Passing struct output parameter into COM Object
Brought to you by:
apnadkarni
Hi, I am trying invoke some ActiveX Object functions, but have no idea about how to pass pSKStock into below functions.
(dispid 5) i4 SKQuoteLib_GetStockByNo 1 ([in] bstr bstrStockNos, [inout] SKSTOCK* pSKStock)
I was able to adapt this one with declare psPageNo first and pass variable name to parameter.
(dispid 3) i4 SKQuoteLib_RequestStocks 1 ([inout] i2* psPageNo, [in] bstr bstrStockNos)
The error messages like below, try several way but still not work.
Unsupported or invalid type information format in parameter
while executing
"::twapi::IDispatch_Invoke {70115896 IDispatch} {5 0 1 3 {{8 1} {{26 {29 record {{00000000-0000-0000-0000-000000000000}}}} 3}} {bstrStockNos pSKStock}}..."
Is that possible to pass struct data?
Any help would be appreciated.
Anonymous
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Unfortunately, at this time twapi does not handle struct/record types. It lacks the API's to retrieve the definitions from the type library and generate the appropriate structures and adding it is not straightforward. Sorry.
/Ashok
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
OK, I will try other way, many thanks :D