One small question: Is there a define for invalid handle value ? (I think no but maybe i've missed something) It is very useful to keep the state of handle => if INVALID_HANDLE then not opened else opened and valid.