"""
Auto-generated Python stub file from w32.win32file.py
Module: w32.win32file
"""

import c


import t
from stdint import *
from w32.win32base import *

GENERIC_READ: t.CDefine = 0x80000000
GENERIC_WRITE: t.CDefine = 0x40000000
GENERIC_EXECUTE: t.CDefine = 0x20000000
GENERIC_ALL: t.CDefine = 0x10000000
FILE_SHARE_READ: t.CDefine = 0x00000001
FILE_SHARE_WRITE: t.CDefine = 0x00000002
FILE_SHARE_DELETE: t.CDefine = 0x00000004
CREATE_NEW: t.CDefine = 1
CREATE_ALWAYS: t.CDefine = 2
OPEN_EXISTING: t.CDefine = 3
OPEN_ALWAYS: t.CDefine = 4
TRUNCATE_EXISTING: t.CDefine = 5
FILE_ATTRIBUTE_READONLY: t.CDefine = 0x00000001
FILE_ATTRIBUTE_HIDDEN: t.CDefine = 0x00000002
FILE_ATTRIBUTE_SYSTEM: t.CDefine = 0x00000004
FILE_ATTRIBUTE_DIRECTORY: t.CDefine = 0x00000010
FILE_ATTRIBUTE_ARCHIVE: t.CDefine = 0x00000020
FILE_ATTRIBUTE_NORMAL: t.CDefine = 0x00000080
FILE_ATTRIBUTE_TEMPORARY: t.CDefine = 0x00000100
FILE_ATTRIBUTE_COMPRESSED: t.CDefine = 0x00000800
FILE_ATTRIBUTE_OFFLINE: t.CDefine = 0x00001000
FILE_ATTRIBUTE_ENCRYPTED: t.CDefine = 0x00004000
FILE_FLAG_WRITE_THROUGH: t.CDefine = 0x80000000
FILE_FLAG_OVERLAPPED: t.CDefine = 0x40000000
FILE_FLAG_NO_BUFFERING: t.CDefine = 0x20000000
FILE_FLAG_RANDOM_ACCESS: t.CDefine = 0x10000000
FILE_FLAG_SEQUENTIAL_SCAN: t.CDefine = 0x08000000
FILE_FLAG_DELETE_ON_CLOSE: t.CDefine = 0x04000000
FILE_FLAG_BACKUP_SEMANTICS: t.CDefine = 0x02000000
FILE_FLAG_POSIX_SEMANTICS: t.CDefine = 0x01000000
FILE_BEGIN: t.CDefine = 0
FILE_CURRENT: t.CDefine = 1
FILE_END: t.CDefine = 2
STD_INPUT_HANDLE: t.CDefine = t.CUnsignedLong(-10)
STD_OUTPUT_HANDLE: t.CDefine = t.CUnsignedLong(-11)
STD_ERROR_HANDLE: t.CDefine = t.CUnsignedLong(-12)
MOVEFILE_REPLACE_EXISTING: t.CDefine = 0x00000001
MOVEFILE_COPY_ALLOWED: t.CDefine = 0x00000002
MOVEFILE_WRITE_THROUGH: t.CDefine = 0x00000008

class BY_HANDLE_FILE_INFORMATION:
    dwFileAttributes: ULONG
    ftCreationTime: FILETIME
    ftLastAccessTime: FILETIME
    ftLastWriteTime: FILETIME
    dwVolumeSerialNumber: ULONG
    nFileSizeHigh: ULONG
    nFileSizeLow: ULONG
    nNumberOfLinks: ULONG
    nFileIndexHigh: ULONG
    nFileIndexLow: ULONG
class WIN32_FIND_DATAA:
    dwFileAttributes: ULONG
    ftCreationTime: FILETIME
    ftLastAccessTime: FILETIME
    ftLastWriteTime: FILETIME
    nFileSizeHigh: ULONG
    nFileSizeLow: ULONG
    dwReserved0: ULONG
    dwReserved1: ULONG
    cFileName: t.CArray[t.CChar, 260]
    cAlternateFileName: t.CArray[t.CChar, 14]
class WIN32_FIND_DATAW:
    dwFileAttributes: ULONG
    ftCreationTime: FILETIME
    ftLastAccessTime: FILETIME
    ftLastWriteTime: FILETIME
    nFileSizeHigh: ULONG
    nFileSizeLow: ULONG
    dwReserved0: ULONG
    dwReserved1: ULONG
    cFileName: t.CArray[t.CUInt16T, 260]
    cAlternateFileName: t.CArray[t.CUInt16T, 14]

