Reputation: 1652
Im very new in C++
I have found this post http://msdn.microsoft.com/en-us/magazine/cc163486.aspx
and trying to ask admin right to windows.
I have created .manifest file added this
#define MANIFEST_RESOURCE_ID 1
MANIFEST_RESOURCE_ID RT_MANIFEST "MyAPP.exe.manifest"
To my main.cpp under #includes
visual studio says: expected a declaration.
What i am doing wrong?
Thanks
Upvotes: 0
Views: 372
Reputation: 7592
As it states in the link you provided:
The following lines in the .rc file would embed the manifest above if it were saved as AdminApp.exe.manifest:
#define MANIFEST_RESOURCE_ID 1
MANIFEST_RESOURCE_ID RT_MANIFEST "AdminApp.exe.manifest"
Your C++ project needs a resource file, and these lines belong in the .rc file, not your main.cpp
Don't forget to create your manifest file too.
Upvotes: 1