Skype Raw API (NOT COM API) send message problem
- by Mike Trader
In converting this CONSOLE example to a full windows dialog implementation I have run into a very "simple problem". SendMessage() (line 283) is returning zero,
GetLastError reveals 0x578 - Invalid window handle.
http://read.pudn.com/downloads51/sourcecode/windows/multimedia/175678/msgapitest.cpp__.htm
(https://developer.skype.com/Download/Sample...example_win.zip)
C++ 2005 Studio express edition instructions
http://forum.skype.com/index.php?showtopic=54549
The previous call using HWND_BROADCAST works and Skype replies as expected, so I know Skype is installed and working properly.
The handle I use is the wParam value from the Skype Reply message, as in the code. This is non zero, but I am not sure if there is a way to test it other than with SendMessage.
The compiled app from this C++ code example (see zip download) does actually work so I am stumped. I do encode the message with UTF8, and I create an instance of the COPYDATASTRUCT in my app, populate it then call SendMessage() with the COPYDATASTRUCT pointer in lparam. Skype does not respond nor does it obey. Am I missing something obvious here?