Hi, I am trying to get the file size of a .exe file in C, I have tried using the GetFileSize(); function using the CreateFile(); function to get a handle for it, but the value returned is a DWORD and doesnt seem to work when i output it. I want to just retrieve the filesize of a .exe file and store this value in bytes in a long integer, does anyone have any other methods on this or can you help to correct my problem, here is my current code for this part:
HANDLE MF = CreateFile(FilePath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL);
DWORD Size;
GetFileSize(MF,&Size);
SendMessage(LogListBox,LB_ADDSTRING,0,(LPARAM)Size);
Any suggestions ?