本文整理汇总了C++中Files::find方法的典型用法代码示例。如果您正苦于以下问题:C++ Files::find方法的具体用法?C++ Files::find怎么用?C++ Files::find使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Files
的用法示例。
在下文中一共展示了Files::find方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: APIHook_WriteFile
BOOL __stdcall APIHook_WriteFile(
LPVOID hFile,
LPVOID lpBuffer,
unsigned long int nNumberOfBytesToWrite,
unsigned long int * lpNumberOfBytesWritten,
LPOVERLAPPED lpOverlapped)
{
BOOL result = WriteFile (
hFile,
lpBuffer,
nNumberOfBytesToWrite,
lpNumberOfBytesWritten,
lpOverlapped);
Files::iterator it = files.find(hFile);
if(it != files.end())
{
logger.write(it->second, result == TRUE ? "WriteFile OK" : "WriteFile ERROR", lpBuffer, nNumberOfBytesToWrite);
}
return result;
}
示例2: APIHook_ReadFile
BOOL __stdcall APIHook_ReadFile(
LPVOID hFile,
LPVOID lpBuffer,
unsigned long int nNumberOfBytesToRead,
unsigned long int * lpNumberOfBytesRead,
LPOVERLAPPED lpOverlapped)
{
BOOL result = ReadFile (
hFile,
lpBuffer,
nNumberOfBytesToRead,
lpNumberOfBytesRead,
lpOverlapped);
Files::iterator it = files.find(hFile);
if(result == TRUE && it != files.end())
{
logger.write(it->second, "ReadFile", lpBuffer, *lpNumberOfBytesRead);
}
return result;
}