Export (0) Print
Expand All
Expand Minimize

ATL Provider Error ATL2070

" function " cannot be used in attributed project

The global function function will be injected automatically. Applies to DllMain, DllRegisterServer, DllUnregisterServer, DllCanUnloadNow, DllGetClassObject, and WinMain.

The following sample generates ATL2070.

// ATL2070.cpp
// compile with: /c
// ATL2070 expected
#include <atlbase.h>
#include <atlcom.h>

// to resolve, remove the definition of DllMain
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
   return TRUE;

[ module (dll, name="ATL2070Lib") ];

Community Additions

© 2014 Microsoft