Hello,
I have a dll that I distribute to people writing applications using the functions from that dll. When such an application is normally started in Windows7, some dll functions fail to execute (e.g. retrieve the HDD serial). However if that same application is started with the "execute as administrator" right mouse popup then everything works fine.
What I now want to do is elevate the execution level of my dll. I searched the net and found that I should use a manifest file and embed it into my resource file. This however didn't change anything. I am wondering if I missed an important point? Here is what I have:
my dll: v_rep.dll
my manifest file (in the source directory): v_rep.dll.manifest
This is the manifest file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="v_rep.app" type="win32"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="highestAvailable"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
in my v_rep.rc file, I added following 2 lines:
#define MANIFEST_RESOURCE_ID 1
MANIFEST_RESOURCE_ID RT_MANIFEST "v_rep.dll.manifest"
That resource now appears in the "regular" resource viewer.
It compiles without error, but I don't get elevated execution level. What did I do wrong?
By the way I am using c++ and VS2005
Thanks for any help