GDIPlus fails if called from a service under windows 2008 RRS feed

  • Question


    I have a service which makes use GDI Plus to do some image conversions.It works well under windows 2000 and windows 2003 but fails under windows 2008 with error code 2 (Invalid Parameter). What can I do?




    Monday, June 16, 2008 11:02 AM


  • Hi,

    First of all GDI+ functions and classes are not supported for use within a Windows service. Attempting to use these functions and classes from a Windows service may produce unexpected problems, such as diminished service performance and run-time exceptions or errors.

    So in your situation you can either write your own code to do the image conversion or otherwise, you can use the GDI+ from an interactive application and have the service talk to that application.

    Hope the above helps.



    Monday, June 16, 2008 8:51 PM