网站首页  词典首页

请输入您要查询的函数:

 

术语 getwritewatch
释义 GetWriteWatch
语法:
C++
UINT WINAPI GetWriteWatch(
__in DWORD dwFlags,
__in PVOID lpBaseAddress,
__in SIZE_T dwRegionSize,
__out PVOID *lpAddresses,
__inout PULONG_PTR lpdwCount,
__out PULONG lpdwGranularity
);
GetWriteWatch功能
检索的地址认为写入页的虚拟内存区域。
64位Itanium的Windows系统:由于在页面大小的差异,GetWriteWatch不支持32位应用程序。
参数
dwFlags [in]
指示是否函数重置写跟踪状态。
要重置写跟踪状态,设置这个参数WRITE_WATCH_FLAG_RESET。如果此参数为0(零),GetWriteWatch不重置写跟踪状态。有关更多信息,请参阅本主题的备注部分。
lpBaseAddress [in]
该内存区域的的检索跟踪信息写入基地址。
这个地址必须是在一个内存区域,这是由VirtualAlloc使用MEM_WRITE_WATCH功能分配。
dwRegionSize [in]
该内存区域的的检索跟踪信息写入大小,以字节为单位。
lpAddresses [out]
A到接收缓冲区的网页地址的内存区域中的数组的指针。
显示的地址已被写入,因为该区域已分配或写入跟踪状态已被重置页。
lpdwCount [ in , out ]
在输入,这个变量指示该lpAddresses数组的大小,在数组元素。
在输出的变量接收到页面中返回的数组地址的数量。
lpdwGranularity [out]
对变量的接收以字节页面大小,指针。
返回值
如果函数成功,返回值为0(零)。
如果函数失败,返回值是一个非零值。
备注
当您调用VirtualAlloc函数保留或提交的内存,您可以指定MEM_WRITE_WATCH。此值会导致系统,以掌握的写入页面追踪所犯的内存区域。您可以调用GetWriteWatch函数来检索已写入,因为该区域已分配或写入跟踪状态已被重置页面的地址。
要重置写跟踪状态,设置在dwFlags参数WRITE_WATCH_FLAG_RESET值。或者,您可以调用ResetWriteWatch函数重置写跟踪状态。但是,如果您使用ResetWriteWatch,您必须确保在没有线程写GetWriteWatch之间的间隔和ResetWriteWatch该地区通话。否则,有可能会被写入网页,您不检测。
该GetWriteWatch功能可以是有用的廓线仪,调试工具和垃圾收集。
要求:
最低支持clientWindows与SP3 XP中,Windows 2000专业版
最低支持serverWindows与SP3的服务器2003,Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
内存管理功能
ResetWriteWatch
VirtualAlloc
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==GetWriteWatch Function
Retrieves the addresses of the pages that are written to in a region of virtual memory.
64-bit Windows on Itanium-based systems: Due to the difference in page sizes, GetWriteWatch is not supported for 32-bit applications.
Syntax
C++
UINT WINAPI GetWriteWatch(
__in DWORD dwFlags,
__in PVOID lpBaseAddress,
__in SIZE_T dwRegionSize,
__out PVOID *lpAddresses,
__inout PULONG_PTR lpdwCount,
__out PULONG lpdwGranularity
);
Parameters
dwFlags [in]
Indicates whether the function resets the write-tracking state.
To reset the write-tracking state, set this parameter to WRITE_WATCH_FLAG_RESET. If this parameter is 0 (zero), GetWriteWatch does not reset the write-tracking state. For more information, see the Remarks section of this topic.
lpBaseAddress [in]
The base address of the memory region for which to retrieve write-tracking information.
This address must be in a memory region that is allocated by the VirtualAlloc function using MEM_WRITE_WATCH.
dwRegionSize [in]
The size of the memory region for which to retrieve write-tracking information, in bytes.
lpAddresses [out]
A pointer to a buffer that receives an array of page addresses in the memory region.
The addresses indicate the pages that have been written to since the region has been allocated or the write-tracking state has been reset.
lpdwCount [in, out]
On input, this variable indicates the size of the lpAddresses array, in array elements.
On output, the variable receives the number of page addresses that are returned in the array.
lpdwGranularity [out]
A pointer to a variable that receives the page size, in bytes.
Return Value
If the function succeeds, the return value is 0 (zero).
If the function fails, the return value is a nonzero value.
Remarks
When you call the VirtualAlloc function to reserve or commit memory, you can specify MEM_WRITE_WATCH. This value causes the system to keep track of the pages that are written to in the committed memory region. You can call the GetWriteWatch function to retrieve the addresses of the pages that have been written to since the region has been allocated or the write-tracking state has been reset.
To reset the write-tracking state, set the WRITE_WATCH_FLAG_RESET value in the dwFlags parameter. Alternatively, you can call the ResetWriteWatch function to reset the write-tracking state. However, if you use ResetWriteWatch, you must ensure that no threads write to the region during the interval between the GetWriteWatch and ResetWriteWatch calls. Otherwise, there may be written pages that you do not detect.
The GetWriteWatch function can be useful to profilers, debugging tools, or garbage collectors.
Requirements
Minimum supported clientWindows XP, Windows 2000 Professional with SP3
Minimum supported serverWindows Server 2003, Windows 2000 Server with SP3
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
Memory Management Functions
ResetWriteWatch
VirtualAlloc
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa366573(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:36