Strange error returned by 'PostThreadMessage'...
From: Nadav (anonymous_at_discussions.microsoft.com)
Date: 05/24/04
- Next message: Jon: "Mixing Mananged and Unmanaged in an Unmanaged class"
- Previous message: Chris P. [MVP]: "Re: Bandwidth Management..."
- Next in thread: William DePalo [MVP VC++]: "Re: Strange error returned by 'PostThreadMessage'..."
- Reply: William DePalo [MVP VC++]: "Re: Strange error returned by 'PostThreadMessage'..."
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 24 May 2004 15:31:05 -0700
Hi,
I have encountered a strange problem: while using PostThreadMessage to communicate between threads of different processes, PostThreadMessage returns "The message can be used only with synchronous operations" (1159), I didn't find any documentation discussing this error in details, does anyone has a clue??? What am I doing wrong here? Why should PostThreadMessage return this kind of error?
Following is the code used to post the message:
int iSendCnt = 10;
while(--iSendCnt > 0 && 0 == PostThreadMessage(dwDebuggerMsgThreadID, 1, 2300, 0))
Sleep(0);
NOTE that the thread referred to by 'dwDebuggerMsgThreadID' has a
message pump: while(0 != GetMessage(&msg, NULL, 0, 0)) { ........ }
Thanks,
Nadav
- Next message: Jon: "Mixing Mananged and Unmanaged in an Unmanaged class"
- Previous message: Chris P. [MVP]: "Re: Bandwidth Management..."
- Next in thread: William DePalo [MVP VC++]: "Re: Strange error returned by 'PostThreadMessage'..."
- Reply: William DePalo [MVP VC++]: "Re: Strange error returned by 'PostThreadMessage'..."
- Messages sorted by: [ date ] [ thread ]