delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/08/27/01:15:07

From: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Urgent help, please
Date: Mon, 26 Aug 2002 23:57:49 CDT
Organization: Rice University, Houston TX
Lines: 28
Message-ID: <3d6b06cd.sandmann@clio.rice.edu>
References: <6124b64f DOT 0208261541 DOT 4592f51c AT posting DOT google DOT com>
NNTP-Posting-Host: clio.rice.edu
X-Trace: joe.rice.edu 1030424579 29763 128.42.105.3 (27 Aug 2002 05:02:59 GMT)
X-Complaints-To: abuse AT rice DOT edu
NNTP-Posting-Date: 27 Aug 2002 05:02:59 GMT
X-NewsEditor: ED-1.5.9
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019