delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/06/18:18:50

Message-ID: <32D1840D.4DC3@rangenet.com>
Date: Mon, 06 Jan 1997 17:00:29 -0600
From: Dan Hedlund <markiv AT rangenet DOT com>
Reply-To: markiv AT rangenet DOT com
Organization: Range Net
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, djgpp AT delorie DOT com
Subject: Re: WinSock in Dos with WIn95
References: <Pine DOT SUN DOT 3 DOT 91 DOT 970106132938 DOT 24131F-100000 AT is>

Eli Zaretskii wrote:
> 
> On Sun, 5 Jan 1997, Dan Hedlund wrote:
> 
> > I havent found a way to call the entry point directly from protected
> > mode, so I'm just using DPMI functions to call it in real mode from
> > protected mode.  (DPMI function 0x0301)
> 
> Did you try library function `__dpmi_simulate_real_mode_procedure_retf'?
I'm using my own library.
> It is specifically there for the situations like yours.  It indeed calls
> DPMI function 0x301, but it does a bit of bookkeeping, which might be all
> you need to make the VxD calls work.

What I ment was:
  Int 2f returns a real mode entry point when called from real mode, and
a PM entry point when called from PM.  The RM entry point works fine,
but the PM entry point just causes in a GPF...  I think the PM entry
point might only be for 16 bit PM programs.

When the entry point is called, AX has the function number, and ES:BX
points to a structure that has the parameters for the function.  When I
debuged it, I set ES:EBX to the address of the structure.  EBX was less
than 64k.  Do you think I should try allocating a 16 bit LDT, and
putting the structure there?

-- 

*****      ***   **    **       Dan M. Hedlund
 ** **    *****  ***   **       <markiv AT rangenet DOT com>
 **  **  **   ** ****  **       http://www.rangenet.com/markiv
 **   ** **   ** ** ** **
 **   ** ******* **  ****
 **  **  **   ** **   ***
 ** **   **   ** **    **
*****    **   ** **    **


- Raw text -


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