Has anyone managed to get any class within _gdiplus.vcx to work within
a
MTDLL.
I have done a short test program that works fine from the command line
but
if you then build a MTDLL around it then it no longer works. I have
been
running filemon.exe to check what is going on and where gdiplus.dll is
being
loaded from the problem seems to be in that direction. Fox command
line
seems to use gdiplus.dll from the Microsoft Shared/FVP dir. However
when
running from the MTDLL it seems to access mtdll from
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.2600.2180_x-ww_522f9f82.
I've include the sample program below.
To test it:
1) Make sure you have a jpg in c:\windows\web\wallpaper\azul.jpg (xp)
2) Copy to code below to test.prg
3) run test.prg
4) MODIFY COMMAND c:\gditest.txt
Notice imageheight is displayed
Test as MTDLL
Create a project called test, add test.prg
Build as MTDLL
To test call from fox command line:
lo = CREATEOBJECT("test.testgdi")
?lo.gdifunc()
MODIFY COMMAND c:\gditest.txt
Notice imageheight is NOT displayed
Anyone have any ideas??
Thanks
* Test GDIPLUS in MTDLL
lo = CREATEOBJECT("testgdi")
lo.gdifunc
RETURN
DEFINE CLASS testgdi as custom OLEPUBLIC
FUNCTION gdifunc
SET SAFETY OFF
*
* Set classlib to ffc _gdiplus.vcx
* Make sure _gdiplus points to your dir
*
SET CLASSLIB TO libs\_gdiplus
lo= createobject("gpimage")
*
* Malke sure lc points to a file
*
lc = "C:\WINDOWS\Web\Wallpaper\azul.jpg"
lo.CreateFromFile(lc)
*
* Send the image height to a file for inspection
*
SET ALTERNATE TO c:\gditest.txt
SET ALTERNATE ON
?lo.ImageHeight
SET ALTERNATE TO
ENDFUNC
ENDDEFINE
--
Miguel Villax
Director
MIGG Systems Limited