Information générale
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement