Hi,
I made a small program which calculates the CRC of the main file and inserts data along with the CRC inside a custom made data section in the main application. It doesn't really matter much how it works, because the problem is simply building the right command line.
The command line should look like this:
CRC32.exe [Target] [Section] [Offset] [Size]
Well I know the values so I can simply give (for instance) this command line in VS:
CRC32.exe "$(TargetPath)" ".SECSEG" "208" "1024"
However I just don't like 'hardscribing' the last three values in the command line. For each of the values I have a predefined value which is known to the preprocessor. Is it possible to pass those values along in the command line? For instance:
#define CRC_SECTION ".SECSEG"
#define CRC_OFFSET 208
#define CRC_BLOCKSIZE 1024
CRC32.exe "$(TargetPath)" "$(CRC_SECTION)" "$(CRC_OFFSET)" "$(CRC_BLOCKSIZE)"
Obviously the above command line doesn't work, but it's just to illustrate my intentions. I don't know if this is possible at all, but I was just wondering if it is.
Thanks in advance.
I made a small program which calculates the CRC of the main file and inserts data along with the CRC inside a custom made data section in the main application. It doesn't really matter much how it works, because the problem is simply building the right command line.
The command line should look like this:
CRC32.exe [Target] [Section] [Offset] [Size]
Well I know the values so I can simply give (for instance) this command line in VS:
CRC32.exe "$(TargetPath)" ".SECSEG" "208" "1024"
However I just don't like 'hardscribing' the last three values in the command line. For each of the values I have a predefined value which is known to the preprocessor. Is it possible to pass those values along in the command line? For instance:
#define CRC_SECTION ".SECSEG"
#define CRC_OFFSET 208
#define CRC_BLOCKSIZE 1024
CRC32.exe "$(TargetPath)" "$(CRC_SECTION)" "$(CRC_OFFSET)" "$(CRC_BLOCKSIZE)"
Obviously the above command line doesn't work, but it's just to illustrate my intentions. I don't know if this is possible at all, but I was just wondering if it is.
Thanks in advance.