namespace Msp {
namespace IO {
-Handle::operator const void *() const
-{
- return priv->handle!=INVALID_HANDLE_VALUE ? this : 0;
-}
-
-
void sys_set_blocking(Handle &, bool)
{
}
void sys_close(Handle &handle)
{
- CloseHandle(*handle);
+ if(handle)
+ {
+ CloseHandle(*handle);
+ *handle = INVALID_HANDLE_VALUE;
+ }
}
} // namespace IO