Beispiel #1
0
        /// <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);
        }
Beispiel #2
0
 private static extern void RegisterOnPipeServerSentCallback(PipeMethod aCallback);
Beispiel #3
0
 private static extern void RegisterOnPipeClientSentCallback(PipeMethod aCallback);
Beispiel #4
0
 private static extern void RegisterOnPipeServerDisconnectCallback(PipeMethod aCallback);