locked
Usage of WndProc for receiving message from skype c# RRS feed

  • Question

  • i am trying hard to capture & save skype conversation to file. i go through this tutorial http://galratner.com/blogs/net/archive/2011/08/27/how-to-record-skype-voice-conversations.aspx also download wpf based the source code which i run and got the success.

    i follow the everything but my application is not working. the main problem is regarding receiving message from skype through WndProc() function. my WndProc() function is calling only once but the application which i download there i saw their WndProc() function is calling repeatedly for getting message from skype. i am trying for long time to capture the skype conversation but still no luck.

    i already post few questions for capturing the skype conversation in this forum but not getting no expected clue. here i attach the link of my win application and that is https://onedrive.live.com/#cid=C4A6F16F34D7540A&id=C4A6F16F34D7540A!126 just download the skypecalltest and run it and definitely notice that WndProc() function is calling repeatedly for getting message from skype.

    here is my WndProc() body

    protected override void WndProc(ref Message m)
            {
                Boolean handled = false;
                if (m.Msg == NativeCalls.APIAttach && (uint)m.LParam == NativeCalls.SKYPECONTROLAPI_ATTACH_SUCCESS)
                {
                    // Get the current handle to the Skype window
                    NativeCalls.HWND_BROADCAST = m.WParam;
                    handled = true;
                    m.Result = new IntPtr(1);
                }
    
                // Skype sends our program messages using WM_COPYDATA. the data is in lParam
                if (m.Msg == NativeCalls.WM_COPYDATA && m.WParam == NativeCalls.HWND_BROADCAST)
                {
                    COPYDATASTRUCT data = (COPYDATASTRUCT) Marshal.PtrToStructure(m.LParam, typeof(COPYDATASTRUCT));
                    StatusTextBox.Items.Add(data.lpData + Environment.NewLine);
    
                    // Check for connection
                    //if (data.lpData.IndexOf("CONNSTATUS ONLINE") > -1)
                    //    ConnectButton.IsEnabled = false;
    
                    // Check for calls
                    IsCallInProgress(data.lpData);
                    handled = true;
                    m.Result = new IntPtr(1);
                }
                m.Result = IntPtr.Zero;
    
                if (handled) DefWndProc(ref m); else base.WndProc(ref m);
    
            }

    please please help me to capture the problem and guide me where i need to rectify as a result WndProc() should work as expected. thanks

    • Moved by Barry Wang Friday, April 25, 2014 5:36 AM
    Thursday, April 24, 2014 8:37 AM

Answers

  • Hi Mou_Kolkata,

    Since you are trying to get Skype conversation which used Skype API, it is out for support from C# forum and you have to post on below forum:
    http://community.skype.com/t5/English/ct-p/English?profile.language=en

    Regards,



    Barry Wang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Just Karl Friday, April 25, 2014 4:04 PM
    • Marked as answer by Just Karl Thursday, May 15, 2014 8:41 PM
    Friday, April 25, 2014 5:36 AM

All replies

  • Hi Mou_Kolkata,

    Since you are trying to get Skype conversation which used Skype API, it is out for support from C# forum and you have to post on below forum:
    http://community.skype.com/t5/English/ct-p/English?profile.language=en

    Regards,



    Barry Wang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Just Karl Friday, April 25, 2014 4:04 PM
    • Marked as answer by Just Karl Thursday, May 15, 2014 8:41 PM
    Friday, April 25, 2014 5:36 AM
  • you have misunderstanding for my requirement. without using skype API we can record skype conversation. i asked here about WndProc function which is not working as expected.

    here i am attaching a link from where you know that without using skype api we can capture & save skype conversation.....here is the url http://skypeautorecorder.codeplex.com/

    if you run the apps skypeautorecorder then you can see that this app can record & save skype conversation when you start interact with skype.

    so please read my problem and tell me how to sort it. thanks

    Saturday, April 26, 2014 6:39 PM
  • You either need to ask in the Skype community or ask the person you got the code from.

    Karl


    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

    Thursday, May 15, 2014 8:42 PM