quick question

  • Thread starter Thread starter jtman
  • Start date Start date
J

jtman

Hello
I am trying to send text to another application
I tried using SendMessage / WM_SETTEXT ...but to no avail could you help me
out here?
thanks for any help
 
SendMessage ((HWND)hwnd,WM_SETTEXT,(WPARAM) length,
(LPARAM) szText);

is used for sending text to a Window, not an application.

If you want to send a string or other variables to an
applicaltion, then look up the the arguments of Main()
in C# and try using on of the following functions to
call your program :

_spawn (); or _wspawn();
_exec (); or _wexec();

James Sexton
 
JtMan,

As James notes, WM_SETTEXT is for setting a Window's text (whatever that
means to the targeted window). If you want to send data to an application
you have several choices. Try looking into the following...

WM_COPYDATA
WM_APP
DDE
Mail Slots
Named Pipes
Clipboard
RPC
COM/DCOM


Hope this helps.

-MerkX
 
Back
Top