Using a TSR to Share XMS Memory Between Virtual MachinesLast reviewed: February 15, 1996Article ID: Q74809 |
The information in this article applies to:
By using a terminate-and-stay-resident program (TSR) loaded before Windows, programs can share a block of extended memory specification (XMS) memory between virtual machines (VMs). When the TSR is loaded, it allocates and locks a block of XMS memory. This memory is now global to all VMs. The TSR hooks an interrupt and will return the physical address of the block and the XMS block handle. A protected-mode Windows program can access the memory directly by converting the physical address returned by the TSR to a linear address using DPMI (the MS-DOS Protected Mode Interface). This linear address can then be used to build a descriptor that references the memory. The descriptor is also built using DPMI. For the MS-DOS VM to access the XMS block, it must use the XMS block handle returned by the TSR. With this handle, MS-DOS-based applications can copy data to and from the block. A sample application that demonstrates the techniques outlined above is available in the Software Library in XMSWIN.EXE. A copy of the Microsoft Macro Assembler (MASM) version 5.0 or later is required to build the applications in this file. Download XMSWIN.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:
|
Additional reference words: 3.00 3.10 softlib XMSWIN.EXE
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |