ATL Provider Error ATL2021
Subkey syntax - (\) not allowed in values.
The provider encountered a value containing a backslash character (\).
The backslash character, which indicates a subkey, is not allowed in values. If you want to specify a subkey, move the text preceding the backslash to the key. For example,
[ rdx ("HKLM", "test\\test1", "text") ] TCHAR m_szValue[10];
would become
[ rdx ("HKLM\\test", "test1", "text") ] TCHAR m_szValue[10];
The following sample generates ATL2021.
// ATL2021.cpp
// compile with: /c
// ATL2021 expected
#define _ATL_ATTRIBUTES
#include <atlbase.h>
#include <atlcom.h>
class CRDXTest
{
public :
[ rdx ("HKLM", "test\\test1", "text") ] TCHAR m_szValue[10];
// change above to
// [ rdx ("HKLM\\test", "test1", "text") ] TCHAR m_szValue[10];
};