0

I cannot find the function CancelIo and GetOverlappedResult

The function CancelIO is described as The CancelIO function cancels all pending input and output (I/O) operations that were issued by the calling thread for the specified file handle. The function does not cancel I/O operations issued for the file handle by other threads.

The function GetOverlappedResult is described as Retrieves the results of an overlapped operation on the specified file, named pipe, or communications device. To specify a timeout interval or wait on an alertable thread.

They are not defined in the windows.h. where header file can I find them? or are there equlivlent function can replace them?

tshepang
  • 12,111
  • 21
  • 91
  • 136
  • Both [GetOverlappedResult()](http://msdn.microsoft.com/en-us/library/windows/desktop/ms683209(v=vs.85).aspx) and [CancelIO()](http://msdn.microsoft.com/en-us/library/windows/desktop/aa363791(v=vs.85).aspx) are supposed to be pulled in with `#include `. They're actually in headers like `WinBase.h` that are pulled into `Windows.h` Windows 8 and Windows Server 2012 require `#include ` for `GetOverlappedResult()`, but I'm surprised `Windows.h` doesn't pull that is as well. – WhozCraig Dec 06 '12 at 17:54
  • I just checked they are not in winbase.h either. I am running my application under win32 smart device Visual 2008 environment, it that makes any difference – user651659 Dec 06 '12 at 18:02
  • 1
    It likely will (make a difference), since if you're targeting Windows CE (intentionally or otherwise) overlapped IO isn't supported, which would explain the lack of API support. – WhozCraig Dec 06 '12 at 18:13

1 Answers1

1

Windows CE, the base OS beneath Windows Mobile, doesn't support overlapped I/O. You'll have to re-factor the code to eliminate its use.

tshepang
  • 12,111
  • 21
  • 91
  • 136
ctacke
  • 66,480
  • 18
  • 94
  • 155