网站首页  词典首页

请输入您要查询的函数:

 

术语 isbadcodeptr
释义 IsBadCodePtr
语法:
C++
BOOL WINAPI IsBadCodePtr(
__in FARPROC lpfn
);
IsBadCodePtr功能
确定是否调用进程读取指定的地址访问内存。
重要此功能已经过时,不应使用。尽管它的名字,它并不能保证有效的指针,或指向的内存可以安全使用。有关更多信息,看到注释。
参数
lpfn [in]
一个内存地址的指针。
返回值
如果调用进程具有读取访问指定的内存,返回值是零。
如果调用进程没有读访问指定的内存,返回非零值。为了获得更多错误信息,调用GetLastError。
如果应用程序被编译为调试版本,这一过程没有读访问指定的内存位置,该函数会导致断言,到调试器中断。离开调试器,功能如常,并返回一个非零值。此行为是设计,作为一个调试援助。
备注
在抢占式多任务环境中,可能有其他线程改变进程的存取存储器被测试。即使函数表明,这一进程具有读取访问指定的内存,您应该使用结构化异常处理时,试图访问内存。结构化异常处理使用使系统通知进程,如果访问冲突异常时,推动这一进程的机会来处理异常。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
IsBadReadPtr
IsBadStringPtr
IsBadWritePtr
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==IsBadCodePtr Function
Determines whether the calling process has read access to the memory at the specified address.
Important This function is obsolete and should not be used. Despite its name, it does not guarantee that the pointer is valid or that the memory pointed to is safe to use. For more information, see Remarks on this page.
Syntax
C++
BOOL WINAPI IsBadCodePtr(
__in FARPROC lpfn
);
Parameters
lpfn [in]
A pointer to a memory address.
Return Value
If the calling process has read access to the specified memory, the return value is zero.
If the calling process does not have read access to the specified memory, the return value is nonzero. To get extended error information, call GetLastError .
If the application is compiled as a debugging version, and the process does not have read access to the specified memory location, the function causes an assertion and breaks into the debugger. Leaving the debugger, the function continues as usual, and returns a nonzero value. This behavior is by design, as a debugging aid.
Remarks
In a preemptive multitasking environment, it is possible for some other thread to change the process's access to the memory being tested. Even when the function indicates that the process has read access to the specified memory, you should use structured exception handling when attempting to access the memory. Use of structured exception handling enables the system to notify the process if an access violation exception occurs, giving the process an opportunity to handle the exception.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
IsBadReadPtr
IsBadStringPtr
IsBadWritePtr
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa366712(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 13:24:57