网站首页  词典首页

请输入您要查询的函数:

 

术语 getwschanges
释义 GetWsChanges
语法:
C++
BOOL WINAPI GetWsChanges(
__in HANDLE hProcess,
__out PPSAPI_WS_WATCH_INFORMATION lpWatchInfo,
__in DWORD cb
);
GetWsChanges功能
获取信息的已被添加到指定的工作进程中设置自上一次函数或InitializeProcessForWsWatch功能被称为页。
要检索扩展的信息,请使用GetWsChangesEx功能。
参数
hProcess [in]
句柄的进程。句柄必须有PROCESS_QUERY_INFORMATION访问权。有关更多信息,请参见过程的安全性和访问权限。
lpWatchInfo [out]
一个用户指针分配的缓冲区,它接收的PSAPI_WS_WATCH_INFORMATION结构的数组。该数组被终止的结构,其FaultingPc成员是NULL。
文件 [in]
该lpWatchInfo缓冲区大小,以字节为单位。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
GetLastError返回ERROR_INSUFFICIENT_BUFFER如果lpWatchInfo缓冲区不够大,无法包含所有的工作集的变化记录;缓冲区返回空。重新分配的缓冲区更大的内存块,再打电话。
备注
操作系统使用每个进程缓冲区,以维持工作集变更记录。如果多个应用程序(或多个在同一应用程序线程)调用同一进程处理这个功能,没有申请将有变化的工作集完整的会计,因为每次调用清空缓冲区。
该操作系统不记录,记录了新的变化,而它正在处理的查询(和清空缓冲区)。该函数设置错误代码NO_MORE_ENTRIES并发查询,如果收到,而它正在处理另一个查询。
如果缓冲区已满,没有新的记录被添加到该函数或InitializeProcessForWsWatch功能,被称为缓冲区。您应该把这种方法有足够的频率,以防止数据丢失。如果档案丢失,该数组被终止的结构,其FaultingPc成员是NULL,其FaultingVa成员设置到该损失的记录数。
Windows Server 2003中的Windows XP和Windows 2000:如果档案丢失,该数组的结构,其FaultingPc成员是NULL,其FaultingVa成员1终止。
与PSAPI版本的Windows 7和Windows Server 2008 R2的2起,这个功能被定义为Psapi.h K32GetWsChanges和Kernel32.lib和Kernel32.dll出口。但是,您应该始终作为GetWsChanges调用这个函数。为了确保对程序将运行在Windows的早期版本的符号的正确决议,添加Psapi.lib到TARGETLIBS宏和编译程序与- DPSAPI_VERSION = 1。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderPsapi.h
LibraryKernel32.lib在Windows 7和Windows Server 2008 R2的Psapi.lib在Windows Server 2008,Windows Vista中的Windows Server 2003,和Windows XP/2000
DLLKernel32.dll在Windows 7和Windows Server 2008 R2的Psapi.dll在Windows Server 2008,Windows Vista中的Windows Server 2003,和Windows XP/2000
参见
EnumProcesses
InitializeProcessForWsWatch
PSAPI函数
PSAPI_WS_WATCH_INFORMATION
工作集信息
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==GetWsChanges Function
Retrieves information about the pages that have been added to the working set of the specified process since the last time this function or the InitializeProcessForWsWatch function was called.
To retrieve extended information, use the GetWsChangesEx function.
Syntax
C++
BOOL WINAPI GetWsChanges(
__in HANDLE hProcess,
__out PPSAPI_WS_WATCH_INFORMATION lpWatchInfo,
__in DWORD cb
);
Parameters
hProcess [in]
A handle to the process. The handle must have the PROCESS_QUERY_INFORMATION access right. For more information, see Process Security and Access Rights .
lpWatchInfo [out]
A pointer to a user-allocated buffer that receives an array of PSAPI_WS_WATCH_INFORMATION structures. The array is terminated with a structure whose FaultingPc member is NULL.
cb [in]
The size of the lpWatchInfo buffer, in bytes.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
GetLastError returns ERROR_INSUFFICIENT_BUFFER if the lpWatchInfo buffer is not large enough to contain all the working set change records; the buffer is returned empty. Reallocate a larger block of memory for the buffer and call again.
Remarks
The operating system uses one buffer per process to maintain working set change records. If more than one application (or multiple threads in the same application) calls this function with the same process handle, neither application will have a complete accounting of the working set changes because each call empties the buffer.
The operating system does not record new change records while it is processing the query (and emptying the buffer). The function sets the error code to NO_MORE_ENTRIES if a concurrent query is received while it is processing another query.
If the buffer becomes full, no new records are added to the buffer until this function or the InitializeProcessForWsWatch function is called. You should call this method with enough frequency to prevent possible data loss. If records are lost, the array is terminated with a structure whose FaultingPc member is NULL and whose FaultingVa member is set to the number of records that were lost.
Windows Server 2003, Windows XP, and Windows 2000: If records are lost, the array is terminated with a structure whose FaultingPc member is NULL and whose FaultingVa member is 1.
Starting with PSAPI version 2 for Windows 7 and Windows Server 2008 R2, this function is defined as K32GetWsChanges in Psapi.h and exported in Kernel32.lib and Kernel32.dll. However, you should always call this function as GetWsChanges. To ensure correct resolution of symbols for programs that will run on earlier versions of Windows, add Psapi.lib to the TARGETLIBS macro and compile the program with –DPSAPI_VERSION=1.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderPsapi.h
LibraryKernel32.lib on Windows 7 and Windows Server 2008 R2, Psapi.lib on Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP/2000
DLLKernel32.dll on Windows 7 and Windows Server 2008 R2, Psapi.dll on Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP/2000
See Also
EnumProcesses
InitializeProcessForWsWatch
PSAPI Functions
PSAPI_WS_WATCH_INFORMATION
Working Set Information
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms683239(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:23:37