/// <summary> /// Initializes a new instance of the ConnectionManager class. /// </summary> /// <remarks> /// <list type="table"><listheader><term>Platforms Supported</term><description></description></listheader> /// <item><term>Windows Mobile</term><description>Windows Mobile 2003 and later</description></item> /// <item><term>Windows Embedded Compact</term><description>Windows Embedded Compact 6.0 and later, Windows Embedded NavReady 2009</description></item> /// </list> /// </remarks> public ConnectionManager() { messageWindow = new ConnectionManagerMessageWindow(this); connectionInfo = new CONNMGR_CONNECTIONINFO(); connectionInfo.cbSize = Marshal.SizeOf(connectionInfo); connectionInfo.dwFlags = CONNMGR_FLAG.NO_ERROR_MSGS; connectionInfo.dwParams = CONNMGR_PARAM.GUIDDESTNET; connectionInfo.dwPriority = ConnectionPriority.HighPriorityBackground; connectionInfo.hWnd = messageWindow.Hwnd; connectionInfo.uMsg = ConnectionManagerMessageWindow.WM_ConnectionManager; }
internal static extern int EstablishConnectionSync(ref CONNMGR_CONNECTIONINFO pConnInfo, out IntPtr phConnection, int dwTimeout, out ConnectionStatus pdwStatus);
internal static extern int EstablishConnection(ref CONNMGR_CONNECTIONINFO pConnInfo, out IntPtr phConnection);