Type of Exe(Console, Windows, MS-DOS application).

How to find out the type of an executable file, i.e. whether it’s a windows application or a console application or an MS-DOS application… [sourcecode language=’cpp’]void GetFileType( LPCTSTR lpctszFilePath_i, CString& csFileType_o ) {     // Get exe file type     const DWORD dwRetVal = SHGetFileInfo( lpctszFilePath_i,                                           FILE_ATTRIBUTE_NORMAL,                                           0,                                           0,                                           SHGFI_EXETYPE );     […]
Continue reading…