Сделал обертку для HidApi от signal11
Все исходники лежат https://github.com/Dadlick/hidapi
Сюда приложу скомпилированные библиотеки под Windows, Linux, Arm Linux и исходники на purebasic.
Архив: HidApi_purebasic.zip
Модуль для работы с USB HID (Windows, Linux, Arm Linux)
Сообщений 1 страница 7 из 7
Поделиться106.12.2022 14:15:52
Поделиться209.12.2022 18:58:53
В процедуре Procedure.s Wchar_tToStr(*Mem) у меня не оказалось константы #PB_ByteLength.
Но вот это в тесте вобще буксануло как понял Hidapi_Library = GetCurrentDirectory() + "hidapi.dll"
CompilerSelect #PB_Compiler_OS CompilerCase #PB_OS_Windows Hidapi_Library = GetCurrentDirectory() + "hidapi.dll" Debug Hidapi_Library CompilerCase #PB_OS_Linux Hidapi_Library = GetCurrentDirectory() + "libhidapi.so" CompilerEndSelect
Так как дллка в другой папке,соответственно требуется не только линукс и винду указать но и разрядность операционки и сразу определять папку с длл.
а так придётся к исходнику кидать в одну папку.
Поделиться309.12.2022 19:18:15
После правки вышеуказанного открылось пустое окно,видимо из за того что в процедуре Procedure hid_enum()
первый же вызов *devs= hid_enumerate(0,0) сразу в ауте(как видимо и другие будут),так как в .pbi только прототипы и процедуры без загрузки их с дллки.
Поделиться409.12.2022 20:55:08
Подправил загрузку процедур с длл так(без макроса)
И сразу такой результат что изначально мышь неотображает а как внешнию карту звуковую вставляю так сразу и мышь и её показывает в окне.
;{;Загрузка,выгрузка длл PrototypeC.l hid_open(vendor_id.c, product_id.c,*serial_number) PrototypeC.l hid_open_path(*path) PrototypeC.i hid_write(*device, *Data, length.i) PrototypeC.i hid_read(*device, *Data, length.i) PrototypeC.i hid_read_timeout(*device, *Data, length.i, milliseconds.i ) PrototypeC hid_close(*device) PrototypeC.l hid_enumerate(vendor_id.u, product_id.u) PrototypeC.i hid_send_feature_report(*device, *Data, length.i) PrototypeC.i hid_get_feature_report(*device, *Data, length.i) PrototypeC.i hid_get_manufacturer_string(*device, *string, maxlen.i) PrototypeC.i hid_get_product_string(*device, *string, maxlen.i) PrototypeC.i hid_get_serial_number_string(*device, *string, maxlen.i) PrototypeC.i hid_get_indexed_string(*device, *string, maxlen.i) PrototypeC.l hid_error(*device) PrototypeC.l hid_enum_path(devs.l) PrototypeC.u hid_enum_vendor_id(devs.l) PrototypeC.u hid_enum_product_id(devs.l) PrototypeC.l hid_enum_serial_number(devs.l) PrototypeC.u hid_enum_release_number(devs.l) PrototypeC.l hid_enum_manufacturer_string(devs.l) PrototypeC.l hid_enum_product_string(devs.l) PrototypeC.l hid_enum_next(devs.l) PrototypeC.i hid_wchart_size() PrototypeC hid_free_enumeration(devs.l) PrototypeC.i hid_set_nonblocking(*device, nonblock.i) Global hid_open.hid_open Global hid_open_path.hid_open_path Global hid_write.hid_write Global hid_read.hid_read Global hid_read_timeout.hid_read_timeout Global hid_close.hid_close Global hid_enumerate.hid_enumerate Global hid_free_enumeration.hid_free_enumeration Global hid_set_nonblocking.hid_set_nonblocking Global hid_send_feature_report.hid_send_feature_report Global hid_get_feature_report.hid_get_feature_report Global hid_get_manufacturer_string.hid_get_manufacturer_string Global hid_get_product_string.hid_get_product_string Global hid_get_serial_number_string.hid_get_serial_number_string Global hid_get_indexed_string.hid_get_indexed_string Global hid_error.hid_error Global hid_enum_path.hid_enum_path Global hid_enum_vendor_id.hid_enum_vendor_id Global hid_enum_product_id.hid_enum_product_id Global hid_enum_serial_number.hid_enum_serial_number Global hid_enum_release_number.hid_enum_release_number Global hid_enum_manufacturer_string.hid_enum_manufacturer_string Global hid_enum_product_string.hid_enum_product_string Global hid_enum_next.hid_enum_next Global hid_wchart_size.hid_wchart_size Global hid_dll.i Procedure Hidapi_Free_Library() CloseLibrary(hid_dll) EndProcedure Procedure.i Hidapi_Load_Library() Protected Hidapi_Library.s CompilerSelect #PB_Compiler_OS CompilerCase #PB_OS_Windows Hidapi_Library = GetCurrentDirectory() + "hidapi.dll" CompilerCase #PB_OS_Linux Hidapi_Library = GetCurrentDirectory() + "libhidapi.so" CompilerEndSelect If Hidapi_Library ="" Debug "Failed to load hidapi" End EndIf ; hid_dll = OpenLibrary(#PB_Any, Hidapi_Library) If hid_dll<>0 hid_open.hid_open=GetFunction(hid_dll,"hid_open") hid_open_path.hid_open_path=GetFunction(hid_dll,"hid_open_path") hid_write.hid_write=GetFunction(hid_dll,"hid_write") hid_read.hid_read=GetFunction(hid_dll,"hid_read") hid_read_timeout.hid_read_timeout=GetFunction(hid_dll,"hid_read_timeout") hid_close.hid_close=GetFunction(hid_dll,"hid_close") hid_enumerate.hid_enumerate=GetFunction(hid_dll,"hid_enumerate") hid_free_enumeration.hid_free_enumeration=GetFunction(hid_dll,"hid_free_enumeration") hid_set_nonblocking.hid_set_nonblocking=GetFunction(hid_dll,"hid_set_nonblocking") hid_send_feature_report.hid_send_feature_report=GetFunction(hid_dll,"hid_send_feature_report") hid_get_feature_report.hid_get_feature_report=GetFunction(hid_dll,"hid_get_feature_report") hid_get_manufacturer_string.hid_get_manufacturer_string=GetFunction(hid_dll,"hid_get_manufacturer_string") hid_get_product_string.hid_get_product_string=GetFunction(hid_dll,"hid_get_product_string") hid_get_serial_number_string.hid_get_serial_number_string=GetFunction(hid_dll,"hid_get_serial_number_string") hid_get_indexed_string.hid_get_indexed_string=GetFunction(hid_dll,"hid_get_indexed_string") hid_error.hid_error=GetFunction(hid_dll,"hid_error") hid_enum_path.hid_enum_path=GetFunction(hid_dll,"hid_enum_path") hid_enum_vendor_id.hid_enum_vendor_id=GetFunction(hid_dll,"hid_enum_vendor_id") hid_enum_product_id.hid_enum_product_id=GetFunction(hid_dll,"hid_enum_product_id") hid_enum_serial_number.hid_enum_serial_number=GetFunction(hid_dll,"hid_enum_serial_number") hid_enum_release_number.hid_enum_release_number=GetFunction(hid_dll,"hid_enum_release_number") hid_enum_manufacturer_string.hid_enum_manufacturer_string=GetFunction(hid_dll,"hid_enum_manufacturer_string") hid_enum_product_string.hid_enum_product_string=GetFunction(hid_dll,"hid_enum_product_string") hid_enum_next.hid_enum_next=GetFunction(hid_dll,"hid_enum_next") hid_wchart_size.hid_wchart_size=GetFunction(hid_dll,"hid_wchart_size") ProcedureReturn #True Else MessageRequester("ERROR", "hid_dll не загружена") End ;ProcedureReturn #False EndIf EndProcedure ;};
И в тесте сразу на загрузку процедур
XIncludeFile "HidApi.pbi" Hidapi_Load_Library()
ps:как я понял на саму дллку нет исходников на гитхабе?
Отредактировано Sergeihik (10.12.2022 00:09:20)
Поделиться511.12.2022 00:41:26
как я понял на саму дллку нет исходников на гитхабе?
Все есть на гитхабе, исходники на dll windows, лежат в папке windows
Поделиться623.12.2022 17:12:40
Тема интересна мне но как я созрею? упор сделал на трее гаджете самописном,так как стандартный не отрабатывает скорость работы,а я хочу в рамках диалогового окна получить результат всех устройств(возможно и их характеристики)а после уже сделать выбор устройства для дальнейших действии и общения с ним.
PS:как я понял гллянув мельком(да и о чём выше писал) получение списка устойств на githab самописное а не библиотека(ки) hid из WinDDK?
Поделиться723.12.2022 17:25:47
Мои из наработоки.
;{;Setupapi Import "C:\Users\d\Desktop\Redactor_coda\hid\hid_dll\setupapi.lib" CMP_GetBlockedDriverInfo() CMP_GetServerSideDeviceInstallFlags() CMP_Init_Detection() CMP_RegisterNotification() CMP_Report_LogOn() CMP_UnregisterNotification() CMP_WaitNoPendingInstallEvents() CMP_WaitServicesAvailable() CM_Add_Driver_PackageW() CM_Add_Empty_Log_Conf() CM_Add_Empty_Log_Conf_Ex() CM_Add_IDA() CM_Add_IDW() CM_Add_ID_ExA() CM_Add_ID_ExW() CM_Add_Range() CM_Add_Res_Des() CM_Add_Res_Des_Ex() CM_Apply_PowerScheme() CM_Connect_MachineA() CM_Connect_MachineW() CM_Create_DevNodeA() CM_Create_DevNodeW() CM_Create_DevNode_ExA() CM_Create_DevNode_ExW() CM_Create_Range_List() CM_Delete_Class_Key() CM_Delete_Class_Key_Ex() CM_Delete_DevNode_Key() CM_Delete_DevNode_Key_Ex() CM_Delete_Device_Interface_KeyA() CM_Delete_Device_Interface_KeyW() CM_Delete_Device_Interface_Key_ExA() CM_Delete_Device_Interface_Key_ExW() CM_Delete_Driver_PackageW() CM_Delete_PowerScheme(a, b) CM_Delete_Range() CM_Detect_Resource_Conflict() CM_Detect_Resource_Conflict_Ex() CM_Disable_DevNode() CM_Disable_DevNode_Ex() CM_Disconnect_Machine() CM_Dup_Range_List() CM_Duplicate_PowerScheme(a, b, c) CM_Enable_DevNode() CM_Enable_DevNode_Ex() CM_Enumerate_Classes() CM_Enumerate_Classes_Ex() CM_Enumerate_EnumeratorsA() CM_Enumerate_EnumeratorsW() CM_Enumerate_Enumerators_ExA() CM_Enumerate_Enumerators_ExW() CM_Find_Range() CM_First_Range() CM_Free_Log_Conf() CM_Free_Log_Conf_Ex() CM_Free_Log_Conf_Handle() CM_Free_Range_List() CM_Free_Res_Des() CM_Free_Res_Des_Ex() CM_Free_Res_Des_Handle() CM_Free_Resource_Conflict_Handle() CM_Get_Child() CM_Get_Child_Ex() CM_Get_Class_Key_NameA() CM_Get_Class_Key_NameW() CM_Get_Class_Key_Name_ExA() CM_Get_Class_Key_Name_ExW() CM_Get_Class_NameA() CM_Get_Class_NameW() CM_Get_Class_Name_ExA() CM_Get_Class_Name_ExW() CM_Get_Class_Registry_PropertyA() CM_Get_Class_Registry_PropertyW() CM_Get_Depth() CM_Get_Depth_Ex() CM_Get_DevNode_Custom_PropertyA() CM_Get_DevNode_Custom_PropertyW() CM_Get_DevNode_Custom_Property_ExA() CM_Get_DevNode_Custom_Property_ExW() CM_Get_DevNode_Registry_PropertyA() CM_Get_DevNode_Registry_PropertyW() CM_Get_DevNode_Registry_Property_ExA() CM_Get_DevNode_Registry_Property_ExW() CM_Get_DevNode_Status() CM_Get_DevNode_Status_Ex() CM_Get_Device_IDA() CM_Get_Device_IDW() CM_Get_Device_ID_ExA() CM_Get_Device_ID_ExW() CM_Get_Device_ID_ListA() CM_Get_Device_ID_ListW() CM_Get_Device_ID_List_ExA() CM_Get_Device_ID_List_ExW() CM_Get_Device_ID_List_SizeA() CM_Get_Device_ID_List_SizeW() CM_Get_Device_ID_List_Size_ExA() CM_Get_Device_ID_List_Size_ExW() CM_Get_Device_ID_Size() CM_Get_Device_ID_Size_Ex() CM_Get_Device_Interface_AliasA() CM_Get_Device_Interface_AliasW() CM_Get_Device_Interface_Alias_ExA() CM_Get_Device_Interface_Alias_ExW() CM_Get_Device_Interface_ListA() CM_Get_Device_Interface_ListW() CM_Get_Device_Interface_List_ExA() CM_Get_Device_Interface_List_ExW() CM_Get_Device_Interface_List_SizeA() CM_Get_Device_Interface_List_SizeW() CM_Get_Device_Interface_List_Size_ExA() CM_Get_Device_Interface_List_Size_ExW() CM_Get_First_Log_Conf() CM_Get_First_Log_Conf_Ex() CM_Get_Global_State() CM_Get_Global_State_Ex() CM_Get_HW_Prof_FlagsA() CM_Get_HW_Prof_FlagsW() CM_Get_HW_Prof_Flags_ExA() CM_Get_HW_Prof_Flags_ExW() CM_Get_Hardware_Profile_InfoA() CM_Get_Hardware_Profile_InfoW() CM_Get_Hardware_Profile_Info_ExA() CM_Get_Hardware_Profile_Info_ExW() CM_Get_Log_Conf_Priority() CM_Get_Log_Conf_Priority_Ex() CM_Get_Next_Log_Conf() CM_Get_Next_Log_Conf_Ex() CM_Get_Next_Res_Des() CM_Get_Next_Res_Des_Ex() CM_Get_Parent() CM_Get_Parent_Ex() CM_Get_Res_Des_Data() CM_Get_Res_Des_Data_Ex() CM_Get_Res_Des_Data_Size() CM_Get_Res_Des_Data_Size_Ex() CM_Get_Resource_Conflict_Count() CM_Get_Resource_Conflict_DetailsA() CM_Get_Resource_Conflict_DetailsW() CM_Get_Sibling() CM_Get_Sibling_Ex() CM_Get_Version() CM_Get_Version_Ex() CM_Import_PowerScheme(a, b, c) CM_Install_DevNodeW() CM_Install_DevNode_ExW() CM_Intersect_Range_List() CM_Invert_Range_List() CM_Is_Dock_Station_Present() CM_Is_Dock_Station_Present_Ex() CM_Is_Version_Available() CM_Is_Version_Available_Ex() CM_Locate_DevNodeA() CM_Locate_DevNodeW() CM_Locate_DevNode_ExA() CM_Locate_DevNode_ExW() CM_Merge_Range_List() CM_Modify_Res_Des() CM_Modify_Res_Des_Ex() CM_Move_DevNode() CM_Move_DevNode_Ex() CM_Next_Range() CM_Open_Class_KeyA() CM_Open_Class_KeyW() CM_Open_Class_Key_ExA() CM_Open_Class_Key_ExW() CM_Open_DevNode_Key() CM_Open_DevNode_Key_Ex() CM_Open_Device_Interface_KeyA() CM_Open_Device_Interface_KeyW() CM_Open_Device_Interface_Key_ExA() CM_Open_Device_Interface_Key_ExW() CM_Query_And_Remove_SubTreeA() CM_Query_And_Remove_SubTreeW() CM_Query_And_Remove_SubTree_ExA() CM_Query_And_Remove_SubTree_ExW() CM_Query_Arbitrator_Free_Data() CM_Query_Arbitrator_Free_Data_Ex() CM_Query_Arbitrator_Free_Size() CM_Query_Arbitrator_Free_Size_Ex() CM_Query_Remove_SubTree() CM_Query_Remove_SubTree_Ex() CM_Query_Resource_Conflict_List() CM_Reenumerate_DevNode() CM_Reenumerate_DevNode_Ex() CM_Register_Device_Driver() CM_Register_Device_Driver_Ex() CM_Register_Device_InterfaceA() CM_Register_Device_InterfaceW() CM_Register_Device_Interface_ExA() CM_Register_Device_Interface_ExW() CM_Remove_SubTree() CM_Remove_SubTree_Ex() CM_Request_Device_EjectA() CM_Request_Device_EjectW() CM_Request_Device_Eject_ExA() CM_Request_Device_Eject_ExW() CM_Request_Eject_PC() CM_Request_Eject_PC_Ex() CM_RestoreAll_DefaultPowerSchemes(a) CM_Restore_DefaultPowerScheme(a, b) CM_Run_Detection() CM_Run_Detection_Ex() CM_Set_ActiveScheme(a, b) CM_Set_Class_Registry_PropertyA() CM_Set_Class_Registry_PropertyW() CM_Set_DevNode_Problem() CM_Set_DevNode_Problem_Ex() CM_Set_DevNode_Registry_PropertyA() CM_Set_DevNode_Registry_PropertyW() CM_Set_DevNode_Registry_Property_ExA() CM_Set_DevNode_Registry_Property_ExW() CM_Set_HW_Prof() CM_Set_HW_Prof_Ex() CM_Set_HW_Prof_FlagsA() CM_Set_HW_Prof_FlagsW() CM_Set_HW_Prof_Flags_ExA() CM_Set_HW_Prof_Flags_ExW() CM_Setup_DevNode() CM_Setup_DevNode_Ex() CM_Test_Range_Available() CM_Uninstall_DevNode() CM_Uninstall_DevNode_Ex() CM_Unregister_Device_InterfaceA() CM_Unregister_Device_InterfaceW() CM_Unregister_Device_Interface_ExA() CM_Unregister_Device_Interface_ExW() CM_Write_UserPowerKey(a, b, c, d, e, f, g, h) DoesUserHavePrivilege(a) DriverStoreAddDriverPackageA(a, b, c, d, e, f) DriverStoreAddDriverPackageW(a, b, c, d, e, f) DriverStoreDeleteDriverPackageA(a, b, c) DriverStoreDeleteDriverPackageW(a, b, c) DriverStoreEnumDriverPackageA(a, b) DriverStoreEnumDriverPackageW(a, b) DriverStoreFindDriverPackageA(a, b, c, d, e, f, g) DriverStoreFindDriverPackageW(a, b, c, d, e, f, g) ExtensionPropSheetPageProc() InstallCatalog(a, b, c) InstallHinfSection(a, b, c, d) InstallHinfSectionA(a, b, c, d) InstallHinfSectionW() IsUserAdmin() MyFree(a) MyMalloc(a) MyRealloc(a, b) PnpEnumDrpFile(a, b) PnpIsFileAclIntact(a, b) PnpIsFileContentIntact(a, b) PnpIsFilePnpDriver(a, b) PnpRepairWindowsProtectedDriver() SetupAddInstallSectionToDiskSpaceListA(a, b, c, d, e, f) SetupAddInstallSectionToDiskSpaceListW(a, b, c, d, e, f) SetupAddSectionToDiskSpaceListA(a, b, c, d, e, f, g) SetupAddSectionToDiskSpaceListW(a, b, c, d, e, f, g) SetupAddToDiskSpaceListA(a, b, c, d, e, f, g) SetupAddToDiskSpaceListW() SetupAddToSourceListA(a, b) SetupAddToSourceListW(a, b) SetupAdjustDiskSpaceListA(a, b, c, d, e, f) SetupAdjustDiskSpaceListW() SetupBackupErrorA(a, b, c, d, e, f) SetupBackupErrorW(a, b, c, d, e, f) SetupCancelTemporarySourceList() SetupCloseFileQueue() SetupCloseInfFile(a) SetupCloseLog() SetupCommitFileQueue(a, b, c, d) SetupCommitFileQueueA(a, b, c, d) SetupCommitFileQueueW(a, b, c, d) SetupConfigureWmiFromInfSectionA() SetupConfigureWmiFromInfSectionW(a, b, c) SetupCopyErrorA(a, b, c, d, e, f, g, h, i, j, k) SetupCopyErrorW(a, b, c, d, e, f, g, h, i, j, k) SetupCopyOEMInfA() SetupCopyOEMInfW(a, b, c, d, e, f, g, h) SetupCreateDiskSpaceListA(a, b, c) SetupCreateDiskSpaceListW(a, b, c) SetupDecompressOrCopyFileA(a, b, c) SetupDecompressOrCopyFileW(a, b, c) SetupDefaultQueueCallback(a, b, c, d) SetupDefaultQueueCallbackA(a, b, c, d) SetupDefaultQueueCallbackW(a, b, c, d) SetupDeleteErrorA(a, b, c, d, e) SetupDeleteErrorW(a, b, c, d, e) SetupDestroyDiskSpaceList() SetupDiApplyPowerScheme() SetupDiAskForOEMDisk() SetupDiBuildClassInfoList() SetupDiBuildClassInfoListExA() SetupDiBuildClassInfoListExW() SetupDiBuildDriverInfoList(a, b, c) SetupDiCallClassInstaller(a, b, c) SetupDiCancelDriverInfoSearch() SetupDiChangeState() SetupDiClassGuidsFromNameA() SetupDiClassGuidsFromNameExA() SetupDiClassGuidsFromNameExW() SetupDiClassGuidsFromNameW() SetupDiClassNameFromGuidA() SetupDiClassNameFromGuidExA() SetupDiClassNameFromGuidExW(a, b, c, d, e, f) As "SetupDiClassNameFromGuidExW" SetupDiClassNameFromGuidW(a, b, c, d) SetupDiCreateDevRegKeyA() SetupDiCreateDevRegKeyW(a, b, c, d, e, f, g) SetupDiCreateDeviceInfoA(a, b, c, d, e, f, g) SetupDiCreateDeviceInfoList(a, b) SetupDiCreateDeviceInfoListExA(a, b, c, d) SetupDiCreateDeviceInfoListExW(a, b, c, d) SetupDiCreateDeviceInfoW(a, b, c, d, e, f, g) SetupDiCreateDeviceInterfaceA(a, b, c, d, e, f) SetupDiCreateDeviceInterfaceRegKeyA() SetupDiCreateDeviceInterfaceRegKeyW() SetupDiCreateDeviceInterfaceW() SetupDiDeleteDevRegKey() SetupDiDeleteDeviceInfo() SetupDiDeleteDeviceInterfaceData(a, b) SetupDiDeleteDeviceInterfaceRegKey() SetupDiDestroyClassImageList() SetupDiDestroyDeviceInfoList(a) SetupDiDestroyDriverInfoList(a, b, c) SetupDiDrawMiniIcon() SetupDiEnumDeviceInfo(a, b, c) SetupDiEnumDeviceInterfaces(a, b, c, d, e) SetupDiEnumDriverInfoA(a, b, c, d, e) SetupDiEnumDriverInfoW(a, b, c, d, e) SetupDiGetActualModelsSectionA() SetupDiGetActualModelsSectionW(a, b, c, d, e, f) SetupDiGetActualSectionToInstallA(a, b, c, d, e, f) SetupDiGetActualSectionToInstallExA() SetupDiGetActualSectionToInstallExW(a, b, c, d, e, f, g, h) SetupDiGetActualSectionToInstallW(a, b, c, d, e, f) SetupDiGetClassBitmapIndex() SetupDiGetClassDescriptionA() SetupDiGetClassDescriptionExA() SetupDiGetClassDescriptionExW(a, b, c, d, e, f) SetupDiGetClassDescriptionW(a, b, c, d) SetupDiGetClassDevPropertySheetsA() SetupDiGetClassDevPropertySheetsW() SetupDiGetClassDevsA(a, b, c, d) SetupDiGetClassDevsExA(a, b, c, d, e, f, g) SetupDiGetClassDevsExW(a, b, c, d, e, f, g) SetupDiGetClassDevsW(a, b, c, d) SetupDiGetClassImageIndex() SetupDiGetClassImageList() SetupDiGetClassImageListExA() SetupDiGetClassImageListExW() SetupDiGetClassInstallParamsA() SetupDiGetClassInstallParamsW(a, b, c, d, e) SetupDiGetClassPropertyExW(a, b, c, d, e, f, g, h, i) SetupDiGetClassPropertyKeys() SetupDiGetClassPropertyKeysExW(a, b, c, d, e, f, g) SetupDiGetClassPropertyW(a, b, c, d, e, f, g) SetupDiGetClassRegistryPropertyA() SetupDiGetClassRegistryPropertyW(a, b, c, d, e, f) SetupDiGetCustomDevicePropertyA(a, b, c, d, e, f, g, h) SetupDiGetCustomDevicePropertyW() SetupDiGetDeviceInfoListClass() SetupDiGetDeviceInfoListDetailA(a, b) SetupDiGetDeviceInfoListDetailW(a, b) SetupDiGetDeviceInstallParamsA() SetupDiGetDeviceInstallParamsW(a, b, c) SetupDiGetDeviceInstanceIdA() SetupDiGetDeviceInstanceIdW(a, b, c, d, e) SetupDiGetDeviceInterfaceAlias(a, b, c, d) SetupDiGetDeviceInterfaceDetailA(a, b, c, d, e, f) SetupDiGetDeviceInterfaceDetailW(a, b, c, d, e, f) SetupDiGetDeviceInterfacePropertyKeys() SetupDiGetDeviceInterfacePropertyW(a, b, c, d, e, f, g, h) SetupDiGetDevicePropertyKeys() SetupDiGetDevicePropertyW(a, b, c, d, e, f, g, h) SetupDiGetDeviceRegistryPropertyA() SetupDiGetDeviceRegistryPropertyW(a, b, c, d, e, f, g) SetupDiGetDriverInfoDetailA() SetupDiGetDriverInfoDetailW(a, b, c, d, e, f) SetupDiGetDriverInstallParamsA(a, b, c, d) SetupDiGetDriverInstallParamsW(a, b, c, d) SetupDiGetHwProfileFriendlyNameA() SetupDiGetHwProfileFriendlyNameExA() SetupDiGetHwProfileFriendlyNameExW() SetupDiGetHwProfileFriendlyNameW() SetupDiGetHwProfileList() SetupDiGetHwProfileListExA() SetupDiGetHwProfileListExW() SetupDiGetINFClassA() SetupDiGetINFClassW(a, b, c, d, e) SetupDiGetSelectedDevice() SetupDiGetSelectedDriverA(a, b, c) SetupDiGetSelectedDriverW(a, b, c) SetupDiGetWizardPage() SetupDiInstallClassA() SetupDiInstallClassExA() SetupDiInstallClassExW() SetupDiInstallClassW() SetupDiInstallDevice(a, b) SetupDiInstallDeviceInterfaces(a, b) SetupDiInstallDriverFiles(a, b) SetupDiLoadClassIcon() SetupDiLoadDeviceIcon(a, b, c, d, e, f) SetupDiMoveDuplicateDevice(a, b) SetupDiOpenClassRegKey() SetupDiOpenClassRegKeyExA() SetupDiOpenClassRegKeyExW(a, b, c, d, e, f) SetupDiOpenDevRegKey(a, b, c, d, e, f) SetupDiOpenDeviceInfoA(a, b, c, d, e) SetupDiOpenDeviceInfoW(a, b, c, d, e) SetupDiOpenDeviceInterfaceA(a, b, c, d) SetupDiOpenDeviceInterfaceRegKey() SetupDiOpenDeviceInterfaceW(a, b, c, d) SetupDiRegisterCoDeviceInstallers(a, b) SetupDiRegisterDeviceInfo(a, b, c, d, e, f) SetupDiRemoveDevice() SetupDiRemoveDeviceInterface() SetupDiReportAdditionalSoftwareRequested() SetupDiReportDeviceInstallError() SetupDiReportDriverNotFoundError() SetupDiReportDriverPackageImportationError() SetupDiReportGenericDriverInstalled() SetupDiReportPnPDeviceProblem() SetupDiRestartDevices() SetupDiSelectBestCompatDrv(a, b) SetupDiSelectDevice() SetupDiSelectOEMDrv() SetupDiSetClassInstallParamsA() SetupDiSetClassInstallParamsW(a, b, c, d) SetupDiSetClassPropertyExW(a, b, c, d, e, f, g, h) SetupDiSetClassPropertyW() SetupDiSetClassRegistryPropertyA() SetupDiSetClassRegistryPropertyW(a, b, c, d, e, f) SetupDiSetDeviceInstallParamsA() SetupDiSetDeviceInstallParamsW(a, b, c) SetupDiSetDeviceInterfaceDefault() SetupDiSetDeviceInterfacePropertyW() SetupDiSetDevicePropertyW(a, b, c, d, e, f, g) SetupDiSetDeviceRegistryPropertyA() SetupDiSetDeviceRegistryPropertyW(a, b, c, d, e) SetupDiSetDriverInstallParamsA(a, b, c, d) SetupDiSetDriverInstallParamsW(a, b, c, d) SetupDiSetSelectedDevice(a, b) SetupDiSetSelectedDriverA(a, b, c) SetupDiSetSelectedDriverW(a, b, c) SetupDiUnremoveDevice() SetupDuplicateDiskSpaceListA(a, b, c, d) SetupDuplicateDiskSpaceListW() SetupEnumInfSectionsA() SetupEnumInfSectionsW(a, b, c, d, e) SetupEnumPublishedInfA(a, b) SetupEnumPublishedInfW(a, b) SetupFindFirstLineA(a, b, c, d) SetupFindFirstLineW(a, b, c, d, e) SetupFindNextLine(a, b) SetupFindNextMatchLineA(a, b, c) SetupFindNextMatchLineW(a, b, c) SetupFreeSourceListA(a, b) SetupFreeSourceListW() SetupGetBackupInformationA(a, b) SetupGetBackupInformationW(a, b) SetupGetBinaryField() SetupGetFieldCount(a) SetupGetFileCompressionInfoA() SetupGetFileCompressionInfoExA() SetupGetFileCompressionInfoExW() SetupGetFileCompressionInfoW() SetupGetFileQueueCount() SetupGetFileQueueFlags(a, b) SetupGetInfDriverStoreLocationA() SetupGetInfDriverStoreLocationW(a, b, c, d, e, f) SetupGetInfFileListA(a, b, c, d, e) SetupGetInfFileListW(a, b, c, d, e) SetupGetInfInformationA(a, b, c, d, e) SetupGetInfInformationW() SetupGetInfPublishedNameA() SetupGetInfPublishedNameW(a, b, c, d) SetupGetInfSections(a, b, c, d) SetupGetIntField(a, b, c) SetupGetLineByIndexA(a, b, c, d) SetupGetLineByIndexW(a, b) SetupGetLineCountA(a, b) SetupGetLineCountW(a, b, c, d) SetupGetLineTextA() SetupGetLineTextW() SetupGetMultiSzFieldA() SetupGetMultiSzFieldW() SetupGetNonInteractiveMode() SetupGetSourceFileLocationA() SetupGetSourceFileLocationW() SetupGetSourceFileSizeA() SetupGetSourceFileSizeW() SetupGetSourceInfoA() SetupGetSourceInfoW(a, b, c, d, e, f) SetupGetStringFieldA() SetupGetStringFieldW(a, b, c, d, e) SetupGetTargetPathA() SetupGetTargetPathW(a, b, c, d, e, f) SetupGetThreadLogToken() SetupInitDefaultQueueCallback(a) SetupInitDefaultQueueCallbackEx(a, b, c, d, e) SetupInitializeFileLogA(a, b) SetupInitializeFileLogW(a, b) SetupInstallFileA(a, b, c, d, e, f, g, h) SetupInstallFileExA(a, b, c, d, e, f, g, h, i) SetupInstallFileExW(a, b, c, d, e, f, g, h, i) SetupInstallFileW(a, b, c, d, e, f, g, h) SetupInstallFilesFromInfSectionA(a, b, c, d, e, f) SetupInstallFilesFromInfSectionW(a, b, c, d, e, f) SetupInstallFromInfSectionA(a, b, c, d, e, f, g, h, i, j, k) SetupInstallFromInfSectionW(a, b, c, d, e, f, g, h, i, j, k) SetupInstallLogCloseEventGroup(a, b, c) SetupInstallLogCreateEventGroup(a, b, c, d, e) SetupInstallServicesFromInfSectionA(a, b, c) SetupInstallServicesFromInfSectionExA(a, b, c, d, e, f, g) SetupInstallServicesFromInfSectionExW() SetupInstallServicesFromInfSectionW(a, b, c) SetupIterateCabinetA(a, b, c, d) SetupIterateCabinetW(a, b, c, d) SetupLogErrorA() SetupLogErrorW(a, b) SetupLogFileA(a, b, c, d, e, f, g, h, i) SetupLogFileW() SetupOpenAppendInfFileA() SetupOpenAppendInfFileW() SetupOpenFileQueue() SetupOpenInfFileA() SetupOpenInfFileW(a, b, c, d) SetupOpenLog() SetupOpenMasterInf() SetupPrepareQueueForRestoreA(a, b, c) SetupPrepareQueueForRestoreW(a, b, c) SetupPromptForDiskA(a, b, c, d, e, f, g, h, i, j) SetupPromptForDiskW(a, b, c, d, e, f, g, h, i, j) SetupPromptReboot(a, b, c) SetupQueryDrivesInDiskSpaceListA(a, b, c, d) SetupQueryDrivesInDiskSpaceListW(a, b, c, d) SetupQueryFileLogA() SetupQueryFileLogW() SetupQueryInfFileInformationA() SetupQueryInfFileInformationW(a, b, c, d, e) SetupQueryInfOriginalFileInformationA() SetupQueryInfOriginalFileInformationW() SetupQueryInfVersionInformationA() SetupQueryInfVersionInformationW() SetupQuerySourceListA() SetupQuerySourceListW(a, b, c) SetupQuerySpaceRequiredOnDriveA(a, b, c, d, e) SetupQuerySpaceRequiredOnDriveW() SetupQueueCopyA(a, b, c, d, e, f, g, h, i) SetupQueueCopyIndirectA() SetupQueueCopyIndirectW() SetupQueueCopySectionA(a, b, c, d, e, f) SetupQueueCopySectionW(a, b, c, d, e, f) SetupQueueCopyW(a, b, c, d, e, f, g, h, i) SetupQueueDefaultCopyA(a, b, c, d, e, f) SetupQueueDefaultCopyW() SetupQueueDeleteA(a, b, c) SetupQueueDeleteSectionA(a, b, c, d) SetupQueueDeleteSectionW(a, b, c, d) SetupQueueDeleteW(a, b, c) SetupQueueRenameA(a, b, c, d, e) SetupQueueRenameSectionA(a, b, c, d) SetupQueueRenameSectionW(a, b, c, d) SetupQueueRenameW(a, b, c, d, e) SetupRemoveFileLogEntryA(a, b, c) SetupRemoveFileLogEntryW() SetupRemoveFromDiskSpaceListA(a, b, c, d, e) SetupRemoveFromDiskSpaceListW() SetupRemoveFromSourceListA(a, b) SetupRemoveFromSourceListW(a, b) SetupRemoveInstallSectionFromDiskSpaceListA(a, b, c, d, e, f) SetupRemoveInstallSectionFromDiskSpaceListW(a, b, c, d, e, f) SetupRemoveSectionFromDiskSpaceListA(a, b, c, d, e, f, g) SetupRemoveSectionFromDiskSpaceListW(a, b, c, d, e, f, g) SetupRenameErrorA(a, b, c, d, e, f) SetupRenameErrorW(a, b, c, d, e, f) SetupScanFileQueue(a, b, c, d, e, f) SetupScanFileQueueA() SetupScanFileQueueW(a, b, c, d, e, f) SetupSetDirectoryIdA(a, b, c) SetupSetDirectoryIdExA(a, b, c, d, e, f) SetupSetDirectoryIdExW(a, b, c, d, e, f) SetupSetDirectoryIdW(a, b, c) SetupSetFileQueueAlternatePlatformA(a, b, c) SetupSetFileQueueAlternatePlatformW() SetupSetFileQueueFlags() SetupSetNonInteractiveMode(a) SetupSetPlatformPathOverrideA(a) SetupSetPlatformPathOverrideW() SetupSetSourceListA() SetupSetSourceListW() SetupSetThreadLogToken() SetupTermDefaultQueueCallback(a) SetupTerminateFileLog() SetupUninstallNewlyCopiedInfs(a, b, c) SetupUninstallOEMInfA(a, b, c) SetupUninstallOEMInfW() SetupVerifyInfFileA() SetupVerifyInfFileW(a, b, c) SetupWriteTextLog() SetupWriteTextLogError() SetupWriteTextLogInfLine(a, b, c, d, e) UnicodeToMultiByte(a, b) VerifyCatalogFile(a) pGetDriverPackageHash() pSetupAccessRunOnceNodeList() pSetupAddMiniIconToList() pSetupAddTagToGroupOrderListEntry(a, b, c) pSetupAppendPath(a, b, c) pSetupCaptureAndConvertAnsiArg(a, b) pSetupCenterWindowRelativeToParent(a) pSetupCloseTextLogSection() pSetupConcatenatePaths(a, b, c, d) pSetupCreateTextLogSectionA() pSetupCreateTextLogSectionW() pSetupDestroyRunOnceNodeList() pSetupDiBuildInfoDataFromStrongName(a, b, c, d) pSetupDiCrimsonLogDeviceInstall(a, b, c, d, e, f) pSetupDiGetStrongNameForDriverNode(a, b, c, d, e, f) pSetupDiInvalidateHelperModules(a, b, c) pSetupDoLastKnownGoodBackup(a, b) pSetupDoesUserHavePrivilege(a) pSetupDuplicateString(a) pSetupEnablePrivilege(a, b) pSetupFree(a) pSetupGetCurrentDriverSigningPolicy(a) pSetupGetDriverDate(a, b, c) pSetupGetDriverVersion(a, b, c) pSetupGetField(a, b) pSetupGetFileTitle(a) pSetupGetGlobalFlags() pSetupGetIndirectStringsFromDriverInfo() pSetupGetInfSections(a, b, c, d) pSetupGetQueueFlags() pSetupGetRealSystemTime(a) pSetupGuidFromString(a, b) pSetupHandleFailedVerification(a, b, c, d, e, f, g, h, i, j) pSetupInfGetDigitalSignatureInfo() pSetupInfIsInbox() pSetupInfSetDigitalSignatureInfo(a, b, c) pSetupInstallCatalog(a, b, c) pSetupIsBiDiLocalizedSystemEx(a) pSetupIsGuidNull(a) pSetupIsLocalSystem() pSetupIsUserAdmin() pSetupIsUserTrustedInstaller() pSetupLoadIndirectString(a, b, c, d) pSetupMakeSurePathExists(a) pSetupMalloc(a) pSetupModifyGlobalFlags(a, b) pSetupMultiByteToUnicode(a, b) pSetupOpenAndMapFileForRead(a, b, c, d, e) pSetupOutOfMemory(a) pSetupQueryMultiSzValueToArray(a, b, c, d, e, f) pSetupRealloc(a, b) pSetupRegistryDelnode(a, b) pSetupRetrieveServiceConfig(a, b) pSetupSetArrayToMultiSzValue(a, b, c, d, e) pSetupSetDriverPackageRestorePoint(a, b, c) pSetupSetGlobalFlags(a) pSetupSetQueueFlags() pSetupShouldDeviceBeExcluded(a, b, c) pSetupStringFromGuid(a, b, c) pSetupStringTableAddString(a, b, c) pSetupStringTableAddStringEx(a, b, c, d, e) pSetupStringTableDestroy(a) pSetupStringTableDuplicate() pSetupStringTableEnum() pSetupStringTableGetExtraData() pSetupStringTableInitialize() pSetupStringTableInitializeEx(a, b) pSetupStringTableLookUpString() pSetupStringTableLookUpStringEx(a, b, c, d, e) pSetupStringTableSetExtraData(a, b, c, d) pSetupStringTableStringFromId() pSetupStringTableStringFromIdEx() pSetupUnicodeToMultiByte(a, b) pSetupUnmapAndCloseFile(a, b, c) pSetupValidateDriverPackage(a, b, c, d, e, f, g, h, i) pSetupVerifyCatalogFile(a) pSetupVerifyQueuedCatalogs(a) pSetupWriteLogEntry() pSetupWriteLogError(a, b, c) EndImport ;}; ;{;hid dll Prototype HidD_FlushQueue(a) Prototype HidD_FreePreparsedData(a) Prototype HidD_GetAttributes(a, b) Prototype HidD_GetConfiguration(a, b, c) Prototype HidD_GetFeature(a, b, c) Prototype HidD_GetHidGuid(a) Prototype HidD_GetIndexedString(a, b, c, d) Prototype HidD_GetInputReport(a, b, c) Prototype HidD_GetManufacturerString(a, b, c) Prototype HidD_GetMsGenreDescriptor(a, b, c) Prototype HidD_GetNumInputBuffers(a, b) Prototype HidD_GetPhysicalDescriptor(a, b, c) Prototype HidD_GetPreparsedData(a, b) Prototype HidD_GetProductString(a, b, c) Prototype HidD_GetSerialNumberString(a, b, c) Prototype HidD_Hello(a, b) Prototype HidD_SetConfiguration(a, b, c) Prototype HidD_SetFeature(a, b, c) Prototype HidD_SetNumInputBuffers(a, b) Prototype HidD_SetOutputReport(a, b, c) Prototype HidP_GetButtonCaps(a, b, c, d) Prototype HidP_GetCaps(a, b) Prototype HidP_GetData(a, b, c, d, e, f) Prototype HidP_GetExtendedAttributes(a, b, c, d, e) Prototype HidP_GetLinkCollectionNodes(a, b, c) Prototype HidP_GetScaledUsageValue(a, b, c, d, e, f, g, h) Prototype HidP_GetSpecificButtonCaps(a, b, c, d, e, f, g) Prototype HidP_GetSpecificValueCaps(a, b, c, d, e, f, g) Prototype HidP_GetUsageValue(a, b, c, d, e, f, g, h) Prototype HidP_GetUsageValueArray(a, b, c, d, e, f, g, h, i) Prototype HidP_GetUsages(a, b, c, d, e, f, g, h) Prototype HidP_GetUsagesEx(a, b, c, d, e, f, g) Prototype HidP_GetValueCaps(a, b, c, d) Prototype HidP_InitializeReportForID(a, b, c, d, e) Prototype HidP_MaxDataListLength(a, b) Prototype HidP_MaxUsageListLength(a, b, c) Prototype HidP_SetData(a, b, c, d, e, f) Prototype HidP_SetScaledUsageValue(a, b, c, d, e, f, g, h) Prototype HidP_SetUsageValue(a, b, c, d, e, f, g, h) Prototype HidP_SetUsageValueArray(a, b, c, d, e, f, g, h, i) Prototype HidP_SetUsages(a, b, c, d, e, f, g, h) Prototype HidP_TranslateUsagesToI8042ScanCodes(a, b, c, d, e, f) Prototype HidP_UnsetUsages(a, b, c, d, e, f, g, h) Prototype HidP_UsageListDifference(a, b, c, d, e) Global HidD_FlushQueue.HidD_FlushQueue Global HidD_FreePreparsedData.HidD_FreePreparsedData Global HidD_GetAttributes.HidD_GetAttributes Global HidD_GetConfiguration.HidD_GetConfiguration Global HidD_GetFeature.HidD_GetFeature Global HidD_GetHidGuid.HidD_GetHidGuid Global HidD_GetIndexedString.HidD_GetIndexedString Global HidD_GetInputReport.HidD_GetInputReport Global HidD_GetManufacturerString.HidD_GetManufacturerString Global HidD_GetMsGenreDescriptor.HidD_GetMsGenreDescriptor Global HidD_GetNumInputBuffers.HidD_GetNumInputBuffers Global HidD_GetPhysicalDescriptor.HidD_GetPhysicalDescriptor Global HidD_GetPreparsedData.HidD_GetPreparsedData Global HidD_GetProductString.HidD_GetProductString Global HidD_GetSerialNumberString.HidD_GetSerialNumberString Global HidD_Hello.HidD_Hello Global HidD_SetConfiguration.HidD_SetConfiguration Global HidD_SetFeature.HidD_SetFeature Global HidD_SetNumInputBuffers.HidD_SetNumInputBuffers Global HidD_SetOutputReport.HidD_SetOutputReport Global HidP_GetButtonCaps.HidP_GetButtonCaps Global HidP_GetCaps.HidP_GetCaps Global HidP_GetData.HidP_GetData Global HidP_GetExtendedAttributes.HidP_GetExtendedAttributes Global HidP_GetLinkCollectionNodes.HidP_GetLinkCollectionNodes Global HidP_GetScaledUsageValue.HidP_GetScaledUsageValue Global HidP_GetSpecificButtonCaps.HidP_GetSpecificButtonCaps Global HidP_GetSpecificValueCaps.HidP_GetSpecificValueCaps Global HidP_GetUsageValue.HidP_GetUsageValue Global HidP_GetUsageValueArray.HidP_GetUsageValueArray Global HidP_GetUsages.HidP_GetUsages Global HidP_GetUsagesEx.HidP_GetUsagesEx Global HidP_GetValueCaps.HidP_GetValueCaps Global HidP_InitializeReportForID.HidP_InitializeReportForID Global HidP_MaxDataListLength.HidP_MaxDataListLength Global HidP_MaxUsageListLength.HidP_MaxUsageListLength Global HidP_SetData.HidP_SetData Global HidP_SetScaledUsageValue.HidP_SetScaledUsageValue Global HidP_SetUsageValue.HidP_SetUsageValue Global HidP_SetUsageValueArray.HidP_SetUsageValueArray Global HidP_SetUsages.HidP_SetUsages Global HidP_TranslateUsagesToI8042ScanCodes.HidP_TranslateUsagesToI8042ScanCodes Global HidP_UnsetUsages.HidP_UnsetUsages Global HidP_UsageListDifference.HidP_UsageListDifference Procedure.i hid_LoadDLL() Protected hDLL.i hDLL = OpenLibrary(#PB_Any, "C:\Windows\System32\hid.dll") ; Debug hDLL If hDLL <> 0 HidD_FlushQueue = GetFunction(hDLL, "HidD_FlushQueue") HidD_FreePreparsedData = GetFunction(hDLL, "HidD_FreePreparsedData") HidD_GetAttributes = GetFunction(hDLL, "HidD_GetAttributes") HidD_GetConfiguration = GetFunction(hDLL, "HidD_GetConfiguration") HidD_GetFeature = GetFunction(hDLL, "HidD_GetFeature") HidD_GetHidGuid = GetFunction(hDLL, "HidD_GetHidGuid") HidD_GetIndexedString = GetFunction(hDLL, "HidD_GetIndexedString") HidD_GetInputReport = GetFunction(hDLL, "HidD_GetInputReport") HidD_GetManufacturerString = GetFunction(hDLL, "HidD_GetManufacturerString") HidD_GetMsGenreDescriptor = GetFunction(hDLL, "HidD_GetMsGenreDescriptor") HidD_GetNumInputBuffers = GetFunction(hDLL, "HidD_GetNumInputBuffers") HidD_GetPhysicalDescriptor = GetFunction(hDLL, "HidD_GetPhysicalDescriptor") HidD_GetPreparsedData = GetFunction(hDLL, "HidD_GetPreparsedData") HidD_GetProductString = GetFunction(hDLL, "HidD_GetProductString") HidD_GetSerialNumberString = GetFunction(hDLL, "HidD_GetSerialNumberString") HidD_Hello = GetFunction(hDLL, "HidD_Hello") HidD_SetConfiguration = GetFunction(hDLL, "HidD_SetConfiguration") HidD_SetFeature = GetFunction(hDLL, "HidD_SetFeature") HidD_SetNumInputBuffers = GetFunction(hDLL, "HidD_SetNumInputBuffers") HidD_SetOutputReport = GetFunction(hDLL, "HidD_SetOutputReport") HidP_GetButtonCaps = GetFunction(hDLL, "HidP_GetButtonCaps") HidP_GetCaps = GetFunction(hDLL, "HidP_GetCaps") HidP_GetData = GetFunction(hDLL, "HidP_GetData") HidP_GetExtendedAttributes = GetFunction(hDLL, "HidP_GetExtendedAttributes") HidP_GetLinkCollectionNodes = GetFunction(hDLL, "HidP_GetLinkCollectionNodes") HidP_GetScaledUsageValue = GetFunction(hDLL, "HidP_GetScaledUsageValue") HidP_GetSpecificButtonCaps = GetFunction(hDLL, "HidP_GetSpecificButtonCaps") HidP_GetSpecificValueCaps = GetFunction(hDLL, "HidP_GetSpecificValueCaps") HidP_GetUsageValue = GetFunction(hDLL, "HidP_GetUsageValue") HidP_GetUsageValueArray = GetFunction(hDLL, "HidP_GetUsageValueArray") HidP_GetUsages = GetFunction(hDLL, "HidP_GetUsages") HidP_GetUsagesEx = GetFunction(hDLL, "HidP_GetUsagesEx") HidP_GetValueCaps = GetFunction(hDLL, "HidP_GetValueCaps") HidP_InitializeReportForID = GetFunction(hDLL, "HidP_InitializeReportForID") HidP_MaxDataListLength = GetFunction(hDLL, "HidP_MaxDataListLength") HidP_MaxUsageListLength = GetFunction(hDLL, "HidP_MaxUsageListLength") HidP_SetData = GetFunction(hDLL, "HidP_SetData") HidP_SetScaledUsageValue = GetFunction(hDLL, "HidP_SetScaledUsageValue") HidP_SetUsageValue = GetFunction(hDLL, "HidP_SetUsageValue") HidP_SetUsageValueArray = GetFunction(hDLL, "HidP_SetUsageValueArray") HidP_SetUsages = GetFunction(hDLL, "HidP_SetUsages") HidP_TranslateUsagesToI8042ScanCodes = GetFunction(hDLL, "HidP_TranslateUsagesToI8042ScanCodes") HidP_UnsetUsages = GetFunction(hDLL, "HidP_UnsetUsages") HidP_UsageListDifference = GetFunction(hDLL, "HidP_UsageListDifference") ProcedureReturn hDLL EndIf ProcedureReturn #False EndProcedure ;}; ;{Константы setupapi.h ; Коды свойств реестра устройств ; (Коды, помеченные как доступные только для чтения (R), могут использоваться только для чтения ; SetupDiGetDeviceRegistryProperty) ; ; Эти значения должны охватывать один и тот же набор свойств реестра ;=============================== ;как определено кодами CM_DRP в cfgmgr32.h. #CM_DEVCAP_LOCKSUPPORTED=$00000001 #CM_DEVCAP_EJECTSUPPORTED=$00000002 #CM_DEVCAP_REMOVABLE=$00000004 #CM_DEVCAP_DOCKDEVICE=$00000008 #CM_DEVCAP_UNIQUEID=$00000010 #CM_DEVCAP_SILENTINSTALL=$00000020 #CM_DEVCAP_RAWDEVICEOK=$00000040 #CM_DEVCAP_SURPRISEREMOVALOK=$00000080 #CM_DEVCAP_HARDWAREDISABLED=$00000100 #CM_DEVCAP_NONDYNAMIC=$00000200 ;============== ;{;аргумент Property функцииSetupDiGetClassRegistryProperty() ;Обратите внимание, что коды SPDRP отсчитываются от нуля, а коды CM_DRP отсчитываются от единицы! #SPDRP_DEVICEDESC = $00000000;DeviceDesc (R/W) #SPDRP_HARDWAREID = $00000001;HardwareID (R/W) #SPDRP_COMPATIBLEIDS = $00000002;CompatibleIDs (R/W) #SPDRP_UNUSED0 = $00000003;unused #SPDRP_SERVICE = $00000004;Service (R/W) #SPDRP_UNUSED1 = $00000005;unused #SPDRP_UNUSED2 = $00000006;unused #SPDRP_CLASS = $00000007;Class (R--tied To ClassGUID) #SPDRP_CLASSGUID = $00000008;ClassGUID (R/W) #SPDRP_DRIVER = $00000009;Driver (R/W) #SPDRP_CONFIGFLAGS = $0000000A;ConfigFlags (R/W) #SPDRP_MFG = $0000000B;Mfg (R/W) #SPDRP_FRIENDLYNAME = $0000000C;FriendlyName (R/W) #SPDRP_LOCATION_INFORMATION = $0000000D;LocationInformation (R/W) #SPDRP_PHYSICAL_DEVICE_OBJECT_NAME = $0000000E;PhysicalDeviceObjectName (R) #SPDRP_CAPABILITIES = $0000000F;Capabilities (R) #SPDRP_UI_NUMBER = $00000010;UiNumber (R) #SPDRP_UPPERFILTERS = $00000011;UpperFilters (R/W) #SPDRP_LOWERFILTERS = $00000012;LowerFilters (R/W) #SPDRP_BUSTYPEGUID = $00000013;BusTypeGUID (R) #SPDRP_LEGACYBUSTYPE = $00000014;LegacyBusType (R) #SPDRP_BUSNUMBER = $00000015;BusNumber (R) #SPDRP_ENUMERATOR_NAME = $00000016;Enumerator Name (R) #SPDRP_SECURITY = $00000017;Security (R/W, binary form) #SPDRP_SECURITY_SDS = $00000018;Security (W, SDS form) #SPDRP_DEVTYPE = $00000019;Device Type (R/W) #SPDRP_EXCLUSIVE = $0000001A;Device is exclusive-access (R/W) #SPDRP_CHARACTERISTICS = $0000001B;Device Characteristics (R/W) #SPDRP_ADDRESS = $0000001C;Device Address (R) #SPDRP_UI_NUMBER_DESC_FORMAT = $0000001D;UiNumberDescFormat (R/W) #SPDRP_DEVICE_POWER_DATA = $0000001E;Device Power Data (R) #SPDRP_REMOVAL_POLICY = $0000001F;Removal Policy (R) #SPDRP_REMOVAL_POLICY_HW_DEFAULT = $00000020;Hardware Removal Policy (R) #SPDRP_REMOVAL_POLICY_OVERRIDE = $00000021;Removal Policy Override (RW) #SPDRP_INSTALL_STATE = $00000022;Device Install State (R) #SPDRP_LOCATION_PATHS = $00000023;Device Location Paths (R) #SPDRP_BASE_CONTAINERID = $00000024;Base ContainerID (R) #SPDRP_MAXIMUM_PROPERTY = $00000025;Upper bound on ordinals ;}; ;{;константы функции SetupDiGetClassProperty(ex) #DICLASSPROP_INSTALLER=1;получение инфы для класса установки устройства #DICLASSPROP_INTERFACE=2;получение инфы для класса интерфеса устройства ;}; #DIGCF_DEFAULT = $00000001; only valid With DIGCF_DEVICEINTERFACE #DIGCF_PRESENT = $00000002 #DIGCF_ALLCLASSES = $00000004 #DIGCF_PROFILE = $00000008 #DIGCF_DEVICEINTERFACE = $00000010 #DIGCF_INTERFACEDEVICE = #DIGCF_DEVICEINTERFACE ;} ;{;Структуры Structure _GUID Data1.l; Data2.w; Data3.w; Data4.w Data5.a[6]; EndStructure Structure _GUID1 Data1.l; Data2.w; Data3.w; Data4.a[8]; EndStructure Structure _GUID2 Data.a[16]; EndStructure Structure _GUID3 Data1.l Data2.l Data3.l Data4.l EndStructure Structure _GUID4 Data1.q Data2.q EndStructure ; Structure _SP_DEVINFO_DATA cbSize.l;Размер в байтах структуры SP_DEVINFO_DATA ClassGuid._GUID3;GUID класса установки устройства DevInst.l;Непрозрачный дескриптор экземпляра устройства (также известный как дескриптор devnode). ;Некоторые функции, такие как функции SetupDiXxx, принимают всю структуру SP_DEVINFO_DATA в качестве входных данных для идентификации ;устройства в наборе информации об устройстве. Другие функции, такие как функции CM_Xxx, такие как CM_Get_DevNode_Status, принимают этот ;дескриптор DevInst в качестве входных данных. *Reserved; EndStructure ; Structure _SP_DEVICE_INTERFACE_DATA cbSize.l; InterfaceClassGuid._GUID; Flags.l; *Reserved; EndStructure ; Structure _DEVPROPKEY; представляющию ключ свойства устройства в унифицированной модели свойств устройства fmtid._GUID1;DEVPROPGUID pid.u;DEVPROPID(идентификатора свойства,Идентификатор свойства должен быть больше или равен двум) EndStructure ; Structure _SP_DEVICE_INTERFACE_DETAIL_DATA cbSize.l; DevicePath.s{255}; EndStructure ; Macro DEFINE_DEVPROPKEY(none,name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pidd) name\fmtid\Data1=l name\fmtid\Data2=w1 name\fmtid\Data3=w2 name\fmtid\Data4[0]=b1 name\fmtid\Data4[1]=b2 name\fmtid\Data4[2]=b3 name\fmtid\Data4[3]=b4 name\fmtid\Data4[4]=b5 name\fmtid\Data4[5]=b6 name\fmtid\Data4[6]=b7 name\fmtid\Data4[7]=b8 name\pid=pidd EndMacro ;}; Procedure debug_ohibka(s$) Protected *Bufer *Bufer=AllocateMemory(200) FormatMessage_(#FORMAT_MESSAGE_FROM_SYSTEM,0, GetLastError_(), #LANG_NEUTRAL, *Bufer, 200,0) MessageRequester("Событие "+s$,Str(GetLastError_())+" "+PeekS(*Bufer,-1,#PB_Unicode)) FreeMemory(*Bufer) EndProcedure Global hdll.i=hid_LoadDLL() Procedure Get_Guid(*buffer,*Guid) ;;получаем имя класса по его GUID и записываем в строку+GUID ; SetupDiClassNameFromGuid_(*Guid,*buffer,100,0) ; Protected *bait.unicode=*buffer Protected *GUID2._GUID2=*Guid Protected *bait2.integer Protected e.i Protected i.i Protected i2.i cikl: ; If *bait\u<>0 ;Debug *bait\u *bait+2 Goto cikl Else *bait2=*bait *bait2\i=$7b0020;" {" *bait2+4 i=3 i2=0 cikl5: e=*GUID2\Data[i] ; !ror dword [p.v_e],4 !cmp byte [p.v_e],9 !ja rrr !add byte [p.v_e],48 !jmp ttt !rrr: !add byte [p.v_e],55 !ttt: !rol dword [p.v_e],16 !shr word [p.v_e],12 !cmp byte [p.v_e],9 !ja rrr2 !add byte [p.v_e],48 !jmp ttt2 !rrr2: !add byte [p.v_e],55 !ttt2: !rol dword [p.v_e],16 ; *bait2\i=e *bait2+4 ; If i>i2 i-1 Goto cikl5 ElseIf i<i2 i+1 Goto cikl5 EndIf ; If i=0 i=5 i2=4 *bait=*bait2 *bait\u=45 *bait2+2 Goto cikl5 ElseIf i=4 i=7 i2=6 *bait=*bait2 *bait\u=45 *bait2+2 Goto cikl5 ElseIf i=6 i=8 i2=9 *bait=*bait2 *bait\u=45 *bait2+2 Goto cikl5 ElseIf i=9 i=10 i2=15 *bait=*bait2 *bait\u=45 *bait2+2 Goto cikl5 EndIf *bait2\i=$7d EndIf EndProcedure Procedure.i Get_Interface(TreeGadget,*class._GUID=0) Protected hidGuid._GUID Protected deviceInfoList.i If *class._GUID=0 HidD_GetHidGuid(@hidGuid) Else hidGuid\Data1=*class._GUID\Data1 hidGuid\Data2=*class._GUID\Data2 hidGuid\Data3=*class._GUID\Data3 hidGuid\Data4=*class._GUID\Data4 hidGuid\Data5[0]=*class._GUID\Data5[0] hidGuid\Data5[1]=*class._GUID\Data5[1] hidGuid\Data5[2]=*class._GUID\Data5[2] hidGuid\Data5[3]=*class._GUID\Data5[3] hidGuid\Data5[4]=*class._GUID\Data5[4] hidGuid\Data5[5]=*class._GUID\Data5[5] EndIf ;Debug Hex(hidGuid\Data1,#PB_Long) deviceInfoList = SetupDiGetClassDevs_(@hidGuid, #Null, #Null,#DIGCF_PRESENT | #DIGCF_INTERFACEDEVICE); If deviceInfoList = #INVALID_HANDLE_VALUE debug_ohibka("SetupDiGetClassDevs") ProcedureReturn 0; EndIf Protected DeviceIndex.i=0 Protected index.i=0 Protected RequiredSize.i Protected DeviceInfoData._SP_DEVINFO_DATA DeviceInfoData\cbSize=SizeOf(_SP_DEVINFO_DATA) Protected DeviceInterfaceData._SP_DEVICE_INTERFACE_DATA DeviceInterfaceData\cbSize = SizeOf(_SP_DEVICE_INTERFACE_DATA); Protected DeviceInterfaceDetailData._SP_DEVICE_INTERFACE_DETAIL_DATA CompilerIf #PB_Compiler_Processor = #PB_Processor_x64 DeviceInterfaceDetailData\cbSize = 8; x86(Unicode=6, ASCII=5), x64=8 CompilerElse DeviceInterfaceDetailData\cbSize = 6; + SizeOf(Character); x86(Unicode=6, ASCII=5), x64=8 CompilerEndIf Protected s.s;="" Protected *Buffer=AllocateMemory(500) !mov dword [p.v_s],eax While SetupDiEnumDeviceInfo_(deviceInfoList,DeviceIndex,@DeviceInfoData)<>0 DeviceIndex+1 ;{;Описание класса установки SetupDiClassNameFromGuid_(@DeviceInfoData\ClassGuid,*buffer,100,0) Get_Guid(*buffer,@DeviceInfoData\ClassGuid) AddGadgetItem(TreeGadget, -1,s, 0, 1) SetupDiGetClassDescription_(@DeviceInfoData\ClassGuid,*Buffer,500,0) AddGadgetItem(TreeGadget, -1,s, 0, 2) ;}; index.i=0 While SetupDiEnumDeviceInterfaces_(deviceInfoList, @DeviceInfoData, @hidGuid, index,@DeviceInterfaceData)<>0 index+1 Get_Guid(*buffer,@DeviceInterfaceData\InterfaceClassGuid) AddGadgetItem(TreeGadget, -1,s, 0, 3) If SetupDiGetDeviceInterfaceDetail_(deviceInfoList, @DeviceInterfaceData, @DeviceInterfaceDetailData, 255, 0, @DeviceInfoData)<>0 AddGadgetItem(TreeGadget, -1,"Путь", 0, 2) AddGadgetItem(TreeGadget, -1,DeviceInterfaceDetailData\DevicePath, 0, 2) Debug PeekS(@DeviceInterfaceDetailData\DevicePath,-1,#PB_Unicode) EndIf Wend Wend ; If Not SetupDiGetDeviceInterfaceDetail(deviceInfoList, @deviceInfo,deviceDetails, size, @size, #Null) ; debug_ohibka("SetupDiGetDeviceInterfaceDetail"); ; Continue; ; EndIf ; hDev = CreateFile(deviceDetails->DevicePath, 0, ; #FILE_SHARE_READ | #FILE_SHARE_WRITE, #Null, ; #OPEN_EXISTING, 0, #Null); ; If(hDev = #INVALID_HANDLE_VALUE) ; debug_ohibka("CreateFile"); ; Continue; ; EndIf ; deviceAttributes.Size = SizeOf(deviceAttributes); ; If (HidD_GetAttributes(hDev, &deviceAttributes)) ; ;fprintf(stderr, "VID = %04x PID = %04x\n", (unsigned)deviceAttributes.VendorID, (unsigned)deviceAttributes.ProductID); ; Else ; debug_ohibka("HidD_GetAttributes"); ; EndIf ; CloseHandle(hDev); ; FreeMemory(*Buffer) SetupDiDestroyDeviceInfoList(deviceInfoList); ProcedureReturn 1 EndProcedure Procedure.i Get_ClassGUID(Gadget,flag=0,flag2=0) Protected i.i Protected *simvol.unicode Protected s.s;="" ; If flag=0; *simvol=?class !mov dword eax,[p.p_simvol] !mov dword [p.v_s],eax i=78 cikl34: AddGadgetItem(Gadget, -1,s) If i>0 cikl755: If *simvol\u<>0 *simvol+2 Goto cikl755 Else *simvol+2 !mov dword eax,[p.p_simvol] !mov dword [p.v_s],eax i-1 Goto cikl34 EndIf EndIf ElseIf flag=8; *simvol=?class i=0 ; cikl456: If flag2>0 If *simvol\u<>0 *simvol+2 Goto cikl456 Else *simvol+2 i+1 If i<flag2 Goto cikl456 EndIf EndIf EndIf Protected *Buffer=AllocateMemory(500) Protected *Buffer2.unicode=*Buffer !mov dword eax,[p.p_Buffer] !mov dword [p.v_s],eax cikl285: If *simvol\u<>0 i=*simvol\u *Buffer2\u=i *simvol+2 *Buffer2+2 Goto cikl285 EndIf ; ;AddGadgetItem(Gadget, -1,s, 0, 1) flag2*16 flag2+?_1 Get_Guid(*buffer,flag2) AddGadgetItem(Gadget, -1,s, 0, 1) FreeMemory(*Buffer) ProcedureReturn flag2 EndIf ; SetupDiClassNameFromGuid_(?_1+i,*buffer,100,0) ;AddGadgetItem(ComboBoxGadget1, -1,s) ; ;FreeMemory(*Buffer) ;ProcedureReturn s ;{;Датасекция Guuid_classov DataSection _1: Data.q $11D0810F6BDD1FC1,$2F09E22B0008C7BE Data.q $4A64780166F250D6,$240B450AA8EE39B1 _3: Data.q $11D232007EBEFBC0,$77D69C9A000C2B4 _4: Data.q $11CEE3254D36E964,$1803E12B0008C1BF _5: Data.q $11D1C8FAD45B1C18,$30F505F80000779F _6: Data.q $48F0AE09C06FF265,$83BA7C3D75162C81 _7: Data.q $11D078A472631E54,$2AB3B700AA00F7BC _8: Data.q $4D14377C53D29EF7,$599376853AEB4B86 _9: Data.q $4647CD8BE0CBF06C,$74F9F0433B268ABB _10: Data.q $11CEE3254D36E965,$1803E12B0008C1BF _11: Data.q $11CEE3254D36E966,$1803E12B0008C1BF _12: Data.q $11D0810F6BDD1FC2,$2F09E22B0008C7BE _13: Data.q $11CEE3254D36E967,$1803E12B0008C1BF _14: Data.q $11CEE3254D36E968,$1803E12B0008C1BF _15: Data.q $11D2679548721B56,$A2742EC78000A8B1 _16: Data.q $11D26F8649CE6AC8,$A2742EC78000E5B1 _17: Data.q $11D1DB08C459DF55,$F61F08C9A00009B0 _18: Data.q $11CEE3254D36E969,$1803E12B0008C1BF _19: Data.q $11CEE3254D36E980,$1803E12B0008C1BF _20: Data.q $11D0810F6BDD1FC3,$2F09E22B0008C7BE _21: Data.q $11CEE3254D36E96A,$1803E12B0008C1BF _22: Data.q $11D074D3745A17A0,$DA570FC9A000FEB6 _23: Data.q $11D0810F6BDD1FC6,$2F09E22B0008C7BE _24: Data.q $4A0CD85830EF7132,$3FCA5C8A02B924AC _25: Data.q $11D0810F6BDD1FC5,$2F09E22B0008C7BE _26: Data.q $11CEE3254D36E96B,$1803E12B0008C1BF _27: Data.q $11D1047F8ECC055D,$D13E75F8000037A5 _28: Data.q $11CEE3254D36E96C,$1803E12B0008C1BF _29: Data.q $11D0EBDECE5939AE,$C43E75F8000081B1 _30: Data.q $11CEE3254D36E96D,$1803E12B0008C1BF _31: Data.q $11CEE3254D36E96E,$1803E12B0008C1BF _32: Data.q $11CEE3254D36E96F,$1803E12B0008C1BF _33: Data.q $11CEE3254D36E970,$1803E12B0008C1BF _34: Data.q $11CEE3254D36E971,$1803E12B0008C1BF _35: Data.q $11D1BA1250906CB8,$30F505F800005DBF _36: Data.q $11CEE3254D36E972,$1803E12B0008C1BF _37: Data.q $11CEE3254D36E973,$1803E12B0008C1BF _38: Data.q $11CEE3254D36E974,$1803E12B0008C1BF _39: Data.q $11CEE3254D36E975,$1803E12B0008C1BF _40: Data.q $11CEE3254D36E976,$1803E12B0008C1BF _41: Data.q $11CEE3254D36E977,$1803E12B0008C1BF _42: Data.q $11D1F0504658EE7E,$A772A34FC000BDB6 _43: Data.q $11CEE3254D36E978,$1803E12B0008C1BF _44: Data.q $11CEE3254D36E979,$1803E12B0008C1BF _45: Data.q $11CEE3254D36E97A,$1803E12B0008C1BF _46: Data.q $415E0F3650127DC3,$650B91BEB34CCCA6 _47: Data.q $11D1EC20D48179BE,$A772A34FC000B8B6 _48: Data.q $11CEE3254D36E97B,$1803E12B0008C1BF _49: Data.q $11D3EDFE268C95A1,$A55040DC1000C395 _50: Data.q $4806C3715175D334,$8D25C953FD71BAB3 _51: Data.q $4F2EC442997B5D8D,$219E1E678E9CF3BA _52: Data.q $11D1BA8A50DD5230,$30F505F800005DBF _53: Data.q $11CEE3254D36E97C,$1803E12B0008C1BF _54: Data.q $11CEE3254D36E97D,$1803E12B0008C1BF _55: Data.q $11CF7D216D807884,$1803E12B00081C80 _56: Data.q $11CEE3254D36E97E,$1803E12B0008C1BF _57: Data.q $11CFC46536FC9E60,$545345445680 _58: Data.q $11D0812A71A27CDD,$2F09E22B0008C7BE _59: Data.q $11D2EC70533C5B84,$AFDE794FC0000595 _60: Data.q $4A726C8F25DBCE51,$35C84F2B4CB56D8A _61: Data.q $425F8080EEC5AD98,$9AF6E33DBFDA2A92 _62: Data.q $4BACA31EB86DFF51,$C29F5CE7CFE8CFB3 _63: Data.q $48C0C67AFE8F1572,$FBCA666D5C0BACBB _64: Data.q $4379C54FB1D1A169,$54748DD8E7BEDB81 _65: Data.q $48FF4CF848D3EBC4,$9FEB42AD689C69B8 _66: Data.q $46226FAD71AA14F8,$47697E9DBB9277AD _67: Data.q $4558C83C3E3F0674,$C5A5EBE1209826BB _68: Data.q $4919A6C78503C911,$C6B86F52850798F _69: Data.q $4131706E2DB15374,$9A28B08EC7D7C7A0 _70: Data.q $4630B75BCDCF0939,$845865BAF78076BF _71: Data.q $45F62AEBD546500A,$77319C79B1F48294 _72: Data.q $49B5B5AAF3586BAF,$9F634C2869056C8D _73: Data.q $42FFA511A0A701C0,$6F579503DC066CAA _74: Data.q $4FC4BBA66A0A8E78,$7ED609CD331E09A7 _75: Data.q $41A566D1F8ECAFA6,$B716725D58669B89 _76: Data.q $49450C8ED02BC3DA,$8C6C223C88F1D59B _77: Data.q $402F9C1289786FF1,$75437F3C75179E9C _78: Data.q $46AF01E25D1B9AAA,$464C323F2B279F84 _79: Data.q $4D04128CE55FA6F9,$3A45B1740C63ABAB EndDataSection ;}; ;{;Датасекция class DataSection class: Data.s "1394" Data.s "1394DEBUG" Data.s "61883" Data.s "ADAPTER" Data.s "APMSUPPORT" Data.s "AVC" Data.s "BATTERY" Data.s "BIOMETRIC" Data.s "BLUETOOTH" Data.s "CDROM" Data.s "COMPUTER" Data.s "DECODER" Data.s "DISKDRIVE" Data.s "DISPLAY" Data.s "DOT4" Data.s "DOT4PRINT" Data.s "ENUM1394" Data.s "FDC" Data.s "FOPPYDISK" Data.s "GPS" Data.s "HDC" Data.s "HIDCLASS" Data.s "IMAGE" Data.s "INFINIBAND" Data.s "INFRARED" Data.s "KEYBOARD" Data.s "EGACYDRIVER" Data.s "MEDIA" Data.s "MEDIUM_CHANGER" Data.s "MODEM" Data.s "MONITOR" Data.s "MOUSE" Data.s "MTD" Data.s "MUTIFUNCTION" Data.s "MUTIPORTSERIA" Data.s "NET" Data.s "NETCIENT" Data.s "NETSERVICE" Data.s "NETTRANS" Data.s "NODRIVER" Data.s "PCMCIA" Data.s "PNPPRINTERS" Data.s "PORTS" Data.s "PRINTER" Data.s "PRINTERUPGRADE" Data.s "PROCESSOR" Data.s "SBP2" Data.s "SCSIADAPTER" Data.s "SECURITYACCEERATOR" Data.s "SENSOR" Data.s "SIDESHOW" Data.s "SMARTCARDREADER" Data.s "SOUND" Data.s "SYSTEM" Data.s "TAPEDRIVE" Data.s "UNKNOWN" Data.s "USB" Data.s "VOUME" Data.s "VOUMESNAPSHOT" Data.s "WCEUSBS" Data.s "WPD" Data.s "FSFITER_ACTIVITYMONITOR" Data.s "FSFITER_UNDEETE" Data.s "FSFITER_ANTIVIRUS" Data.s "FSFITER_REPICATION" Data.s "FSFITER_CONTINUOUSBACKUP" Data.s "FSFITER_CONTENTSCREENER" Data.s "FSFITER_QUOTAMANAGEMENT" Data.s "FSFITER_SYSTEMRECOVERY" Data.s "FSFITER_CFSMETADATASERVER" Data.s "FSFITER_HSM" Data.s "FSFITER_COMPRESSION" Data.s "FSFITER_ENCRYPTION" Data.s "FSFITER_PHYSICAQUOTAMANAGEMENT" Data.s "FSFITER_OPENFIEBACKUP" Data.s "FSFITER_SECURITYENHANCER" Data.s "FSFITER_COPYPROTECTION" Data.s "FSFITER_SYSTEM" Data.s "FSFITER_INFRASTRUCTURE" EndDataSection ;}; EndProcedure Global Obrabothik_Tree.i Procedure.i Calbac_Tree(hwnd,Msg,wParam,lParam) Select msg Case #WM_LBUTTONDOWN CallWindowProc_(Obrabothik_Tree, hWnd, #WM_RBUTTONDOWN, wParam, lParam);сначала прыгнем в родной обработчик ; Debug GetGadgetItemText(GetWindowLongPtr_(hwnd,#GWLP_ID),GetGadgetState(GetWindowLongPtr_(hwnd,#GWLP_ID))) EndSelect ProcedureReturn CallWindowProc_(Obrabothik_Tree, hWnd, Msg, wParam, lParam) EndProcedure ProcedureDLL.i Diologovoe_Okno_Ustroistv() ;{;Форма Protected window.i window= OpenWindow(#PB_Any, 0, 0,800, 400, "Конфигурация устройств", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) If window<>0 Protected ComboBoxGadget1.i=ComboBoxGadget(#PB_Any, 5, 5, 250, 21,#PB_ComboBox_Editable) SetGadgetText(ComboBoxGadget1, "Выбор класса инсталяции");заставка нопоминающая выбор интерфейса Get_ClassGUID(ComboBoxGadget1) Protected TreeGadget1.i=TreeGadget(#PB_Any,260,0,538,400) ;SetWindowLongPtr_(GadgetID(TreeGadget1),#GWLP_HWNDPARENT,WindowID(window)) Obrabothik_Tree=SetWindowLongPtr_(GadgetID(TreeGadget1),#GWLP_WNDPROC,@Calbac_Tree()) AddGadgetItem(TreeGadget1, -1, "Класс инсталяции", 0, 0) Get_Interface(TreeGadget1) EndIf ;} ;{;Обработчик сообщений Repeat Select WaitWindowEvent() Case #PB_Event_CloseWindow;{; SetWindowLongPtr_(GadgetID(TreeGadget1),#GWL_WNDPROC,Obrabothik_Tree) Break;}; Case #PB_Event_Gadget Select EventGadget() Case ComboBoxGadget1;{;выбор класса ;Debug GetGadgetState(ComboBoxGadget1) If GetGadgetState(ComboBoxGadget1)>-1;список классов ранее отображён ClearGadgetItems(TreeGadget1) AddGadgetItem(TreeGadget1, -1, "Устройства Класса", 0, 0) Get_ClassGUID(TreeGadget1,8,GetGadgetState(ComboBoxGadget1)) Debug GetGadgetState(ComboBoxGadget1) EndIf EndSelect ;}; EndSelect ForEver;}; EndProcedure ;пример приминения Diologovoe_Okno_Ustroistv() CloseLibrary(hdll)
В этом коде и ответ возможно заданный ранее egnos чем не нравится стандартные макросы?да всё нравится впринципе но ключ есть ключ из 16 байт и если есть возможность оперироаать с ним в тех же операциях сравнения с меньшим запросом процу то почему невоспользоваться этим
Отредактировано Sergeihik (23.12.2022 17:33:59)