def CreateFileA(lpFileName: LPCSTR, dwDesiredAccess: ULONG, dwShareMode: ULONG, lpSecurityAttributes: SECURITY_ATTRIBUTES | t.CPtr, dwCreationDisposition: ULONG, dwFlagsAndAttributes: ULONG, hTemplateFile: HANDLE) -> HANDLE | t.State: pass

def CreateFileW(lpFileName: LPCWSTR, dwDesiredAccess: ULONG, dwShareMode: ULONG, lpSecurityAttributes: SECURITY_ATTRIBUTES | t.CPtr, dwCreationDisposition: ULONG, dwFlagsAndAttributes: ULONG, hTemplateFile: HANDLE) -> HANDLE | t.State: pass

def ReadFile(hFile: HANDLE, lpBuffer: VOIDPTR, nNumberOfBytesToRead: ULONG, lpNumberOfBytesRead: ULONG | t.CPtr, lpOverlapped: OVERLAPPED | t.CPtr) -> BOOL | t.State: pass

def WriteFile(hFile: HANDLE, lpBuffer: t.CConst | VOIDPTR, nNumberOfBytesToWrite: ULONG, lpNumberOfBytesWritten: ULONG | t.CPtr, lpOverlapped: OVERLAPPED | t.CPtr) -> BOOL | t.State: pass

def SetFilePointer(hFile: HANDLE, lDistanceToMove: LONG, lpDistanceToMoveHigh: LONG | t.CPtr, dwMoveMethod: ULONG) -> LONG | t.State: pass

def SetFilePointerEx(hFile: HANDLE, liDistanceToMove: LARGE_INTEGER | t.CPtr, lpNewFilePointer: LARGE_INTEGER | t.CPtr, dwMoveMethod: ULONG) -> BOOL | t.State: pass

def GetFileSize(hFile: HANDLE, lpFileSizeHigh: ULONG | t.CPtr) -> ULONG | t.State: pass

def GetFileSizeEx(hFile: HANDLE, lpFileSize: LARGE_INTEGER | t.CPtr) -> BOOL | t.State: pass

def SetEndOfFile(hFile: HANDLE) -> BOOL | t.State: pass

def FlushFileBuffers(hFile: HANDLE) -> BOOL | t.State: pass

def GetFileType(hFile: HANDLE) -> ULONG | t.State: pass

def GetFileAttributesA(lpFileName: LPCSTR) -> ULONG | t.State: pass

def GetFileAttributesW(lpFileName: LPCWSTR) -> ULONG | t.State: pass

def SetFileAttributesA(lpFileName: LPCSTR, dwFileAttributes: ULONG) -> BOOL | t.State: pass

def SetFileAttributesW(lpFileName: LPCWSTR, dwFileAttributes: ULONG) -> BOOL | t.State: pass

def DeleteFileA(lpFileName: LPCSTR) -> BOOL | t.State: pass

def DeleteFileW(lpFileName: LPCWSTR) -> BOOL | t.State: pass

def MoveFileA(lpExistingFileName: LPCSTR, lpNewFileName: LPCSTR) -> BOOL | t.State: pass

def MoveFileW(lpExistingFileName: LPCWSTR, lpNewFileName: LPCWSTR) -> BOOL | t.State: pass

def MoveFileExA(lpExistingFileName: LPCSTR, lpNewFileName: LPCSTR, dwFlags: ULONG) -> BOOL | t.State: pass

def MoveFileExW(lpExistingFileName: LPCWSTR, lpNewFileName: LPCWSTR, dwFlags: ULONG) -> BOOL | t.State: pass

def CopyFileA(lpExistingFileName: LPCSTR, lpNewFileName: LPCSTR, bFailIfExists: BOOL) -> BOOL | t.State: pass

def CopyFileW(lpExistingFileName: LPCWSTR, lpNewFileName: LPCWSTR, bFailIfExists: BOOL) -> BOOL | t.State: pass

def CreateDirectoryA(lpPathName: LPCSTR, lpSecurityAttributes: SECURITY_ATTRIBUTES | t.CPtr) -> BOOL | t.State: pass

def CreateDirectoryW(lpPathName: LPCWSTR, lpSecurityAttributes: SECURITY_ATTRIBUTES | t.CPtr) -> BOOL | t.State: pass

