From - Mon Oct 27 09:31:07 1997 Path: news.mitre.org!blanket.mitre.org!agate!howland.erols.net!news-peer.gsl.net!news.gsl.net!gip.net!portc01.blue.aol.com!audrey01.news.aol.com!not-for-mail From: tguinther@aol.com (Tguinther) Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode Subject: Re: segmented model and NT Date: 26 Oct 1997 15:52:01 GMT Lines: 33 Message-ID: <19971026155201.KAA06923@ladder01.news.aol.com> NNTP-Posting-Host: ladder01.news.aol.com X-Admin: news@aol.com Organization: AOL http://www.aol.com References: <62o1ja$9mk$1@news01.btx.dtag.de> >We plan to write a WIN32-Program that allocates memory for the >286 program and then uses a kernel driver to create the needed >descriptors. > > There was a previous reply to your previous message about the Win16 subsystem providing all the selector routines so I am assuming that your 286 program is not a Win16 client, and is just a typical 286 16:16 executable. If that is the case then you could simply use your "device driver" to create and maintain a LDT that contained all the selector entries you needed. Assuming you have an LDT then you can *poke* the Win32 kernel process environment block with the LDT value, and unwittingly, ntoskrnl!SwapContext will blindly *poke* that value into the GDT when a thread from your process is active. This is an extreme generalization and it may not be appropriate for what you are attending to accomplish. Also, there may be technical difficulties I have not taken into account. In reality the Win32 process could provide the LDT management itself, and the only real need for the driver is to *poke* the LDT into the KPEB. Tom Guinther, Vireo Software tomg@vireo.com tguinther@aol.com