Can't access constant #defined in C
This is the C program I used, in the header file I define the offset:
#define LDR_DATA_PATHFILENAME_OFFSET 0x24 // MODULE_ITEM.PathFileName
Later in the program, I use it like:
pImageName = (PUNICODE_STRING)( ((DWORD)(pUserModuleListPtr)) + (LDR_DATA_PATHFILENAME_OFFSET-dwOffset));
When checking the LDR value, I get CXX0017: Error: Symbol "LDR_DATA_PATHFILENAME_OFFSET" was not found. Erm, its definition, it compiles, but it cannot access the value! What am I doing wrong?
0
a source to share
4 answers