private static void LoadDynamicFunctions() { LibK_GetVersion = (LibK_GetVersionDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LibK_GetVersion"), typeof (LibK_GetVersionDelegate)); LibK_GetContext = (LibK_GetContextDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LibK_GetContext"), typeof (LibK_GetContextDelegate)); LibK_SetContext = (LibK_SetContextDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LibK_SetContext"), typeof (LibK_SetContextDelegate)); LibK_SetCleanupCallback = (LibK_SetCleanupCallbackDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LibK_SetCleanupCallback"), typeof (LibK_SetCleanupCallbackDelegate)); LibK_LoadDriverAPI = (LibK_LoadDriverAPIDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LibK_LoadDriverAPI"), typeof (LibK_LoadDriverAPIDelegate)); LibK_CopyDriverAPI = (LibK_CopyDriverAPIDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LibK_CopyDriverAPI"), typeof (LibK_CopyDriverAPIDelegate)); LibK_GetProcAddress = (LibK_GetProcAddressDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LibK_GetProcAddress"), typeof (LibK_GetProcAddressDelegate)); LibK_SetDefaultContext = (LibK_SetDefaultContextDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LibK_SetDefaultContext"), typeof (LibK_SetDefaultContextDelegate)); LibK_GetDefaultContext = (LibK_GetDefaultContextDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LibK_GetDefaultContext"), typeof (LibK_GetDefaultContextDelegate)); LibK_Context_Init = (LibK_Context_InitDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LibK_Context_Init"), typeof (LibK_Context_InitDelegate)); LibK_Context_Free = (LibK_Context_FreeDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LibK_Context_Free"), typeof (LibK_Context_FreeDelegate)); UsbK_Free = (UsbK_FreeDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "UsbK_Free"), typeof (UsbK_FreeDelegate)); LstK_Init = (LstK_InitDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LstK_Init"), typeof (LstK_InitDelegate)); LstK_InitEx = (LstK_InitExDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LstK_InitEx"), typeof (LstK_InitExDelegate)); LstK_Free = (LstK_FreeDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LstK_Free"), typeof (LstK_FreeDelegate)); LstK_Enumerate = (LstK_EnumerateDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LstK_Enumerate"), typeof (LstK_EnumerateDelegate)); LstK_Current = (LstK_CurrentDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LstK_Current"), typeof (LstK_CurrentDelegate)); LstK_MoveNext = (LstK_MoveNextDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LstK_MoveNext"), typeof (LstK_MoveNextDelegate)); LstK_MoveReset = (LstK_MoveResetDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LstK_MoveReset"), typeof (LstK_MoveResetDelegate)); LstK_FindByVidPid = (LstK_FindByVidPidDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LstK_FindByVidPid"), typeof (LstK_FindByVidPidDelegate)); LstK_Count = (LstK_CountDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LstK_Count"), typeof (LstK_CountDelegate)); HotK_Init = (HotK_InitDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "HotK_Init"), typeof (HotK_InitDelegate)); HotK_Free = (HotK_FreeDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "HotK_Free"), typeof (HotK_FreeDelegate)); HotK_FreeAll = (HotK_FreeAllDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "HotK_FreeAll"), typeof (HotK_FreeAllDelegate)); OvlK_Acquire = (OvlK_AcquireDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "OvlK_Acquire"), typeof (OvlK_AcquireDelegate)); OvlK_Release = (OvlK_ReleaseDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "OvlK_Release"), typeof (OvlK_ReleaseDelegate)); OvlK_Init = (OvlK_InitDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "OvlK_Init"), typeof (OvlK_InitDelegate)); OvlK_Free = (OvlK_FreeDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "OvlK_Free"), typeof (OvlK_FreeDelegate)); OvlK_GetEventHandle = (OvlK_GetEventHandleDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "OvlK_GetEventHandle"), typeof (OvlK_GetEventHandleDelegate)); OvlK_Wait = (OvlK_WaitDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "OvlK_Wait"), typeof (OvlK_WaitDelegate)); OvlK_WaitOldest = (OvlK_WaitOldestDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "OvlK_WaitOldest"), typeof (OvlK_WaitOldestDelegate)); OvlK_WaitOrCancel = (OvlK_WaitOrCancelDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "OvlK_WaitOrCancel"), typeof (OvlK_WaitOrCancelDelegate)); OvlK_WaitAndRelease = (OvlK_WaitAndReleaseDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "OvlK_WaitAndRelease"), typeof (OvlK_WaitAndReleaseDelegate)); OvlK_IsComplete = (OvlK_IsCompleteDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "OvlK_IsComplete"), typeof (OvlK_IsCompleteDelegate)); OvlK_ReUse = (OvlK_ReUseDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "OvlK_ReUse"), typeof (OvlK_ReUseDelegate)); StmK_Init = (StmK_InitDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "StmK_Init"), typeof (StmK_InitDelegate)); StmK_Free = (StmK_FreeDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "StmK_Free"), typeof (StmK_FreeDelegate)); StmK_Start = (StmK_StartDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "StmK_Start"), typeof (StmK_StartDelegate)); StmK_Stop = (StmK_StopDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "StmK_Stop"), typeof (StmK_StopDelegate)); StmK_Read = (StmK_ReadDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "StmK_Read"), typeof (StmK_ReadDelegate)); StmK_Write = (StmK_WriteDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "StmK_Write"), typeof (StmK_WriteDelegate)); IsoK_Init = (IsoK_InitDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "IsoK_Init"), typeof (IsoK_InitDelegate)); IsoK_Free = (IsoK_FreeDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "IsoK_Free"), typeof (IsoK_FreeDelegate)); IsoK_SetPackets = (IsoK_SetPacketsDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "IsoK_SetPackets"), typeof (IsoK_SetPacketsDelegate)); IsoK_SetPacket = (IsoK_SetPacketDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "IsoK_SetPacket"), typeof (IsoK_SetPacketDelegate)); IsoK_GetPacket = (IsoK_GetPacketDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "IsoK_GetPacket"), typeof (IsoK_GetPacketDelegate)); IsoK_EnumPackets = (IsoK_EnumPacketsDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "IsoK_EnumPackets"), typeof (IsoK_EnumPacketsDelegate)); IsoK_ReUse = (IsoK_ReUseDelegate) Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "IsoK_ReUse"), typeof (IsoK_ReUseDelegate)); }
private static void LoadDynamicFunctions() { LibK_LoadDriverAPI = (LibK_LoadDriverAPIDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LibK_LoadDriverAPI"), typeof(LibK_LoadDriverAPIDelegate)); LstK_InitEx = (LstK_InitExDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LstK_InitEx"), typeof(LstK_InitExDelegate)); LstK_MoveNext = (LstK_MoveNextDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(mModuleLibusbK, "LstK_MoveNext"), typeof(LstK_MoveNextDelegate)); }