Help - Search - Members - Calendar
Full Version: A Big Problem.Why ?
Skype Community > English > Development, Betas and Skype Garage > Skype Public API
Tear.Sun_
crying.png
when i sendmessage(broadcast,skypehandle,myhandle,o)
i can connect with skype,but i only can receive one message. and then the skype will cut off my message pipe and i will not send any message to skype.when i sendmessage(......) the return value is always flase.
Why?????
i am sure the message and the handle is not null;
who can tell me why or what's wrong with me??????
i used mfc6.0 and XPsp2 professinal.
thank you !!!
rtxleh_
Do you return 1 when processing WM_COPYDATA?

Also, Skype displays various debug messages. Use DebugView (http://www.sysinternals.com/Utilities/DebugView.html) to view them.

Leo Havmøller.
Tear.Sun_
if i send wm_copydata just when i receive the message "skypecontrolapiattach" the return value is TRUE.
but another time i send the message the return is always FALSE.
why ??
thank you!!
rtxleh_
Yes, but do you return 1 when receiving/processing WM_COPYDATA in your application?

Leo Havmøller.
Tear.Sun_
yes.i can get only one message from skype.
Tear.Sun_
[2332] TMainUserList.BufferedPaint (w=133, h=94) took 145 ms (9 ms + 135 ms + 1 ms)
[2332] TMainUserList.BufferedPaint (w=134, h=15) took 24 ms (11 ms + 12 ms + 271 us)
[2332] [18:22:25] Invoking CheckAPIClient
[2332] GetDialogBackground took 14 ms
[2332] GetDialogBackground took 25 ms
[2332] GetDialogBackground took 15 ms
[2332] TDialogBackground.BufferedPaint (w=466, h=325) took 45 ms (21 ms + 331 us + 23 ms)
[2332] [18:22:26] OUT>USER markliux LASTONLINETIMESTAMP 1148466145 (0 ms)
[2332] [18:22:28] Client attached, hwnd = 2885056, name = D:sunskypenew5.13.11.04(成功)Debugsxh_newskype2.exe
[2332] [18:22:28] MessageTransport.Send failed, SMTO = 1, SendResult = 0, Message = "USERSTATUS ONLINE"
[2332] [18:22:28] OUT>USERSTATUS ONLINE (0 ms)
[2332] [18:22:28] Client detached, hwnd = 2885056, name = D:sunskypenew5.13.11.04(成功)Debugsxh_newskype2.exe
[2332] [18:22:28] TControlAPIClient: shutdown
[2332] [18:22:28] Client "D:sunskypenew5.13.11.04(成功)Debugsxh_newskype2.exe" destroyed
[2332] [18:22:28] IN>set userstatus offline



thank you for your tools!!!
and can you tell me what's wrong in my program.
[/quote]
TheUberOverlord
For starters the command is "SET USERSTATUS ONLINE" you forgot the SET, it looks like you might also not be responding to error messages properly, because you should have received "ERROR 2 Unknown command" in your trace, from skype because the "SET" was missing.

Here is what I get doing the same using the utility listed below:

CODE


!!! Pending authorization

!!! Try connect now (API available); issue #connect

!!! Connected; to terminate issue #disconnect

Message from Skype(0): CURRENTUSERHANDLE theuberoverlord

Message from Skype(0): USERSTATUS ONLINE



USER STATUS AWAY

Message from Skype(0): ERROR 2 Unknown command



If you dropped that message on the floor Skype would disconnect you. You also should have logic in place that if Skype did disconnect you, you auto-reconnect.

Try using this small utlity to see what the message flow should be like:

http://forum.skype.com/viewtopic.php?t=54549

Also please read this:

https://developer.skype.com/Docs/ApiDoc/Usi..._API_on_Windows

Quote:


If the API client spends more than 1 second processing a message, the connection is disconnected. Use the PING command to test the connection status. To ease debugging during development, in regedit enter the key APITimeoutDisabled (DWORD value, 0 = timeout enabled 1 = timeout disabled) into the HKCUSoftwareSkypePhoneUI file in the registry to override the 1 second timeout.


It Would seem because you did not repond to the error message, Skype disconnected you.

Look at the source of the utility I gave a link and see what the message loop does, you can view it also when it runs. At least this gives you something to compare too.
Tear.Sun_
thank you for your help .its fine now.
TheUberOverlord
[quote=Tear.Sun]thank you for your help .its fine now.[/quote]

You are very welcome, Glad it is working now smile.png
最小的大巨人
mfc with a dialog .


i have set the registry key to disabled the timeout.
but it still not work .

i only can accept skype msg once .

i got the problem is we should return 1 at wndproc .

thanks
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.