Why does the following code produce error under pelles C?? It works fine with MSVC 2010..
#include<winnt.h>
#include<windows.h>
#include<stdlib.h>
#include<stdio.h>
int main()
{
FILE *fp;
IMAGE_DOS_HEADER imdh;
IMAGE_NT_HEADERS imnth;
if((fp = fopen("c:\\le.exe","r"))==NULL)
{
printf("Unable to open file\n");
exit(0);
}
fread(&imdh,sizeof(imdh),1,fp);
fseek(fp,imdh.e_lfanew,SEEK_SET);
}