Mail Archives: djgpp/2002/08/27/01:15:07
> I'm using DJGPP and dpmi libray in a machine with Win2000. I
> previously had it running under win98 Second Edition. When running
> under win98 everytime I called the dpmi function:
> __dpmi_meminfo mem;
> __dpmi_allocate_memory(&mem)
> It always gave as a result same value for mem.handle and mem.address.
> I wrote a multi-threaded executive with a different data segment for
> executive structures, being confident about this being the normal
> behaviour of the function.
This was a bad assumption - different DPMI providers behave
differently. Windows 2000 and Windows XP behave like Windows NT,
not like Win 9x. (And Win 9x is dead as far as MS is concerned).
Even under Win9x if you do some heavy multi-tasking in different
windows you can see different behavior.
> And now under Win2000 everytime I call the function I get different
> values for mem.handle and mem.address, and this implies making a lot
> of changes in my code.
You need to make those changes and not make assumptions like this in
the future, unless it's specifically stated to be that way in the
DPMI specification.
Sorry, maybe there is an easy way to fix this in your code if you look
hard enough.
- Raw text -