I'm trying to write a dll, but I didn't get far until I ran into an annyoing problem.
I want to use the CCriticalSection class, and according to the msdn I have to include
afxmt.h. However, that gives me the following error:
fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
I tried to place afxmt.h over stdafx.h, and that gave another error (or errors):
error C2065: 'CCriticalSection' : undeclared identifier
error C2146: syntax error : missing ';' before identifier 'ccs'
error C2065: 'ccs' : undeclared identifier
What is going on?? I've pasted the code below.
BOOL APIENTRY DllMain( HANDLE hModule,
Thanks in advance.