网站首页  词典首页

请输入您要查询的函数:

 

术语 iswow64message
释义 IsWow64Message
语法:
C++
BOOL WINAPI IsWow64Message(void);
IsWow64Message功能
确定是否最后一条消息从当前线程的队列中读取的过程从一个WOW64的起源。
参数
这个函数没有参数。
返回值
该函数返回TRUE,如果最后一条消息从当前线程的队列中读取的过程,从最初的WOW64,否则返回FALSE。
备注
此功能非常有用,帮助您开发的64位本地应用程序,可以接收私人信息发送至32位客户端应用程序,如果信息与数据结构的指针包含依赖数据关联。在这种情况下,您可以调用此函数的64位本地应用程序,以确定该消息源自于WOW64的过程,然后适当thunk的消息。
实例
对于操作系统不支持此功能,兼容性调用GetProcAddress来检测是否IsWow64Message是在user32.dll实施。如果调用GetProcAddress成功,它是安全的调用此函数。否则,WOW64是不存在。请注意,这种方法并不是一个可靠的方法来检测操作系统是否是64位版本的Windows,因为在目前32个版本user32.dll中位Windows还包含这一功能。
#include
#include
typedef BOOL (WINAPI *LPFN_ISWOW64MESSAGE) (void);
LPFN_ISWOW64MESSAGE fnIsWow64Message;
BOOL IsWow64Msg()
{
fnIsWow64Message = (LPFN_ISWOW64MESSAGE) GetProcAddress(
LoadLibrary(TEXT("user32")), "IsWow64Message");

if (NULL != fnIsWow64Message)
{
return (fnIsWow64Message());
}
else return FALSE;
}
void main()
{
if(IsWow64Msg())
printf("Last message from 32-bit process\\n");
else if (NULL == fnIsWow64Message )
printf("IsWow64Message not available (%d).\\n", GetLastError());
else printf("Last message from 64-bit process\\n");
}
要求:
最低支持clientWindows SP2的景色时,Windows XP
最低支持serverWindows Server 2008中时,Windows Server 2003 SP1的
HeaderWinuser.h(头文件:winuser.h)
LibraryUser32.lib
DLLUser32.dll
参见
GetNativeSystemInfo
IsWow64Process
在WOW 64
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==IsWow64Message Function
Determines whether the last message read from the current thread's queue originated from a WOW64 process.
Syntax
C++
BOOL WINAPI IsWow64Message(void);
Parameters
This function has no parameters.
Return Value
The function returns TRUE if the last message read from the current thread's queue originated from a WOW64 process, and FALSE otherwise.
Remarks
This function is useful to helping you develop 64-bit native applications that can receive private messages sent from 32-bit client applications, if the messages are associated with data structures that contain pointer-dependent data. In these situations, you can call this function in your 64-bit native application to determine if the message originated from a WOW64 process and then thunk the message appropriately.
Examples
For compatibility with operating systems that do not support this function, call GetProcAddress to detect whether IsWow64Message is implemented in User32.dll. If GetProcAddress succeeds, it is safe to call this function. Otherwise, WOW64 is not present. Note that this technique is not a reliable way to detect whether the operating system is a 64-bit version of Windows because the User32.dll in current versions of 32-bit Windows also contains this function.
#include
#include
typedef BOOL (WINAPI *LPFN_ISWOW64MESSAGE) (void);
LPFN_ISWOW64MESSAGE fnIsWow64Message;
BOOL IsWow64Msg()
{
fnIsWow64Message = (LPFN_ISWOW64MESSAGE) GetProcAddress(
LoadLibrary(TEXT("user32")), "IsWow64Message");

if (NULL != fnIsWow64Message)
{
return (fnIsWow64Message());
}
else return FALSE;
}
void main()
{
if(IsWow64Msg())
printf("Last message from 32-bit process\\n");
else if (NULL == fnIsWow64Message )
printf("IsWow64Message not available (%d).\\n", GetLastError());
else printf("Last message from 64-bit process\\n");
}
Requirements
Minimum supported clientWindows Vista, Windows XP with SP2
Minimum supported serverWindows Server 2008, Windows Server 2003 with SP1
HeaderWinuser.h (include Windows.h)
LibraryUser32.lib
DLLUser32.dll
See Also
GetNativeSystemInfo
IsWow64Process
WOW64
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms684136(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:45