home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!samsung!transfer!ceylon!genesis!mfredett
- From: mfredett@genesis.nred.ma.us (Matt Fredette)
- Newsgroups: comp.os.ms-windows.programmer.misc
- Subject: Re: Help using DPMI "Allocate DOS Memory Block"
- Message-ID: <9207242398@genesis.nred.ma.us>
- Date: 24 Jul 92 17:23:44 GMT
- References: <BrwrI5.FGG@news.udel.edu>
- Organization: Genesis Public Access Minix +1 508 664 0149
- Lines: 34
-
- In article <BrwrI5.FGG@news.udel.edu> radel@bach.udel.edu (Todd Radel) writes:
-
- >I'm trying to use the DPMI services in Windows 3.1 to communicate with
- >a DOS program running in a window. The DOS program is a server which
- >communicates with a couple of transputer boards installed in the system.
- >The transputers support DMA transfers, but only as long as the server
- >is running. Thus, if I want to bring data into my Windows program,
- >I have to start the server, allocate some memory, tell the server
- >where to find it, and wait for data to come in.
- >
- >Of course, giving the server the value of a pointer won't work
- >because of the way Windows handles virtual memory in VDM's. The
- >DPMI function "Allocate DOS Memory Block" (AX= 0100h) seems to be
- >what I need. But what is a "selector", and how do I use it? I
- >know I can pass the transputer server the real-mode segment of the
- >allocated block (or can I?), but how do I access the allocated
- >memory from within my program?
-
- Sharing memory across virtual machines (VMs) in Windows is tricky,
- if not impossible. Memory allocated for use in one VM simply cannot
- be seen by another VM, unless you use the shared memory functions
- defined in DPMI 1.0, which unfortunately aren't supported under Windows.
-
- The only possible solution to your problem would be to create and install
- a TSR /before/ you start Windows that allocates a chunk of DOS memory.
- /This/ memory is then global to all VMs when Windows is running. What you
- would have to do in your Windows program is find the location of this chunk,
- and then use it to communicate with this server. Another call that you may
- find useful is a call that lets you call a procedure in another VM, which I
- can provide the info on.
-
- Hopefully this will give you some kind of start,
-
- Matt
-