View Issue Details

IDProjectCategoryView StatusLast Update
0006538JEDI VCL00 JVCL Componentspublic2019-04-30 16:13
ReporterbfloracAssigned Toobones 
Status resolvedResolutionfixed 
Product Version3.48 
Target VersionFixed in VersionDaily / GIT 
Summary0006538: JvHidControllerClass, BusType should be of type TGUID not string
DescriptionAccording to MS, SetupDiGetDeviceRegistryProperty with SPDRP_BUSTYPEGUID returns a 16 byte GUID not a string.

See function: TJvHidPnPInfo.Create()...
FBusType := GetRegistryPropertyString(APnPHandle, ADevData, SPDRP_BUSTYPEGUID);
Additional InformationTo make it backward compatible, one could extract as TGUID and convert to string for the object.

New Function:

function TJvHidPnPInfo.GetRegistryPropertyGuid(PnPHandle: HDEVINFO;
  const DevData: TSPDevInfoData; Prop: DWORD): TGuid;
  GUID_NULL: TGUID = '{00000000-0000-0000-0000-000000000000}';
  BytesReturned: DWORD;
  RegDataType: DWORD;
  BytesReturned := 0;
  RegDataType := 0;
  Result := GUID_NULL;
  SetupDiGetDeviceRegistryProperty(APnPHandle, ADevData, Prop, RegDataType, PByte(@Result), SizeOf(Result), BytesReturned);

And then in TJvHidPnPInfo.Create():
  FBusType := GuidToString(GetRegistryPropertyString(APnPHandle, ADevData, SPDRP_BUSTYPEGUID));

TagsNo tags attached.



2018-07-18 15:48

administrator   ~0021507

Could you check if the issue is still present in the latest GIT content? If yes, please provide the zipped sources of an application showing this.


2019-04-28 09:06

reporter   ~0021770

Created a pull request for it, implementing it without local GUID_NULL:

Issue History

Date Modified Username Field Change
2016-12-04 19:28 bflorac New Issue
2018-07-18 15:48 obones Note Added: 0021507
2018-07-18 15:48 obones Status new => feedback
2019-04-28 09:06 mh Note Added: 0021770
2019-04-30 16:13 obones Status feedback => resolved
2019-04-30 16:13 obones Fixed in Version => Daily / GIT
2019-04-30 16:13 obones Resolution open => fixed
2019-04-30 16:13 obones Assigned To => obones