From: egmose AT image DOT dk (Søren Egmose) Newsgroups: comp.os.msdos.djgpp Subject: Re: How to determine the physical address from a DPMI descriptor Date: Mon, 24 Aug 1998 11:26:44 GMT Message-ID: <35e24ad7.6733200@news.image.dk> References: <35e04c8f DOT 1705102 AT news DOT teaser DOT fr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Lines: 42 NNTP-Posting-Host: news010.image.dk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In artikel <35e04c8f DOT 1705102 AT news DOT teaser DOT fr>, On Sun, 23 Aug 1998 18:10:52 GMT, jpdelprat AT teaser DOT fr (JP) wrote: >Eli Zaretskii wrote: > >> >>On Tue, 18 Aug 1998, JP wrote: >> >>> My need is to create and lock a 2Mo continuous buffer (under Windows >>> 95), and determine its physical address to give it to a video capture card. >> >>I think section 18.7 of the FAQ should get you started. >> >>> With DPMI functions (under Windows 95), I allocate my buffer then >>> lock it, but despite the call to dpmi_lock_linear_region, the buffer >>> is still mixed and partially swapped out. >> >>Did you remember to make your segment to have a size that's a multiple of >>4KB? > >Thanks for the advice. I hadn't noticed this point. Fortunately, my >buffer is exactly 2M. So it should be ok. > >I have found another solution : I allocate and lock an xms buffer >before Windows starts. This buffer is continuous and cannot be used by >Windows. The drawback is that my system now has less memory. I would >prefer to allocate my buffer when I run my program, but I could find >any way. Under windows you would use something like the following to get a non-swappable array. mem = GlobalAlloc(GMEM_FIXED, TWOMB); isn't there anything like this in djgpp? -- mvh. Søren Some random US email addresses: senator AT hutchison DOT senate DOT gov sam DOT tx03 AT mail DOT house DOT gov rhundt AT fcc DOT gov jquello AT fcc DOT gov sness AT fcc DOT gov rchong AT fcc DOT gov uce AT ftc DOT gov abuse AT localhost