Hello,
i recently started out using visual studio c++ on my windows 10 machine because i wanted to code on the WINAPI. Unfortunately i noticed a weird behavior of MSVC++. I had my code compiling running perfectly with windows.h included. Now the exact thing i did to cause the weird behavior is changing the line:
cout << "entry: " << hex << (DWORD)((parameters*)loaderDest + 1) << endl;
to
cout << "entry: " << hex << (PVOID)((parameters*)loaderDest + 1) << endl;
and then back again. Suddenly i got 1144 Errors. They seem to be somewhat related to the typedefs in windows.h. For example suddenly hovering over DWORD gives
typedef <error-type> DWORD(<error-type>).
I don't understand this syntax but watching other error messages it seems like DWORD is interpreted as a function. If i go to the typedef it jumps to
typedef DWORD (WINAPI *PTHREAD_START_ROUTINE)(LPVOID lpThreadParameter);
Now last time i had a very similar problem when including stdio.h and then again removing it. That time i got douzens of errors when including <iostream> and i ended up simply uninstalling and installing MSVC++ which fixed it. But since this problem seems to reappear i wanted to ask what causes this behavior? Could it be that MSVC++ sometimes adds #defines to my file which alter the behavior of windows.h?
Tanks for help.