MSC 5.1 comment pragma (exestr)
Doug Asherman
doug at gethen.UUCP
Wed Jul 20 13:26:50 AEST 1988
Recently, I've been trying to use the comment pragma to place a version
number in an executable file. According to the Microsoft documentation,
this can be done like so:
#pragma comment(exestr,"ThisProg V1.1");
On page 12 of the MSC 5.1 update docs, it says under "exestr":
"Places the string specified...in the object file. At link time,
this string is placed in the executable file....[Stuff deleted]
..it can be found with a program that finds printable strings in
files."
Ok...I've looked through the .exe file using two different programs that
purport to find ASCII strings in any file, and finally viewed the program
sector by sector with a disk editor...but I can't find that string! In
its place, of course, I just use 'char *version = "ThisProg V1.1";'.
However, I was wondering if anyone has gotten this pragma to work
correctly, and if so, how...the other comment pragmas seem to work
just fine.
--
Current Address: : "Get used to disappointment"
: -William Goldman
{ sun, ptsfa } : from
!hoptoad!unisoft!gethen!doug : "The Princess Bride"
More information about the Comp.lang.c
mailing list