mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 09:13:07 +03:00
+2
-1
@@ -1541,7 +1541,8 @@ pub mod extra {
|
||||
pub type DWORDLONG = c_ulonglong;
|
||||
|
||||
pub type HANDLE = LPVOID;
|
||||
pub type HMODULE = c_uint;
|
||||
pub type HINSTANCE = HANDLE;
|
||||
pub type HMODULE = HINSTANCE;
|
||||
|
||||
pub type LONG = c_long;
|
||||
pub type PLONG = *mut c_long;
|
||||
|
||||
@@ -281,7 +281,7 @@ pub fn join_paths<T: BytesContainer>(paths: &[T]) -> Result<Vec<u8>, &'static st
|
||||
pub fn load_self() -> Option<Vec<u8>> {
|
||||
unsafe {
|
||||
fill_utf16_buf_and_decode(|buf, sz| {
|
||||
libc::GetModuleFileNameW(0u as libc::DWORD, buf, sz)
|
||||
libc::GetModuleFileNameW(ptr::null_mut(), buf, sz)
|
||||
}).map(|s| s.to_string().into_bytes())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user