How to ship gdiplus.dll but not have Windows use i

2019-06-09 02:56发布

问题:

i have an application that has a dependancy on gdiplus. i need the application to also run on Windows 2000.

i want to include GDIPlus in the application directory, so that Windows 2000 computers will function, but if the machine is Windows XP, Windows Vista, Windows 7, etc, i want it to use the version of GDIPlus that ships, and is updated, with Windows.

Not possible?

回答1:

From http://msdn.microsoft.com/en-us/library/ms997620.aspx Try adding the following to your manifest :-

<?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="Microsoft.Windows.mysampleapp" type="win32" />
    <description>Your app description here</description>
    <dependency>
        <dependentAssembly>
            <assemblyIdentity type="win32" name="Microsoft.Windows.GdiPlus"
                version="1.0.0.0" processorArchitecture="x86"
                publicKeyToken="6595b64144ccf1df" language="*" />
        </dependentAssembly>
    </dependency>
</assembly>


回答2:

Won't it be easier to do it from the installer ? IF you are installing on Windows 2000 copy Gdiplus to application directory otherwise skip it.



回答3:

From the GDI+ page:

Run-time Requirements

Gdiplus.dll is included with Windows XP. For information about which operating systems are required to use a particular class or method, see the More Information section of the documentation for the class or method. GDI+ is available as a redistributable for Windows NT 4.0 SP6, Windows 2000, Windows 98, and Windows Me. To download the latest redistributable, see http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdkredist.htm.

First hit on Google for "win2000 gdiplus".