Rollup merge of #21387 - retep998:hmodule, r=alexcrichton
r? @alexcrichton
This commit is contained in:
commit
3d6568fcb2
@ -1541,7 +1541,8 @@ pub mod types {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user