Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making a call to DLL with variant parameters
Message
From
20/01/1999 13:42:30
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Making a call to DLL with variant parameters
Miscellaneous
Thread ID:
00178164
Message ID:
00178164
Views:
59
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
Map
View

Click here to load this message in the networking platform