S.l.e!ep.¢%

像打了激速一样,以四倍的速度运转,开心的工作
简单、开放、平等的公司文化;尊重个性、自由与个人价值;
posts - 1098, comments - 335, trackbacks - 0, articles - 1
  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

判断程序是否为 16bit 应用程序

Posted on 2010-05-05 14:05 S.l.e!ep.¢% 阅读(341) 评论(0)  编辑 收藏 引用 所属分类: VC
GetBinaryType

The GetBinaryType function 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.


BOOL GetBinaryType(
  LPCTSTR lpApplicationName,
  LPDWORD lpBinaryType
);

lpBinaryType
[out] Pointer to a variable to receive information about the executable type of the file specified by lpApplicationName. The following constants are defined. Value Meaning
SCS_32BIT_BINARY A 32-bit Windows-based application
SCS_64BIT_BINARY A 64-bit Windows-based application.
SCS_DOS_BINARY An MS-DOS – based application
SCS_OS216_BINARY A 16-bit OS/2-based application
SCS_PIF_BINARY A PIF file that executes an MS-DOS – based application
SCS_POSIX_BINARY A POSIX – based application
SCS_WOW_BINARY A 16-bit Windows-based application