接收器窗口无法通过Windows

时间:2015-08-02 11:36:33

标签: sendmessage postmessage window-messages

void SendDataFromWorkerThread(HWND句柄)

{

 int *x = new int(10);

 ::PostMessage(handle, user_defined_message_id, 0, (LPARAM)x);

}

在不同的线程上接收..

void GetDataFromWorkerThread(WPARAM wparam,LPARAM lparam)

{

int *x = (int*) lparam;

// But it does not give the right data.
// It gives 0 at that memory address.
//( Also memory Address pointed by lparam is different from what was sent)

}

我的应用程序是单线程,我将一些工作委托(返回一些数据,高于x值" 10")到工作线程。 我正在收到消息但不是数据。

0 个答案:

没有答案