进程,线程间消息函数。
Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
BOOL WINAPI PostMessage( _In_opt_ HWND hWnd, _In_ UINT Msg, _In_ WPARAM wParam, _In_ LPARAM lParam);
Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.
LRESULT WINAPI SendMessage( _In_ HWND hWnd, _In_ UINT Msg, _In_ WPARAM wParam, _In_ LPARAM lParam );Sends the specified message to a window or windows. If the window was created by the calling thread, SendNotifyMessage calls the window procedure for the window and does not return until the window procedure has processed the message. If the window was created by a different thread, SendNotifyMessage passes the message to the window procedure and returns immediately; it does not wait for the window procedure to finish processing the message.
BOOL WINAPI SendNotifyMessage( _In_ HWND hWnd, _In_ UINT Msg, _In_ WPARAM wParam, _In_ LPARAM lParam );Posts a message to the message queue of the specified thread. It returns without waiting for the thread to process the message.
BOOL WINAPI PostThreadMessage( _In_ DWORD idThread, _In_ UINT Msg, _In_ WPARAM wParam, _In_ LPARAM lParam );附加参数可以使用wParam,lParam,一般通过指针传递大量的参数。send属于同步,一般不会有什么问题。
post属于异步,在发送方动态申请内存,接收方使用时候释放内存。