Esempio n. 1
0
        public bool Command(string theCommand)
        {
            Platform.CopyDataStruct aCDS = new Platform.CopyDataStruct();

            aCDS.ID     = "1";
            aCDS.Data   = theCommand;
            aCDS.Length = aCDS.Data.Length + 1;

            IntPtr result;
            IntPtr aRetVal = Platform.SendMessageTimeout(mySkypeHandle, Platform.WM_COPYDATA, Handle, ref aCDS, Platform.SendMessageTimeoutFlags.SMTO_NORMAL, 100, out result);

            return(aRetVal != IntPtr.Zero);
        }
Esempio n. 2
0
        public bool Command(string theCommand)
        {
            Platform.CopyDataStruct aCDS = new Platform.CopyDataStruct();

            aCDS.ID = "1";
            aCDS.Data = theCommand;
            aCDS.Length = aCDS.Data.Length + 1;

            IntPtr result;
            IntPtr aRetVal = Platform.SendMessageTimeout(mySkypeHandle, Platform.WM_COPYDATA, Handle, ref aCDS, Platform.SendMessageTimeoutFlags.SMTO_NORMAL, 100, out result);

            return (aRetVal != IntPtr.Zero);
        }
Esempio n. 3
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);
        }
Esempio n. 4
0
        protected bool DoCommand(string theCommand)
        {
            if (SkypeCommand != null)
            {
                SkypeCommand(this, new SkypeCommandEventArgs(theCommand));
            }


            Platform.CopyDataStruct aCDS = new Platform.CopyDataStruct();

            aCDS.ID     = "1";
            aCDS.Data   = theCommand;
            aCDS.Length = aCDS.Data.Length + 1;

            IntPtr result;
            IntPtr aRetVal = Platform.SendMessageTimeout(mySkypeHandle, Platform.WM_COPYDATA, Handle, ref aCDS, Platform.SendMessageTimeoutFlags.SMTO_NORMAL, 100, out result);

            return(aRetVal != IntPtr.Zero);
        }
Esempio n. 5
0
        protected bool DoCommand(string theCommand)
        {
            if (SkypeCommand != null)
                SkypeCommand(this, new SkypeCommandEventArgs(theCommand));

            Platform.CopyDataStruct aCDS = new Platform.CopyDataStruct();

            aCDS.ID = "1";
            aCDS.Data = theCommand;
            aCDS.Length = aCDS.Data.Length + 1;

            IntPtr result;
            IntPtr aRetVal = Platform.SendMessageTimeout(mySkypeHandle, Platform.WM_COPYDATA, Handle, ref aCDS, Platform.SendMessageTimeoutFlags.SMTO_NORMAL, 100, out result);

            return (aRetVal != IntPtr.Zero);
        }