2 Replies Latest reply on Feb 2, 2007 7:54 AM by dgiet

    COM object

    dgiet
      Hi All,

      I am trying to use ImageMagick DLL.
      I use a <cfobject>
      <cfobject type="COM" action="create" class="ImageMagickObject.MagickImage.1" name="toto" />

      When i dump the object created <cfdump var="#toto#" />
      /***********************************************************/
      object of coldfusion.runtime.com.ComProxy
      {5630be5a-3f5f-4bca-a511-ad6a6386cac1}
      Methods Composite([out,in]VARIANT, [out, retval]VARIANT)
      GetTypeInfo([in]UINT, [in]UI4, [out]VOID, [out, retval]VOID)
      Remove([in]VARIANT, [out, retval]VOID)
      Identify([out,in]VARIANT, [out, retval]VARIANT)
      AddRef([out, retval]UI4)
      GetIDsOfNames([in]USERDEFINED, [in]I1, [in]UINT, [in]UI4, [out]I4, [out, retval]VOID)
      Release([out, retval]UI4)
      QueryInterface([in]USERDEFINED, [out]VOID, [out, retval]VOID)
      Add([out,in]VARIANT, [out, retval]VARIANT)
      OnStartPage([in]UNKNOWN, [out, retval]VOID)
      Stream([out,in]VARIANT, [out, retval]VARIANT)
      Mogrify([out,in]VARIANT, [out, retval]VARIANT)
      TestHarness([out,in]VARIANT, [out, retval]VARIANT)
      GetTypeInfoCount([out]UINT, [out, retval]VOID)
      Convert([out,in]VARIANT, [out, retval]VARIANT)
      Invoke([in]I4, [in]USERDEFINED, [in]UI4, [in]UI2, [in]USERDEFINED, [out]VARIANT, [out]USERDEFINED, [out]UINT, [out, retval]VOID)
      OnEndPage([out, retval]VOID)
      Compare([out,in]VARIANT, [out, retval]VARIANT)
      Montage([out,in]VARIANT, [out, retval]VARIANT)

      Get Properties Count([out, retval]I4)
      Item([in]VARIANT, [out, retval]VARIANT)
      Messages([out, retval]VARIANT)
      _NewEnum([out, retval]UNKNOWN)
      /********************************************************/

      but when i try to use the object like
      <cfset msgs = toto.Convert("logo:","-format","%m,%h,%w","logo.jpg") />
      /****************************************/
      The selected method Convert was not found.
      There are no methods with the specified method name and argument types. Please check your function and try again.

      L´erreur s´est produite dans C:\Data\EDILLIAV2\library\testIM_OLE.cfm: line 7

      5 : <cfdump var="#toto#" />
      6 : <cfoutput>avant<br></cfoutput>
      7 : <cfset msgs = toto.Convert("logo:","-format","%m,%h,%w","logo.jpg") />
      /***********************************************************/

      Thanks for your help.

      Didier
        • 1. Re: COM object
          Pekka
          On windows, we're using <cfexecute... instead for ImageMagick. Works like a charm. Don't trust those pesky COM objects ;)
          • 2. Re: COM object
            dgiet Level 1
            I am working on windows too.
            A this moment i use <cfx_exec> with ImageMagick command line which works more better than <cfexecute>.
            But i would try to use ImageMagick DLL to compare execution time.

            Regards,

            Didier