Compiler Error C3309
'macro_name': module name cannot be a macro or a keyword
The value that you pass to the name property of the module attribute cannot be a symbol for the preprocessor to expand; it must be a string literal.
The following sample generates C3309:
// C3309.cpp
#define NAME MyModule
[module(name="NAME")]; // C3309
// Try the following line instead
// [module(name="MyModule")];
[coclass]
class MyClass {
public:
void MyFunc();
};
int main() {
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for