[ofw] running ibnetdisc with the debugger attached

Hefty, Sean sean.hefty at intel.com
Thu Aug 26 14:46:46 PDT 2010


> m_OverlapWrite.hEvent is being closed twice.
> 
> CWMProvider::~CWMProvider()
> 
> {
> 
>                 if (m_OverlapRead.hEvent != NULL) {
> 
>                                 CloseHandle(m_OverlapWrite.hEvent);

Yep -wrong overlap here...  I'll fix.

> 
>                 }
> 
>                 if (m_OverlapWrite.hEvent != NULL) {
> 
>                                 CloseHandle(m_OverlapWrite.hEvent);
> 
>                 }
> 
> 
> 
> Writefile is not being used according to the docs. Should be something like:
> 
> 
> 
>         m_OverlapWrite.Offset = 0;
> 
>         m_OverlapWrite.OffsetHigh = 0;
> 
> 
> 
>                                 EnterCriticalSection(&m_CritSecWrite);
> 
>                                 ret = WriteFile(m_hFile, pMad, bytes, &bytes, &m_OverlapWrite);
> 
>         if (ret==0) {
> 
>             if(GetLastError() == ERROR_IO_PENDING) {
> 
>                 hr = GetOverlappedResult(&m_OverlapWrite, &bytes, TRUE);
> 
>             } else {
> 
>                 Print()
> 
>                 hr = ???
> 
>             }
> 
> 
> 
> The same is probably true for ReadFile.

I will take a look at this.

Thanks,
Sean



More information about the ofw mailing list