diff --git a/common.h b/common.h index ee072e4..f437fcf 100644 --- a/common.h +++ b/common.h @@ -20,7 +20,7 @@ namespace wibo { void *resolveUser32(const char *name); void *resolveOle32(const char *name); void *resolveAdvApi32(const char *name); - void *resolveLmgr11(uint16_t ordinal); + void *resolveLmgr(uint16_t ordinal); void *resolveStubByName(const char *dllName, const char *funcName); void *resolveStubByOrdinal(const char *dllName, uint16_t ordinal); diff --git a/lmgr11.cpp b/lmgr.cpp similarity index 71% rename from lmgr11.cpp rename to lmgr.cpp index ad93671..866f4de 100644 --- a/lmgr11.cpp +++ b/lmgr.cpp @@ -1,6 +1,6 @@ #include "common.h" -namespace lmgr11 { +namespace lmgr { int lp_checkout(int a, int b, const char* c, const char* d, int e, const char* f, int* out) { DEBUG_LOG("lp_checkout %d %d %s %s %d %s\n", a, b, c, d, e, f); *out = 1234; @@ -13,12 +13,12 @@ namespace lmgr11 { } } -void *wibo::resolveLmgr11(uint16_t ordinal) { +void *wibo::resolveLmgr(uint16_t ordinal) { switch (ordinal) { case 189: - return (void*)lmgr11::lp_checkin; + return (void*)lmgr::lp_checkin; case 190: - return (void*)lmgr11::lp_checkout; + return (void*)lmgr::lp_checkout; } return 0; } diff --git a/main.cpp b/main.cpp index 0002237..d6f74f0 100644 --- a/main.cpp +++ b/main.cpp @@ -82,8 +82,10 @@ void *wibo::resolveStubByName(const char *dllName, const char *funcName) { } void *wibo::resolveStubByOrdinal(const char *dllName, uint16_t ordinal) { - if (strcmp(dllName, "LMGR11.dll") == 0 || strcmp(dllName, "LMGR326B.dll") == 0) { - void* func = wibo::resolveLmgr11(ordinal); + if (strcmp(dllName, "LMGR11.dll") == 0 || + strcmp(dllName, "LMGR326B.dll") == 0 || + strcmp(dllName, "LMGR8C.dll") == 0) { + void* func = wibo::resolveLmgr(ordinal); if (func) return func; } diff --git a/ole32.cpp b/ole32.cpp index 352599a..53eea1d 100644 --- a/ole32.cpp +++ b/ole32.cpp @@ -20,7 +20,7 @@ namespace ole32 { const GUID *riid, void **ppv ) { - // for mwcc_41_60126: + // when license.dat is missing: // rclsid = CLSID_ShellLink (0x21401), riid = IID_IShellLinkA (0x214ee) // and then it crashes with a null pointer deref DEBUG_LOG("CoCreateInstance 0x%x %p %d 0x%x %p\n", rclsid->Data1, pUnkOuter, dwClsContext, riid->Data1, *ppv); diff --git a/version.cpp b/version.cpp index 38e620b..6fddbdb 100644 --- a/version.cpp +++ b/version.cpp @@ -4,7 +4,6 @@ namespace version { unsigned int WIN_FUNC GetFileVersionInfoSizeA(const char* lptstrFilename, unsigned int* outZero) { DEBUG_LOG("GetFileVersionInfoSizeA %s\n", lptstrFilename); *outZero = 0; - // stub: signal an error wibo::lastError = 0; return 0; }