开发者

Identifying memory-mapped files

开发者 https://www.devze.com 2023-02-11 22:31 出处:网络
I\'m identifying parts of process\'s virtual memory using VirtualQuery. I identify regions taken by mapped files (MEM_MAPPED), but how to determine actual files (filenames) of files allocated there? I

I'm identifying parts of process's virtual memory using VirtualQuery. I identify regions taken by mapped files (MEM_MAPPED), but how to determine actual files (filenames) of files allocated there? I suppose it has something to do with MapView* family of APIs but cant开发者_如何学C figure it out exactly...


It looks like GetMappedFileName() is the function you want.

DWORD WINAPI GetMappedFileName(
    __in   HANDLE hProcess,
    __in   LPVOID lpv,
    __out  LPTSTR lpFilename,
    __in   DWORD nSize
);

GetMappedFileName on MSDN

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号