From: Kursat on 11 Jun 2010 06:51 Hi, I call DeleteTimerQueueTimer function in timer callback function. My first question is "is that safe?" Assuming that there is no problem, I pass NULL for CompletionEvent parameter so that the function does not block. So far so good, but because I call DeleteTimerQueueTimer function in timer callback function it should return FALSE and GetLastError () should return ERROR_IO_PENDING stating that the callback function is running. This happens most of the times but sometimes the function returns TRUE as if the timer callback function has completed. This behavior is strange because I call DeleteTimerQueueTimer inside timer callback function. Do you have any idea about what goes wrong? Thanks in advance
From: Leo Davidson on 11 Jun 2010 10:01 On Jun 11, 11:51 am, Kursat <Kur...(a)discussions.microsoft.com> wrote: > I pass NULL for CompletionEvent parameter > so that the function does not block. I don't know if it's relevant to what you are seeing but you're supposed to pass INVALID_HANDLE_VALUE for the CompletionEvent if you don't want it to block. ( http://msdn.microsoft.com/en-us/library/ms682569%28VS.85%29.aspx ) Unfortunately, INVALID_HANDLE_VALUE and NULL are not the same. It's something to be careful of because some functions use one while others use the other for their handles/results.
|
Pages: 1 Prev: Wildcat! Live Exchange V1.0e Available Next: IoConnectInterrupt - STATUS_INVALID_PARAMETER |