Fix HMODULE

Signed-off-by: Peter Atashian <retep998@gmail.com>
This commit is contained in:
Peter Atashian 2015-01-19 03:43:44 -05:00
parent bd8a43c668
commit b57662aed7
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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())
}
}