SendMessage and PostMessage of parameter passing in C #

When the message transmission system used PostMessage, SendNotifyMessage, SendMessageCallback asynchronous function, etc., can not be used in the argument pointers, since the sender does not process returns to waiting for messages, the recipient can not deal with the pointer has been released. 



5, Windows 2000 / XP, each message queue can hold up to 10,000 Post 
news, exceeded not been processed will not be processed, directly lost. This value can be improved much more: [HKEY_LOCAL_MACHINE / SOFTWARE / 
in the Microsoft / Windows NT / CurrentVersion / Windows] USERPostMessageLimit, the minimum can be 
4000. 

PostMessage is only responsible for the message on the message queue, not sure when and whether to process 

SendMessage to wait by the return code for message processing (DWord type) before continuing 

PostMessage returns immediately after execution 

SendMessage must not return until after the message is processed. 

The following example will be explained by a different small parameter passing under these two methods:

Reproduced in: https: //www.cnblogs.com/kevinGao/archive/2011/10/30/2231524.html

Guess you like

Origin blog.csdn.net/weixin_34010949/article/details/93376155