Passing File Handles from TSR to Windows-Based AppLast reviewed: July 23, 1997Article ID: Q75257 |
3.00 3.10
WINDOWS
kbprg
The information in this article applies to:
SUMMARYMS-DOS file handles are associated with a PSP (program segment prefix). For an MS-DOS terminate-and-stay-resident program (TSR) to open and operate on files on behalf of a Windows-based application, or to share file handles between MS-DOS TSRs and Windows-based applications, the TSR and application must be operating with the same PSP. This is possible because every Windows-based application has an MS-DOS PSP. Therefore, it is simply a matter of ensuring that the Windows-based application's PSP is the current PSP when the MS-DOS TSR opens or operates on a file. This article discusses some of the details involved with this process.
MORE INFORMATIONThe Windows Kernel creates a unique MS-DOS PSP for every Windows-based application that is started. The only time that the application's PSP must be selected as the current PSP is when the application calls MS-DOS. Therefore, an application cannot assume that its PSP is the current PSP. Listed below are two ways to have the PSP set so that a TSR can open or operate on a file on the application's behalf:
|
Additional reference words: 3.00 3.l0
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |