My WIN16 application tries to access a range of memory addresses in NT. In
order to do this, I make a VDD to install a meory hook for this bunch of
memory. The code is as follows.
MIOAddress = (ULONG) GetVDMPointer(MIO_ADDRESS, MIO_RANGE, TRUE);
// Hook memory-mapped I/O.
MIOHook =
VDDInstallMemoryHook(hVDD,(PVOID)MIOAddress,MIO_RANGE,(PVDD_MEMORY_HANDLER)M
IOHandler);
where, MIO_ADDRESS is a 32bit x86 address like 0xd0004000. MIO_RANGE is 2k.
This code works with MS-DOS program when the third parameter of
GetVDMPointer is 0. But it doesn’t work with WIN16 application.
From NT DKK document, if the third parameter (ProtectedMode) is 0, this
function will take the high word of MIO_ADDRESS as segment. If the parameter
is 1, the high word will be seen as a selector.
Can anyone tell me where the problem is?
Thanks a lot.
-----Original Message-----
From: Jim Young [mailto:xxxxx@youngendeavors.com]
Sent: Wednesday, November 07, 2001 2:12 PM
To: NT Developers Interest List
Subject: [ntdev] RE: a VDD question
The only way I know is to write a thunking DLL (its ugly). Look under
Thunking Compiler in MSDN. You can also pass data to a 16 bit process using
WM_COPYDATA or DDE, etc. If you have the source code for the 16 bit DLL a
better option may be to re-compile it as a 32 bit DLL.
Jim
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Mingshu Wang
Sent: Wednesday, November 07, 2001 9:54 AM
To: NT Developers Interest List
Subject: [ntdev] a VDD question
How can I call a function in a win16 DLL from a VDD under NT or WIN2K?
You are currently subscribed to ntdev as: xxxxx@youngendeavors.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@ccontrols.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com