The SaferiIsExecutableFileType function determines whether a specified file is an executable file. Applications use this function to determine whether a file is an executable file, and if it is, then the application can take security precautions to prevent invoking untrustworthy code.
BOOL SaferiIsExecutableFileType( LPCWSTR szFullPathname, BOOLEAN bFromShellExecute );
Pointer to a null-terminated Unicode character string for the name of the file. The path is optional because only the file name extension is evaluated. The evaluation of the file name extension is not case-sensitive. This parameter cannot be NULL or an empty string, and the specified file must include a file name extension.
Boolean value that determines whether .exe files are treated as executable files for the file type evaluation. Set this value to TRUE to omit .exe files from the evaluation or to FALSE to include them.
If the function successfully recognizes the file name's extension as an executable file type, the return value is TRUE.
If the function fails, or if szFullPath identifies a file name with a nonexecutable extension, the function returns FALSE.
The following file name extensions are examples of executable file types. This is not a complete list.
To view or modify the extensions that are considered executable file types
- Run Secpol.msc.
- Expand Software Restriction Policies, and then double-click Designated File Types.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|