private async void Window_Loaded(object sender, RoutedEventArgs e) { WSAData dummy = new WSAData(); m_socketAccessable = NativeMethods.WSAStartup(0x0202, ref dummy) == 0; try { ThreadPool.SetMinThreads(15, 10); mCaptureManager = new CaptureManager("CaptureManager.dll"); } catch (System.Exception exc) { try { mCaptureManager = new CaptureManager(); } catch (System.Exception exc1) { } } if (mCaptureManager == null) { return; } XmlDataProvider lXmlDataProvider = (XmlDataProvider)this.Resources["XmlLogProvider"]; if (lXmlDataProvider == null) { return; } System.Xml.XmlDocument doc = new System.Xml.XmlDocument(); string lxmldoc = await mCaptureManager.getCollectionOfSourcesAsync(); if (string.IsNullOrEmpty(lxmldoc)) { return; } doc.LoadXml(lxmldoc); lXmlDataProvider.Document = doc; mIEVRStreamControl = await mCaptureManager.createEVRStreamControlAsync(); mSourceControl = await mCaptureManager.createSourceControlAsync(); }
public static extern Int32 WSAStartup(short wVersionRequested, ref WSAData wsaData);