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); }
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); }
public SkypeAttachEventArgs(SkypeAttachStatus theAttachStatus) { AttachStatus = theAttachStatus; }
public SkypeAttachEventArgs(SkypeAttachStatus attacheStatus) { AttachStatus = attacheStatus; }