views:

544

answers:

3

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?

A: 

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.

no_one
There's no installer. Its sitting in a shared folder on the LAN.
Ian Boyd
A: 

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".

leppie
Yeaaahhhhh..... The the folder that will contain the executable will contain gdiplus.dll for operating systems that do not ship with it. How do i make operating systems that do ship with it not use my depoyed version...
Ian Boyd
Delete it after install.
leppie
There is no installer. i need to include gdi+ in the app directory for those OS's that don't ship with GDI+, but not use it on OS's that do have GDI+.
Ian Boyd
+1  A: 

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>
Chris Becke
This works perfectly. i verified that fusion wasn't using my local version with Process Explorer. The path of gdiplus was "C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.6002.18005_none_9e50b396ca17ae07\gdiplus.dll"
Ian Boyd