Wrapper for some Win32 functions