The information in this article applies to:
SYMPTOMSAn attempt to use #pragma comment to place a text string into an executable module fails. RESOLUTION
The sample code below demonstrates two methods to work around this
problem. The first method declares a character array in the
application that contains the string to embed in the file. This method
places the string into the application's data segment. The second
method is similar to the first except that the compiler places the
string into the application's code segment, and therefore it does not
consume space in the data segment. Either of these methods loads the
string into memory when the application runs.
STATUSMicrosoft has confirmed this to be a problem in Microsoft LINK version 5.5 for MS-DOS. This problem was corrected in Microsoft LINK version 5.6 for MS-DOS. This is not a problem in Microsoft LINK version 1.0 for Windows NT. MORE INFORMATION
The #pragma comment(exestr, <string>) statement places <string> into
the object file. LINK places the string into the executable file; you
can find it with an application that searches executable files for
strings. However, the loader does not load the string into memory. You
can use comment strings to store a version number or similar
information into your executable file.
Sample Code
Additional query words: 5.50 8.00
Keywords : kb16bitonly |
Last Reviewed: October 8, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |