Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WINE does in fact support Windows 9x style Win16 thunks #61

Open
joncampbell123 opened this issue Dec 3, 2024 · 0 comments
Open

WINE does in fact support Windows 9x style Win16 thunks #61

joncampbell123 opened this issue Dec 3, 2024 · 0 comments

Comments

@joncampbell123
Copy link
Owner

Contacted by a developer, WINE supports Windows 9x Win16 thunks and, unlike Windows 9x/ME, will not prevent use of GetProcAddress() to use them.

Update this code:

doslib/hw/dos/w9xqthnk.c

Lines 54 to 77 in fbe2e57

/* This hack relies on undocumented Win16 support routines hidden in KERNEL32.DLL.
* They're so super seekret, Microsoft won't even let us get to them through GetProcAddress() */
kern32 = GetModuleHandle("KERNEL32.DLL");
if (windows_emulation == WINEMU_WINE) {
/* FIXME: Direct ordinal lookup doesn't work. Returned
* addresses point to invalid regions of KERNEL32.DLL.
* I doubt WINE is even putting a PE-compatible image
* of it out there.
*
* WINE does allow us to GetProcAddress ordinals
* (unlike Windows 9x which blocks it) but I'm not
* really sure the returned functions are anything
* like the Windows 9x equivalent. If we assume they
* are, this code seems unable to get the address of
* KRNL386.EXE's "GETVERSION" function.
*
* So basically WINE's Windows 9x emulation is more
* like Windows XP's Application Compatability modes
* than any serious attempt at pretending to be
* Windows 9x. And the entry points may well be
* stubs or other random functions in the same way
* that ordinal 35 is unrelated under Windows XP. */
return 0;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant