Adding some PE related windef + CertFreeCertificateContext

This commit is contained in:
hakril
2018-03-04 18:45:23 +01:00
parent d91bc1a45a
commit 1dc13b1a35
10 changed files with 2765 additions and 2631 deletions
@@ -0,0 +1,49 @@
// A LOT of PE related definition are in windef.txt
// This refactoring (multiple .txt file) come very late in the dev
#define IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA 0x0020 // Image can handle a high entropy 64-bit virtual address space.
#define IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE 0x0040 // DLL can move.
#define IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY 0x0080 // Code Integrity Image
#define IMAGE_DLLCHARACTERISTICS_NX_COMPAT 0x0100 // Image is NX compatible
#define IMAGE_DLLCHARACTERISTICS_NO_ISOLATION 0x0200 // Image understands isolation and doesn't want it
#define IMAGE_DLLCHARACTERISTICS_NO_SEH 0x0400 // Image does not use SEH. No SE handler may reside in this image
#define IMAGE_DLLCHARACTERISTICS_NO_BIND 0x0800 // Do not bind this image.
#define IMAGE_DLLCHARACTERISTICS_APPCONTAINER 0x1000 // Image should execute in an AppContainer
#define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER 0x2000 // Driver uses WDM model
#define IMAGE_DLLCHARACTERISTICS_GUARD_CF 0x4000 // Image supports Control Flow Guard.
#define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE 0x8000
// Directory Entries
#define IMAGE_DIRECTORY_ENTRY_EXPORT 0 // Export Directory
#define IMAGE_DIRECTORY_ENTRY_IMPORT 1 // Import Directory
#define IMAGE_DIRECTORY_ENTRY_RESOURCE 2 // Resource Directory
#define IMAGE_DIRECTORY_ENTRY_EXCEPTION 3 // Exception Directory
#define IMAGE_DIRECTORY_ENTRY_SECURITY 4 // Security Directory
#define IMAGE_DIRECTORY_ENTRY_BASERELOC 5 // Base Relocation Table
#define IMAGE_DIRECTORY_ENTRY_DEBUG 6 // Debug Directory
#define IMAGE_DIRECTORY_ENTRY_ARCHITECTURE 7 // Architecture Specific Data
#define IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8 // RVA of GP
#define IMAGE_DIRECTORY_ENTRY_TLS 9 // TLS Directory
#define IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10 // Load Configuration Directory
#define IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT 11 // Bound Import Directory in headers
#define IMAGE_DIRECTORY_ENTRY_IAT 12 // Import Address Table
#define IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT 13 // Delay Load Import Descriptors
#define IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR 14 // COM Runtime descriptor
//
// Based relocation types.
//
#define IMAGE_REL_BASED_ABSOLUTE 0
#define IMAGE_REL_BASED_HIGH 1
#define IMAGE_REL_BASED_LOW 2
#define IMAGE_REL_BASED_HIGHLOW 3
#define IMAGE_REL_BASED_HIGHADJ 4
#define IMAGE_REL_BASED_MACHINE_SPECIFIC_5 5
#define IMAGE_REL_BASED_RESERVED 6
#define IMAGE_REL_BASED_MACHINE_SPECIFIC_7 7
#define IMAGE_REL_BASED_MACHINE_SPECIFIC_8 8
#define IMAGE_REL_BASED_MACHINE_SPECIFIC_9 9
#define IMAGE_REL_BASED_DIR64 10
@@ -188,6 +188,10 @@ BOOL WINAPI CertAddCertificateContextToStore(
_Out_opt_ PCCERT_CONTEXT *ppStoreContext
);
BOOL WINAPI CertFreeCertificateContext(
_In_ PCCERT_CONTEXT pCertContext
);
BOOL WINAPI PFXExportCertStoreEx(
_In_ HCERTSTORE hStore,
File diff suppressed because it is too large Load Diff
+11
View File
@@ -74,6 +74,17 @@ Calling it
windows.winproxy.Kernel32Error: VirtualAlloc: [Error 8] Not enough storage is available to process this command.
"""
Kernel32Error
"""""""""""""
All errors raised by winproxy functions are instance of :class:`Kernel32Error` (or subclasses)
.. autoclass:: Kernel32Error
:show-inheritance:
.. attribute:: api_name
The name of the API that raised the exception
Functions in :mod:`windows.winproxy`
""""""""""""""""""""""""""""""""""""
+21
View File
@@ -2190,6 +2190,27 @@ _IMAGE_EXPORT_DIRECTORY
:class:`DWORD`
_IMAGE_BASE_RELOCATION
''''''''''''''''''''''
.. class:: PIMAGE_BASE_RELOCATION
Pointer to :class:`_IMAGE_BASE_RELOCATION`
.. class:: IMAGE_BASE_RELOCATION
Alias for :class:`_IMAGE_BASE_RELOCATION`
.. class:: _IMAGE_BASE_RELOCATION
.. attribute:: VirtualAddress
:class:`DWORD`
.. attribute:: SizeOfBlock
:class:`DWORD`
_MEMORY_BASIC_INFORMATION
'''''''''''''''''''''''''
.. class:: PMEMORY_BASIC_INFORMATION
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+150 -145
View File
@@ -29,6 +29,31 @@ RollbackTransactionParams = ((1, 'TransactionHandle'),)
OpenTransactionPrototype = WINFUNCTYPE(HANDLE, DWORD, LPGUID)
OpenTransactionParams = ((1, 'dwDesiredAccess'), (1, 'TransactionId'))
#def TpCallbackSendAlpcMessageOnCompletion(TpHandle, PortHandle, Flags, SendMessage):
# return TpCallbackSendAlpcMessageOnCompletion.ctypes_function(TpHandle, PortHandle, Flags, SendMessage)
TpCallbackSendAlpcMessageOnCompletionPrototype = WINFUNCTYPE(NTSTATUS, HANDLE, HANDLE, ULONG, PPORT_MESSAGE)
TpCallbackSendAlpcMessageOnCompletionParams = ((1, 'TpHandle'), (1, 'PortHandle'), (1, 'Flags'), (1, 'SendMessage'))
#def CreateNamedPipeA(lpName, dwOpenMode, dwPipeMode, nMaxInstances, nOutBufferSize, nInBufferSize, nDefaultTimeOut, lpSecurityAttributes):
# return CreateNamedPipeA.ctypes_function(lpName, dwOpenMode, dwPipeMode, nMaxInstances, nOutBufferSize, nInBufferSize, nDefaultTimeOut, lpSecurityAttributes)
CreateNamedPipeAPrototype = WINFUNCTYPE(HANDLE, LPCSTR, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, LPSECURITY_ATTRIBUTES)
CreateNamedPipeAParams = ((1, 'lpName'), (1, 'dwOpenMode'), (1, 'dwPipeMode'), (1, 'nMaxInstances'), (1, 'nOutBufferSize'), (1, 'nInBufferSize'), (1, 'nDefaultTimeOut'), (1, 'lpSecurityAttributes'))
#def CreateNamedPipeW(lpName, dwOpenMode, dwPipeMode, nMaxInstances, nOutBufferSize, nInBufferSize, nDefaultTimeOut, lpSecurityAttributes):
# return CreateNamedPipeW.ctypes_function(lpName, dwOpenMode, dwPipeMode, nMaxInstances, nOutBufferSize, nInBufferSize, nDefaultTimeOut, lpSecurityAttributes)
CreateNamedPipeWPrototype = WINFUNCTYPE(HANDLE, LPWSTR, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, LPSECURITY_ATTRIBUTES)
CreateNamedPipeWParams = ((1, 'lpName'), (1, 'dwOpenMode'), (1, 'dwPipeMode'), (1, 'nMaxInstances'), (1, 'nOutBufferSize'), (1, 'nInBufferSize'), (1, 'nDefaultTimeOut'), (1, 'lpSecurityAttributes'))
#def ConnectNamedPipe(hNamedPipe, lpOverlapped):
# return ConnectNamedPipe.ctypes_function(hNamedPipe, lpOverlapped)
ConnectNamedPipePrototype = WINFUNCTYPE(BOOL, HANDLE, LPOVERLAPPED)
ConnectNamedPipeParams = ((1, 'hNamedPipe'), (1, 'lpOverlapped'))
#def SetNamedPipeHandleState(hNamedPipe, lpMode, lpMaxCollectionCount, lpCollectDataTimeout):
# return SetNamedPipeHandleState.ctypes_function(hNamedPipe, lpMode, lpMaxCollectionCount, lpCollectDataTimeout)
SetNamedPipeHandleStatePrototype = WINFUNCTYPE(BOOL, HANDLE, LPDWORD, LPDWORD, LPDWORD)
SetNamedPipeHandleStateParams = ((1, 'hNamedPipe'), (1, 'lpMode'), (1, 'lpMaxCollectionCount'), (1, 'lpCollectDataTimeout'))
#def ExitProcess(uExitCode):
# return ExitProcess.ctypes_function(uExitCode)
ExitProcessPrototype = WINFUNCTYPE(VOID, UINT)
@@ -1374,131 +1399,6 @@ RtlDosPathNameToNtPathName_UParams = ((1, 'DosName'), (1, 'NtName'), (1, 'PartNa
ApiSetResolveToHostPrototype = WINFUNCTYPE(NTSTATUS, PVOID, PUNICODE_STRING, PUNICODE_STRING, PBOOLEAN, PUNICODE_STRING)
ApiSetResolveToHostParams = ((1, 'Schema'), (1, 'FileNameIn'), (1, 'ParentName'), (1, 'Resolved'), (1, 'HostBinary'))
#def GetCursorPos(lpPoint):
# return GetCursorPos.ctypes_function(lpPoint)
GetCursorPosPrototype = WINFUNCTYPE(BOOL, LPPOINT)
GetCursorPosParams = ((1, 'lpPoint'),)
#def WindowFromPoint(Point):
# return WindowFromPoint.ctypes_function(Point)
WindowFromPointPrototype = WINFUNCTYPE(HWND, POINT)
WindowFromPointParams = ((1, 'Point'),)
#def GetWindowRect(hWnd, lpRect):
# return GetWindowRect.ctypes_function(hWnd, lpRect)
GetWindowRectPrototype = WINFUNCTYPE(BOOL, HWND, LPRECT)
GetWindowRectParams = ((1, 'hWnd'), (1, 'lpRect'))
#def EnumWindows(lpEnumFunc, lParam):
# return EnumWindows.ctypes_function(lpEnumFunc, lParam)
EnumWindowsPrototype = WINFUNCTYPE(BOOL, WNDENUMPROC, LPARAM)
EnumWindowsParams = ((1, 'lpEnumFunc'), (1, 'lParam'))
#def GetWindowTextA(hWnd, lpString, nMaxCount):
# return GetWindowTextA.ctypes_function(hWnd, lpString, nMaxCount)
GetWindowTextAPrototype = WINFUNCTYPE(INT, HWND, LPSTR, INT)
GetWindowTextAParams = ((1, 'hWnd'), (1, 'lpString'), (1, 'nMaxCount'))
#def GetParent(hWnd):
# return GetParent.ctypes_function(hWnd)
GetParentPrototype = WINFUNCTYPE(HWND, HWND)
GetParentParams = ((1, 'hWnd'),)
#def GetWindowTextW(hWnd, lpString, nMaxCount):
# return GetWindowTextW.ctypes_function(hWnd, lpString, nMaxCount)
GetWindowTextWPrototype = WINFUNCTYPE(INT, HWND, LPWSTR, INT)
GetWindowTextWParams = ((1, 'hWnd'), (1, 'lpString'), (1, 'nMaxCount'))
#def GetWindowModuleFileNameA(hwnd, pszFileName, cchFileNameMax):
# return GetWindowModuleFileNameA.ctypes_function(hwnd, pszFileName, cchFileNameMax)
GetWindowModuleFileNameAPrototype = WINFUNCTYPE(UINT, HWND, LPSTR, UINT)
GetWindowModuleFileNameAParams = ((1, 'hwnd'), (1, 'pszFileName'), (1, 'cchFileNameMax'))
#def GetWindowModuleFileNameW(hwnd, pszFileName, cchFileNameMax):
# return GetWindowModuleFileNameW.ctypes_function(hwnd, pszFileName, cchFileNameMax)
GetWindowModuleFileNameWPrototype = WINFUNCTYPE(UINT, HWND, LPWSTR, UINT)
GetWindowModuleFileNameWParams = ((1, 'hwnd'), (1, 'pszFileName'), (1, 'cchFileNameMax'))
#def EnumChildWindows(hWndParent, lpEnumFunc, lParam):
# return EnumChildWindows.ctypes_function(hWndParent, lpEnumFunc, lParam)
EnumChildWindowsPrototype = WINFUNCTYPE(BOOL, HWND, WNDENUMPROC, LPARAM)
EnumChildWindowsParams = ((1, 'hWndParent'), (1, 'lpEnumFunc'), (1, 'lParam'))
#def CloseWindow(hWnd):
# return CloseWindow.ctypes_function(hWnd)
CloseWindowPrototype = WINFUNCTYPE(BOOL, HWND)
CloseWindowParams = ((1, 'hWnd'),)
#def GetDesktopWindow():
# return GetDesktopWindow.ctypes_function()
GetDesktopWindowPrototype = WINFUNCTYPE(HWND)
GetDesktopWindowParams = ()
#def GetForegroundWindow():
# return GetForegroundWindow.ctypes_function()
GetForegroundWindowPrototype = WINFUNCTYPE(HWND)
GetForegroundWindowParams = ()
#def BringWindowToTop(hWnd):
# return BringWindowToTop.ctypes_function(hWnd)
BringWindowToTopPrototype = WINFUNCTYPE(BOOL, HWND)
BringWindowToTopParams = ((1, 'hWnd'),)
#def MoveWindow(hWnd, X, Y, nWidth, nHeight, bRepaint):
# return MoveWindow.ctypes_function(hWnd, X, Y, nWidth, nHeight, bRepaint)
MoveWindowPrototype = WINFUNCTYPE(BOOL, HWND, INT, INT, INT, INT, BOOL)
MoveWindowParams = ((1, 'hWnd'), (1, 'X'), (1, 'Y'), (1, 'nWidth'), (1, 'nHeight'), (1, 'bRepaint'))
#def SetWindowPos(hWnd, hWndInsertAfter, X, Y, cx, cy, uFlags):
# return SetWindowPos.ctypes_function(hWnd, hWndInsertAfter, X, Y, cx, cy, uFlags)
SetWindowPosPrototype = WINFUNCTYPE(BOOL, HWND, HWND, INT, INT, INT, INT, UINT)
SetWindowPosParams = ((1, 'hWnd'), (1, 'hWndInsertAfter'), (1, 'X'), (1, 'Y'), (1, 'cx'), (1, 'cy'), (1, 'uFlags'))
#def SetWindowTextA(hWnd, lpString):
# return SetWindowTextA.ctypes_function(hWnd, lpString)
SetWindowTextAPrototype = WINFUNCTYPE(BOOL, HWND, LPCSTR)
SetWindowTextAParams = ((1, 'hWnd'), (1, 'lpString'))
#def SetWindowTextW(hWnd, lpString):
# return SetWindowTextW.ctypes_function(hWnd, lpString)
SetWindowTextWPrototype = WINFUNCTYPE(BOOL, HWND, LPWSTR)
SetWindowTextWParams = ((1, 'hWnd'), (1, 'lpString'))
#def RealGetWindowClassA(hwnd, pszType, cchType):
# return RealGetWindowClassA.ctypes_function(hwnd, pszType, cchType)
RealGetWindowClassAPrototype = WINFUNCTYPE(UINT, HWND, LPCSTR, UINT)
RealGetWindowClassAParams = ((1, 'hwnd'), (1, 'pszType'), (1, 'cchType'))
#def RealGetWindowClassW(hwnd, pszType, cchType):
# return RealGetWindowClassW.ctypes_function(hwnd, pszType, cchType)
RealGetWindowClassWPrototype = WINFUNCTYPE(UINT, HWND, LPWSTR, UINT)
RealGetWindowClassWParams = ((1, 'hwnd'), (1, 'pszType'), (1, 'cchType'))
#def GetClassInfoExA(hinst, lpszClass, lpwcx):
# return GetClassInfoExA.ctypes_function(hinst, lpszClass, lpwcx)
GetClassInfoExAPrototype = WINFUNCTYPE(BOOL, HINSTANCE, LPCSTR, LPWNDCLASSEXA)
GetClassInfoExAParams = ((1, 'hinst'), (1, 'lpszClass'), (1, 'lpwcx'))
#def GetClassInfoExW(hinst, lpszClass, lpwcx):
# return GetClassInfoExW.ctypes_function(hinst, lpszClass, lpwcx)
GetClassInfoExWPrototype = WINFUNCTYPE(BOOL, HINSTANCE, LPCWSTR, LPWNDCLASSEXW)
GetClassInfoExWParams = ((1, 'hinst'), (1, 'lpszClass'), (1, 'lpwcx'))
#def GetClassNameA(hWnd, lpClassName, nMaxCount):
# return GetClassNameA.ctypes_function(hWnd, lpClassName, nMaxCount)
GetClassNameAPrototype = WINFUNCTYPE(INT, HWND, LPCSTR, INT)
GetClassNameAParams = ((1, 'hWnd'), (1, 'lpClassName'), (1, 'nMaxCount'))
#def GetClassNameW(hWnd, lpClassName, nMaxCount):
# return GetClassNameW.ctypes_function(hWnd, lpClassName, nMaxCount)
GetClassNameWPrototype = WINFUNCTYPE(INT, HWND, LPWSTR, INT)
GetClassNameWParams = ((1, 'hWnd'), (1, 'lpClassName'), (1, 'nMaxCount'))
#def GetWindowThreadProcessId(hWnd, lpdwProcessId):
# return GetWindowThreadProcessId.ctypes_function(hWnd, lpdwProcessId)
GetWindowThreadProcessIdPrototype = WINFUNCTYPE(DWORD, HWND, LPDWORD)
GetWindowThreadProcessIdParams = ((1, 'hWnd'), (1, 'lpdwProcessId'))
#def CryptCATAdminCalcHashFromFileHandle(hFile, pcbHash, pbHash, dwFlags):
# return CryptCATAdminCalcHashFromFileHandle.ctypes_function(hFile, pcbHash, pbHash, dwFlags)
CryptCATAdminCalcHashFromFileHandlePrototype = WINFUNCTYPE(BOOL, HANDLE, POINTER(DWORD), POINTER(BYTE), DWORD)
@@ -1619,6 +1519,11 @@ CertOpenStoreParams = ((1, 'lpszStoreProvider'), (1, 'dwMsgAndCertEncodingType')
CertAddCertificateContextToStorePrototype = WINFUNCTYPE(BOOL, HCERTSTORE, PCCERT_CONTEXT, DWORD, POINTER(PCCERT_CONTEXT))
CertAddCertificateContextToStoreParams = ((1, 'hCertStore'), (1, 'pCertContext'), (1, 'dwAddDisposition'), (1, 'ppStoreContext'))
#def CertFreeCertificateContext(pCertContext):
# return CertFreeCertificateContext.ctypes_function(pCertContext)
CertFreeCertificateContextPrototype = WINFUNCTYPE(BOOL, PCCERT_CONTEXT)
CertFreeCertificateContextParams = ((1, 'pCertContext'),)
#def PFXExportCertStoreEx(hStore, pPFX, szPassword, pvPara, dwFlags):
# return PFXExportCertStoreEx.ctypes_function(hStore, pPFX, szPassword, pvPara, dwFlags)
PFXExportCertStoreExPrototype = WINFUNCTYPE(BOOL, HCERTSTORE, POINTER(CRYPT_DATA_BLOB), LPCWSTR, PVOID, DWORD)
@@ -1744,30 +1649,130 @@ CryptMsgVerifyCountersignatureEncodedExParams = ((1, 'hCryptProv'), (1, 'dwEncod
CryptHashCertificatePrototype = WINFUNCTYPE(BOOL, HCRYPTPROV_LEGACY, ALG_ID, DWORD, POINTER(BYTE), DWORD, POINTER(BYTE), POINTER(DWORD))
CryptHashCertificateParams = ((1, 'hCryptProv'), (1, 'Algid'), (1, 'dwFlags'), (1, 'pbEncoded'), (1, 'cbEncoded'), (1, 'pbComputedHash'), (1, 'pcbComputedHash'))
#def TpCallbackSendAlpcMessageOnCompletion(TpHandle, PortHandle, Flags, SendMessage):
# return TpCallbackSendAlpcMessageOnCompletion.ctypes_function(TpHandle, PortHandle, Flags, SendMessage)
TpCallbackSendAlpcMessageOnCompletionPrototype = WINFUNCTYPE(NTSTATUS, HANDLE, HANDLE, ULONG, PPORT_MESSAGE)
TpCallbackSendAlpcMessageOnCompletionParams = ((1, 'TpHandle'), (1, 'PortHandle'), (1, 'Flags'), (1, 'SendMessage'))
#def GetCursorPos(lpPoint):
# return GetCursorPos.ctypes_function(lpPoint)
GetCursorPosPrototype = WINFUNCTYPE(BOOL, LPPOINT)
GetCursorPosParams = ((1, 'lpPoint'),)
#def CreateNamedPipeA(lpName, dwOpenMode, dwPipeMode, nMaxInstances, nOutBufferSize, nInBufferSize, nDefaultTimeOut, lpSecurityAttributes):
# return CreateNamedPipeA.ctypes_function(lpName, dwOpenMode, dwPipeMode, nMaxInstances, nOutBufferSize, nInBufferSize, nDefaultTimeOut, lpSecurityAttributes)
CreateNamedPipeAPrototype = WINFUNCTYPE(HANDLE, LPCSTR, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, LPSECURITY_ATTRIBUTES)
CreateNamedPipeAParams = ((1, 'lpName'), (1, 'dwOpenMode'), (1, 'dwPipeMode'), (1, 'nMaxInstances'), (1, 'nOutBufferSize'), (1, 'nInBufferSize'), (1, 'nDefaultTimeOut'), (1, 'lpSecurityAttributes'))
#def WindowFromPoint(Point):
# return WindowFromPoint.ctypes_function(Point)
WindowFromPointPrototype = WINFUNCTYPE(HWND, POINT)
WindowFromPointParams = ((1, 'Point'),)
#def CreateNamedPipeW(lpName, dwOpenMode, dwPipeMode, nMaxInstances, nOutBufferSize, nInBufferSize, nDefaultTimeOut, lpSecurityAttributes):
# return CreateNamedPipeW.ctypes_function(lpName, dwOpenMode, dwPipeMode, nMaxInstances, nOutBufferSize, nInBufferSize, nDefaultTimeOut, lpSecurityAttributes)
CreateNamedPipeWPrototype = WINFUNCTYPE(HANDLE, LPWSTR, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, LPSECURITY_ATTRIBUTES)
CreateNamedPipeWParams = ((1, 'lpName'), (1, 'dwOpenMode'), (1, 'dwPipeMode'), (1, 'nMaxInstances'), (1, 'nOutBufferSize'), (1, 'nInBufferSize'), (1, 'nDefaultTimeOut'), (1, 'lpSecurityAttributes'))
#def GetWindowRect(hWnd, lpRect):
# return GetWindowRect.ctypes_function(hWnd, lpRect)
GetWindowRectPrototype = WINFUNCTYPE(BOOL, HWND, LPRECT)
GetWindowRectParams = ((1, 'hWnd'), (1, 'lpRect'))
#def ConnectNamedPipe(hNamedPipe, lpOverlapped):
# return ConnectNamedPipe.ctypes_function(hNamedPipe, lpOverlapped)
ConnectNamedPipePrototype = WINFUNCTYPE(BOOL, HANDLE, LPOVERLAPPED)
ConnectNamedPipeParams = ((1, 'hNamedPipe'), (1, 'lpOverlapped'))
#def EnumWindows(lpEnumFunc, lParam):
# return EnumWindows.ctypes_function(lpEnumFunc, lParam)
EnumWindowsPrototype = WINFUNCTYPE(BOOL, WNDENUMPROC, LPARAM)
EnumWindowsParams = ((1, 'lpEnumFunc'), (1, 'lParam'))
#def SetNamedPipeHandleState(hNamedPipe, lpMode, lpMaxCollectionCount, lpCollectDataTimeout):
# return SetNamedPipeHandleState.ctypes_function(hNamedPipe, lpMode, lpMaxCollectionCount, lpCollectDataTimeout)
SetNamedPipeHandleStatePrototype = WINFUNCTYPE(BOOL, HANDLE, LPDWORD, LPDWORD, LPDWORD)
SetNamedPipeHandleStateParams = ((1, 'hNamedPipe'), (1, 'lpMode'), (1, 'lpMaxCollectionCount'), (1, 'lpCollectDataTimeout'))
#def GetWindowTextA(hWnd, lpString, nMaxCount):
# return GetWindowTextA.ctypes_function(hWnd, lpString, nMaxCount)
GetWindowTextAPrototype = WINFUNCTYPE(INT, HWND, LPSTR, INT)
GetWindowTextAParams = ((1, 'hWnd'), (1, 'lpString'), (1, 'nMaxCount'))
#def GetParent(hWnd):
# return GetParent.ctypes_function(hWnd)
GetParentPrototype = WINFUNCTYPE(HWND, HWND)
GetParentParams = ((1, 'hWnd'),)
#def GetWindowTextW(hWnd, lpString, nMaxCount):
# return GetWindowTextW.ctypes_function(hWnd, lpString, nMaxCount)
GetWindowTextWPrototype = WINFUNCTYPE(INT, HWND, LPWSTR, INT)
GetWindowTextWParams = ((1, 'hWnd'), (1, 'lpString'), (1, 'nMaxCount'))
#def GetWindowModuleFileNameA(hwnd, pszFileName, cchFileNameMax):
# return GetWindowModuleFileNameA.ctypes_function(hwnd, pszFileName, cchFileNameMax)
GetWindowModuleFileNameAPrototype = WINFUNCTYPE(UINT, HWND, LPSTR, UINT)
GetWindowModuleFileNameAParams = ((1, 'hwnd'), (1, 'pszFileName'), (1, 'cchFileNameMax'))
#def GetWindowModuleFileNameW(hwnd, pszFileName, cchFileNameMax):
# return GetWindowModuleFileNameW.ctypes_function(hwnd, pszFileName, cchFileNameMax)
GetWindowModuleFileNameWPrototype = WINFUNCTYPE(UINT, HWND, LPWSTR, UINT)
GetWindowModuleFileNameWParams = ((1, 'hwnd'), (1, 'pszFileName'), (1, 'cchFileNameMax'))
#def EnumChildWindows(hWndParent, lpEnumFunc, lParam):
# return EnumChildWindows.ctypes_function(hWndParent, lpEnumFunc, lParam)
EnumChildWindowsPrototype = WINFUNCTYPE(BOOL, HWND, WNDENUMPROC, LPARAM)
EnumChildWindowsParams = ((1, 'hWndParent'), (1, 'lpEnumFunc'), (1, 'lParam'))
#def CloseWindow(hWnd):
# return CloseWindow.ctypes_function(hWnd)
CloseWindowPrototype = WINFUNCTYPE(BOOL, HWND)
CloseWindowParams = ((1, 'hWnd'),)
#def GetDesktopWindow():
# return GetDesktopWindow.ctypes_function()
GetDesktopWindowPrototype = WINFUNCTYPE(HWND)
GetDesktopWindowParams = ()
#def GetForegroundWindow():
# return GetForegroundWindow.ctypes_function()
GetForegroundWindowPrototype = WINFUNCTYPE(HWND)
GetForegroundWindowParams = ()
#def BringWindowToTop(hWnd):
# return BringWindowToTop.ctypes_function(hWnd)
BringWindowToTopPrototype = WINFUNCTYPE(BOOL, HWND)
BringWindowToTopParams = ((1, 'hWnd'),)
#def MoveWindow(hWnd, X, Y, nWidth, nHeight, bRepaint):
# return MoveWindow.ctypes_function(hWnd, X, Y, nWidth, nHeight, bRepaint)
MoveWindowPrototype = WINFUNCTYPE(BOOL, HWND, INT, INT, INT, INT, BOOL)
MoveWindowParams = ((1, 'hWnd'), (1, 'X'), (1, 'Y'), (1, 'nWidth'), (1, 'nHeight'), (1, 'bRepaint'))
#def SetWindowPos(hWnd, hWndInsertAfter, X, Y, cx, cy, uFlags):
# return SetWindowPos.ctypes_function(hWnd, hWndInsertAfter, X, Y, cx, cy, uFlags)
SetWindowPosPrototype = WINFUNCTYPE(BOOL, HWND, HWND, INT, INT, INT, INT, UINT)
SetWindowPosParams = ((1, 'hWnd'), (1, 'hWndInsertAfter'), (1, 'X'), (1, 'Y'), (1, 'cx'), (1, 'cy'), (1, 'uFlags'))
#def SetWindowTextA(hWnd, lpString):
# return SetWindowTextA.ctypes_function(hWnd, lpString)
SetWindowTextAPrototype = WINFUNCTYPE(BOOL, HWND, LPCSTR)
SetWindowTextAParams = ((1, 'hWnd'), (1, 'lpString'))
#def SetWindowTextW(hWnd, lpString):
# return SetWindowTextW.ctypes_function(hWnd, lpString)
SetWindowTextWPrototype = WINFUNCTYPE(BOOL, HWND, LPWSTR)
SetWindowTextWParams = ((1, 'hWnd'), (1, 'lpString'))
#def RealGetWindowClassA(hwnd, pszType, cchType):
# return RealGetWindowClassA.ctypes_function(hwnd, pszType, cchType)
RealGetWindowClassAPrototype = WINFUNCTYPE(UINT, HWND, LPCSTR, UINT)
RealGetWindowClassAParams = ((1, 'hwnd'), (1, 'pszType'), (1, 'cchType'))
#def RealGetWindowClassW(hwnd, pszType, cchType):
# return RealGetWindowClassW.ctypes_function(hwnd, pszType, cchType)
RealGetWindowClassWPrototype = WINFUNCTYPE(UINT, HWND, LPWSTR, UINT)
RealGetWindowClassWParams = ((1, 'hwnd'), (1, 'pszType'), (1, 'cchType'))
#def GetClassInfoExA(hinst, lpszClass, lpwcx):
# return GetClassInfoExA.ctypes_function(hinst, lpszClass, lpwcx)
GetClassInfoExAPrototype = WINFUNCTYPE(BOOL, HINSTANCE, LPCSTR, LPWNDCLASSEXA)
GetClassInfoExAParams = ((1, 'hinst'), (1, 'lpszClass'), (1, 'lpwcx'))
#def GetClassInfoExW(hinst, lpszClass, lpwcx):
# return GetClassInfoExW.ctypes_function(hinst, lpszClass, lpwcx)
GetClassInfoExWPrototype = WINFUNCTYPE(BOOL, HINSTANCE, LPCWSTR, LPWNDCLASSEXW)
GetClassInfoExWParams = ((1, 'hinst'), (1, 'lpszClass'), (1, 'lpwcx'))
#def GetClassNameA(hWnd, lpClassName, nMaxCount):
# return GetClassNameA.ctypes_function(hWnd, lpClassName, nMaxCount)
GetClassNameAPrototype = WINFUNCTYPE(INT, HWND, LPCSTR, INT)
GetClassNameAParams = ((1, 'hWnd'), (1, 'lpClassName'), (1, 'nMaxCount'))
#def GetClassNameW(hWnd, lpClassName, nMaxCount):
# return GetClassNameW.ctypes_function(hWnd, lpClassName, nMaxCount)
GetClassNameWPrototype = WINFUNCTYPE(INT, HWND, LPWSTR, INT)
GetClassNameWParams = ((1, 'hWnd'), (1, 'lpClassName'), (1, 'nMaxCount'))
#def GetWindowThreadProcessId(hWnd, lpdwProcessId):
# return GetWindowThreadProcessId.ctypes_function(hWnd, lpdwProcessId)
GetWindowThreadProcessIdPrototype = WINFUNCTYPE(DWORD, HWND, LPDWORD)
GetWindowThreadProcessIdParams = ((1, 'hWnd'), (1, 'lpdwProcessId'))
#def OpenEventLogA(lpUNCServerName, lpSourceName):
# return OpenEventLogA.ctypes_function(lpUNCServerName, lpSourceName)
+461 -461
View File
@@ -253,349 +253,6 @@ HCERTSTORE = PVOID
HCRYPTMSG = PVOID
PALPC_PORT_ATTRIBUTES = PVOID
PPORT_MESSAGE = PVOID
class _SHITEMID(Structure):
_fields_ = [
("cb", USHORT),
("abID", BYTE * 1),
]
SHITEMID = _SHITEMID
class _ITEMIDLIST(Structure):
_fields_ = [
("mkid", SHITEMID),
]
ITEMIDLIST = _ITEMIDLIST
PCIDLIST_ABSOLUTE = POINTER(_ITEMIDLIST)
PIDLIST_ABSOLUTE = POINTER(_ITEMIDLIST)
FakeFileInformationZero = EnumValue("_FILE_INFORMATION_CLASS", "FakeFileInformationZero", 0x0)
FileDirectoryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileDirectoryInformation", 0x1)
FileFullDirectoryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileFullDirectoryInformation", 0x2)
FileBothDirectoryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileBothDirectoryInformation", 0x3)
FileBasicInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileBasicInformation", 0x4)
FileStandardInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileStandardInformation", 0x5)
FileInternalInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileInternalInformation", 0x6)
FileEaInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileEaInformation", 0x7)
FileAccessInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileAccessInformation", 0x8)
FileNameInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileNameInformation", 0x9)
FileRenameInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileRenameInformation", 0xa)
FileLinkInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileLinkInformation", 0xb)
FileNamesInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileNamesInformation", 0xc)
FileDispositionInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileDispositionInformation", 0xd)
FilePositionInformation = EnumValue("_FILE_INFORMATION_CLASS", "FilePositionInformation", 0xe)
FileFullEaInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileFullEaInformation", 0xf)
FileModeInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileModeInformation", 0x10)
FileAlignmentInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileAlignmentInformation", 0x11)
FileAllInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileAllInformation", 0x12)
FileAllocationInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileAllocationInformation", 0x13)
FileEndOfFileInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileEndOfFileInformation", 0x14)
FileAlternateNameInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileAlternateNameInformation", 0x15)
FileStreamInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileStreamInformation", 0x16)
FilePipeInformation = EnumValue("_FILE_INFORMATION_CLASS", "FilePipeInformation", 0x17)
FilePipeLocalInformation = EnumValue("_FILE_INFORMATION_CLASS", "FilePipeLocalInformation", 0x18)
FilePipeRemoteInformation = EnumValue("_FILE_INFORMATION_CLASS", "FilePipeRemoteInformation", 0x19)
FileMailslotQueryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileMailslotQueryInformation", 0x1a)
FileMailslotSetInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileMailslotSetInformation", 0x1b)
FileCompressionInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileCompressionInformation", 0x1c)
FileObjectIdInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileObjectIdInformation", 0x1d)
FileCompletionInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileCompletionInformation", 0x1e)
FileMoveClusterInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileMoveClusterInformation", 0x1f)
FileQuotaInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileQuotaInformation", 0x20)
FileReparsePointInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileReparsePointInformation", 0x21)
FileNetworkOpenInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileNetworkOpenInformation", 0x22)
FileAttributeTagInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileAttributeTagInformation", 0x23)
FileTrackingInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileTrackingInformation", 0x24)
FileIdBothDirectoryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIdBothDirectoryInformation", 0x25)
FileIdFullDirectoryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIdFullDirectoryInformation", 0x26)
FileValidDataLengthInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileValidDataLengthInformation", 0x27)
FileShortNameInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileShortNameInformation", 0x28)
FileIoCompletionNotificationInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIoCompletionNotificationInformation", 0x29)
FileIoStatusBlockRangeInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIoStatusBlockRangeInformation", 0x2a)
FileIoPriorityHintInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIoPriorityHintInformation", 0x2b)
FileSfioReserveInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileSfioReserveInformation", 0x2c)
FileSfioVolumeInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileSfioVolumeInformation", 0x2d)
FileHardLinkInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileHardLinkInformation", 0x2e)
FileProcessIdsUsingFileInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileProcessIdsUsingFileInformation", 0x2f)
FileNormalizedNameInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileNormalizedNameInformation", 0x30)
FileNetworkPhysicalNameInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileNetworkPhysicalNameInformation", 0x31)
FileIdGlobalTxDirectoryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIdGlobalTxDirectoryInformation", 0x32)
FileIsRemoteDeviceInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIsRemoteDeviceInformation", 0x33)
FileUnusedInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileUnusedInformation", 0x34)
FileNumaNodeInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileNumaNodeInformation", 0x35)
FileStandardLinkInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileStandardLinkInformation", 0x36)
FileRemoteProtocolInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileRemoteProtocolInformation", 0x37)
FileRenameInformationBypassAccessCheck = EnumValue("_FILE_INFORMATION_CLASS", "FileRenameInformationBypassAccessCheck", 0x38)
FileLinkInformationBypassAccessCheck = EnumValue("_FILE_INFORMATION_CLASS", "FileLinkInformationBypassAccessCheck", 0x39)
FileVolumeNameInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileVolumeNameInformation", 0x3a)
FileIdInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIdInformation", 0x3b)
FileIdExtdDirectoryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIdExtdDirectoryInformation", 0x3c)
FileReplaceCompletionInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileReplaceCompletionInformation", 0x3d)
FileHardLinkFullIdInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileHardLinkFullIdInformation", 0x3e)
FileIdExtdBothDirectoryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIdExtdBothDirectoryInformation", 0x3f)
FileDispositionInformationEx = EnumValue("_FILE_INFORMATION_CLASS", "FileDispositionInformationEx", 0x40)
FileRenameInformationEx = EnumValue("_FILE_INFORMATION_CLASS", "FileRenameInformationEx", 0x41)
FileRenameInformationExBypassAccessCheck = EnumValue("_FILE_INFORMATION_CLASS", "FileRenameInformationExBypassAccessCheck", 0x42)
FileMaximumInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileMaximumInformation", 0x43)
class _FILE_INFORMATION_CLASS(EnumType):
values = [FakeFileInformationZero, FileDirectoryInformation, FileFullDirectoryInformation, FileBothDirectoryInformation, FileBasicInformation, FileStandardInformation, FileInternalInformation, FileEaInformation, FileAccessInformation, FileNameInformation, FileRenameInformation, FileLinkInformation, FileNamesInformation, FileDispositionInformation, FilePositionInformation, FileFullEaInformation, FileModeInformation, FileAlignmentInformation, FileAllInformation, FileAllocationInformation, FileEndOfFileInformation, FileAlternateNameInformation, FileStreamInformation, FilePipeInformation, FilePipeLocalInformation, FilePipeRemoteInformation, FileMailslotQueryInformation, FileMailslotSetInformation, FileCompressionInformation, FileObjectIdInformation, FileCompletionInformation, FileMoveClusterInformation, FileQuotaInformation, FileReparsePointInformation, FileNetworkOpenInformation, FileAttributeTagInformation, FileTrackingInformation, FileIdBothDirectoryInformation, FileIdFullDirectoryInformation, FileValidDataLengthInformation, FileShortNameInformation, FileIoCompletionNotificationInformation, FileIoStatusBlockRangeInformation, FileIoPriorityHintInformation, FileSfioReserveInformation, FileSfioVolumeInformation, FileHardLinkInformation, FileProcessIdsUsingFileInformation, FileNormalizedNameInformation, FileNetworkPhysicalNameInformation, FileIdGlobalTxDirectoryInformation, FileIsRemoteDeviceInformation, FileUnusedInformation, FileNumaNodeInformation, FileStandardLinkInformation, FileRemoteProtocolInformation, FileRenameInformationBypassAccessCheck, FileLinkInformationBypassAccessCheck, FileVolumeNameInformation, FileIdInformation, FileIdExtdDirectoryInformation, FileReplaceCompletionInformation, FileHardLinkFullIdInformation, FileIdExtdBothDirectoryInformation, FileDispositionInformationEx, FileRenameInformationEx, FileRenameInformationExBypassAccessCheck, FileMaximumInformation]
mapper = {x:x for x in values}
FILE_INFORMATION_CLASS = _FILE_INFORMATION_CLASS
PFILE_INFORMATION_CLASS = POINTER(_FILE_INFORMATION_CLASS)
IoPriorityVeryLow = EnumValue("_IO_PRIORITY_HINT", "IoPriorityVeryLow", 0x0)
IoPriorityLow = EnumValue("_IO_PRIORITY_HINT", "IoPriorityLow", 0x1)
IoPriorityNormal = EnumValue("_IO_PRIORITY_HINT", "IoPriorityNormal", 0x2)
IoPriorityHigh = EnumValue("_IO_PRIORITY_HINT", "IoPriorityHigh", 0x3)
IoPriorityCritical = EnumValue("_IO_PRIORITY_HINT", "IoPriorityCritical", 0x4)
MaxIoPriorityTypes = EnumValue("_IO_PRIORITY_HINT", "MaxIoPriorityTypes", 0x5)
class _IO_PRIORITY_HINT(EnumType):
values = [IoPriorityVeryLow, IoPriorityLow, IoPriorityNormal, IoPriorityHigh, IoPriorityCritical, MaxIoPriorityTypes]
mapper = {x:x for x in values}
IO_PRIORITY_HINT = _IO_PRIORITY_HINT
class _FILE_INTERNAL_INFORMATION(Structure):
_fields_ = [
("IndexNumber", LARGE_INTEGER),
]
FILE_INTERNAL_INFORMATION = _FILE_INTERNAL_INFORMATION
PFILE_INTERNAL_INFORMATION = POINTER(_FILE_INTERNAL_INFORMATION)
class _FILE_ALIGNMENT_INFORMATION(Structure):
_fields_ = [
("AlignmentRequirement", ULONG),
]
PFILE_ALIGNMENT_INFORMATION = POINTER(_FILE_ALIGNMENT_INFORMATION)
FILE_ALIGNMENT_INFORMATION = _FILE_ALIGNMENT_INFORMATION
class _FILE_ATTRIBUTE_TAG_INFORMATION(Structure):
_fields_ = [
("FileAttributes", ULONG),
("ReparseTag", ULONG),
]
PFILE_ATTRIBUTE_TAG_INFORMATION = POINTER(_FILE_ATTRIBUTE_TAG_INFORMATION)
FILE_ATTRIBUTE_TAG_INFORMATION = _FILE_ATTRIBUTE_TAG_INFORMATION
class _FILE_BASIC_INFORMATION(Structure):
_fields_ = [
("CreationTime", LARGE_INTEGER),
("LastAccessTime", LARGE_INTEGER),
("LastWriteTime", LARGE_INTEGER),
("ChangeTime", LARGE_INTEGER),
("FileAttributes", ULONG),
]
FILE_BASIC_INFORMATION = _FILE_BASIC_INFORMATION
PFILE_BASIC_INFORMATION = POINTER(_FILE_BASIC_INFORMATION)
class _FILE_EA_INFORMATION(Structure):
_fields_ = [
("EaSize", ULONG),
]
PFILE_EA_INFORMATION = POINTER(_FILE_EA_INFORMATION)
FILE_EA_INFORMATION = _FILE_EA_INFORMATION
class _FILE_IO_PRIORITY_HINT_INFORMATION(Structure):
_fields_ = [
("PriorityHint", IO_PRIORITY_HINT),
]
PFILE_IO_PRIORITY_HINT_INFORMATION = POINTER(_FILE_IO_PRIORITY_HINT_INFORMATION)
FILE_IO_PRIORITY_HINT_INFORMATION = _FILE_IO_PRIORITY_HINT_INFORMATION
class _FILE_MODE_INFORMATION(Structure):
_fields_ = [
("Mode", ULONG),
]
PFILE_MODE_INFORMATION = POINTER(_FILE_MODE_INFORMATION)
FILE_MODE_INFORMATION = _FILE_MODE_INFORMATION
class _FILE_NAME_INFORMATION(Structure):
_fields_ = [
("FileNameLength", ULONG),
("FileName", WCHAR * 1),
]
PFILE_NAME_INFORMATION = POINTER(_FILE_NAME_INFORMATION)
FILE_NAME_INFORMATION = _FILE_NAME_INFORMATION
class _FILE_NETWORK_OPEN_INFORMATION(Structure):
_fields_ = [
("CreationTime", LARGE_INTEGER),
("LastAccessTime", LARGE_INTEGER),
("LastWriteTime", LARGE_INTEGER),
("ChangeTime", LARGE_INTEGER),
("AllocationSize", LARGE_INTEGER),
("EndOfFile", LARGE_INTEGER),
("FileAttributes", ULONG),
]
PFILE_NETWORK_OPEN_INFORMATION = POINTER(_FILE_NETWORK_OPEN_INFORMATION)
FILE_NETWORK_OPEN_INFORMATION = _FILE_NETWORK_OPEN_INFORMATION
class _FILE_STANDARD_INFORMATION(Structure):
_fields_ = [
("AllocationSize", LARGE_INTEGER),
("EndOfFile", LARGE_INTEGER),
("NumberOfLinks", ULONG),
("DeletePending", BOOLEAN),
("Directory", BOOLEAN),
]
FILE_STANDARD_INFORMATION = _FILE_STANDARD_INFORMATION
PFILE_STANDARD_INFORMATION = POINTER(_FILE_STANDARD_INFORMATION)
class _FILE_ACCESS_INFORMATION(Structure):
_fields_ = [
("AccessFlags", ACCESS_MASK),
]
FILE_ACCESS_INFORMATION = _FILE_ACCESS_INFORMATION
PFILE_ACCESS_INFORMATION = POINTER(_FILE_ACCESS_INFORMATION)
class _FILE_POSITION_INFORMATION(Structure):
_fields_ = [
("CurrentByteOffset", LARGE_INTEGER),
]
PFILE_POSITION_INFORMATION = POINTER(_FILE_POSITION_INFORMATION)
FILE_POSITION_INFORMATION = _FILE_POSITION_INFORMATION
class _FILE_IS_REMOTE_DEVICE_INFORMATION(Structure):
_fields_ = [
("IsRemote", BOOLEAN),
]
FILE_IS_REMOTE_DEVICE_INFORMATION = _FILE_IS_REMOTE_DEVICE_INFORMATION
PFILE_IS_REMOTE_DEVICE_INFORMATION = POINTER(_FILE_IS_REMOTE_DEVICE_INFORMATION)
class _FILE_ALL_INFORMATION(Structure):
_fields_ = [
("BasicInformation", FILE_BASIC_INFORMATION),
("StandardInformation", FILE_STANDARD_INFORMATION),
("InternalInformation", FILE_INTERNAL_INFORMATION),
("EaInformation", FILE_EA_INFORMATION),
("AccessInformation", FILE_ACCESS_INFORMATION),
("PositionInformation", FILE_POSITION_INFORMATION),
("ModeInformation", FILE_MODE_INFORMATION),
("AlignmentInformation", FILE_ALIGNMENT_INFORMATION),
("NameInformation", FILE_NAME_INFORMATION),
]
PFILE_ALL_INFORMATION = POINTER(_FILE_ALL_INFORMATION)
FILE_ALL_INFORMATION = _FILE_ALL_INFORMATION
class _EVENTLOGRECORD(Structure):
_fields_ = [
("Length", DWORD),
("Reserved", DWORD),
("RecordNumber", DWORD),
("TimeGenerated", DWORD),
("TimeWritten", DWORD),
("EventID", DWORD),
("EventType", WORD),
("NumStrings", WORD),
("EventCategory", WORD),
("ReservedFlags", WORD),
("ClosingRecordNumber", DWORD),
("StringOffset", DWORD),
("UserSidLength", DWORD),
("UserSidOffset", DWORD),
("DataLength", DWORD),
("DataOffset", DWORD),
]
PEVENTLOGRECORD = POINTER(_EVENTLOGRECORD)
EVENTLOGRECORD = _EVENTLOGRECORD
class _EVENTLOG_FULL_INFORMATION(Structure):
_fields_ = [
("dwFull", DWORD),
]
EVENTLOG_FULL_INFORMATION = _EVENTLOG_FULL_INFORMATION
LPEVENTLOG_FULL_INFORMATION = POINTER(_EVENTLOG_FULL_INFORMATION)
BG_JOB_STATE_QUEUED = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_QUEUED", 0x0)
BG_JOB_STATE_CONNECTING = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_CONNECTING", 0x1)
BG_JOB_STATE_TRANSFERRING = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_TRANSFERRING", 0x2)
BG_JOB_STATE_SUSPENDED = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_SUSPENDED", 0x3)
BG_JOB_STATE_ERROR = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_ERROR", 0x4)
BG_JOB_STATE_TRANSIENT_ERROR = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_TRANSIENT_ERROR", 0x5)
BG_JOB_STATE_TRANSFERRED = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_TRANSFERRED", 0x6)
BG_JOB_STATE_ACKNOWLEDGED = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_ACKNOWLEDGED", 0x7)
BG_JOB_STATE_CANCELLED = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_CANCELLED", 0x8)
class _BG_JOB_STATE(EnumType):
values = [BG_JOB_STATE_QUEUED, BG_JOB_STATE_CONNECTING, BG_JOB_STATE_TRANSFERRING, BG_JOB_STATE_SUSPENDED, BG_JOB_STATE_ERROR, BG_JOB_STATE_TRANSIENT_ERROR, BG_JOB_STATE_TRANSFERRED, BG_JOB_STATE_ACKNOWLEDGED, BG_JOB_STATE_CANCELLED]
mapper = {x:x for x in values}
BG_JOB_STATE = _BG_JOB_STATE
BG_JOB_PROXY_USAGE_PRECONFIG = EnumValue("_BG_JOB_PROXY_USAGE", "BG_JOB_PROXY_USAGE_PRECONFIG", 0x0)
BG_JOB_PROXY_USAGE_NO_PROXY = EnumValue("_BG_JOB_PROXY_USAGE", "BG_JOB_PROXY_USAGE_NO_PROXY", 0x1)
BG_JOB_PROXY_USAGE_OVERRIDE = EnumValue("_BG_JOB_PROXY_USAGE", "BG_JOB_PROXY_USAGE_OVERRIDE", 0x2)
BG_JOB_PROXY_USAGE_AUTODETECT = EnumValue("_BG_JOB_PROXY_USAGE", "BG_JOB_PROXY_USAGE_AUTODETECT", 0x3)
class _BG_JOB_PROXY_USAGE(EnumType):
values = [BG_JOB_PROXY_USAGE_PRECONFIG, BG_JOB_PROXY_USAGE_NO_PROXY, BG_JOB_PROXY_USAGE_OVERRIDE, BG_JOB_PROXY_USAGE_AUTODETECT]
mapper = {x:x for x in values}
BG_JOB_PROXY_USAGE = _BG_JOB_PROXY_USAGE
BG_JOB_PRIORITY_FOREGROUND = EnumValue("_BG_JOB_PRIORITY", "BG_JOB_PRIORITY_FOREGROUND", 0x0)
BG_JOB_PRIORITY_HIGH = EnumValue("_BG_JOB_PRIORITY", "BG_JOB_PRIORITY_HIGH", 0x1)
BG_JOB_PRIORITY_NORMAL = EnumValue("_BG_JOB_PRIORITY", "BG_JOB_PRIORITY_NORMAL", 0x2)
BG_JOB_PRIORITY_LOW = EnumValue("_BG_JOB_PRIORITY", "BG_JOB_PRIORITY_LOW", 0x3)
class _BG_JOB_PRIORITY(EnumType):
values = [BG_JOB_PRIORITY_FOREGROUND, BG_JOB_PRIORITY_HIGH, BG_JOB_PRIORITY_NORMAL, BG_JOB_PRIORITY_LOW]
mapper = {x:x for x in values}
BG_JOB_PRIORITY = _BG_JOB_PRIORITY
BG_ERROR_CONTEXT_NONE = EnumValue("_BG_ERROR_CONTEXT", "BG_ERROR_CONTEXT_NONE", 0x0)
BG_ERROR_CONTEXT_UNKNOWN = EnumValue("_BG_ERROR_CONTEXT", "BG_ERROR_CONTEXT_UNKNOWN", 0x1)
BG_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER = EnumValue("_BG_ERROR_CONTEXT", "BG_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER", 0x2)
BG_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION = EnumValue("_BG_ERROR_CONTEXT", "BG_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION", 0x3)
BG_ERROR_CONTEXT_LOCAL_FILE = EnumValue("_BG_ERROR_CONTEXT", "BG_ERROR_CONTEXT_LOCAL_FILE", 0x4)
BG_ERROR_CONTEXT_REMOTE_FILE = EnumValue("_BG_ERROR_CONTEXT", "BG_ERROR_CONTEXT_REMOTE_FILE", 0x5)
BG_ERROR_CONTEXT_GENERAL_TRANSPORT = EnumValue("_BG_ERROR_CONTEXT", "BG_ERROR_CONTEXT_GENERAL_TRANSPORT", 0x6)
BG_ERROR_CONTEXT_REMOTE_APPLICATION = EnumValue("_BG_ERROR_CONTEXT", "BG_ERROR_CONTEXT_REMOTE_APPLICATION", 0x7)
class _BG_ERROR_CONTEXT(EnumType):
values = [BG_ERROR_CONTEXT_NONE, BG_ERROR_CONTEXT_UNKNOWN, BG_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER, BG_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION, BG_ERROR_CONTEXT_LOCAL_FILE, BG_ERROR_CONTEXT_REMOTE_FILE, BG_ERROR_CONTEXT_GENERAL_TRANSPORT, BG_ERROR_CONTEXT_REMOTE_APPLICATION]
mapper = {x:x for x in values}
BG_ERROR_CONTEXT = _BG_ERROR_CONTEXT
BG_JOB_TYPE_DOWNLOAD = EnumValue("_BG_JOB_TYPE", "BG_JOB_TYPE_DOWNLOAD", 0x0)
BG_JOB_TYPE_UPLOAD = EnumValue("_BG_JOB_TYPE", "BG_JOB_TYPE_UPLOAD", 0x1)
BG_JOB_TYPE_UPLOAD_REPLY = EnumValue("_BG_JOB_TYPE", "BG_JOB_TYPE_UPLOAD_REPLY", 0x2)
class _BG_JOB_TYPE(EnumType):
values = [BG_JOB_TYPE_DOWNLOAD, BG_JOB_TYPE_UPLOAD, BG_JOB_TYPE_UPLOAD_REPLY]
mapper = {x:x for x in values}
BG_JOB_TYPE = _BG_JOB_TYPE
class _BG_FILE_PROGRESS(Structure):
_fields_ = [
("BytesTotal", UINT64),
("BytesTransferred", UINT64),
("Completed", BOOL),
]
BG_FILE_PROGRESS = _BG_FILE_PROGRESS
class _BG_JOB_PROGRESS(Structure):
_fields_ = [
("BytesTotal", UINT64),
("BytesTransferred", UINT64),
("FilesTotal", ULONG),
("FilesTransferred", ULONG),
]
BG_JOB_PROGRESS = _BG_JOB_PROGRESS
class _BG_FILE_INFO(Structure):
_fields_ = [
("RemoteName", LPWSTR),
("LocalName", LPWSTR),
]
BG_FILE_INFO = _BG_FILE_INFO
class _BG_JOB_TIMES(Structure):
_fields_ = [
("CreationTime", FILETIME),
("ModificationTime", FILETIME),
("TransferCompletionTime", FILETIME),
]
BG_JOB_TIMES = _BG_JOB_TIMES
class _GUID(Structure):
_fields_ = [
("Data1", ULONG),
@@ -672,6 +329,140 @@ IID = _GUID
CLSID = _GUID
GUID = _GUID
REFIID = POINTER(_GUID)
class tagRGBTRIPLE(Structure):
_fields_ = [
("rgbtBlue", BYTE),
("rgbtGreen", BYTE),
("rgbtRed", BYTE),
]
NPRGBTRIPLE = POINTER(tagRGBTRIPLE)
LPRGBTRIPLE = POINTER(tagRGBTRIPLE)
RGBTRIPLE = tagRGBTRIPLE
PRGBTRIPLE = POINTER(tagRGBTRIPLE)
class tagBITMAPFILEHEADER(Structure):
_pack_ = 2
_fields_ = [
("bfType", WORD),
("bfSize", DWORD),
("bfReserved1", WORD),
("bfReserved2", WORD),
("bfOffBits", DWORD),
]
BITMAPFILEHEADER = tagBITMAPFILEHEADER
PBITMAPFILEHEADER = POINTER(tagBITMAPFILEHEADER)
LPBITMAPFILEHEADER = POINTER(tagBITMAPFILEHEADER)
class tagBITMAPCOREHEADER(Structure):
_fields_ = [
("bcSize", DWORD),
("bcWidth", WORD),
("bcHeight", WORD),
("bcPlanes", WORD),
("bcBitCount", WORD),
]
LPBITMAPCOREHEADER = POINTER(tagBITMAPCOREHEADER)
PBITMAPCOREHEADER = POINTER(tagBITMAPCOREHEADER)
BITMAPCOREHEADER = tagBITMAPCOREHEADER
class tagBITMAP(Structure):
_fields_ = [
("bmType", LONG),
("bmWidth", LONG),
("bmHeight", LONG),
("bmWidthBytes", LONG),
("bmPlanes", WORD),
("bmBitsPixel", WORD),
("bmBits", LPVOID),
]
NPBITMAP = POINTER(tagBITMAP)
LPBITMAP = POINTER(tagBITMAP)
PBITMAP = POINTER(tagBITMAP)
BITMAP = tagBITMAP
class tagBITMAPINFOHEADER(Structure):
_fields_ = [
("biSize", DWORD),
("biWidth", LONG),
("biHeight", LONG),
("biPlanes", WORD),
("biBitCount", WORD),
("biCompression", DWORD),
("biSizeImage", DWORD),
("biXPelsPerMeter", LONG),
("biYPelsPerMeter", LONG),
("biClrUsed", DWORD),
("biClrImportant", DWORD),
]
BITMAPINFOHEADER = tagBITMAPINFOHEADER
PBITMAPINFOHEADER = POINTER(tagBITMAPINFOHEADER)
LPBITMAPINFOHEADER = POINTER(tagBITMAPINFOHEADER)
class tagRGBQUAD(Structure):
_fields_ = [
("rgbBlue", BYTE),
("rgbGreen", BYTE),
("rgbRed", BYTE),
("rgbReserved", BYTE),
]
RGBQUAD = tagRGBQUAD
class tagBITMAPINFO(Structure):
_fields_ = [
("bmiHeader", BITMAPINFOHEADER),
("bmiColors", RGBQUAD * 1),
]
LPBITMAPINFO = POINTER(tagBITMAPINFO)
PBITMAPINFO = POINTER(tagBITMAPINFO)
BITMAPINFO = tagBITMAPINFO
class tagBITMAPCOREINFO(Structure):
_fields_ = [
("bmciHeader", BITMAPCOREHEADER),
("bmciColors", RGBTRIPLE * 1),
]
LPBITMAPCOREINFO = POINTER(tagBITMAPCOREINFO)
BITMAPCOREINFO = tagBITMAPCOREINFO
PBITMAPCOREINFO = POINTER(tagBITMAPCOREINFO)
class tagWNDCLASSEXA(Structure):
_fields_ = [
("cbSize", UINT),
("style", UINT),
("lpfnWndProc", WNDPROC),
("cbClsExtra", INT),
("cbWndExtra", INT),
("hInstance", HINSTANCE),
("hIcon", HICON),
("hCursor", HCURSOR),
("hbrBackground", HBRUSH),
("lpszMenuName", LPCSTR),
("lpszClassName", LPCSTR),
("hIconSm", HICON),
]
PWNDCLASSEXA = POINTER(tagWNDCLASSEXA)
LPWNDCLASSEXA = POINTER(tagWNDCLASSEXA)
WNDCLASSEXA = tagWNDCLASSEXA
class tagWNDCLASSEXW(Structure):
_fields_ = [
("cbSize", UINT),
("style", UINT),
("lpfnWndProc", WNDPROC),
("cbClsExtra", INT),
("cbWndExtra", INT),
("hInstance", HINSTANCE),
("hIcon", HICON),
("hCursor", HCURSOR),
("hbrBackground", HBRUSH),
("lpszMenuName", LPWSTR),
("lpszClassName", LPWSTR),
("hIconSm", HICON),
]
WNDCLASSEXW = tagWNDCLASSEXW
LPWNDCLASSEXW = POINTER(tagWNDCLASSEXW)
PWNDCLASSEXW = POINTER(tagWNDCLASSEXW)
SystemBasicInformation = EnumValue("_SYSTEM_INFORMATION_CLASS", "SystemBasicInformation", 0x0)
SystemProcessorInformation = EnumValue("_SYSTEM_INFORMATION_CLASS", "SystemProcessorInformation", 0x1)
SystemPerformanceInformation = EnumValue("_SYSTEM_INFORMATION_CLASS", "SystemPerformanceInformation", 0x2)
@@ -4763,139 +4554,110 @@ class _PROCESS_INSTRUMENTATION_CALLBACK_INFORMATION(Structure):
PPROCESS_INSTRUMENTATION_CALLBACK_INFORMATION = POINTER(_PROCESS_INSTRUMENTATION_CALLBACK_INFORMATION)
PROCESS_INSTRUMENTATION_CALLBACK_INFORMATION = _PROCESS_INSTRUMENTATION_CALLBACK_INFORMATION
class tagRGBTRIPLE(Structure):
class _SHITEMID(Structure):
_fields_ = [
("rgbtBlue", BYTE),
("rgbtGreen", BYTE),
("rgbtRed", BYTE),
("cb", USHORT),
("abID", BYTE * 1),
]
NPRGBTRIPLE = POINTER(tagRGBTRIPLE)
LPRGBTRIPLE = POINTER(tagRGBTRIPLE)
RGBTRIPLE = tagRGBTRIPLE
PRGBTRIPLE = POINTER(tagRGBTRIPLE)
SHITEMID = _SHITEMID
class tagBITMAPFILEHEADER(Structure):
_pack_ = 2
class _ITEMIDLIST(Structure):
_fields_ = [
("bfType", WORD),
("bfSize", DWORD),
("bfReserved1", WORD),
("bfReserved2", WORD),
("bfOffBits", DWORD),
("mkid", SHITEMID),
]
BITMAPFILEHEADER = tagBITMAPFILEHEADER
PBITMAPFILEHEADER = POINTER(tagBITMAPFILEHEADER)
LPBITMAPFILEHEADER = POINTER(tagBITMAPFILEHEADER)
ITEMIDLIST = _ITEMIDLIST
PCIDLIST_ABSOLUTE = POINTER(_ITEMIDLIST)
PIDLIST_ABSOLUTE = POINTER(_ITEMIDLIST)
class tagBITMAPCOREHEADER(Structure):
_fields_ = [
("bcSize", DWORD),
("bcWidth", WORD),
("bcHeight", WORD),
("bcPlanes", WORD),
("bcBitCount", WORD),
]
LPBITMAPCOREHEADER = POINTER(tagBITMAPCOREHEADER)
PBITMAPCOREHEADER = POINTER(tagBITMAPCOREHEADER)
BITMAPCOREHEADER = tagBITMAPCOREHEADER
BG_JOB_STATE_QUEUED = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_QUEUED", 0x0)
BG_JOB_STATE_CONNECTING = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_CONNECTING", 0x1)
BG_JOB_STATE_TRANSFERRING = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_TRANSFERRING", 0x2)
BG_JOB_STATE_SUSPENDED = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_SUSPENDED", 0x3)
BG_JOB_STATE_ERROR = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_ERROR", 0x4)
BG_JOB_STATE_TRANSIENT_ERROR = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_TRANSIENT_ERROR", 0x5)
BG_JOB_STATE_TRANSFERRED = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_TRANSFERRED", 0x6)
BG_JOB_STATE_ACKNOWLEDGED = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_ACKNOWLEDGED", 0x7)
BG_JOB_STATE_CANCELLED = EnumValue("_BG_JOB_STATE", "BG_JOB_STATE_CANCELLED", 0x8)
class _BG_JOB_STATE(EnumType):
values = [BG_JOB_STATE_QUEUED, BG_JOB_STATE_CONNECTING, BG_JOB_STATE_TRANSFERRING, BG_JOB_STATE_SUSPENDED, BG_JOB_STATE_ERROR, BG_JOB_STATE_TRANSIENT_ERROR, BG_JOB_STATE_TRANSFERRED, BG_JOB_STATE_ACKNOWLEDGED, BG_JOB_STATE_CANCELLED]
mapper = {x:x for x in values}
BG_JOB_STATE = _BG_JOB_STATE
class tagBITMAP(Structure):
_fields_ = [
("bmType", LONG),
("bmWidth", LONG),
("bmHeight", LONG),
("bmWidthBytes", LONG),
("bmPlanes", WORD),
("bmBitsPixel", WORD),
("bmBits", LPVOID),
]
NPBITMAP = POINTER(tagBITMAP)
LPBITMAP = POINTER(tagBITMAP)
PBITMAP = POINTER(tagBITMAP)
BITMAP = tagBITMAP
class tagBITMAPINFOHEADER(Structure):
_fields_ = [
("biSize", DWORD),
("biWidth", LONG),
("biHeight", LONG),
("biPlanes", WORD),
("biBitCount", WORD),
("biCompression", DWORD),
("biSizeImage", DWORD),
("biXPelsPerMeter", LONG),
("biYPelsPerMeter", LONG),
("biClrUsed", DWORD),
("biClrImportant", DWORD),
]
BITMAPINFOHEADER = tagBITMAPINFOHEADER
PBITMAPINFOHEADER = POINTER(tagBITMAPINFOHEADER)
LPBITMAPINFOHEADER = POINTER(tagBITMAPINFOHEADER)
BG_JOB_PROXY_USAGE_PRECONFIG = EnumValue("_BG_JOB_PROXY_USAGE", "BG_JOB_PROXY_USAGE_PRECONFIG", 0x0)
BG_JOB_PROXY_USAGE_NO_PROXY = EnumValue("_BG_JOB_PROXY_USAGE", "BG_JOB_PROXY_USAGE_NO_PROXY", 0x1)
BG_JOB_PROXY_USAGE_OVERRIDE = EnumValue("_BG_JOB_PROXY_USAGE", "BG_JOB_PROXY_USAGE_OVERRIDE", 0x2)
BG_JOB_PROXY_USAGE_AUTODETECT = EnumValue("_BG_JOB_PROXY_USAGE", "BG_JOB_PROXY_USAGE_AUTODETECT", 0x3)
class _BG_JOB_PROXY_USAGE(EnumType):
values = [BG_JOB_PROXY_USAGE_PRECONFIG, BG_JOB_PROXY_USAGE_NO_PROXY, BG_JOB_PROXY_USAGE_OVERRIDE, BG_JOB_PROXY_USAGE_AUTODETECT]
mapper = {x:x for x in values}
BG_JOB_PROXY_USAGE = _BG_JOB_PROXY_USAGE
class tagRGBQUAD(Structure):
_fields_ = [
("rgbBlue", BYTE),
("rgbGreen", BYTE),
("rgbRed", BYTE),
("rgbReserved", BYTE),
]
RGBQUAD = tagRGBQUAD
class tagBITMAPINFO(Structure):
_fields_ = [
("bmiHeader", BITMAPINFOHEADER),
("bmiColors", RGBQUAD * 1),
]
LPBITMAPINFO = POINTER(tagBITMAPINFO)
PBITMAPINFO = POINTER(tagBITMAPINFO)
BITMAPINFO = tagBITMAPINFO
BG_JOB_PRIORITY_FOREGROUND = EnumValue("_BG_JOB_PRIORITY", "BG_JOB_PRIORITY_FOREGROUND", 0x0)
BG_JOB_PRIORITY_HIGH = EnumValue("_BG_JOB_PRIORITY", "BG_JOB_PRIORITY_HIGH", 0x1)
BG_JOB_PRIORITY_NORMAL = EnumValue("_BG_JOB_PRIORITY", "BG_JOB_PRIORITY_NORMAL", 0x2)
BG_JOB_PRIORITY_LOW = EnumValue("_BG_JOB_PRIORITY", "BG_JOB_PRIORITY_LOW", 0x3)
class _BG_JOB_PRIORITY(EnumType):
values = [BG_JOB_PRIORITY_FOREGROUND, BG_JOB_PRIORITY_HIGH, BG_JOB_PRIORITY_NORMAL, BG_JOB_PRIORITY_LOW]
mapper = {x:x for x in values}
BG_JOB_PRIORITY = _BG_JOB_PRIORITY
class tagBITMAPCOREINFO(Structure):
_fields_ = [
("bmciHeader", BITMAPCOREHEADER),
("bmciColors", RGBTRIPLE * 1),
]
LPBITMAPCOREINFO = POINTER(tagBITMAPCOREINFO)
BITMAPCOREINFO = tagBITMAPCOREINFO
PBITMAPCOREINFO = POINTER(tagBITMAPCOREINFO)
class tagWNDCLASSEXA(Structure):
_fields_ = [
("cbSize", UINT),
("style", UINT),
("lpfnWndProc", WNDPROC),
("cbClsExtra", INT),
("cbWndExtra", INT),
("hInstance", HINSTANCE),
("hIcon", HICON),
("hCursor", HCURSOR),
("hbrBackground", HBRUSH),
("lpszMenuName", LPCSTR),
("lpszClassName", LPCSTR),
("hIconSm", HICON),
]
PWNDCLASSEXA = POINTER(tagWNDCLASSEXA)
LPWNDCLASSEXA = POINTER(tagWNDCLASSEXA)
WNDCLASSEXA = tagWNDCLASSEXA
BG_ERROR_CONTEXT_NONE = EnumValue("_BG_ERROR_CONTEXT", "BG_ERROR_CONTEXT_NONE", 0x0)
BG_ERROR_CONTEXT_UNKNOWN = EnumValue("_BG_ERROR_CONTEXT", "BG_ERROR_CONTEXT_UNKNOWN", 0x1)
BG_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER = EnumValue("_BG_ERROR_CONTEXT", "BG_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER", 0x2)
BG_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION = EnumValue("_BG_ERROR_CONTEXT", "BG_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION", 0x3)
BG_ERROR_CONTEXT_LOCAL_FILE = EnumValue("_BG_ERROR_CONTEXT", "BG_ERROR_CONTEXT_LOCAL_FILE", 0x4)
BG_ERROR_CONTEXT_REMOTE_FILE = EnumValue("_BG_ERROR_CONTEXT", "BG_ERROR_CONTEXT_REMOTE_FILE", 0x5)
BG_ERROR_CONTEXT_GENERAL_TRANSPORT = EnumValue("_BG_ERROR_CONTEXT", "BG_ERROR_CONTEXT_GENERAL_TRANSPORT", 0x6)
BG_ERROR_CONTEXT_REMOTE_APPLICATION = EnumValue("_BG_ERROR_CONTEXT", "BG_ERROR_CONTEXT_REMOTE_APPLICATION", 0x7)
class _BG_ERROR_CONTEXT(EnumType):
values = [BG_ERROR_CONTEXT_NONE, BG_ERROR_CONTEXT_UNKNOWN, BG_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER, BG_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION, BG_ERROR_CONTEXT_LOCAL_FILE, BG_ERROR_CONTEXT_REMOTE_FILE, BG_ERROR_CONTEXT_GENERAL_TRANSPORT, BG_ERROR_CONTEXT_REMOTE_APPLICATION]
mapper = {x:x for x in values}
BG_ERROR_CONTEXT = _BG_ERROR_CONTEXT
class tagWNDCLASSEXW(Structure):
BG_JOB_TYPE_DOWNLOAD = EnumValue("_BG_JOB_TYPE", "BG_JOB_TYPE_DOWNLOAD", 0x0)
BG_JOB_TYPE_UPLOAD = EnumValue("_BG_JOB_TYPE", "BG_JOB_TYPE_UPLOAD", 0x1)
BG_JOB_TYPE_UPLOAD_REPLY = EnumValue("_BG_JOB_TYPE", "BG_JOB_TYPE_UPLOAD_REPLY", 0x2)
class _BG_JOB_TYPE(EnumType):
values = [BG_JOB_TYPE_DOWNLOAD, BG_JOB_TYPE_UPLOAD, BG_JOB_TYPE_UPLOAD_REPLY]
mapper = {x:x for x in values}
BG_JOB_TYPE = _BG_JOB_TYPE
class _BG_FILE_PROGRESS(Structure):
_fields_ = [
("cbSize", UINT),
("style", UINT),
("lpfnWndProc", WNDPROC),
("cbClsExtra", INT),
("cbWndExtra", INT),
("hInstance", HINSTANCE),
("hIcon", HICON),
("hCursor", HCURSOR),
("hbrBackground", HBRUSH),
("lpszMenuName", LPWSTR),
("lpszClassName", LPWSTR),
("hIconSm", HICON),
("BytesTotal", UINT64),
("BytesTransferred", UINT64),
("Completed", BOOL),
]
WNDCLASSEXW = tagWNDCLASSEXW
LPWNDCLASSEXW = POINTER(tagWNDCLASSEXW)
PWNDCLASSEXW = POINTER(tagWNDCLASSEXW)
BG_FILE_PROGRESS = _BG_FILE_PROGRESS
class _BG_JOB_PROGRESS(Structure):
_fields_ = [
("BytesTotal", UINT64),
("BytesTransferred", UINT64),
("FilesTotal", ULONG),
("FilesTransferred", ULONG),
]
BG_JOB_PROGRESS = _BG_JOB_PROGRESS
class _BG_FILE_INFO(Structure):
_fields_ = [
("RemoteName", LPWSTR),
("LocalName", LPWSTR),
]
BG_FILE_INFO = _BG_FILE_INFO
class _BG_JOB_TIMES(Structure):
_fields_ = [
("CreationTime", FILETIME),
("ModificationTime", FILETIME),
("TransferCompletionTime", FILETIME),
]
BG_JOB_TIMES = _BG_JOB_TIMES
AlpcBasicInformation = EnumValue("_ALPC_PORT_INFORMATION_CLASS", "AlpcBasicInformation", 0x0)
AlpcPortInformation = EnumValue("_ALPC_PORT_INFORMATION_CLASS", "AlpcPortInformation", 0x1)
@@ -5222,3 +4984,241 @@ class _RPC_IF_ID(INITIAL_RPC_IF_ID):
def __repr__(self):
return '<RPC_IF_ID "{0}" ({1}, {2})>'.format(self.Uuid.to_string(), self.VersMajor, self.VersMinor)
RPC_IF_ID = _RPC_IF_ID
FakeFileInformationZero = EnumValue("_FILE_INFORMATION_CLASS", "FakeFileInformationZero", 0x0)
FileDirectoryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileDirectoryInformation", 0x1)
FileFullDirectoryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileFullDirectoryInformation", 0x2)
FileBothDirectoryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileBothDirectoryInformation", 0x3)
FileBasicInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileBasicInformation", 0x4)
FileStandardInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileStandardInformation", 0x5)
FileInternalInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileInternalInformation", 0x6)
FileEaInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileEaInformation", 0x7)
FileAccessInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileAccessInformation", 0x8)
FileNameInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileNameInformation", 0x9)
FileRenameInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileRenameInformation", 0xa)
FileLinkInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileLinkInformation", 0xb)
FileNamesInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileNamesInformation", 0xc)
FileDispositionInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileDispositionInformation", 0xd)
FilePositionInformation = EnumValue("_FILE_INFORMATION_CLASS", "FilePositionInformation", 0xe)
FileFullEaInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileFullEaInformation", 0xf)
FileModeInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileModeInformation", 0x10)
FileAlignmentInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileAlignmentInformation", 0x11)
FileAllInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileAllInformation", 0x12)
FileAllocationInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileAllocationInformation", 0x13)
FileEndOfFileInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileEndOfFileInformation", 0x14)
FileAlternateNameInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileAlternateNameInformation", 0x15)
FileStreamInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileStreamInformation", 0x16)
FilePipeInformation = EnumValue("_FILE_INFORMATION_CLASS", "FilePipeInformation", 0x17)
FilePipeLocalInformation = EnumValue("_FILE_INFORMATION_CLASS", "FilePipeLocalInformation", 0x18)
FilePipeRemoteInformation = EnumValue("_FILE_INFORMATION_CLASS", "FilePipeRemoteInformation", 0x19)
FileMailslotQueryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileMailslotQueryInformation", 0x1a)
FileMailslotSetInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileMailslotSetInformation", 0x1b)
FileCompressionInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileCompressionInformation", 0x1c)
FileObjectIdInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileObjectIdInformation", 0x1d)
FileCompletionInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileCompletionInformation", 0x1e)
FileMoveClusterInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileMoveClusterInformation", 0x1f)
FileQuotaInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileQuotaInformation", 0x20)
FileReparsePointInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileReparsePointInformation", 0x21)
FileNetworkOpenInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileNetworkOpenInformation", 0x22)
FileAttributeTagInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileAttributeTagInformation", 0x23)
FileTrackingInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileTrackingInformation", 0x24)
FileIdBothDirectoryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIdBothDirectoryInformation", 0x25)
FileIdFullDirectoryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIdFullDirectoryInformation", 0x26)
FileValidDataLengthInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileValidDataLengthInformation", 0x27)
FileShortNameInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileShortNameInformation", 0x28)
FileIoCompletionNotificationInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIoCompletionNotificationInformation", 0x29)
FileIoStatusBlockRangeInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIoStatusBlockRangeInformation", 0x2a)
FileIoPriorityHintInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIoPriorityHintInformation", 0x2b)
FileSfioReserveInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileSfioReserveInformation", 0x2c)
FileSfioVolumeInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileSfioVolumeInformation", 0x2d)
FileHardLinkInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileHardLinkInformation", 0x2e)
FileProcessIdsUsingFileInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileProcessIdsUsingFileInformation", 0x2f)
FileNormalizedNameInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileNormalizedNameInformation", 0x30)
FileNetworkPhysicalNameInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileNetworkPhysicalNameInformation", 0x31)
FileIdGlobalTxDirectoryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIdGlobalTxDirectoryInformation", 0x32)
FileIsRemoteDeviceInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIsRemoteDeviceInformation", 0x33)
FileUnusedInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileUnusedInformation", 0x34)
FileNumaNodeInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileNumaNodeInformation", 0x35)
FileStandardLinkInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileStandardLinkInformation", 0x36)
FileRemoteProtocolInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileRemoteProtocolInformation", 0x37)
FileRenameInformationBypassAccessCheck = EnumValue("_FILE_INFORMATION_CLASS", "FileRenameInformationBypassAccessCheck", 0x38)
FileLinkInformationBypassAccessCheck = EnumValue("_FILE_INFORMATION_CLASS", "FileLinkInformationBypassAccessCheck", 0x39)
FileVolumeNameInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileVolumeNameInformation", 0x3a)
FileIdInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIdInformation", 0x3b)
FileIdExtdDirectoryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIdExtdDirectoryInformation", 0x3c)
FileReplaceCompletionInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileReplaceCompletionInformation", 0x3d)
FileHardLinkFullIdInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileHardLinkFullIdInformation", 0x3e)
FileIdExtdBothDirectoryInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileIdExtdBothDirectoryInformation", 0x3f)
FileDispositionInformationEx = EnumValue("_FILE_INFORMATION_CLASS", "FileDispositionInformationEx", 0x40)
FileRenameInformationEx = EnumValue("_FILE_INFORMATION_CLASS", "FileRenameInformationEx", 0x41)
FileRenameInformationExBypassAccessCheck = EnumValue("_FILE_INFORMATION_CLASS", "FileRenameInformationExBypassAccessCheck", 0x42)
FileMaximumInformation = EnumValue("_FILE_INFORMATION_CLASS", "FileMaximumInformation", 0x43)
class _FILE_INFORMATION_CLASS(EnumType):
values = [FakeFileInformationZero, FileDirectoryInformation, FileFullDirectoryInformation, FileBothDirectoryInformation, FileBasicInformation, FileStandardInformation, FileInternalInformation, FileEaInformation, FileAccessInformation, FileNameInformation, FileRenameInformation, FileLinkInformation, FileNamesInformation, FileDispositionInformation, FilePositionInformation, FileFullEaInformation, FileModeInformation, FileAlignmentInformation, FileAllInformation, FileAllocationInformation, FileEndOfFileInformation, FileAlternateNameInformation, FileStreamInformation, FilePipeInformation, FilePipeLocalInformation, FilePipeRemoteInformation, FileMailslotQueryInformation, FileMailslotSetInformation, FileCompressionInformation, FileObjectIdInformation, FileCompletionInformation, FileMoveClusterInformation, FileQuotaInformation, FileReparsePointInformation, FileNetworkOpenInformation, FileAttributeTagInformation, FileTrackingInformation, FileIdBothDirectoryInformation, FileIdFullDirectoryInformation, FileValidDataLengthInformation, FileShortNameInformation, FileIoCompletionNotificationInformation, FileIoStatusBlockRangeInformation, FileIoPriorityHintInformation, FileSfioReserveInformation, FileSfioVolumeInformation, FileHardLinkInformation, FileProcessIdsUsingFileInformation, FileNormalizedNameInformation, FileNetworkPhysicalNameInformation, FileIdGlobalTxDirectoryInformation, FileIsRemoteDeviceInformation, FileUnusedInformation, FileNumaNodeInformation, FileStandardLinkInformation, FileRemoteProtocolInformation, FileRenameInformationBypassAccessCheck, FileLinkInformationBypassAccessCheck, FileVolumeNameInformation, FileIdInformation, FileIdExtdDirectoryInformation, FileReplaceCompletionInformation, FileHardLinkFullIdInformation, FileIdExtdBothDirectoryInformation, FileDispositionInformationEx, FileRenameInformationEx, FileRenameInformationExBypassAccessCheck, FileMaximumInformation]
mapper = {x:x for x in values}
FILE_INFORMATION_CLASS = _FILE_INFORMATION_CLASS
PFILE_INFORMATION_CLASS = POINTER(_FILE_INFORMATION_CLASS)
IoPriorityVeryLow = EnumValue("_IO_PRIORITY_HINT", "IoPriorityVeryLow", 0x0)
IoPriorityLow = EnumValue("_IO_PRIORITY_HINT", "IoPriorityLow", 0x1)
IoPriorityNormal = EnumValue("_IO_PRIORITY_HINT", "IoPriorityNormal", 0x2)
IoPriorityHigh = EnumValue("_IO_PRIORITY_HINT", "IoPriorityHigh", 0x3)
IoPriorityCritical = EnumValue("_IO_PRIORITY_HINT", "IoPriorityCritical", 0x4)
MaxIoPriorityTypes = EnumValue("_IO_PRIORITY_HINT", "MaxIoPriorityTypes", 0x5)
class _IO_PRIORITY_HINT(EnumType):
values = [IoPriorityVeryLow, IoPriorityLow, IoPriorityNormal, IoPriorityHigh, IoPriorityCritical, MaxIoPriorityTypes]
mapper = {x:x for x in values}
IO_PRIORITY_HINT = _IO_PRIORITY_HINT
class _FILE_INTERNAL_INFORMATION(Structure):
_fields_ = [
("IndexNumber", LARGE_INTEGER),
]
FILE_INTERNAL_INFORMATION = _FILE_INTERNAL_INFORMATION
PFILE_INTERNAL_INFORMATION = POINTER(_FILE_INTERNAL_INFORMATION)
class _FILE_ALIGNMENT_INFORMATION(Structure):
_fields_ = [
("AlignmentRequirement", ULONG),
]
PFILE_ALIGNMENT_INFORMATION = POINTER(_FILE_ALIGNMENT_INFORMATION)
FILE_ALIGNMENT_INFORMATION = _FILE_ALIGNMENT_INFORMATION
class _FILE_ATTRIBUTE_TAG_INFORMATION(Structure):
_fields_ = [
("FileAttributes", ULONG),
("ReparseTag", ULONG),
]
PFILE_ATTRIBUTE_TAG_INFORMATION = POINTER(_FILE_ATTRIBUTE_TAG_INFORMATION)
FILE_ATTRIBUTE_TAG_INFORMATION = _FILE_ATTRIBUTE_TAG_INFORMATION
class _FILE_BASIC_INFORMATION(Structure):
_fields_ = [
("CreationTime", LARGE_INTEGER),
("LastAccessTime", LARGE_INTEGER),
("LastWriteTime", LARGE_INTEGER),
("ChangeTime", LARGE_INTEGER),
("FileAttributes", ULONG),
]
FILE_BASIC_INFORMATION = _FILE_BASIC_INFORMATION
PFILE_BASIC_INFORMATION = POINTER(_FILE_BASIC_INFORMATION)
class _FILE_EA_INFORMATION(Structure):
_fields_ = [
("EaSize", ULONG),
]
PFILE_EA_INFORMATION = POINTER(_FILE_EA_INFORMATION)
FILE_EA_INFORMATION = _FILE_EA_INFORMATION
class _FILE_IO_PRIORITY_HINT_INFORMATION(Structure):
_fields_ = [
("PriorityHint", IO_PRIORITY_HINT),
]
PFILE_IO_PRIORITY_HINT_INFORMATION = POINTER(_FILE_IO_PRIORITY_HINT_INFORMATION)
FILE_IO_PRIORITY_HINT_INFORMATION = _FILE_IO_PRIORITY_HINT_INFORMATION
class _FILE_MODE_INFORMATION(Structure):
_fields_ = [
("Mode", ULONG),
]
PFILE_MODE_INFORMATION = POINTER(_FILE_MODE_INFORMATION)
FILE_MODE_INFORMATION = _FILE_MODE_INFORMATION
class _FILE_NAME_INFORMATION(Structure):
_fields_ = [
("FileNameLength", ULONG),
("FileName", WCHAR * 1),
]
PFILE_NAME_INFORMATION = POINTER(_FILE_NAME_INFORMATION)
FILE_NAME_INFORMATION = _FILE_NAME_INFORMATION
class _FILE_NETWORK_OPEN_INFORMATION(Structure):
_fields_ = [
("CreationTime", LARGE_INTEGER),
("LastAccessTime", LARGE_INTEGER),
("LastWriteTime", LARGE_INTEGER),
("ChangeTime", LARGE_INTEGER),
("AllocationSize", LARGE_INTEGER),
("EndOfFile", LARGE_INTEGER),
("FileAttributes", ULONG),
]
PFILE_NETWORK_OPEN_INFORMATION = POINTER(_FILE_NETWORK_OPEN_INFORMATION)
FILE_NETWORK_OPEN_INFORMATION = _FILE_NETWORK_OPEN_INFORMATION
class _FILE_STANDARD_INFORMATION(Structure):
_fields_ = [
("AllocationSize", LARGE_INTEGER),
("EndOfFile", LARGE_INTEGER),
("NumberOfLinks", ULONG),
("DeletePending", BOOLEAN),
("Directory", BOOLEAN),
]
FILE_STANDARD_INFORMATION = _FILE_STANDARD_INFORMATION
PFILE_STANDARD_INFORMATION = POINTER(_FILE_STANDARD_INFORMATION)
class _FILE_ACCESS_INFORMATION(Structure):
_fields_ = [
("AccessFlags", ACCESS_MASK),
]
FILE_ACCESS_INFORMATION = _FILE_ACCESS_INFORMATION
PFILE_ACCESS_INFORMATION = POINTER(_FILE_ACCESS_INFORMATION)
class _FILE_POSITION_INFORMATION(Structure):
_fields_ = [
("CurrentByteOffset", LARGE_INTEGER),
]
PFILE_POSITION_INFORMATION = POINTER(_FILE_POSITION_INFORMATION)
FILE_POSITION_INFORMATION = _FILE_POSITION_INFORMATION
class _FILE_IS_REMOTE_DEVICE_INFORMATION(Structure):
_fields_ = [
("IsRemote", BOOLEAN),
]
FILE_IS_REMOTE_DEVICE_INFORMATION = _FILE_IS_REMOTE_DEVICE_INFORMATION
PFILE_IS_REMOTE_DEVICE_INFORMATION = POINTER(_FILE_IS_REMOTE_DEVICE_INFORMATION)
class _FILE_ALL_INFORMATION(Structure):
_fields_ = [
("BasicInformation", FILE_BASIC_INFORMATION),
("StandardInformation", FILE_STANDARD_INFORMATION),
("InternalInformation", FILE_INTERNAL_INFORMATION),
("EaInformation", FILE_EA_INFORMATION),
("AccessInformation", FILE_ACCESS_INFORMATION),
("PositionInformation", FILE_POSITION_INFORMATION),
("ModeInformation", FILE_MODE_INFORMATION),
("AlignmentInformation", FILE_ALIGNMENT_INFORMATION),
("NameInformation", FILE_NAME_INFORMATION),
]
PFILE_ALL_INFORMATION = POINTER(_FILE_ALL_INFORMATION)
FILE_ALL_INFORMATION = _FILE_ALL_INFORMATION
class _EVENTLOGRECORD(Structure):
_fields_ = [
("Length", DWORD),
("Reserved", DWORD),
("RecordNumber", DWORD),
("TimeGenerated", DWORD),
("TimeWritten", DWORD),
("EventID", DWORD),
("EventType", WORD),
("NumStrings", WORD),
("EventCategory", WORD),
("ReservedFlags", WORD),
("ClosingRecordNumber", DWORD),
("StringOffset", DWORD),
("UserSidLength", DWORD),
("UserSidOffset", DWORD),
("DataLength", DWORD),
("DataOffset", DWORD),
]
PEVENTLOGRECORD = POINTER(_EVENTLOGRECORD)
EVENTLOGRECORD = _EVENTLOGRECORD
class _EVENTLOG_FULL_INFORMATION(Structure):
_fields_ = [
("dwFull", DWORD),
]
EVENTLOG_FULL_INFORMATION = _EVENTLOG_FULL_INFORMATION
LPEVENTLOG_FULL_INFORMATION = POINTER(_EVENTLOG_FULL_INFORMATION)
+7
View File
@@ -1517,6 +1517,10 @@ def CertGetCertificateChain(hChainEngine, pCertContext, pTime, hAdditionalStore,
def CertDuplicateCertificateContext(pCertContext):
return CertDuplicateCertificateContext.ctypes_function(pCertContext)
@Crypt32Proxy('CertFreeCertificateContext')
def CertFreeCertificateContext(pCertContext):
return CertFreeCertificateContext.ctypes_function(pCertContext)
@Crypt32Proxy('CertEnumCertificatesInStore')
def CertEnumCertificatesInStore(hCertStore, pPrevCertContext):
@@ -1680,6 +1684,9 @@ def VerQueryValueW(pBlock, lpSubBlock, lplpBuffer, puLen):
# ## Ole32Proxy (COM STUFF) ## #
# IMPORTANT:
# Functions that returns HRESULT (like CoInitializeEx) will raise if HRESULT is an error
# even if there is no error check on the return value
@Ole32Proxy('CoInitializeEx', no_error_check)
def CoInitializeEx(pvReserved=None, dwCoInit=COINIT_MULTITHREADED):
return CoInitializeEx.ctypes_function(pvReserved, dwCoInit)