1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
cdef extern from "stddef.h":
ctypedef unsigned int size_t
cdef extern from "stdint.h":
ctypedef unsigned char uint8_t
ctypedef short int int16_t
ctypedef unsigned short int uint16_t
ctypedef int int32_t
# FIXME: this isn't portable
ctypedef unsigned long uint32_t
ctypedef long int int64_t
ctypedef unsigned long long uint64_t
cdef extern from "synce.h":
ctypedef void VOID
ctypedef uint8_t BYTE
ctypedef BYTE BOOLEAN
ctypedef int16_t CSHORT
ctypedef uint16_t WORD
ctypedef uint16_t USHORT
ctypedef uint16_t WCHAR
ctypedef WCHAR TCHAR
ctypedef int32_t LONG
ctypedef int32_t HKEY
ctypedef int32_t REGSAM
ctypedef uint32_t DWORD
ctypedef uint32_t UINT
ctypedef uint32_t ULONG
ctypedef uint32_t HWND
ctypedef uint32_t BOOL
ctypedef int64_t LONGLONG
ctypedef uint64_t ULARGE_INTEGER
ctypedef uint64_t* PULARGE_INTEGER
# XXX: sizeof(double) must be 8 */
ctypedef double DATE
ctypedef void* LPVOID
ctypedef char* LPSTR
ctypedef BYTE* LPBYTE
ctypedef WORD* LPWORD
ctypedef WCHAR* LPWSTR
ctypedef HKEY* PHKEY
ctypedef DWORD* LPDWORD
ctypedef LONG* PLONG
ctypedef void* LPCVOID
ctypedef char* LPCSTR
ctypedef char* LPCTSTR
ctypedef WCHAR* LPCWSTR
ctypedef int32_t HRESULT
ctypedef HRESULT STDAPI
ctypedef uint32_t HANDLE
ctypedef struct _FILETIME:
DWORD dwLowDateTime
DWORD dwHighDateTime
ctypedef _FILETIME FILETIME
ctypedef FILETIME* PFILETIME
ctypedef FILETIME* LPFILETIME
cdef extern from "rapi.h":
ctypedef void* LPSECURITY_ATTRIBUTES
ctypedef void* LPOVERLAPPED
ctypedef struct _SYSTEM_POWER_STATUS_EX:
BYTE ACLineStatus
BYTE BatteryFlag
BYTE BatteryLifePercent
BYTE Reserved1
DWORD BatteryLifeTime
DWORD BatteryFullLifeTime
BYTE Reserved2
BYTE BackupBatteryFlag
BYTE BackupBatteryLifePercent
BYTE Reserved3
DWORD BackupBatteryLifeTime
DWORD BackupBatteryFullLifeTime
ctypedef _SYSTEM_POWER_STATUS_EX SYSTEM_POWER_STATUS_EX
ctypedef SYSTEM_POWER_STATUS_EX* PSYSTEM_POWER_STATUS_EX
ctypedef struct _CE_FIND_DATA:
DWORD dwFileAttributes
FILETIME ftCreationTime
FILETIME ftLastAccessTime
FILETIME ftLastWriteTime
DWORD nFileSizeHigh
DWORD nFileSizeLow
DWORD dwOID
WCHAR cFileName[256]
ctypedef _CE_FIND_DATA CE_FIND_DATA
ctypedef CE_FIND_DATA* LPCE_FIND_DATA
ctypedef CE_FIND_DATA** LPLPCE_FIND_DATA
ctypedef struct _PROCESS_INFORMATION:
HANDLE hProcess
HANDLE hThread
DWORD dwProcessId
DWORD dwThreadId
ctypedef _PROCESS_INFORMATION PROCESS_INFORMATION
ctypedef PROCESS_INFORMATION* LPPROCESS_INFORMATION
ctypedef struct _SYSTEM_INFO:
WORD wProcessorArchitecture
WORD wReserved
DWORD dwPageSize
ULONG lpMinimumApplicationAddress
ULONG lpMaximumApplicationAddress
DWORD dwActiveProcessorMask
DWORD dwNumberOfProcessors
DWORD dwProcessorType
DWORD dwAllocationGranularity
WORD wProcessorLevel
WORD wProcessorRevision
ctypedef _SYSTEM_INFO SYSTEM_INFO
ctypedef SYSTEM_INFO* LPSYSTEM_INFO
ctypedef struct _CEOSVERSIONINFO:
DWORD dwOSVersionInfoSize
DWORD dwMajorVersion
DWORD dwMinorVersion
DWORD dwBuildNumber
DWORD dwPlatformId
WCHAR szCSDVersion[128]
ctypedef _CEOSVERSIONINFO CEOSVERSIONINFO
ctypedef CEOSVERSIONINFO* LPCEOSVERSIONINFO
|