Microsoft KB Archive/57842

Making an Application HPFS Aware for OS/2 Version 1.20 PSS ID Number: Q57842 Article last modified on 01-08-1993 PSS database name: O_Os2PrTk

1.20

OS/2

Question:

What changes are necessary to make my application HPFS aware?

Response:

There is a new keyword that must be used in your module definition file (.DEF file) to mark your application as HPFS aware. Place the LONGNAMES directive on the same line as the NAME directive in your .DEF file. For example, for a VIO-window-compatible application called BOO that recognizes long HPFS filenames, use the following statement in your .DEF file:

NAME BOO WINDOWCOMPAT LONGNAMES

The LONGNAMES directive tells LINK to set the NEWFILES bit in the executable file header. It indicates that the module supports non-8.3 filenames. This bit is meaningless in real mode, MS-DOS, and in versions of OS/2 earlier than Version 1.20.

You also should make sure that you use the version of LINK.EXE that comes with OS/2 Version 1.20, or the version that comes with IBM’s development toolkit for OS/2 Version 1.20. The version of LINK.EXE that comes with the Microsoft C Compiler Version 5.10 does not understand the NEWFILES bit or the LONGNAMES entry in the .DEF file since it is a pre OS/2 v1.2 product.

Another method to set the LONGNAME bit in the EXE header is to use the /lfns switch in the resource compiler (RC) from the Microsoft OS/2 Version 1.20 toolkit. This will set the LONGNAME bit and allow you to still use the linker that comes with the Version 1.20 toolkit (or C 5.10), rather than the linker that comes with OS/2. It is preferable to use the linker from C 5.10 since the linker that comes with OS/2 Version 1.20 causes problems when you attempt to bind applications to run in real mode.

Copyright Microsoft Corporation 1993.