public VirtualUI() : base() { if (LibHandle != IntPtr.Zero) { IntPtr pAddressOfFunctionToCall = GetProcAddress(LibHandle, "DllGetInstance"); GetInstance = (funcGetInstance)Marshal.GetDelegateForFunctionPointer( pAddressOfFunctionToCall, typeof(funcGetInstance)); GetInstance(ref m_VirtualUI); virtualUIEventSink = new VirtualUISink(this); connectionPointContainer = (System.Runtime.InteropServices.ComTypes.IConnectionPointContainer)m_VirtualUI; Guid virtualUIEventsInterfaceId = typeof(IEvents).GUID; connectionPointContainer.FindConnectionPoint(ref virtualUIEventsInterfaceId, out connectionPoint); if (connectionPoint != null) connectionPoint.Advise((IEvents)virtualUIEventSink, out connectionCookie); } m_BrowserInfo = new BrowserInfo(m_VirtualUI); m_DevServer = new DevServer(m_VirtualUI); if (!g_virtualUIExists) { g_virtualUIExists = true; g_virtualUI = new VirtualUI(); } }
public Server() : base() { if (LibHandle != IntPtr.Zero) { IntPtr pAddressOfFunctionToCall = GetProcAddress(LibHandle, "DllGetInstance"); GetInstance = (funcGetInstance)Marshal.GetDelegateForFunctionPointer( pAddressOfFunctionToCall, typeof(funcGetInstance)); GetInstance(ref m_Server); } }