Thanks Barney but the problem was missing quote marks in the call to 
retrieve retval from the instantiated CFOBJECT gcpp.  Here's what was involved:

    The Methods and Properties of the DLL as reported by
    Microsoft's OleView.exe:

    [id(0x00000004), helpstring("method getBalance")]
    HRESULT getBalance(
                   [in] BSTR transCode,
                   [in] BSTR GCId,
                   [out] VARIANT* dAmount,
                   [out] VARIANT* currencyCode,
                   [out] VARIANT* expirationDate,
                   [out, retval] long* lErrCode);


The code that worked:

<CFOBJECT
    TYPE="COM"
    ACTION="create"
    CLASS="GiftCardProvider.GCPProvider.1"
    NAME="gcpp"
 >

<CFSET vGCP = gcpp.getGiftCardProvider(-1)>

<!--- IN vars --->
<CFSET transCode = "222">
<CFSET GCId = "60362887117205742342">

<!--- OUT vars --->
<CFSET retval = "">
<CFSET dAmount = "">
<CFSET currencyCode = "">
<CFSET expirationDate = "">

<!---
    NOTE THAT QUOTE MARKS ARE USED AROUND THE OUT VARS TO RETURN THEIR 
VALUES BELOW!!!
--->
<CFSET retval = vGCP.getBalance(transCode, GCId, "dAmount", "currencyCode", 
"expirationDate")>

<CFOUTPUT>
    retval = #retval#

    Balance: #dAmount#

    currencyCode: #currencyCode#

    expirationDate: #expirationDate#

</CFOUTPUT>


Sort of interesting to know if you ever wind up working with one of these 
things.

Regards,

Karl S.


At 05:58 PM 11/7/04, you wrote:
>Message: 8
>    Date: Sat, 6 Nov 2004 22:01:32 -0800
>    From: [EMAIL PROTECTED]
>Subject: Re: Gnarly CFOBJECT problem
>
>Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:183569
>---
>I'm not a COM guru, but to my knowledge, CF only supports single
>return variables from method calls regardless of object type.
>However, it should be a fairly trivial matter to make a proxy object
>to allow you access to all the OUT variables.
>
>Just have the proxy make your method call and store all four OUT vars
>as instance variables, and expose those instance variables via
>getters.  Then from CF, instantiate the proxy object, call the method
>that does the call on your target object, and then you can call each
>getter individually to pull out all four OUT variables.  It'll take a
>little non-CF work, but such is life.  If this is a problem you forsee
>happening again, it probably wouldn't be too difficult to make your
>proxy generic enough to handle any arbitrary method call with an
>arbitrary number of OUT vars, and use an indexed or mapped getter for
>the recall.
>
>cheers,
>barneyb


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183596
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to