Skip to content
Snippets Groups Projects
Commit 860ab9d7 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Java: Fixed some issues with the previous NT patch.

parent 1a3d1351
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ static HINSTANCE jvmdll = NULL; ...@@ -23,7 +23,7 @@ static HINSTANCE jvmdll = NULL;
static int open_nt_dll(void) static int open_nt_dll(void)
{ {
LPCTSTR libname=_T("jvm"); LPTSTR libname=_T("jvm");
LPCTSTR keyname=_T("SOFTWARE\\JavaSoft\\Java Runtime Environment"); LPCTSTR keyname=_T("SOFTWARE\\JavaSoft\\Java Runtime Environment");
HKEY key; HKEY key;
TCHAR buffer[2*MAX_PATH+32]; TCHAR buffer[2*MAX_PATH+32];
...@@ -88,14 +88,14 @@ static int open_nt_dll(void) ...@@ -88,14 +88,14 @@ static int open_nt_dll(void)
* SetDllDirectory() with it. * SetDllDirectory() with it.
*/ */
kernel = GetModuleHandle("kernel32"); kernel = GetModuleHandle("kernel32");
getdlldir = (void *)GetModuleHandle(kernel, "GetDllDirectoryA"); getdlldir = (void *)GetProcAddress(kernel, "GetDllDirectoryA");
setdlldir = (void *)GetModuleHandle(kernel, "SetDllDirectoryA"); setdlldir = (void *)GetProcAddress(kernel, "SetDllDirectoryA");
if (setdlldir) { if (setdlldir) {
int cnt = 0; int cnt = 0;
for(l = len; l--;) { for(l = len; l--;) {
if (jvmdll[l] == '\\') { if (libname[l] == '\\') {
/* Go up two directory levels. */ /* Go up two directory levels. */
if (++cnt == 2) break; if (++cnt == 2) break;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment