又一个d2007的问题,貌似比较严重
刚用d2007写了个小软,稍微有些熟悉了,却突然发现一个严重问题:原来使用D7时只需要把以下文字编译成res包含进工程就能使程序在vista能获得管理员权限。
<?xml version="1.0" encoding="utf-8" ?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="Vista UAC Compat.Application"
type="win32" />
<description>WindowsVistaReadiness Application</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
可是相同的res文件用在d2007里就不行,提示是资源重复id 1 type 24,很显然d2007为工程产生的资源文件里有id 1 类型为24的资源,这个资源和vista.res冲突了,而如果修改rc文件把1 24换成其它id 24再重新编译出res文件,则无法实现在vista下取得权限的目的。
不知道各位用d2007的朋友有没有什么解决方法?