The information in this article applies to:
SYMPTOMSWhen you use "#pragma comment(exestr, <string>)" to place a text string, <string>, into an executable module, the entire string is sometimes not included. CAUSEUsing Microsoft C/C++ version 7.0, Visual C++ for Windows, or Visual C++ 32- bit versions 1.0 and 2.x, the problem occurs when an attempt is made to embed a carriage-return (0x0D) or line-feed (0x0A) character somewhere other than at the end of the string. RESOLUTION
A compiler specific workaround exists for this problem. For Microsoft C/C++
version 7.0, Visual C++ for Windows, or Visual C++ 32-bit versions 1.0 and
2.x, place each carriage-return or line-feed character at the end of the
string.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ version 4.0. MORE INFORMATION
The #pragma comment(exestr, <string>) statement directs the compiler to
place <string> into the object file. The linker places the string into the
executable file. You can find the string by using 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 in your executable file.
Sample Code
REFERENCESFor information on a problem that the linker has with #pragma comment, please see the following article in the Microsoft Knowledge Base: Q102700 No String in EXE from #pragma Comment(exestr, <string>) Additional query words: 8.00 8.00c 9.00
Keywords : kbCompiler kbVC400fix |
Last Reviewed: February 2, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |