Although running without debugger seems to be ok, we have found the following
issues while running with the debugger:
Both issues in the file wm_provider.cpp
m_OverlapWrite.hEvent is being closed twice.
CWMProvider::~CWMProvider()
{
if (m_OverlapRead.hEvent != NULL) {
CloseHandle(m_OverlapWrite.hEvent);
}
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.
What do you think?
Tzachi & Irena
_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw