Everything needed to run simple Rust programs (#40)

* Everything needed to run simple Rust programs

* Add IsDBCSLeadByte implementation

* Address PR comments
This commit is contained in:
2023-09-09 23:07:23 -04:00
committed by GitHub
parent 6e18120410
commit 94b44fd697
18 changed files with 1106 additions and 151 deletions

View File

@@ -29,8 +29,18 @@ namespace ole32 {
}
}
void *wibo::resolveOle32(const char *name) {
static void *resolveByName(const char *name) {
if (strcmp(name, "CoInitialize") == 0) return (void *) ole32::CoInitialize;
if (strcmp(name, "CoCreateInstance") == 0) return (void *) ole32::CoCreateInstance;
return 0;
return nullptr;
}
wibo::Module lib_ole32 = {
(const char *[]){
"ole32",
"ole32.dll",
nullptr,
},
resolveByName,
nullptr,
};