delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/12/13:07:46

From: "Charles Sandmann" <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: DPMI identification
Date: Tue, 12 Oct 1999 11:09:00
Organization: Aspen Technology, Inc.
Lines: 26
Message-ID: <380316cc.sandmann@clio.rice.edu>
References: <380327DC DOT A134803D AT ma DOT tum DOT de>
NNTP-Posting-Host: dcloan.aco.aspentech.com
X-NewsEditor: ED-1.5.8
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> is there a way to find out which DPMI server is actually serving a
> running DJGPP program?  I think of a code fragment like
> 
> i=_dpmi_whtsoever(); //or i=go32_whatsoever();
> switch( i){
>  case A: CWSDPMI...
>  case B: Win9x...
>  case C: YA_DPMI
>  default: DONT_KNOW....
> }
> or any other solution would be fine. thanks.
> --
>  Gruss Waldemar Schultz.

You would need to write one.  Since DPMI is supposed to be a "standard", you
have to dig a bit to tell the differences.

Things I can think of which would give hints:
  Which DPMI calls are supported (Get page attributes is a good one to test)
  What DPMI version is reported
  The current IOPL, and the GDT information

Ideally you should check for features instead of a specific DPMI provider.
The only real use I know of looking for a specific DPMI is to bypass it's
protection and go to ring 0 or collect special information not normally 
available (like the page tables, and thus physical memory info).

- Raw text -


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