static extern void KM_dotnet_Interop_GCodeInterpreter_Set_G_USER_CALLBACK(IntPtr handle, KM_GCodeInterpreterUserCallbackHandler handler);
示例#2
0
 /// <summary>
 /// Sets the internal Interpreter User Callback callback for the GcodeInterpreter.cpp object
 /// Separate delegate for this callback prevents the Garbage Collector from releasing the 
 /// unmanaged function pointer from being destroyed
 /// </summary>
 private void Set_G_USER_CALLBACK()
 {
     try
     {
         InterpreterUserCallbackRequestedHandler = new KM_GCodeInterpreterUserCallbackHandler(OnInterpreterUserCallbackRequested);
         KM_dotnet_Interop_GCodeInterpreter_Set_G_USER_CALLBACK(_InstanceHandle, InterpreterUserCallbackRequestedHandler);
     }
     catch (DllNotFoundException e)
     {
         throw new DMException(this, e, String.Format("Dll Not Found Exception thrown :  Caller - [{0}] :: Member - [{1}]",
             this.ToString(), "Set_G_USER_CALLBACK"));
     }
     catch (EntryPointNotFoundException e)
     {
         throw new DMException(this, e, String.Format("Entry Point Not Found Exception thrown :  Caller - [{0}] :: Member - [{1}]",
            this.ToString(), "Set_G_USER_CALLBACK"));
     }
     catch (Exception e)
     {
         throw new DMException(this, e, String.Format("General Exception thrown :  Caller - [{0}] :: Member - [{1}]",
           this.ToString(), "Set_G_USER_CALLBACK"));
     }
 }
 static extern void KM_dotnet_Interop_GCodeInterpreter_Set_G_USER_CALLBACK(IntPtr handle, KM_GCodeInterpreterUserCallbackHandler handler);