Skip to content

Commit fbf2a92

Browse files
committed
Add needed winapi bindings
1 parent d7a9d96 commit fbf2a92

File tree

1 file changed

+7
-0
lines changed
  • src/libstd/sys/windows

1 file changed

+7
-0
lines changed

src/libstd/sys/windows/c.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ pub type ULONG = c_ulong;
4646
pub type ULONGLONG = u64;
4747
#[cfg(target_arch = "x86_64")]
4848
pub type DWORDLONG = ULONGLONG;
49+
pub type NTSTATUS = LONG;
4950

5051
pub type LPBOOL = *mut BOOL;
5152
pub type LPBYTE = *mut BYTE;
@@ -76,6 +77,8 @@ pub type SOCKET = ::os::windows::raw::SOCKET;
7677
pub type socklen_t = c_int;
7778
pub type ADDRESS_FAMILY = USHORT;
7879

80+
pub type ACCESS_MASK = DWORD;
81+
7982
pub const TRUE: BOOL = 1;
8083
pub const FALSE: BOOL = 0;
8184

@@ -114,6 +117,9 @@ pub const SECURITY_SQOS_PRESENT: DWORD = 0x00100000;
114117

115118
pub const FIONBIO: c_ulong = 0x8004667e;
116119

120+
pub const STATUS_SUCCESS: NTSTATUS = 0x00000000;
121+
pub const STATUS_TIMEOUT: NTSTATUS = 0x00000102;
122+
117123
#[cfg(target_arch = "arm")]
118124
const ARM_MAX_BREAKPOINTS: usize = 8;
119125
#[cfg(target_arch = "arm")]
@@ -1118,6 +1124,7 @@ extern "system" {
11181124
lpFilename: LPWSTR,
11191125
nSize: DWORD)
11201126
-> DWORD;
1127+
pub fn GetModuleHandleA(lpModuleName: LPCSTR) -> HMODULE;
11211128
pub fn CreateDirectoryW(lpPathName: LPCWSTR,
11221129
lpSecurityAttributes: LPSECURITY_ATTRIBUTES)
11231130
-> BOOL;

0 commit comments

Comments
 (0)