LPOVERLAPPED_COMPLETION_ROUTINE is incompatible with function

淺唱寂寞╮ 提交于 2019-12-02 09:34:39

You should start by reading the documentation carefully. This part is of particular import:

The OVERLAPPED data structure must remain valid for the duration of the write operation. It should not be a variable that can go out of scope while the write operation is pending completion.

You are not meeting that requirement, and you need to tackle that issue urgently.

As for the compiler error, that's simple enough. Your callback does not meet the requirements. Again consult the documentation where its signature is given as:

VOID CALLBACK FileIOCompletionRoutine(
  _In_     DWORD dwErrorCode,
  _In_     DWORD dwNumberOfBytesTransfered,
  _Inout_  LPOVERLAPPED lpOverlapped
);

You have omitted CALLBACK which specifies the calling convention.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!