/// <summary> /// Asyncronously connects to network. /// </summary> public void Connect() { ConnMgrConnectionInfo info = new ConnMgrConnectionInfo(id, ConnMgrPriority.UserInteractive); ConnMgrEstablishConnection(info, ref handle); if (timer != null) { timer.Dispose(); } timer = new Timer(new TimerCallback(CheckState), null, 100, 800); }
private static extern int ConnMgrEstablishConnectionSync(ConnMgrConnectionInfo connectionInfo, ref IntPtr connectionHandle, uint dwTimeout, ref Status dwStatus);
private static extern int ConnMgrEstablishConnection(ConnMgrConnectionInfo connectionInfo, ref IntPtr connectionHandle);