Skip to content

Commit 8460299

Browse files
committed
shim more Windows functions
1 parent 52ec21e commit 8460299

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/fn_call.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,12 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx> for EvalContext<'a, 'mir, '
739739
// any non zero value works for the stdlib. This is just used for stackoverflows anyway
740740
self.write_scalar(dest, Scalar::from_u128(1), usize)?;
741741
},
742+
"std::sys::windows::c::::GetModuleHandleW" |
743+
"std::sys::windows::c::::GetProcAddress" => {
744+
let usize = self.tcx.types.usize;
745+
// pretend these do not exist, by returning zero
746+
self.write_scalar(dest, Scalar::from_u128(0), usize)?;
747+
},
742748
_ => return err!(NoMirFor(path)),
743749
}
744750

0 commit comments

Comments
 (0)