home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / mswindo / programm / misc / 1005 < prev    next >
Encoding:
Internet Message Format  |  1992-07-25  |  2.2 KB

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