Shoutbox

StartVideo - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Skype & Live Messenger (/forumdisplay.php?fid=10)
+----- Thread: StartVideo (/showthread.php?tid=28455)

StartVideo by CMI on 07-10-2004 at 06:34 PM

Has anyone been able to call StartVideo? I haven't been able to do it through IMessenger in a plug-in written in VB, or directly in VC++ 7. The method always returns S_OK, MSN Messenger opens an IM Window, but the invite isn't sent.

StartVoice works as expected, and I can send a video invite by clicking on the video button (which it does not appear I can fudge with through SendMessage as most of the IM window is just one big object...)

http://www.msnfanatic.com/forums/index.php?showtopic=9888&st=0&


RE: StartVideo by Stigmata on 07-12-2004 at 10:14 AM

code:
Private msn As MessengerAPI.Messenger

Private Sub Command1_Click()
msn.StartVideo "contact@hotmail.com"
End Sub

Private Sub Form_Load()
Private WithEvents msn As MessengerAPI.Messenger
End Sub


RE: RE: StartVideo by CMI on 07-12-2004 at 03:04 PM

quote:
Originally posted by jackass_wanabe
code:
Private msn As MessengerAPI.Messenger

Private Sub Command1_Click()
msn.StartVideo "contact@hotmail.com"
End Sub

Private Sub Form_Load()
Private WithEvents msn As MessengerAPI.Messenger
End Sub



I've tried that and it doesn't work.
RE: RE: StartVideo by CMI on 07-12-2004 at 04:38 PM

quote:
Originally posted by TheBlasphemer
If you have the IMWindowClass HWND, you can send a WM_COMMAND,
To find out with what arguments, just open Spy++, log messages from IMWindowClass,
go in the menu -> actions -> Send my Webcam, and see what arguments WM_COMMAND had...

hope that helps, TB


Yes, this is my current solution, but I think its a bit sloppy. I thought that I must have just been doing something incorectly, but I recieve no errors and everyone suggests the same code I'm using. Its just plain weird.
RE: StartVideo by CMI on 07-14-2004 at 02:33 AM

Since I'm such a nice guy, I figure I'll help all you people out if you were having StartVideo problems (with this and Messenger 6). No, it still doesn't work, but it doesn't have to. We will be sending a WM_COMMAND message to the IM window, making it think we pressed "Alt+w".

IM windows are made of two parts: The outer window, and a inner object which holds of the entire IM window's contents, not including the menu. You cannot try and send keypresses to the Video button because, guess what, the button doesn't exist! Its simulated.

Even though the the webcam button and menu (note the underscore under w when you hold down Alt) is in the inner object, and not visibly present in the outer window, pressing Alt+W to send a webcam invite is an outer IM window thing. This means getting the handle to that window is enough.

code:
Set imWindow = IMessengerObject.StartVideo(sContact) 'imWindow.HWND is a long containing the hWnd of the new window

After some careful Spy++ing, I can see that the lParam for WM_COMMAND we need to use is 9D57, or 0x9D57, or &H9D57, depending on the language and notation of choice. All we need to do is send this to the IM window using the SendMessage API call. In VB6, it looks like this:

code:
SendMessage imWindow.hwnd, WM_COMMAND, &H9D57, 0

Its so painfully simple, isn't it? Of course, I'm still pretty pissed that IMessenger2.StartVideo doesn't work. Oh well. I should have known.


Edit: In case you didn't notice, this was suggested above, but I initially overlooked the proper value to send to the window, and belive I should be sending things to the inner window.
RE: StartVideo by Destajador on 03-25-2005 at 11:08 PM

Ok StartVoice or Video are the cmds

And the event fired by this in the Client msn is????

i'm thinking i need first use the MessengerPrivate Library to get this event, is this is On_Accepted fired from Invite:from the remote user, some one test this??

I'dont see the event from the session in the Api library, this is an object containig the Voice_Acepted_Call ???