SHGetDriveMedia function Null safety shell32

int SHGetDriveMedia(
  1. Pointer<Utf16> pszDrive,
  2. Pointer<Uint32> pdwMediaContent
)

Returns the type of media that is in the given drive.

HRESULT SHGetDriveMedia(
  PCWSTR pszDrive,
  DWORD  *pdwMediaContent
);

Implementation

int SHGetDriveMedia(Pointer<Utf16> pszDrive, Pointer<Uint32> pdwMediaContent) {
  final _SHGetDriveMedia = _shell32.lookupFunction<
      Int32 Function(Pointer<Utf16> pszDrive, Pointer<Uint32> pdwMediaContent),
      int Function(Pointer<Utf16> pszDrive,
          Pointer<Uint32> pdwMediaContent)>('SHGetDriveMedia');
  return _SHGetDriveMedia(pszDrive, pdwMediaContent);
}