Group: File Management - Library: kernel32
Determines whether a file is executable, and if so, what type of executable file it is. That last property determines which subsystem an executable file runs under.
Using GetBinaryType (WinNT only) to determine the type of an executable file
BOOL GetBinaryType (
LPCTSTR lpApplicationName, // full file path
LPDWORD lpBinaryType // binary type information
);
DECLARE SHORT GetBinaryType IN kernel32;
STRING lpApplicationName,;
INTEGER @ lpBinaryType
lpApplicationName [in] Pointer to a null-terminated string that contains the full path of the file whose binary type the function shall determine.
lpBinaryType [out] Pointer to a variable to receive information about the executable type of the file specified by lpApplicationName.
If the file is executable, the return value is nonzero.
WinNT only.