1 #include <msp/core/systemerror.h>
3 #include "handle_private.h"
8 Handle::operator const void *() const
10 return priv->handle!=INVALID_HANDLE_VALUE ? this : 0;
14 void sys_set_blocking(Handle &, bool)
18 unsigned sys_read(Handle &handle, char *buf, unsigned size)
21 if(ReadFile(*handle, buf, size, &ret, 0)==0)
22 throw system_error("ReadFile");
27 unsigned sys_write(Handle &handle, const char *buf, unsigned size)
30 if(WriteFile(*handle, buf, size, &ret, 0)==0)
31 throw system_error("WriteFile");
36 void sys_close(Handle &handle)