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

Re: GDIPLUS not working within mtdll com server by Fernando

Fernando
Tue Mar 22 22:48:17 CST 2005

You can't use visual commands/functions on a VFP DLL. Instead you can use an
COM EXE.


Regards,

Fernando D. Bozzo
VFP6/SP5
Madrid/Spain


"Miguel Villax" <miguel.villax@migg.com> escribió en el mensaje
news:4e6df268.0503221442.7f7dac36@posting.google.com...
> 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.21
80_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



Re: GDIPLUS not working within mtdll com server by miguel

miguel
Fri Mar 25 13:22:07 CST 2005

Fernando,

I am aware that I cannot use vfp visual functionaly such as forms,
modal states and other I/O function, however I do not see why I cannot
access gdiplus.dll functionality, I am doing nothing visual with it
merely manipulating images.

For instance I have full freedom in manipulating office web components
from a vfp mtdll and create charts and copying them to a gif so I am
not buying your point of view, i am sur that it should be possible to
get it to work.


thank you for you input

Miguel


Fernando D. Bozzo wrote:
> You can't use visual commands/functions on a VFP DLL. Instead you can
use an
> COM EXE.
>
>
> Regards,
>
> Fernando D. Bozzo
> VFP6/SP5
> Madrid/Spain
>
>
> "Miguel Villax" <miguel.villax@migg.com> escribi=F3 en el mensaje
> news:4e6df268.0503221442.7f7dac36@posting.google.com...
> > 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.21
> 80_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 =3D 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 =3D 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=3D createobject("gpimage")
> >
> > *
> > * Malke sure lc points to a file
> > *
> > lc =3D "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


Re: GDIPLUS not working within mtdll com server by Fernando

Fernando
Fri Mar 25 15:47:26 CST 2005

Sorry Miguel, I see your point and you are right.
I think that the VFP Team simply have removed all that can be "interface",
including this (erroneously).

Regards.


<miguel.villax@migg.com> escribió en el mensaje
news:1111778527.747600.159200@l41g2000cwc.googlegroups.com...
Fernando,

I am aware that I cannot use vfp visual functionaly such as forms,
modal states and other I/O function, however I do not see why I cannot
access gdiplus.dll functionality, I am doing nothing visual with it
merely manipulating images.

For instance I have full freedom in manipulating office web components
from a vfp mtdll and create charts and copying them to a gif so I am
not buying your point of view, i am sur that it should be possible to
get it to work.


thank you for you input

Miguel


Fernando D. Bozzo wrote:
> You can't use visual commands/functions on a VFP DLL. Instead you can
use an
> COM EXE.
>
>
> Regards,
>
> Fernando D. Bozzo
> VFP6/SP5
> Madrid/Spain
>
>
> "Miguel Villax" <miguel.villax@migg.com> escribió en el mensaje
> news:4e6df268.0503221442.7f7dac36@posting.google.com...
> > 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.21
> 80_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