The problem is that the parameters for that method are pointers (by
reference). In CF, you pass by reference to a COM object by enclosing the
variables name in quotes. Javacast won't work there because it's not a
variable, which it needs to be.
Try this:
<cfset myValue = "SomeValue">
<cfset oEVR.Add("myValue", "oEVB")>
See here for more information:
http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/h
tml/wwhelp.htm?context=ColdFusion_Documentation&file=00001571.htm#1100380
Hope that helps,
Roland
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Magnus Wege
Sent: Tuesday, September 27, 2005 12:05 PM
To: [email protected]
Subject: [CFCDev] Problem CFC Method Call with COM Objects
Hi,
I am trying to invoke a COM method within a CFC method which a COM-object(s)
as parameter(s).
e.g.:
<cffunction name="test" access="private" output="false">
<cfset var oER = createObject("COM","Dllone.ER") />
<cfset var oEVR = createObject("COM","Dllone.EVR") />
<cfset var oEVB = reateObject("COM","Dllone.RB") />
...
<cfset oEVR.Add(javacast("string","SomeValue"), oEVB ) />
...
</cffunction>
Error: An exception occurred when executing a Com method.
The cause of this exception was that: AutomationException: 0x80020005 - Type
mismatch..
com.linar.jintegra.NativeObjRef.nativeIDispatchInvoke(Native Method)
The TypeLib Viewer of the DLL outputs:
~~~~~~~~~
Add(
[in, out] unsigned char* SomeValue,
[in,out, optional] _RB** RB);
~~~~~~~~~
As I cannot cast complex types I cannot find a solution to this problem. I
want a native CF implementation with no wrapper written in Visual Basic. Is
there anybody out there who can help me? Thanks in advance!
Magnus
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]