Show More
@@ -56,20 +56,20 b' elif ctypes.sizeof(ctypes.c_longlong) ==' | |||
|
56 | 56 | _LPARAM = ctypes.c_longlong |
|
57 | 57 | |
|
58 | 58 | class _FILETIME(ctypes.Structure): |
|
59 | _fields_ = [('dwLowDateTime', _DWORD), | |
|
60 | ('dwHighDateTime', _DWORD)] | |
|
59 | _fields_ = [(r'dwLowDateTime', _DWORD), | |
|
60 | (r'dwHighDateTime', _DWORD)] | |
|
61 | 61 | |
|
62 | 62 | class _BY_HANDLE_FILE_INFORMATION(ctypes.Structure): |
|
63 | _fields_ = [('dwFileAttributes', _DWORD), | |
|
64 | ('ftCreationTime', _FILETIME), | |
|
65 | ('ftLastAccessTime', _FILETIME), | |
|
66 | ('ftLastWriteTime', _FILETIME), | |
|
67 | ('dwVolumeSerialNumber', _DWORD), | |
|
68 | ('nFileSizeHigh', _DWORD), | |
|
69 | ('nFileSizeLow', _DWORD), | |
|
70 | ('nNumberOfLinks', _DWORD), | |
|
71 | ('nFileIndexHigh', _DWORD), | |
|
72 | ('nFileIndexLow', _DWORD)] | |
|
63 | _fields_ = [(r'dwFileAttributes', _DWORD), | |
|
64 | (r'ftCreationTime', _FILETIME), | |
|
65 | (r'ftLastAccessTime', _FILETIME), | |
|
66 | (r'ftLastWriteTime', _FILETIME), | |
|
67 | (r'dwVolumeSerialNumber', _DWORD), | |
|
68 | (r'nFileSizeHigh', _DWORD), | |
|
69 | (r'nFileSizeLow', _DWORD), | |
|
70 | (r'nNumberOfLinks', _DWORD), | |
|
71 | (r'nFileIndexHigh', _DWORD), | |
|
72 | (r'nFileIndexLow', _DWORD)] | |
|
73 | 73 | |
|
74 | 74 | # CreateFile |
|
75 | 75 | _FILE_SHARE_READ = 0x00000001 |
@@ -91,50 +91,50 b' class _BY_HANDLE_FILE_INFORMATION(ctypes' | |||
|
91 | 91 | _STILL_ACTIVE = 259 |
|
92 | 92 | |
|
93 | 93 | class _STARTUPINFO(ctypes.Structure): |
|
94 | _fields_ = [('cb', _DWORD), | |
|
95 | ('lpReserved', _LPSTR), | |
|
96 | ('lpDesktop', _LPSTR), | |
|
97 | ('lpTitle', _LPSTR), | |
|
98 | ('dwX', _DWORD), | |
|
99 | ('dwY', _DWORD), | |
|
100 | ('dwXSize', _DWORD), | |
|
101 | ('dwYSize', _DWORD), | |
|
102 | ('dwXCountChars', _DWORD), | |
|
103 | ('dwYCountChars', _DWORD), | |
|
104 | ('dwFillAttribute', _DWORD), | |
|
105 | ('dwFlags', _DWORD), | |
|
106 | ('wShowWindow', _WORD), | |
|
107 | ('cbReserved2', _WORD), | |
|
108 | ('lpReserved2', ctypes.c_char_p), | |
|
109 | ('hStdInput', _HANDLE), | |
|
110 | ('hStdOutput', _HANDLE), | |
|
111 | ('hStdError', _HANDLE)] | |
|
94 | _fields_ = [(r'cb', _DWORD), | |
|
95 | (r'lpReserved', _LPSTR), | |
|
96 | (r'lpDesktop', _LPSTR), | |
|
97 | (r'lpTitle', _LPSTR), | |
|
98 | (r'dwX', _DWORD), | |
|
99 | (r'dwY', _DWORD), | |
|
100 | (r'dwXSize', _DWORD), | |
|
101 | (r'dwYSize', _DWORD), | |
|
102 | (r'dwXCountChars', _DWORD), | |
|
103 | (r'dwYCountChars', _DWORD), | |
|
104 | (r'dwFillAttribute', _DWORD), | |
|
105 | (r'dwFlags', _DWORD), | |
|
106 | (r'wShowWindow', _WORD), | |
|
107 | (r'cbReserved2', _WORD), | |
|
108 | (r'lpReserved2', ctypes.c_char_p), | |
|
109 | (r'hStdInput', _HANDLE), | |
|
110 | (r'hStdOutput', _HANDLE), | |
|
111 | (r'hStdError', _HANDLE)] | |
|
112 | 112 | |
|
113 | 113 | class _PROCESS_INFORMATION(ctypes.Structure): |
|
114 | _fields_ = [('hProcess', _HANDLE), | |
|
115 | ('hThread', _HANDLE), | |
|
116 | ('dwProcessId', _DWORD), | |
|
117 | ('dwThreadId', _DWORD)] | |
|
114 | _fields_ = [(r'hProcess', _HANDLE), | |
|
115 | (r'hThread', _HANDLE), | |
|
116 | (r'dwProcessId', _DWORD), | |
|
117 | (r'dwThreadId', _DWORD)] | |
|
118 | 118 | |
|
119 | 119 | _CREATE_NO_WINDOW = 0x08000000 |
|
120 | 120 | _SW_HIDE = 0 |
|
121 | 121 | |
|
122 | 122 | class _COORD(ctypes.Structure): |
|
123 | _fields_ = [('X', ctypes.c_short), | |
|
124 | ('Y', ctypes.c_short)] | |
|
123 | _fields_ = [(r'X', ctypes.c_short), | |
|
124 | (r'Y', ctypes.c_short)] | |
|
125 | 125 | |
|
126 | 126 | class _SMALL_RECT(ctypes.Structure): |
|
127 | _fields_ = [('Left', ctypes.c_short), | |
|
128 | ('Top', ctypes.c_short), | |
|
129 | ('Right', ctypes.c_short), | |
|
130 | ('Bottom', ctypes.c_short)] | |
|
127 | _fields_ = [(r'Left', ctypes.c_short), | |
|
128 | (r'Top', ctypes.c_short), | |
|
129 | (r'Right', ctypes.c_short), | |
|
130 | (r'Bottom', ctypes.c_short)] | |
|
131 | 131 | |
|
132 | 132 | class _CONSOLE_SCREEN_BUFFER_INFO(ctypes.Structure): |
|
133 | _fields_ = [('dwSize', _COORD), | |
|
134 | ('dwCursorPosition', _COORD), | |
|
135 | ('wAttributes', _WORD), | |
|
136 | ('srWindow', _SMALL_RECT), | |
|
137 | ('dwMaximumWindowSize', _COORD)] | |
|
133 | _fields_ = [(r'dwSize', _COORD), | |
|
134 | (r'dwCursorPosition', _COORD), | |
|
135 | (r'wAttributes', _WORD), | |
|
136 | (r'srWindow', _SMALL_RECT), | |
|
137 | (r'dwMaximumWindowSize', _COORD)] | |
|
138 | 138 | |
|
139 | 139 | _STD_OUTPUT_HANDLE = _DWORD(-11).value |
|
140 | 140 | _STD_ERROR_HANDLE = _DWORD(-12).value |
@@ -149,40 +149,40 b' PKCS_7_ASN_ENCODING = 0x00010000' | |||
|
149 | 149 | # These structs are only complete enough to achieve what we need. |
|
150 | 150 | class CERT_CHAIN_CONTEXT(ctypes.Structure): |
|
151 | 151 | _fields_ = ( |
|
152 | ("cbSize", _DWORD), | |
|
152 | (r"cbSize", _DWORD), | |
|
153 | 153 | |
|
154 | 154 | # CERT_TRUST_STATUS struct |
|
155 | ("dwErrorStatus", _DWORD), | |
|
156 | ("dwInfoStatus", _DWORD), | |
|
155 | (r"dwErrorStatus", _DWORD), | |
|
156 | (r"dwInfoStatus", _DWORD), | |
|
157 | 157 | |
|
158 | ("cChain", _DWORD), | |
|
159 | ("rgpChain", ctypes.c_void_p), | |
|
160 | ("cLowerQualityChainContext", _DWORD), | |
|
161 | ("rgpLowerQualityChainContext", ctypes.c_void_p), | |
|
162 | ("fHasRevocationFreshnessTime", _BOOL), | |
|
163 | ("dwRevocationFreshnessTime", _DWORD), | |
|
158 | (r"cChain", _DWORD), | |
|
159 | (r"rgpChain", ctypes.c_void_p), | |
|
160 | (r"cLowerQualityChainContext", _DWORD), | |
|
161 | (r"rgpLowerQualityChainContext", ctypes.c_void_p), | |
|
162 | (r"fHasRevocationFreshnessTime", _BOOL), | |
|
163 | (r"dwRevocationFreshnessTime", _DWORD), | |
|
164 | 164 | ) |
|
165 | 165 | |
|
166 | 166 | class CERT_USAGE_MATCH(ctypes.Structure): |
|
167 | 167 | _fields_ = ( |
|
168 | ("dwType", _DWORD), | |
|
168 | (r"dwType", _DWORD), | |
|
169 | 169 | |
|
170 | 170 | # CERT_ENHKEY_USAGE struct |
|
171 | ("cUsageIdentifier", _DWORD), | |
|
172 | ("rgpszUsageIdentifier", ctypes.c_void_p), # LPSTR * | |
|
171 | (r"cUsageIdentifier", _DWORD), | |
|
172 | (r"rgpszUsageIdentifier", ctypes.c_void_p), # LPSTR * | |
|
173 | 173 | ) |
|
174 | 174 | |
|
175 | 175 | class CERT_CHAIN_PARA(ctypes.Structure): |
|
176 | 176 | _fields_ = ( |
|
177 | ("cbSize", _DWORD), | |
|
178 | ("RequestedUsage", CERT_USAGE_MATCH), | |
|
179 | ("RequestedIssuancePolicy", CERT_USAGE_MATCH), | |
|
180 | ("dwUrlRetrievalTimeout", _DWORD), | |
|
181 | ("fCheckRevocationFreshnessTime", _BOOL), | |
|
182 | ("dwRevocationFreshnessTime", _DWORD), | |
|
183 | ("pftCacheResync", ctypes.c_void_p), # LPFILETIME | |
|
184 | ("pStrongSignPara", ctypes.c_void_p), # PCCERT_STRONG_SIGN_PARA | |
|
185 | ("dwStrongSignFlags", _DWORD), | |
|
177 | (r"cbSize", _DWORD), | |
|
178 | (r"RequestedUsage", CERT_USAGE_MATCH), | |
|
179 | (r"RequestedIssuancePolicy", CERT_USAGE_MATCH), | |
|
180 | (r"dwUrlRetrievalTimeout", _DWORD), | |
|
181 | (r"fCheckRevocationFreshnessTime", _BOOL), | |
|
182 | (r"dwRevocationFreshnessTime", _DWORD), | |
|
183 | (r"pftCacheResync", ctypes.c_void_p), # LPFILETIME | |
|
184 | (r"pStrongSignPara", ctypes.c_void_p), # PCCERT_STRONG_SIGN_PARA | |
|
185 | (r"dwStrongSignFlags", _DWORD), | |
|
186 | 186 | ) |
|
187 | 187 | |
|
188 | 188 | # types of parameters of C functions used (required by pypy) |
General Comments 0
You need to be logged in to leave comments.
Login now