ID: Q74809
XMSWin.exe is a sample application that demonstrates the techniques outlined in the following paragraphs. A copy of the Microsoft Macro Assembler (MASM) version 5.0 or later is required to build the applications in this file.
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.
The following file is available for download from the Microsoft Software Library:
~ XMSWin.exe (size: 18055 bytes)
For more information about downloading files from the Microsoft Software
Library, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q119591
TITLE : How to Obtain Microsoft Support Files from Online Services
Additional query words:
Keywords : kbfile kbsample kb16bitonly kbKernBase
Last Reviewed: December 11, 1998