public void EndGetProtocolInfo(IntPtr aAsyncHandle, out String aSource, out String aSink) { uint code; string desc; if (Invocation.Error(aAsyncHandle, out code, out desc)) { throw new ProxyError(code, desc); } uint index = 0; aSource = Invocation.OutputString(aAsyncHandle, index++); aSink = Invocation.OutputString(aAsyncHandle, index++); }
private void GetProtocolInfoComplete(IntPtr aAsyncHandle) { lock (this) { if (DateTime.Now >= iActionPollStopTime) { return; } iConnMgr.BeginGetProtocolInfo(GetProtocolInfoComplete); try { string source; string sink; iConnMgr.EndGetProtocolInfo(aAsyncHandle, out source, out sink); iActionCount++; if (sink == null && iExpectedSink != null) { Console.Write("Expected " + iExpectedSink + "\n...got (null)\n"); } else { if (iExpectedSink == null) { iExpectedSink = sink; } else if (sink != iExpectedSink) { Console.Write("Expected " + iExpectedSink + "\n...got " + sink + "\n"); } } } catch (ControlPoint.ProxyError) { } } }