diff options
| author | Javier <dev.git@javispedro.com> | 2026-11-30 12:53:58 +0100 |
|---|---|---|
| committer | Javier <dev.git@javispedro.com> | 2026-11-30 12:53:58 +0100 |
| commit | 9f46f39f48d3acf4806473b331b654111a6e2084 (patch) | |
| tree | 047142a32fda5820ff3f00851903afe33ec3359c /mousew16.lnk | |
| parent | 2938a67c400930d2d5e6f23bb8e13b1ec3b99000 (diff) | |
| download | vbados-9f46f39f48d3acf4806473b331b654111a6e2084.tar.gz vbados-9f46f39f48d3acf4806473b331b654111a6e2084.zip | |
mousew16: found a way to use the same binary in both 2.x and >3.x
What was missing is to use mark.exe (same as the MEMORY option in wlink)
to mark the 2.0 executable as being "protected mode compatible".
Thanks to Pietrek's Windows Internals book and their description of
what LoadModule is doing.
Diffstat (limited to 'mousew16.lnk')
| -rw-r--r-- | mousew16.lnk | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/mousew16.lnk b/mousew16.lnk index 4e379ef..14ca952 100644 --- a/mousew16.lnk +++ b/mousew16.lnk @@ -1,16 +1,26 @@ -system windows_dll +system windows_dll memory font +# "memory" flag above says we are protected mode compatible +# even if our target windows is < 3.0. this is equivalent to what mark.exe does. option map=mousew16.map option modname=MOUSE # This is necessary; USER.EXE imports mouse functions using this module name option description 'VBMouse int33 absolute mouse driver' option heapsize=128 # We don't need localheap but windows_dll sets 1K by default +option version=1.0 # minimal Windows version required + +# The 2.x drv loader in SETUP.EXE is way more picky than the regular one +# Fortunately, we have the source for 2.x SETUP.EXE, so we know what it needs: +# Paragraph alignment, and for the NE header to start at exactly 0x400, +# which means we need a custom stub exe that is exactly 1K long. +option alignment=16 +option stub=dosstub.exe segment CALLBACKS fixed shared # We need a non-moveable segment to store our callback routines segment CLASS DATA fixed shared # Likewise fix the data segment, too cumbersome if not +# We don't do the normal DLL prolog in the interrupt handlers, for example export Inquire.1 export Enable.2 export Disable.3 export MouseGetIntVect.4 -export WheelHookProc |
