public TC3Client() { hModule = WinAPI.NativeMethods.LoadLibrary("TCStruct3Lib"); if (hModule == IntPtr.Zero) throw new Exception("Unable to Load the TCStruct3Lib.dll Library!"); dDebugOutputCallback = new DebugOutputCallbackDelegate(DebugOutputCallback); dStandardOutputCallback = new StandardOutputCallbackDelegate(StandardOutputCallback); dSetDebugCallback = NativeMethods.GetDelegateFromFunctionPointer<SetDebugOutputCallbackDelegate>(hModule, "SetDebugOutputCallback"); dFreeDebugCallback = NativeMethods.GetDelegateFromFunctionPointer<FreeDebugOutputCallbackDelegate>(hModule, "FreeDebugOutputCallback"); dSetStandardCallback = NativeMethods.GetDelegateFromFunctionPointer<SetStandardOutputCallbackDelegate>(hModule, "SetStandardOutputCallback"); dFreeStandardCallback = NativeMethods.GetDelegateFromFunctionPointer<FreeStandardOutputCallbackDelegate>(hModule, "FreeStandardOutputCallback"); dCreateCPointerInfo = NativeMethods.GetDelegateFromFunctionPointer<CreateCPointerInfoClassObjectDelegate>(hModule, "CreateCPointerInfoClassObject"); dCreateCPointerInfoExtended = NativeMethods.GetDelegateFromFunctionPointer<CreateCPointerInfoClassObjectExtendedDelegate>(hModule, "CreateCPointerInfoClassObjectExtended"); dFreeCPointerInfo = NativeMethods.GetDelegateFromFunctionPointer<FreeCPointerInfoClassObjectDelegate>(hModule, "FreeCPointerInfoClassObject"); dCreateCPointerVariable = NativeMethods.GetDelegateFromFunctionPointer<CreateCPointerVariableClassObjectDelegate>(hModule, "CreateCPointerVariableClassObject"); dFreeCPointerVariable = NativeMethods.GetDelegateFromFunctionPointer<FreeCPointerVariableClassObjectDelegate>(hModule, "FreeCPointerVariableClassObject"); lolfart = NativeMethods.GetDelegateFromFunctionPointer<CSSTestDel>(hModule, "CSSTest"); }
public TC3Client() { hModule = WinAPI.NativeMethods.LoadLibrary("TCStruct3Lib"); if (hModule == IntPtr.Zero) { throw new Exception("Unable to Load the TCStruct3Lib.dll Library!"); } dDebugOutputCallback = new DebugOutputCallbackDelegate(DebugOutputCallback); dStandardOutputCallback = new StandardOutputCallbackDelegate(StandardOutputCallback); dSetDebugCallback = NativeMethods.GetDelegateFromFunctionPointer <SetDebugOutputCallbackDelegate>(hModule, "SetDebugOutputCallback"); dFreeDebugCallback = NativeMethods.GetDelegateFromFunctionPointer <FreeDebugOutputCallbackDelegate>(hModule, "FreeDebugOutputCallback"); dSetStandardCallback = NativeMethods.GetDelegateFromFunctionPointer <SetStandardOutputCallbackDelegate>(hModule, "SetStandardOutputCallback"); dFreeStandardCallback = NativeMethods.GetDelegateFromFunctionPointer <FreeStandardOutputCallbackDelegate>(hModule, "FreeStandardOutputCallback"); dCreateCPointerInfo = NativeMethods.GetDelegateFromFunctionPointer <CreateCPointerInfoClassObjectDelegate>(hModule, "CreateCPointerInfoClassObject"); dCreateCPointerInfoExtended = NativeMethods.GetDelegateFromFunctionPointer <CreateCPointerInfoClassObjectExtendedDelegate>(hModule, "CreateCPointerInfoClassObjectExtended"); dFreeCPointerInfo = NativeMethods.GetDelegateFromFunctionPointer <FreeCPointerInfoClassObjectDelegate>(hModule, "FreeCPointerInfoClassObject"); dCreateCPointerVariable = NativeMethods.GetDelegateFromFunctionPointer <CreateCPointerVariableClassObjectDelegate>(hModule, "CreateCPointerVariableClassObject"); dFreeCPointerVariable = NativeMethods.GetDelegateFromFunctionPointer <FreeCPointerVariableClassObjectDelegate>(hModule, "FreeCPointerVariableClassObject"); lolfart = NativeMethods.GetDelegateFromFunctionPointer <CSSTestDel>(hModule, "CSSTest"); }