Ticket AQ13101
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Errors "Class TdxPNGImage not found", AVs and hang ups when loading or unloading DX libraries

GDI+ problem in a COM library

created 18 years ago

We've been following the following bug reports about using GDI+ in Libraries. Your resolution is to call dxInitializeGDIPlus after LoadLibrary and dxFinalizeGDIPlus before calling FreeLibrary. This works fine for standard libraries, but what is your proposed solution for Com Libraries? With a Com library they are not explicitly loaded and unloaded. So if you run RegSvr32 on them they will hang unless you put the dxFinalizeGDIPlus call "some place." Where is the best place to place these calls in a Com DLL?

I have attached our solution, but wanted to run it by you to see if there are any issues with it.

https://www.devexpress.com/Support/Center/ViewIssue.aspx?issueid=CB43806
https://www.devexpress.com/Support/Center/ViewIssue.aspx?issueid=AB12996
https://www.devexpress.com/Support/Center/ViewIssue.aspx?issueid=CB46095

Thanks
Rickey Norvil

Comments (1)
Serge (DevExpress Support) 18 years ago

    Dear Rickey,
    We have already received such reports related specifically to COM libraries. Our developers are looking for the complete resolution and we will post it here. For the time being, we would like to thank you for sending your findings to us. This information ay be very helpful to other programmers who have encountered similar problems after installing the last updates to our components. We greatly appreciate your input.
    Thanks,
    Serge

    Answers approved by DevExpress Support

    created 18 years ago (modified 11 years ago)

    Hi Rickey,
    Sorry for the delay in responding. Your solution is good, but our developers have decided to found a way out which would allow our users to run their solutions WITHOUT modifying their code. I don’t know for sure whether you are tracking report AB12996 or not, but I have posted a new fix there. It should help you open your DLLs without calling the dxInitializeGDIPlus and dxFinalizeGDIPlus functions if you are NOT explicitly using the ExpressGDI+ Library. However, these calls are still mandatory if you are using the Library. Please read report AB12996 for the detailed explanation.
    Thanks,
    Serge

      Comments (2)

        That problem is sitll there. How do you plan to solve that?

        DevExpress Support Team 11 years ago

          Hello Donald,
          I see that you left the same comment in three different tickets at once (GDI+ problem in a COM library, Invalid operation in GDI+ (Code: 4) with Asus RADEON 5450, and Invalid operation in GDI+ (code:4.)). These tickets seem to be related to different problems, so I have created a separate ticket to process your enquiry. Please refer to the Invalid operation in GDI+ (Code: 4) ticket for further correspondence.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.