def CreateFile_error_check(func_name, result, func, args):
    if result == INVALID_HANDLE_VALUE:
        raise Kernel32Error(func_name)
    return args
raise Kernel32Error if result is NOT 0
dataset/ETHPy150Open hakril/PythonForWindows/windows/winproxy.py/CreateFile_error_check