/// <summary> /// Register the OnSent callback method /// </summary> /// <param name="aCallback">The callback method</param> public static void RegisterOnSentCallback(TPipeClientSentCallback aCallback) { // Store the delegate to prevent GC cscb = aCallback; // Get the delegate pointer IntPtr pcscb = Marshal.GetFunctionPointerForDelegate(cscb); // Create the method object to hold the call PipeMethod methodObj = new PipeMethod() { code = pcscb, data = IntPtr.Zero }; // Register the callback with the DLL RegisterOnPipeClientSentCallback(methodObj); }
private static extern void RegisterOnPipeServerSentCallback(PipeMethod aCallback);
private static extern void RegisterOnPipeClientSentCallback(PipeMethod aCallback);
private static extern void RegisterOnPipeServerDisconnectCallback(PipeMethod aCallback);