Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/kernel32/file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c index 3e93b0d..aa57351 100644 --- a/dlls/kernel32/file.c +++ b/dlls/kernel32/file.c @@ -1586,8 +1586,9 @@ HANDLE WINAPI CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing, { if (vxd_name && vxd_name[0]) { + static const WCHAR krnl386W[] = {'k','r','n','l','3','8','6','.','e','x','e','1','6',0}; static HANDLE (*vxd_open)(LPCWSTR,DWORD,SECURITY_ATTRIBUTES*); - if (!vxd_open) vxd_open = (void *)GetProcAddress( GetModuleHandleA("krnl386.exe16"), + if (!vxd_open) vxd_open = (void *)GetProcAddress( GetModuleHandleW(krnl386W), "__wine_vxd_open" ); if (vxd_open && (ret = vxd_open( vxd_name, access, sa ))) goto done; } @@ -2609,11 +2610,12 @@ BOOL WINAPI DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode,
if (HIWORD( dwIoControlCode ) == 0 && (GetVersion() & 0x80000000)) { + static const WCHAR krnl386W[] = {'k','r','n','l','3','8','6','.','e','x','e','1','6',0}; typedef BOOL (WINAPI *DeviceIoProc)(DWORD, LPVOID, DWORD, LPVOID, DWORD, LPDWORD, LPOVERLAPPED); static DeviceIoProc (*vxd_get_proc)(HANDLE); DeviceIoProc proc = NULL;
- if (!vxd_get_proc) vxd_get_proc = (void *)GetProcAddress( GetModuleHandleA("krnl386.exe16"), + if (!vxd_get_proc) vxd_get_proc = (void *)GetProcAddress( GetModuleHandleW(krnl386W), "__wine_vxd_get_proc" ); if (vxd_get_proc) proc = vxd_get_proc( hDevice ); if (proc) return proc( dwIoControlCode, lpvInBuffer, cbInBuffer,
2017-12-01 11:01 GMT-07:00 Zebediah Figura z.figura12@gmail.com:
static const WCHAR krnl386W[] = {'k','r','n','l','3','8','6','.','e','x','e','1','6',0};
static const WCHAR krnl386W[] = {'k','r','n','l','3','8','6','.','e','x','e','1','6',0};
I would define the constant once at the top of the file, next to wildcardsW.
-Alex