SetupDiOpenDevRegKey function setupapi

Win32Result<HKEY> SetupDiOpenDevRegKey(
  1. HDEVINFO deviceInfoSet,
  2. Pointer<SP_DEVINFO_DATA> deviceInfoData,
  3. int scope,
  4. int hwProfile,
  5. int keyType,
  6. int samDesired,
)

Opens a registry key for device-specific configuration information.

To learn more, see learn.microsoft.com/windows/win32/api/setupapi/nf-setupapi-setupdiopendevregkey.

Implementation

Win32Result<HKEY> SetupDiOpenDevRegKey(
  HDEVINFO deviceInfoSet,
  Pointer<SP_DEVINFO_DATA> deviceInfoData,
  int scope,
  int hwProfile,
  int keyType,
  int samDesired,
) {
  final result_ = SetupDiOpenDevRegKey_Wrapper(
    deviceInfoSet,
    deviceInfoData,
    scope,
    hwProfile,
    keyType,
    samDesired,
  );
  return Win32Result(value: HKEY(result_.value.ptr), error: result_.error);
}