def RemoveDirectoryA(lpPathName: LPCSTR) -> BOOL | t.State: pass

def RemoveDirectoryW(lpPathName: LPCWSTR) -> BOOL | t.State: pass

def FindFirstFileA(lpFileName: LPCSTR, lpFindFileData: WIN32_FIND_DATAA | t.CPtr) -> HANDLE | t.State: pass

def FindFirstFileW(lpFileName: LPCWSTR, lpFindFileData: WIN32_FIND_DATAW | t.CPtr) -> HANDLE | t.State: pass

def FindNextFileA(hFindFile: HANDLE, lpFindFileData: WIN32_FIND_DATAA | t.CPtr) -> BOOL | t.State: pass

def FindNextFileW(hFindFile: HANDLE, lpFindFileData: WIN32_FIND_DATAW | t.CPtr) -> BOOL | t.State: pass

def FindClose(hFindFile: HANDLE) -> BOOL | t.State: pass

def GetStdHandle(nStdHandle: ULONG) -> HANDLE | t.State: pass

def SetStdHandle(nStdHandle: ULONG, hHandle: HANDLE) -> BOOL | t.State: pass

def GetFileInformationByHandle(hFile: HANDLE, lpFileInformation: BY_HANDLE_FILE_INFORMATION | t.CPtr) -> BOOL | t.State: pass

def LockFile(hFile: HANDLE, dwFileOffsetLow: ULONG, dwFileOffsetHigh: ULONG, nNumberOfBytesToLockLow: ULONG, nNumberOfBytesToLockHigh: ULONG) -> BOOL | t.State: pass

def UnlockFile(hFile: HANDLE, dwFileOffsetLow: ULONG, dwFileOffsetHigh: ULONG, nNumberOfBytesToUnlockLow: ULONG, nNumberOfBytesToUnlockHigh: ULONG) -> BOOL | t.State: pass

def GetTempPathA(nBufferLength: ULONG, lpBuffer: CHARPTR) -> ULONG | t.State: pass

def GetTempPathW(nBufferLength: ULONG, lpBuffer: WCHARPTR) -> ULONG | t.State: pass

def GetTempFileNameA(lpPathName: LPCSTR, lpPrefixString: LPCSTR, uUnique: UINT, lpTempFileName: CHARPTR) -> UINT | t.State: pass

def GetTempFileNameW(lpPathName: LPCWSTR, lpPrefixString: LPCWSTR, uUnique: UINT, lpTempFileName: WCHARPTR) -> UINT | t.State: pass

def GetCurrentDirectoryA(nBufferLength: ULONG, lpBuffer: CHARPTR) -> ULONG | t.State: pass

def GetCurrentDirectoryW(nBufferLength: ULONG, lpBuffer: WCHARPTR) -> ULONG | t.State: pass

def SetCurrentDirectoryA(lpPathName: LPCSTR) -> BOOL | t.State: pass

def SetCurrentDirectoryW(lpPathName: LPCWSTR) -> BOOL | t.State: pass

def GetModuleFileNameA(hModule: HANDLE, lpFilename: CHARPTR, nSize: ULONG) -> ULONG | t.State: pass

def GetModuleFileNameW(hModule: HANDLE, lpFilename: WCHARPTR, nSize: ULONG) -> ULONG | t.State: pass


HANDLE_FLAG_INHERIT: t.CDefine = 0x00000001
HANDLE_FLAG_PROTECT_FROM_CLOSE: t.CDefine = 0x00000002

def CreatePipe(hReadPipe: HANDLE | t.CPtr, hWritePipe: HANDLE | t.CPtr, lpPipeAttributes: SECURITY_ATTRIBUTES | t.CPtr, nSize: ULONG) -> BOOL | t.State: pass

def SetHandleInformation(hObject: HANDLE, dwMask: ULONG, dwFlags: ULONG) -> BOOL | t.State: pass

def DuplicateHandle(hSourceProcessHandle: HANDLE, hSourceHandle: HANDLE, hTargetProcessHandle: HANDLE, lpTargetHandle: HANDLE | t.CPtr, dwDesiredAccess: ULONG, bInheritHandle: BOOL, dwOptions: ULONG) -> BOOL | t.State: pass


DUPLICATE_SAME_ACCESS: t.CDefine = 0x00000002