Featured post
How to pass an array of structure as [in, out] paramenter in COM interface definition -
i'm having problems in passing array of structures in definition of com interface. example, i'm trying define series of variables ids in 1 read function , i'm expecting reply function (the same function) bring array of values corresponds defined variable ids:
[helpstring("method readvariables")] hresult readvariables([in] variant varids, [out] _valstruct* retvals);
for _valstruct, definition is:
struct _valstruct { int varid; double varval; int timestamp; double funcid; .... }
i'm not familiar com , know basic types, such int, double, etc... sincerely experts here give me detailed example code or related information. appreciated... thanks!!!
man, it's been ages since did that! anyway, according code have dug 2002, used safearray
.. maybe vb interoperability, so:
[id(9), helpstring("method keys")] hresult keys([out, retval] safearray(comint128)* pkeys);
you can use api functions such safearrayallocdescriptor
, safearrayallocdata
create array , safearrayaccessdata
/safearrayunaccessdata
manage contents.
hope helps.
- Get link
- X
- Other Apps
Comments
Post a Comment