GetOverlappedResult() call in overlay I/O



In the application, I tried to find out how many bytes was written by the
driver by calling GetOverlappedResult() API.
I do not know why this API alwaysreturn 0 in length. Before calliing
GetOverlappedResult(), the application does wait the following API

dwRet = WaitForMultipleObjects(2, h, FALSE, INFINITE);

Does anybody have such problem in calling GetOverlappedResult()?


-----------------------Get the number of bytes written by
driver ---------------------------------------------------------

DWORD
UVPNDriverHelper::GetReturnedBytes(HANDLE hEvent)
{
OVERLAPPED Overlapped;
DWORD NumberOfBytesTransferred;

memset(&Overlapped, 0, sizeof(OVERLAPPED));
Overlapped.hEvent=hEvent;
if (!GetOverlappedResult(m_hDevice, &Overlapped, &NumberOfBytesTransferred,
TRUE))
{
ERRORLOGLEVEL0(_T("GetOverlappedResult() fail
error=%x\n"),GetLastError());
return 0;
}
ERRORLOGLEVEL0(TEXT("GetReturnedBytes(): NumberOfBytesTransferred(%d)
error=%d!!!\n"),NumberOfBytesTransferred, GetLastError());
return NumberOfBytesTransferred;
}


.



Relevant Pages

  • Re: GetOverlappedResult() call in overlay I/O
    ... Be sure you fill Irp->IoStatus.Information properly before calling ... driver by calling GetOverlappedResult() API. ... I do not know why this API alwaysreturn 0 in length. ...
    (microsoft.public.development.device.drivers)
  • Re: GetOverlappedResult() call in overlay I/O
    ... I don't modify my driver. ... The following API can get the correct value but GetOverlappedResult() ... driver by calling GetOverlappedResult() API. ...
    (microsoft.public.development.device.drivers)
  • Re: GetOverlappedResult() call in overlay I/O
    ... IoCompleteRequest. ... driver by calling GetOverlappedResult() API. ... I do not know why this API alwaysreturn 0 in length. ... Before calliing ...
    (microsoft.public.development.device.drivers)
  • Re: Digital-tv card drivers and API discussion
    ... Designing completely new api takes some time and I ... > driver development experience, I have a couple of questions for you. ... > 2) As linux kernel is GPL-licensed, I cannot just port the linux driver ... I'm able to watch DVB programs converted from MPEG TS substreams to MPEG ...
    (freebsd-arch)
  • Re: TDBC documentation, examples, syntax?
    ... every driver and provides no opportunity for abstraction. ... procedural API, the internal details are opaque, the interface remains ... that database. ... standard API, or provide a quirky API with non-standard features. ...
    (comp.lang.tcl)