From: "Charles Sandmann" Newsgroups: comp.os.msdos.djgpp Subject: Re: VDS Date: Sat, 28 Nov 1998 21:58:39 Organization: Aspen Technology, Inc. Lines: 45 Message-ID: <3660720f.sandmann@clio.rice.edu> References: <73q651$ebj$1 AT idy05 DOT tfh-berlin DOT de> NNTP-Posting-Host: dmcap2.aco.aspentech.com X-NewsEditor: ED-1.5.8 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > And what gives? - the DOS-box has no problem with > allocating a 1 meg buffer, but plain DOS has! (i.e. the memory > manager to be exact - both QEMM AND EMM386!). > Error 0x05 (region too large for buffer). > Then I loaded QDPMI because CWSDPMI and QEMM > maybe don't go together well in this case? This changed nothing. > *sigh* and plain DOS is my primary target platform, because > there's native Win software that does the job my program > is supposed to do, quite well. > > So the question is, why is there no memory available for > the VDS provider to allocate? > Has anyone solved this kind of problem and has written some > code that uses VDS in a useful manner? > Or is there any other solution to my problem? VDS is the correct solution to your problem. But as you have found, the implementation is spotty or non-existent. So - VDS is the non-solution ... CWSDPMI does not implement VDS in the standard distribution. There are some VDS functions implemented in some source conditional compiles but they won't solve your problem. The reasons VDS was never completely implemented in CWSDPMI are: 1) I didn't have time. 2) Other DPMI providers either didn't implement it at all, or did it incorrectly, so it appeared no real software was using VDS for extended memory DMA buffers. It was sort of like DPMI 1.0 - a standard no one (except 386MAX) implemented. 386MAX, by the way, seems to have correct VDS support if you can find a copy. The original W95 release I was using did not do VDS right, and NT didn't do it at all. 3) It has too many options so is a mess to implement. 4) Why implement it until someone notices it's missing? It's been about 4 years with CWSDPMI now - with 2 requests - and they went away after finding VDS was non-portable anyway... What people have had luck with is using the XMS functions to allocate an XMS buffer and lock it into memory - which will be 1:1 mapped. This typically must be done with the right memory configuration so CWSDPMI or other DPMIs don't conflict with the memory. You then can "map" that XMS memory into your DPMI space using the device memory mapping functions (adds them to your page tables). Good luck getting something worked out.