Export (0) Print
Expand All
Expand Minimize

ATL Provider Error ATL2023

Attribute should be used with a real array with storage backing it and not just a simple pointer.

The following sample generates ATL2023.

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

class CATL2023
   public :
   [ rdx ("HKLM", "test", "text") ] TCHAR *m_szValue;
// to resolve, change the preceding line to
// [ rdx ("HKLM", "test", "text") ] TCHAR m_szValue[100];

Community Additions

© 2015 Microsoft