Skip to content

Commit

Permalink
gdi32
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonros committed Dec 30, 2024
1 parent 8248e5f commit ded0ef4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
21 changes: 21 additions & 0 deletions libmwemu/src/winapi64/gdi32.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
use crate::emu;
use crate::serialization;
use crate::winapi64;

pub fn gateway(addr: u64, emu: &mut emu::Emu) -> String {
let api = winapi64::kernel32::guess_api_name(emu, addr);
match api.as_str() {
_ => {
if emu.cfg.skip_unimplemented == false {
if emu.cfg.dump_on_exit && emu.cfg.dump_filename.is_some() {
serialization::Serialization::dump_to_file(&emu, emu.cfg.dump_filename.as_ref().unwrap());
}

unimplemented!("atemmpt to call unimplemented API 0x{:x} {}", addr, api);
}
log::warn!("calling unimplemented API 0x{:x} {}", addr, api);
return api;
}
}
String::new()
}
3 changes: 2 additions & 1 deletion libmwemu/src/winapi64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ mod wininet;
mod ws2_32;
mod oleaut32;
mod uxtheme;

mod gdi32;

use crate::emu;

Expand All @@ -33,6 +33,7 @@ pub fn gateway(addr: u64, name: String, emu: &mut emu::Emu) {
"kernelbase.text" => kernelbase::gateway(addr, emu),
"oleaut32.text" => oleaut32::gateway(addr, emu),
"uxtheme.text" => uxtheme::gateway(addr, emu),
"gdi32.text" => gdi32::gateway(addr, emu),
"not_loaded" => {
// TODO: banzai check?
emu.pe64.as_ref().unwrap().import_addr_to_name(addr)
Expand Down

0 comments on commit ded0ef4

Please sign in to comment.