| ... | ... | @@ -1,46 +1,46 @@ |
| 1 | 1 | pub const ERROR = @import("error.zig"); |
| 2 | 2 | |
| 3 | | pub extern "kernel32" stdcallcc fn CryptAcquireContext(phProv: &HCRYPTPROV, pszContainer: LPCTSTR, |
| 3 | pub extern "kernel32" fn CryptAcquireContext(phProv: &HCRYPTPROV, pszContainer: LPCTSTR, |
| 4 | 4 | pszProvider: LPCTSTR, dwProvType: DWORD, dwFlags: DWORD) -> bool; |
| 5 | 5 | |
| 6 | | pub extern "kernel32" stdcallcc fn CryptReleaseContext(hProv: HCRYPTPROV, dwFlags: DWORD) -> bool; |
| 6 | pub extern "kernel32" fn CryptReleaseContext(hProv: HCRYPTPROV, dwFlags: DWORD) -> bool; |
| 7 | 7 | |
| 8 | | pub extern "kernel32" stdcallcc fn CryptGenRandom(hProv: HCRYPTPROV, dwLen: DWORD, pbBuffer: &BYTE) -> bool; |
| 8 | pub extern "kernel32" fn CryptGenRandom(hProv: HCRYPTPROV, dwLen: DWORD, pbBuffer: &BYTE) -> bool; |
| 9 | 9 | |
| 10 | | pub extern "kernel32" stdcallcc fn ExitProcess(exit_code: UINT) -> noreturn; |
| 10 | pub extern "kernel32" fn ExitProcess(exit_code: UINT) -> noreturn; |
| 11 | 11 | |
| 12 | | pub extern "kernel32" stdcallcc fn GetCommandLine() -> LPTSTR; |
| 12 | pub extern "kernel32" fn GetCommandLine() -> LPTSTR; |
| 13 | 13 | |
| 14 | | pub extern "kernel32" stdcallcc fn GetConsoleMode(in_hConsoleHandle: HANDLE, out_lpMode: &DWORD) -> bool; |
| 14 | pub extern "kernel32" fn GetConsoleMode(in_hConsoleHandle: HANDLE, out_lpMode: &DWORD) -> bool; |
| 15 | 15 | |
| 16 | 16 | /// Retrieves the calling thread's last-error code value. The last-error code is maintained on a per-thread basis. |
| 17 | 17 | /// Multiple threads do not overwrite each other's last-error code. |
| 18 | | pub extern "kernel32" stdcallcc fn GetLastError() -> DWORD; |
| 18 | pub extern "kernel32" fn GetLastError() -> DWORD; |
| 19 | 19 | |
| 20 | 20 | /// Retrieves file information for the specified file. |
| 21 | | pub extern "kernel32" stdcallcc fn GetFileInformationByHandleEx(in_hFile: HANDLE, |
| 21 | pub extern "kernel32" fn GetFileInformationByHandleEx(in_hFile: HANDLE, |
| 22 | 22 | in_FileInformationClass: FILE_INFO_BY_HANDLE_CLASS, out_lpFileInformation: &c_void, |
| 23 | 23 | in_dwBufferSize: DWORD) -> bool; |
| 24 | 24 | |
| 25 | 25 | /// Retrieves a handle to the specified standard device (standard input, standard output, or standard error). |
| 26 | | pub extern "kernel32" stdcallcc fn GetStdHandle(in_nStdHandle: DWORD) -> ?HANDLE; |
| 26 | pub extern "kernel32" fn GetStdHandle(in_nStdHandle: DWORD) -> ?HANDLE; |
| 27 | 27 | |
| 28 | 28 | /// Reads data from the specified file or input/output (I/O) device. Reads occur at the position specified by the file pointer if supported by the device. |
| 29 | 29 | /// This function is designed for both synchronous and asynchronous operations. For a similar function designed solely for asynchronous operation, see ReadFileEx. |
| 30 | | pub extern "kernel32" stdcallcc fn ReadFile(in_hFile: HANDLE, out_lpBuffer: LPVOID, |
| 30 | pub extern "kernel32" fn ReadFile(in_hFile: HANDLE, out_lpBuffer: LPVOID, |
| 31 | 31 | in_nNumberOfBytesToRead: DWORD, out_lpNumberOfBytesRead: &DWORD, |
| 32 | 32 | in_out_lpOverlapped: ?&OVERLAPPED) -> BOOL; |
| 33 | 33 | |
| 34 | 34 | /// Writes data to the specified file or input/output (I/O) device. |
| 35 | 35 | /// This function is designed for both synchronous and asynchronous operation. For a similar function designed solely for asynchronous operation, see WriteFileEx. |
| 36 | | pub extern "kernel32" stdcallcc fn WriteFile(in_hFile: HANDLE, in_lpBuffer: &const c_void, |
| 36 | pub extern "kernel32" fn WriteFile(in_hFile: HANDLE, in_lpBuffer: &const c_void, |
| 37 | 37 | in_nNumberOfBytesToWrite: DWORD, out_lpNumberOfBytesWritten: ?&DWORD, |
| 38 | 38 | in_out_lpOverlapped: ?&OVERLAPPED) -> BOOL; |
| 39 | 39 | |
| 40 | | pub extern "kernel32" stdcallcc fn Sleep(dwMilliseconds: DWORD); |
| 40 | pub extern "kernel32" fn Sleep(dwMilliseconds: DWORD); |
| 41 | 41 | |
| 42 | 42 | |
| 43 | | pub extern "user32" stdcallcc fn MessageBoxA(hWnd: ?HANDLE, lpText: ?LPCTSTR, lpCaption: ?LPCTSTR, uType: UINT) -> c_int; |
| 43 | pub extern "user32" fn MessageBoxA(hWnd: ?HANDLE, lpText: ?LPCTSTR, lpCaption: ?LPCTSTR, uType: UINT) -> c_int; |
| 44 | 44 | |
| 45 | 45 | pub const PROV_RSA_FULL = 1; |
| 46 | 46 | |