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
#define _ATL_ATTRIBUTES
#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

ADD
Show:
© 2014 Microsoft