src/windows/native/common/jni_util_md.c

Print this page

        

*** 140,149 **** --- 140,158 ---- void* getProcessHandle() { return (void*)GetModuleHandle(NULL); } + int + getErrorString(int err, char *buf, size_t len) + { + int ret = 0; + if (err == 0 || len < 1) return 0; + ret = strerror_s(buf, len, err); + return ret; + } + /* * Windows symbols can be simple like JNI_OnLoad or __stdcall format * like _JNI_OnLoad@8. We need to handle both. */ void buildJniFunctionName(const char *sym, const char *cname,