|
@@ -287,14 +287,15 @@ bool CIOCPPipe::_DoAccpet( PER_IO_CONTEXT* pIoContext )
|
|
|
{
|
|
|
// 客户端连接后,发出指令:获取客户端注入进程信息;
|
|
|
pIoContext->m_OpType = OP_SEND;
|
|
|
- _stprintf_s(pIoContext->chReply, _T("%s"), _T("1001\n"));
|
|
|
- pIoContext->cbToWrite = sizeof(pIoContext->chReply);
|
|
|
+ _stprintf_s(pIoContext->chReply, _T("%s"), _T("1001"));
|
|
|
+ pIoContext->cbToWrite = _tcslen(pIoContext->chReply);
|
|
|
|
|
|
+ DWORD dwNumberOfBytesWritten = 0;
|
|
|
BOOL fWrite = WriteFile(
|
|
|
pIoContext->m_PipeAccept,
|
|
|
pIoContext->chReply,
|
|
|
pIoContext->cbToWrite,
|
|
|
- &pIoContext->cbToWrite,
|
|
|
+ &dwNumberOfBytesWritten,
|
|
|
(LPOVERLAPPED)pIoContext);
|
|
|
|
|
|
if (!fWrite) {
|