GetDeviceDriverFileName function psapi

Win32Result<int> GetDeviceDriverFileName(
  1. Pointer<NativeType> imageBase,
  2. PWSTR lpFilename,
  3. int nSize
)

Retrieves the path available for the specified device driver.

To learn more, see learn.microsoft.com/windows/win32/api/psapi/nf-psapi-getdevicedriverfilenamew.

Implementation

Win32Result<int> GetDeviceDriverFileName(
  Pointer imageBase,
  PWSTR lpFilename,
  int nSize,
) {
  final result_ = GetDeviceDriverFileNameW_Wrapper(
    imageBase,
    lpFilename,
    nSize,
  );
  return .new(value: result_.value.u32, error: result_.error);
}