Hello,
I am not very good at C. Below is a code snippet I found on the net. I couldnt understand the line "pDosHeader = (PIMAGE_DOS_HEADER) lpFileBase;"
What kind of a usage is it?
Could anyone explain that line?
Thanks.
Code:
void SomeFunction(SomeParameters)
;local variables
-------------------
PIMAGE_DOS_HEADER pDosHeader;
LPVOID lpFileBase;
.....
.....
lpFileBase = MapViewOfFile (hFileMapping, FILE_MAP_READ, 0, 0, 0);
pDosHeader = (PIMAGE_DOS_HEADER) lpFileBase;
if (pDosHeader->e_magic != IMAGE_DOS_SIGNATURE)
{
fprintf (stderr, "DOS header missing\n");
UnmapViewOfFile (lpFileBase);
}
....
....
}