File tree Expand file tree Collapse file tree 2 files changed +5
-18
lines changed Expand file tree Collapse file tree 2 files changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -106,22 +106,9 @@ macro_rules! dbghelp {
106
106
/// Panics if library is already loaded.
107
107
fn open( & mut self ) -> Result <( ) , ( ) > {
108
108
assert!( self . dll. is_null( ) ) ;
109
- let lib = [
110
- 'd' as u16 ,
111
- 'b' as u16 ,
112
- 'g' as u16 ,
113
- 'h' as u16 ,
114
- 'e' as u16 ,
115
- 'l' as u16 ,
116
- 'p' as u16 ,
117
- '.' as u16 ,
118
- 'd' as u16 ,
119
- 'l' as u16 ,
120
- 'l' as u16 ,
121
- 0 ,
122
- ] ;
109
+ let lib = b"dbghelp.dll\0 " ;
123
110
unsafe {
124
- self . dll = LoadLibraryW ( lib. as_ptr( ) ) ;
111
+ self . dll = LoadLibraryA ( lib. as_ptr( ) as * const i8 ) ;
125
112
if self . dll. is_null( ) {
126
113
Err ( ( ) )
127
114
} else {
Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ ffi! {
339
339
pub fn GetCurrentProcess ( ) -> HANDLE ;
340
340
pub fn GetCurrentThread ( ) -> HANDLE ;
341
341
pub fn RtlCaptureContext ( ContextRecord : PCONTEXT ) -> ( ) ;
342
- pub fn LoadLibraryW ( a: * const u16 ) -> HMODULE ;
342
+ pub fn LoadLibraryA ( a: * const i8 ) -> HMODULE ;
343
343
pub fn FreeLibrary ( h: HMODULE ) -> BOOL ;
344
344
pub fn GetProcAddress ( h: HMODULE , name: * const i8 ) -> FARPROC ;
345
345
pub fn OpenProcess (
@@ -567,7 +567,7 @@ ffi! {
567
567
// pub High: LONG64,
568
568
// }
569
569
570
- // pub type PNEON128 = *mut NEON128;
570
+ // pub type PNEON128 = *mut NEON128;
571
571
572
572
#[ repr( C ) ]
573
573
pub struct CONTEXT_u {
@@ -578,7 +578,7 @@ ffi! {
578
578
579
579
pub const ARM_MAX_BREAKPOINTS : usize = 8 ;
580
580
pub const ARM_MAX_WATCHPOINTS : usize = 1 ;
581
-
581
+
582
582
#[ repr( C ) ]
583
583
pub struct CONTEXT {
584
584
pub ContextFlags : DWORD ,
You can’t perform that action at this time.
0 commit comments