网站首页  词典首页

请输入您要查询的函数:

 

术语 getbinarytype
释义 GetBinaryType
语法:
C++
BOOL WINAPI GetBinaryType(
__in LPCTSTR lpApplicationName,
__out LPDWORD lpBinaryType
);
GetBinaryType功能
决定一个文件是一个可执行(。exe)文件,如果有的话,该子系统运行可执行文件。
参数
lpApplicationName [in]
该文件的可执行文件类型待定的完整路径。
在此函数的ANSI版本,名称被限制为MAX_PATH字符。为了延长此限制,以32,767宽字符,调用的功能和前面加上“\\ Unicode版本\\?\\”的路径。有关更多信息,请参见命名一个文件。
lpBinaryType [out]
对变量的指针收到关于由lpApplicationName指定的可执行文件类型信息。下面是常量的定义。
ValueMeaning
SCS_32BIT_BINARY
答32位基于Windows的应用
SCS_64BIT_BINARY
第6A 64位基于Windows的应用程序。
SCS_DOS_BINARY
1An的MS - DOS -基于应用程序
SCS_OS216_BINARY
5A条16位OS/2-based应用
SCS_PIF_BINARY
第3A的PIF文件,执行一个MS - DOS -基于应用程序
SCS_POSIX_BINARY
第4A POSIX的-基于应用程序
SCS_WOW_BINARY
甲16位基于Windows的应用
返回值
如果该文件是可执行的,则返回值为非零。该函数设置变量所指向的lpBinaryType表明该文件的可执行文件类型。
如果该文件是不可执行的,或者如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。如果该文件是一个DLL,最后一个错误代码是ERROR_BAD_EXE_FORMAT。
备注
作为替代方案,您可以通过调用SHGetFileInfo函数相同的信息,通过在uFlags参数的SHGFI_EXETYPE标志。
符号链接的行为,如果路径指向一个符号链接的目标文件被使用。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinBase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesGetBinaryTypeW(Unicode)和GetBinaryTypeA(ANSI)的
参见
文件管理函数
SHGetFileInfo
符号链接
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年9月3日
==英文原文==GetBinaryType Function
Determines whether a file is an executable (.exe) file, and if so, which subsystem runs the executable file.
Syntax
C++
BOOL WINAPI GetBinaryType(
__in LPCTSTR lpApplicationName,
__out LPDWORD lpBinaryType
);
Parameters
lpApplicationName [in]
The full path of the file whose executable type is to be determined.
In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\\\?\\" to the path. For more information, see Naming a File .
lpBinaryType [out]
A pointer to a variable to receive information about the executable type of the file specified by lpApplicationName. The following constants are defined.
ValueMeaning
SCS_32BIT_BINARY
0A 32-bit Windows-based application
SCS_64BIT_BINARY
6A 64-bit Windows-based application.
SCS_DOS_BINARY
1An MS-DOS – based application
SCS_OS216_BINARY
5A 16-bit OS/2-based application
SCS_PIF_BINARY
3A PIF file that executes an MS-DOS – based application
SCS_POSIX_BINARY
4A POSIX – based application
SCS_WOW_BINARY
2A 16-bit Windows-based application

Return Value
If the file is executable, the return value is nonzero. The function sets the variable pointed to by lpBinaryType to indicate the file's executable type.
If the file is not executable, or if the function fails, the return value is zero. To get extended error information, call GetLastError . If the file is a DLL, the last error code is ERROR_BAD_EXE_FORMAT.
Remarks
As an alternative, you can obtain the same information by calling the SHGetFileInfo function, passing the SHGFI_EXETYPE flag in the uFlags parameter.
Symbolic link behavior—If the path points to a symbolic link, the target file is used.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinBase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesGetBinaryTypeW (Unicode) and GetBinaryTypeA (ANSI)
See Also
File Management Functions
SHGetFileInfo
Symbolic Links
Send comments about this topic to Microsoft
Build date: 9/3/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa364819(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:25:00