On 04/23/2010 02:29 PM, Duncan Parsons wrote: > > Yep - PostMessage is asynchronous communication, SendMessage is > synchronous. A useful analogy would be Post as UDP, Send as TCP. > > As Lazarus does not provide any help on these RTL functions but the call parameters, the only available documentation seems to be by Microsoft and same is not overridden by the RTL/LCL developers:
> > The *SendMessage* function sends the specified message to a window or > windows. It calls the window procedure for the specified window and > does not return until the window procedure has processed the message. > > > The* PostMessage* function 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 I have no idea how (in Windows OS) the "window procedure for the specified window" behaves, if it's a window of a different process and same is a Delphi program that uses "procedure ... message". > AFAIR, WM_COPYDATA is the only message that can ONLY use SendMessage, > since the pointer is only guaranteed valid during the transaction (well, > initiator dependant, of course!) In Windows, it makes no sense to send messages like EM_LINEFROMCHAR with PostMessage, as they are used to request a result from the receiver that comes as the SendMessage function value, while PostMessage does not have a function value other than true or false. Do you suggest that the memory array the pointer defines and the pointer itself automatically is managed to be valid for the receiver ? -Michael
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
