Fix HMODULE
Signed-off-by: Peter Atashian <retep998@gmail.com>
This commit is contained in:
parent
bd8a43c668
commit
b57662aed7
|
@ -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…
Reference in New Issue