Пример #1
0
        protected override void WndProc(ref Message m)
        {
            UInt32 aMsg = (UInt32)m.Msg;

            if (aMsg == UM_SkypeControlAPIAttach)
            {
                SkypeAttachStatus anAttachStatus = (SkypeAttachStatus)m.LParam;

                if (anAttachStatus == SkypeAttachStatus.Success)
                {
                    mySkypeHandle = m.WParam;
                }

                if (SkypeAttach != null)
                {
                    SkypeAttach(this, new SkypeAttachEventArgs(anAttachStatus));
                }

                m.Result = new IntPtr(1);
                return;
            }

            if (aMsg == WM.COPYDATA)
            {
                if (m.WParam == mySkypeHandle)
                {
                    CopyDataStruct aCDS = (CopyDataStruct)m.GetLParam(typeof(CopyDataStruct));

                    /*object ddd = m.GetLParam((typeof(Platform.CopyDataStruct)));
                    *  string sss = ddd.ToString();
                    *  Platform.CopyDataStruct aCDS = (Platform.CopyDataStruct)ddd;*/
                    //string aResponse = aCDS.Data;
                    string aResponse = "Data: " + aCDS.Data + " SkypeHandle: " + mySkypeHandle + " HWnd: " + m.HWnd.ToString();

                    if (SkypeResponse != null)
                    {
                        SkypeResponse(this, new SkypeResponseEventArgs(aResponse));
                    }

                    m.Result = new IntPtr(1);
                    return;
                }
                else
                {
                    object ddd = m.GetLParam((typeof(CopyDataStruct)));
                }
            }

            base.WndProc(ref m);
        }
Пример #2
0
        protected override void WndProc(ref Message m)
        {
            UInt32 aMsg = (UInt32)m.Msg;



            if (aMsg == UM_SkypeControlAPIAttach)
            {
                SkypeAttachStatus anAttachStatus = (SkypeAttachStatus)m.LParam;

                if (anAttachStatus == SkypeAttachStatus.AutorizacionExitosa)
                {
                    mySkypeHandle = m.WParam;
                }

                if (SkypeAttach != null)
                {
                    SkypeAttach(this, new SkypeAttachEventArgs(anAttachStatus));
                }

                m.Result = new IntPtr(1);
                return;
            }

            if (aMsg == Platform.WM_COPYDATA)
            {
                if (m.WParam == mySkypeHandle)
                {
                    Platform.CopyDataStruct aCDS = (Platform.CopyDataStruct)m.GetLParam(typeof(Platform.CopyDataStruct));
                    string aResponse             = aCDS.Data;

                    if (SkypeResponse != null)
                    {
                        SkypeResponse(this, new SkypeResponseEventArgs(aResponse));
                    }


                    m.Result = new IntPtr(1);
                    return;
                }
            }


            base.WndProc(ref m);
        }
Пример #3
0
 public SkypeAttachEventArgs(SkypeAttachStatus theAttachStatus)
 {
     AttachStatus = theAttachStatus;
 }
Пример #4
0
 public SkypeAttachEventArgs(SkypeAttachStatus theAttachStatus)
 {
     AttachStatus = theAttachStatus;
 }
Пример #5
0
 public SkypeAttachEventArgs(SkypeAttachStatus attacheStatus)
 {
     AttachStatus = attacheStatus;
 }