I'm writing some simple win32 stuff and I'm using the following wWinMain
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow)
VS2012 express code analysis says
C28251 Inconsistent annotation for function: this instance has an error Inconsistent annotation for 'wWinMain': this instance has no annotations. See c:\program files (x86)\windows kits\8.0\include\um\winbase.h(2201). LeesSpaceShip main.cpp 6
I'm not clear on what an annotation even is. So what is an annotation and which part is wrong on my code?
Apart from this diagnostic the code compiles and runs just fine.
The declaration of wWinMain
in winbase.h (mentioned in the error) is:
wWinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nShowCmd );
Your implementation of wWinMain
in main.cpp is missing the SAL annotations and Code Analysis is warning you about the mismatch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With