GetFileVersionInfoSize function Null safety version

int GetFileVersionInfoSize(
  1. Pointer<Utf16> lptstrFilename,
  2. Pointer<Uint32> lpdwHandle
)

Determines whether the operating system can retrieve version information for a specified file. If version information is available, GetFileVersionInfoSize returns the size, in bytes, of that information.

DWORD GetFileVersionInfoSizeW(
  LPCWSTR lptstrFilename,
  LPDWORD lpdwHandle
);

Implementation

int GetFileVersionInfoSize(
    Pointer<Utf16> lptstrFilename, Pointer<Uint32> lpdwHandle) {
  final _GetFileVersionInfoSize = _version.lookupFunction<
      Uint32 Function(
          Pointer<Utf16> lptstrFilename, Pointer<Uint32> lpdwHandle),
      int Function(Pointer<Utf16> lptstrFilename,
          Pointer<Uint32> lpdwHandle)>('GetFileVersionInfoSizeW');
  return _GetFileVersionInfoSize(lptstrFilename, lpdwHandle);
}