Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006652 [JEDI VCL] 00 JVCL Components minor always 2018-10-08 10:44 2018-10-08 10:44
Reporter Gerold View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version Daily / GIT
Summary 0006652: JvHidDeviceController LoadSetupApi returns false
Description Hi

I have a program for a HID device using TJvHidDeviceController and the program works on most PC's but not on some machines. It turns out, that on these machines these two functions
- SetupDiInstallDeviceInterfaces
- SetupDiRegisterCoDeviceInstallers
are not available.

That means, that LoadSetupApi in JvSetupApi.pas is returning false.

These functions are not used in JvHidControllerClass.pas.

Only these 5 functions are required:
- SetupDiGetDeviceRegistryProperty
- SetupDiGetClassDevs
- SetupDiEnumDeviceInterfaces
- SetupDiGetDeviceInterfaceDetail
- SetupDiDestroyDeviceInfoList

In LoadSetupApi, more than 400 functions are dynamically linked (if case SETUPAPI_LINKONREQUEST is set) and if one fails, than the function returns FALSE.

I am wondering, if it is a good idea to use LoadSetupApi in TJvHidDeviceController. Why not write another function which is linking just the above functions?

Also, would it not be wise to have an overloaded function

function GetModuleSymbolEx(Module: TModuleHandle; SymbolName: string; var ErrorMsg: string): Pointer;

which returns in ErrorMsg the FIRST SymbolName where GetProcAddress failed?

In this case, LoadSetupApi could return, which of the more than 400 linked functions failed.

Additional Information
Tags No tags attached.
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2018-10-08 10:44 Gerold New Issue

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker