[ofw] [RFC] [PATCH 4/12] winverbs: implement IWVProvider

Tzachi Dar tzachid at mellanox.co.il
Sun Mar 16 01:03:28 PDT 2008


BOOL WINAPI CloseHandle( __in  HANDLE hObject);

When everything is fine, CloseHandle shouldn't fail.
However, if one will be using the wrong handle, it still might fail.

Having an assert that will check that for debug is therefore a good
idea.
I guess that if calling CloseHandle on INVALID_HANDLE_VALUE will return
an error we will have to fix them.

Thanks
Tzachi

> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org 
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Sean Hefty
> Sent: Saturday, March 15, 2008 7:28 PM
> To: 'Fab Tillier'; ofw at lists.openfabrics.org
> Subject: RE: [ofw] [RFC] [PATCH 4/12] winverbs: implement IWVProvider
> 
> >>+CWVProvider::~CWVProvider()
> >>+{
> >>+       CloseHandle(m_hFile);
> >
> >What happens if m_hFile == INVALID_HANDLE_VALUE?
> 
> CloseHandle can take INVALID_HANDLE_VALUE as input.
> 
> - Sean
> 
> _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
> 



More information about the ofw mailing list