2023-09-10 03:07:23 +00:00
|
|
|
#include "common.h"
|
|
|
|
|
|
|
|
namespace vcruntime {
|
|
|
|
|
|
|
|
void *WIN_ENTRY memcpy(void *dest, const void *src, size_t count) { return ::memcpy(dest, src, count); }
|
|
|
|
|
|
|
|
void *WIN_ENTRY memset(void *dest, int ch, size_t count) { return ::memset(dest, ch, count); }
|
|
|
|
|
|
|
|
int WIN_ENTRY memcmp(const void *buf1, const void *buf2, size_t count) { return ::memcmp(buf1, buf2, count); }
|
|
|
|
|
2023-10-02 03:56:35 +00:00
|
|
|
void *WIN_ENTRY memmove(void *dest, const void *src, size_t count) { return ::memmove(dest, src, count); }
|
|
|
|
|
2023-09-10 03:07:23 +00:00
|
|
|
} // namespace vcruntime
|
|
|
|
|
|
|
|
static void *resolveByName(const char *name) {
|
|
|
|
if (strcmp(name, "memcpy") == 0)
|
|
|
|
return (void *)vcruntime::memcpy;
|
|
|
|
if (strcmp(name, "memset") == 0)
|
|
|
|
return (void *)vcruntime::memset;
|
|
|
|
if (strcmp(name, "memcmp") == 0)
|
|
|
|
return (void *)vcruntime::memcmp;
|
2023-10-02 03:56:35 +00:00
|
|
|
if (strcmp(name, "memmove") == 0)
|
|
|
|
return (void *)vcruntime::memmove;
|
2023-09-10 03:07:23 +00:00
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
wibo::Module lib_vcruntime = {
|
|
|
|
(const char *[]){
|
|
|
|
"vcruntime140",
|
|
|
|
"vcruntime140.dll",
|
|
|
|
nullptr,
|
|
|
|
},
|
|
|
|
resolveByName,
|
|
|
|
nullptr,
|
|
|
|
};
|