From: Charles Sandmann Newsgroups: comp.os.msdos.djgpp Subject: Re: Urgent help, please Date: Tue, 27 Aug 2002 12:49:58 CDT Organization: Rice University, Houston TX Lines: 11 Message-ID: <3d6bbbc6.sandmann@clio.rice.edu> References: <6124b64f DOT 0208270217 DOT 5eb4a2e2 AT posting DOT google DOT com> NNTP-Posting-Host: clio.rice.edu X-Trace: joe.rice.edu 1030470854 11631 128.42.105.3 (27 Aug 2002 17:54:14 GMT) X-Complaints-To: abuse AT rice DOT edu NNTP-Posting-Date: 27 Aug 2002 17:54:14 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 > Just another question, is there anyway to obtain the handle of a memory > block when you only have the selector that points to the ldt table?. No. There is a DPMI 1.0 function which would provide this information, but it's not implemented almost anywhere. When you allocate the DPMI memory block, you need to store the handle if you want to reference it again. In general you should save these so you can deallocate the memory - if your program runs nested under another DPMI client the memory will not be released when your program exits. The DJGPP run time library stores the handles (when it malloc/sbrk's them) for freeing on exit, and you should do so also. Good luck.