Click here to Skip to main content
16,007,687 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to change display properties of a computer through code? Pin
Sameer_Thakur18-Jun-07 1:09
Sameer_Thakur18-Jun-07 1:09 
Questionsend number to speaker Pin
SYS-MAN16-Jun-07 22:17
SYS-MAN16-Jun-07 22:17 
AnswerRe: send number to speaker Pin
azonenberg17-Jun-07 7:54
azonenberg17-Jun-07 7:54 
QuestionThreads and mutexes Pin
Cyrilix16-Jun-07 21:43
Cyrilix16-Jun-07 21:43 
AnswerRe: Threads and mutexes Pin
Matthew Faithfull17-Jun-07 0:45
Matthew Faithfull17-Jun-07 0:45 
GeneralRe: Threads and mutexes Pin
Cyrilix17-Jun-07 7:02
Cyrilix17-Jun-07 7:02 
GeneralRe: Threads and mutexes Pin
Matthew Faithfull17-Jun-07 10:11
Matthew Faithfull17-Jun-07 10:11 
GeneralRe: Threads and mutexes [modified] Pin
Cyrilix17-Jun-07 11:25
Cyrilix17-Jun-07 11:25 
If I understand QueueUserAPC() correctly, what it does is attach a function that needs to be executed to a thread currently executing WaitForSingleObjectEx(), and then if that thread can be be signaled (bAlertable = TRUE), tells that thread "break out of your wait, execute my function, and then continue execution at the line right after the wait".

Is that more or less what it means?

Allow me to ask another question in parallel (no pun intended Big Grin | :-D ):

Are there any CriticalSection-like or Mutex-like objects that can be released from any thread (doesn't have to be the thread that currently owns the CS or Mutex) without giving an error and failing to release?

MODIFIED:
It seems to me, for my second question, that CreateEvent would be the ideal solution for objects that can be waited upon, and that can be changed. Now this makes me think... why would I use a mutex (lots of overhead), or a critical section (a bit of overhead), when I can just use an event that is more flexible (allows me to signal/unsignal from any thread)?

MODIFIED AGAIN:
Nevermind, I realize the stupidity of my question, given that events must be manually set / reset, so signaling an event would cause everything waiting on it to pass through (when you only want to let one go through at a time).

-- modified at 19:42 Sunday 17th June, 2007
GeneralRe: Threads and mutexes Pin
Bram van Kampen17-Jun-07 15:00
Bram van Kampen17-Jun-07 15:00 
GeneralRe: Threads and mutexes [modified] Pin
Cyrilix17-Jun-07 16:12
Cyrilix17-Jun-07 16:12 
GeneralRe: Threads and mutexes Pin
Matthew Faithfull17-Jun-07 22:23
Matthew Faithfull17-Jun-07 22:23 
GeneralRe: Threads and mutexes Pin
Bram van Kampen18-Jun-07 13:30
Bram van Kampen18-Jun-07 13:30 
NewsAboubt Barcode printing, VC++ master-hand Come in and help me. Pin
h_boy200816-Jun-07 20:46
h_boy200816-Jun-07 20:46 
AnswerRe: Aboubt Barcode printing, VC++ master-hand Come in and help me. Pin
Matthew Faithfull17-Jun-07 0:38
Matthew Faithfull17-Jun-07 0:38 
GeneralRe: Aboubt Barcode printing, VC++ master-hand Come in and help me. Pin
Matthew Faithfull18-Jun-07 1:44
Matthew Faithfull18-Jun-07 1:44 
Questionmsi setup project Pin
deeps_cute16-Jun-07 20:25
deeps_cute16-Jun-07 20:25 
QuestionFirst-chance exception ... access violation ... pointer issue Pin
moonraker92816-Jun-07 20:18
moonraker92816-Jun-07 20:18 
AnswerRe: First-chance exception ... access violation ... pointer issue Pin
Hans Dietrich16-Jun-07 20:33
mentorHans Dietrich16-Jun-07 20:33 
GeneralRe: First-chance exception ... access violation ... pointer issue Pin
moonraker92816-Jun-07 21:48
moonraker92816-Jun-07 21:48 
GeneralRe: First-chance exception ... access violation ... pointer issue Pin
Bram van Kampen18-Jun-07 13:38
Bram van Kampen18-Jun-07 13:38 
AnswerRe: First-chance exception ... access violation ... pointer issue Pin
Stephen Hewitt17-Jun-07 12:51
Stephen Hewitt17-Jun-07 12:51 
GeneralRe: First-chance exception ... access violation ... pointer issue Pin
Bram van Kampen18-Jun-07 13:49
Bram van Kampen18-Jun-07 13:49 
Questiondrawing 2D in C++ Pin
moonraker92816-Jun-07 19:33
moonraker92816-Jun-07 19:33 
AnswerRe: drawing 2D in C++ Pin
Cyrilix16-Jun-07 21:41
Cyrilix16-Jun-07 21:41 
GeneralRe: drawing 2D in C++ Pin
moonraker92816-Jun-07 22:01
moonraker92816-Jun-07 22:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.