PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Rudolf Furstauer on March 12, 2013, 05:01:56 AM

Title: form in dll
Post by: Rudolf Furstauer on March 12, 2013, 05:01:56 AM
Hallo Paul,       
     
I've got a small problem:

I try to give a form in a dll.
In one example (Visual_DLL_works.zip) it works, in another example (Visual_DLL_failed.zip) I give
an additional FireImage on the form in the dll and it no longer works.

Thanks for your help!

Best regards,           


Rudolf Fuerstauer 
Title: Re: form in dll
Post by: Paul Squires on March 12, 2013, 08:53:36 AM
Hi Rudolf,

My tests indicate that I have the GDI+ startup code generated in the wrong place for DLL's. I need to move it to the %DLL_PROCESS_ATTACH message within FF_LIBMAIN. I will see if I can change the code generation and then post a new FireFly exe for you to try.
Title: Re: form in dll
Post by: Paul Squires on March 12, 2013, 10:07:21 AM
Actually, the problem was that the GDI+ shutdown code would always be called for DLL's therefore the visual control would never show. I added code as follows:

#If Not %Def( %DLL_PROJECT )
    ' Shutdown the GDI+ library
   GdiplusShutdown_FF GDIToken
#EndIf


You can try the new FireFly.exe attached to see if it works okay for you.


[attachment deleted by admin]
Title: Re: form in dll
Post by: Rudolf Furstauer on March 12, 2013, 10:26:06 AM
Hi Paul,

many thanks for your help.
Now seems to be working properly!


Rudolf Fürstauer