Microsoft KB Archive/74809

{|
 * width="100%"|

SAMPLE: XMSWin.exe - TSR to Share XMS Mem. Bet. Virt. Computers

 * }

Q74809

-

The information in this article applies to:


 * Microsoft Windows Software Development Kit (SDK) versions 3.0, 3.1

-

SUMMARY
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.

MORE INFORMATION
The following file is available for download from the Microsoft Download Center:

"XMSWin.exe" For additional information about how to download Microsoft Support files, click the article number below to view the article in the Microsoft Knowledge Base:

"Q119591 How to Obtain Microsoft Support Files from Online Services" Microsoft used the most current virus detection software available on the date of posting to scan this file for viruses. Once posted, the file is housed on secure servers that prevent any unauthorized changes to the file.

Additional query words:

Keywords : kbfile kbsample kb16bitonly kbKernBase

Issue type :

Technology : kbAudDeveloper kbWin3xSearch kbSDKSearch kbWinSDKSearch kbWinSDK300 kbWinSDK310