FindExecutable function Null safety shell32

int FindExecutable(
  1. Pointer<Utf16> lpFile,
  2. Pointer<Utf16> lpDirectory,
  3. Pointer<Utf16> lpResult
)

Retrieves the name of and handle to the executable (.exe) file associated with a specific document file.

HINSTANCE FindExecutableW(
  LPCWSTR lpFile,
  LPCWSTR lpDirectory,
  LPWSTR  lpResult
);

Implementation

int FindExecutable(Pointer<Utf16> lpFile, Pointer<Utf16> lpDirectory,
    Pointer<Utf16> lpResult) {
  final _FindExecutable = _shell32.lookupFunction<
      IntPtr Function(Pointer<Utf16> lpFile, Pointer<Utf16> lpDirectory,
          Pointer<Utf16> lpResult),
      int Function(Pointer<Utf16> lpFile, Pointer<Utf16> lpDirectory,
          Pointer<Utf16> lpResult)>('FindExecutableW');
  return _FindExecutable(lpFile, lpDirectory, lpResult);
}