General information
Title:
Making a call to DLL with variant parameters
Hi all,
I am trying to call a registered DLL. I have successfully instantiated and called its initialization function.
Now I am trying to call a function, TableLookUp, which as the following prototype:
STDMETHODIMP TableLookup(BSTR TableName[in],
VARIANT *LookupColumnNames[in],
VARIANT *LookupColumnValues[in],
VARIANT *RequestedColumnNames[in],
VARIANT *RequestedColumnValues[out])
Here is a snippet of my VFP code to call this:
*START
LOCAL inColNames[1], inColVals[1], ReqColNames[1] OutVals[1,2]
inColNames[1] = "STATE"
inColVals[1] = "CA"
ReqColNames[1] = "MaxFHAFamily1LoanAmt"
OutVals = ""
OutVals = o.tablelookup("County", @inColNames, @inColVals, @ReqColNames)
*END
I am getting:
OLE Error Code 0x8000040c: Unknown OLE status code.
I have tried the following, with no luck:
* appending CHR(0) to the end of all the strings
* passing arrays by value as opposed to by reference
* praying to the VFP gods
;-)
Any thoughts? My fear is that I can't properly pass a "variant" data construct from VFP. I really hope this isn't true, but...
Any advice, thoughts, comments, flames, etc. appreciated (well, except for the flames, but I'll take what I can get!).
Thanks,
--Bruce
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only