CAPIHook g_ReadFile; //the main object of CAPIHook! typedef bool (WINAPI *PFNReadFile)( __in HANDLE hFile, __out LPVOID lpBuffer, __in DWORD nNumberOfBytesToRea __out LPDWORD lpNumberOfBytesRead __in LPOVERLAPPED lpOverlapped ); bool WINAPI MyReadFile( __in HANDLE hFile, __out LPVOID lpBuffer, __in DWORD nNumberOfBytesToRead, __out LPDWORD lpNumberOfBytesRead, __in LPOVERLAPPED lpOverlapped ) { char * m_pBuf = (char *)"zxcvzxcv"; //The problem is here, how to write my own data into the Buffer, displayed it out? DWORD len = 0; nResult = ((PFNReadFile)(PROC)g_ReadFile)(hFile, m_pBuf, strlen(m_pBuf), &len, NULL); return nResult; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)