mirror of
https://github.com/ziglang/zig.git
synced 2025-12-30 01:53:16 +00:00
windows API functions are not stdcalls
This commit is contained in:
parent
ba41be67f0
commit
59410a2f13
@ -1,46 +1,46 @@
|
||||
pub const ERROR = @import("error.zig");
|
||||
|
||||
pub extern "kernel32" stdcallcc fn CryptAcquireContext(phProv: &HCRYPTPROV, pszContainer: LPCTSTR,
|
||||
pub extern "kernel32" fn CryptAcquireContext(phProv: &HCRYPTPROV, pszContainer: LPCTSTR,
|
||||
pszProvider: LPCTSTR, dwProvType: DWORD, dwFlags: DWORD) -> bool;
|
||||
|
||||
pub extern "kernel32" stdcallcc fn CryptReleaseContext(hProv: HCRYPTPROV, dwFlags: DWORD) -> bool;
|
||||
pub extern "kernel32" fn CryptReleaseContext(hProv: HCRYPTPROV, dwFlags: DWORD) -> bool;
|
||||
|
||||
pub extern "kernel32" stdcallcc fn CryptGenRandom(hProv: HCRYPTPROV, dwLen: DWORD, pbBuffer: &BYTE) -> bool;
|
||||
pub extern "kernel32" fn CryptGenRandom(hProv: HCRYPTPROV, dwLen: DWORD, pbBuffer: &BYTE) -> bool;
|
||||
|
||||
pub extern "kernel32" stdcallcc fn ExitProcess(exit_code: UINT) -> noreturn;
|
||||
pub extern "kernel32" fn ExitProcess(exit_code: UINT) -> noreturn;
|
||||
|
||||
pub extern "kernel32" stdcallcc fn GetCommandLine() -> LPTSTR;
|
||||
pub extern "kernel32" fn GetCommandLine() -> LPTSTR;
|
||||
|
||||
pub extern "kernel32" stdcallcc fn GetConsoleMode(in_hConsoleHandle: HANDLE, out_lpMode: &DWORD) -> bool;
|
||||
pub extern "kernel32" fn GetConsoleMode(in_hConsoleHandle: HANDLE, out_lpMode: &DWORD) -> bool;
|
||||
|
||||
/// Retrieves the calling thread's last-error code value. The last-error code is maintained on a per-thread basis.
|
||||
/// Multiple threads do not overwrite each other's last-error code.
|
||||
pub extern "kernel32" stdcallcc fn GetLastError() -> DWORD;
|
||||
pub extern "kernel32" fn GetLastError() -> DWORD;
|
||||
|
||||
/// Retrieves file information for the specified file.
|
||||
pub extern "kernel32" stdcallcc fn GetFileInformationByHandleEx(in_hFile: HANDLE,
|
||||
pub extern "kernel32" fn GetFileInformationByHandleEx(in_hFile: HANDLE,
|
||||
in_FileInformationClass: FILE_INFO_BY_HANDLE_CLASS, out_lpFileInformation: &c_void,
|
||||
in_dwBufferSize: DWORD) -> bool;
|
||||
|
||||
/// Retrieves a handle to the specified standard device (standard input, standard output, or standard error).
|
||||
pub extern "kernel32" stdcallcc fn GetStdHandle(in_nStdHandle: DWORD) -> ?HANDLE;
|
||||
pub extern "kernel32" fn GetStdHandle(in_nStdHandle: DWORD) -> ?HANDLE;
|
||||
|
||||
/// 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.
|
||||
/// This function is designed for both synchronous and asynchronous operations. For a similar function designed solely for asynchronous operation, see ReadFileEx.
|
||||
pub extern "kernel32" stdcallcc fn ReadFile(in_hFile: HANDLE, out_lpBuffer: LPVOID,
|
||||
pub extern "kernel32" fn ReadFile(in_hFile: HANDLE, out_lpBuffer: LPVOID,
|
||||
in_nNumberOfBytesToRead: DWORD, out_lpNumberOfBytesRead: &DWORD,
|
||||
in_out_lpOverlapped: ?&OVERLAPPED) -> BOOL;
|
||||
|
||||
/// Writes data to the specified file or input/output (I/O) device.
|
||||
/// This function is designed for both synchronous and asynchronous operation. For a similar function designed solely for asynchronous operation, see WriteFileEx.
|
||||
pub extern "kernel32" stdcallcc fn WriteFile(in_hFile: HANDLE, in_lpBuffer: &const c_void,
|
||||
pub extern "kernel32" fn WriteFile(in_hFile: HANDLE, in_lpBuffer: &const c_void,
|
||||
in_nNumberOfBytesToWrite: DWORD, out_lpNumberOfBytesWritten: ?&DWORD,
|
||||
in_out_lpOverlapped: ?&OVERLAPPED) -> BOOL;
|
||||
|
||||
pub extern "kernel32" stdcallcc fn Sleep(dwMilliseconds: DWORD);
|
||||
pub extern "kernel32" fn Sleep(dwMilliseconds: DWORD);
|
||||
|
||||
|
||||
pub extern "user32" stdcallcc fn MessageBoxA(hWnd: ?HANDLE, lpText: ?LPCTSTR, lpCaption: ?LPCTSTR, uType: UINT) -> c_int;
|
||||
pub extern "user32" fn MessageBoxA(hWnd: ?HANDLE, lpText: ?LPCTSTR, lpCaption: ?LPCTSTR, uType: UINT) -> c_int;
|
||||
|
||||
pub const PROV_RSA_FULL = 1;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user