Re: Hang on send WM_COPYDATA
How are you calling SendMessage ?
Re: Hang on send WM_COPYDATA
This way.
::SendMessage(hWnd, WM_COPYDATA, (WPARAM)m_hWnd, (LPARAM)©data);
I think the problem is no thread call GetMessage.
but how can i create a thread to call?
Re: Hang on send WM_COPYDATA
I am kinda confused. I understand your theory of not having messagepump.. but SendMessage shouldn't be needing the queue at all. It should directly call the wndproc. I am trying to find any info on MSDN that says if it is necessary for a message pump to be there for the wndproc to be called
Re: Hang on send WM_COPYDATA
When a worker thread sends a message to a window, the SendMessage function queues up the message for the window.
If SendMessage is called from the same thread that owns the window, the message is never queued;
Obviously, I call SendMessage from diffrent thread.
Re: Hang on send WM_COPYDATA
As one of the jobs of the dll , you could spawn a thread and create a window and a message pump in it..
BTW, have you thought about other forms of IPC ?
Re: Hang on send WM_COPYDATA
I have found some other way to do the same thing.
thanks. : )