delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/01/12/18:26:51

Sender: rich AT delorie DOT com
Message-ID: <387D06D6.37ACD589@tudor21.net>
Date: Wed, 12 Jan 2000 22:57:26 +0000
From: Richard Dawe <richdawe AT bigfoot DOT com>
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.10 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: Building a VxD for win95 for zero page protection
References: <200001111656 DOT RAA04758 AT cerbere DOT u-strasbg DOT fr> <200001121629 DOT RAA19085 AT cerbere DOT u-strasbg DOT fr>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Pierre Muller wrote:
> 
>     Did anyone ever thought about writing a Win95 VxD that would
> allow to extend the DPMI specifications ?

Or, rather, implement DPMI 1.0 functionality ;) 

How would the VxD be loaded? By the DOS program? Or would you place an
entry in the registry to get it loaded on start-up of Windows '9x?

>    Of particular interest would be to add the DPMI functions
> 0x506 and 0x507

I think you would have to implement function 0x504 to actually allocate
the pages in the first place. You need the memory block handle to pass to
0x506 and 0x507.

>    because this would allow  to get GFP on zero page access !!

How would you set the GPF handler to be the DJGPP code? This sounds like
the most complicated part.

>    I looked at the Windows Device Devel Kit on M$ site and it seems
> possible to get thnigs done...
> 
>    But I never programmed device drivers nor used microsoft compilers.

Well, I managed to get a VxD to compile from source using the Win98 DDK
(freely available) and Visual C++ 6.0 without having used either before. I
think writing the code is the easy part. Debugging it may be very
difficult with the tools provided in the DDK. I think you can use serial
port debugging.

I think writing a VxD like this could be very useful. It might be possible
to use it to implement shared memory between DOS boxes, which would allow
a number of problems to be solved, e.g.

1. Arbitrarily long command lines (no transfer buffer limit)
2. Possible fork() support?
3. Easy Unix domain sockets (rather than using the mailslots as in
libsocket) or other interprocess communication
4. Shared memory

Those are the only ones that spring to mind right now.

Bye,

-- 
Richard Dawe
richdawe AT bigfoot DOT com ICQ 47595498 http://www.bigfoot.com/~richdawe/

- Raw text -


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