zig/std/os/windows/advapi32.zig

35 lines
895 B
Zig
Raw Normal View History

2019-03-03 05:46:04 +08:00
use @import("../windows.zig");
pub const PROV_RSA_FULL = 1;
pub const REGSAM = ACCESS_MASK;
pub const ACCESS_MASK = DWORD;
2018-10-20 23:59:06 +08:00
pub const PHKEY = *HKEY;
pub const HKEY = *HKEY__;
pub const HKEY__ = extern struct {
unused: c_int,
};
pub const LSTATUS = LONG;
2018-08-28 07:25:18 +08:00
pub extern "advapi32" stdcallcc fn RegOpenKeyExW(
hKey: HKEY,
lpSubKey: LPCWSTR,
ulOptions: DWORD,
samDesired: REGSAM,
2018-10-20 23:59:06 +08:00
phkResult: *HKEY,
2018-08-28 07:25:18 +08:00
) LSTATUS;
pub extern "advapi32" stdcallcc fn RegQueryValueExW(
hKey: HKEY,
lpValueName: LPCWSTR,
lpReserved: LPDWORD,
lpType: LPDWORD,
lpData: LPBYTE,
lpcbData: LPDWORD,
) LSTATUS;
// RtlGenRandom is known as SystemFunction036 under advapi32
// http://msdn.microsoft.com/en-us/library/windows/desktop/aa387694.aspx */
2018-08-03 01:34:31 +08:00
pub extern "advapi32" stdcallcc fn SystemFunction036(output: [*]u8, length: usize) BOOL;
pub const RtlGenRandom = SystemFunction036;