Home > Software engineering >  Consult, COM component to get function return value type (string type)
Consult, COM component to get function return value type (string type)

Time:02-08

Now, I can according to obtain the FUNCDESC GetFuncDesc function, the return value types are included in the elemdescFunc? Check the document type is ELEMDESC,

This field contains two fields, I through dynamic debugging, learned that there are data in tdesc, he is a TYPEDESC type, that there are two integers,

Such as debugging when I get the:
N=26 lpValue=https://bbs.csdn.net/topics/1f835080


According to the two integers, be in the form of a string type name? Consult everybody a great god, and check the document a heap of debugging a heap of, is all not to come out, please,

Or the above ideas have a wrong place? Please correct me warrior,

All the documents attached below

==========
TYPEDESC document

Field
LpValue
If the variable is VT_SAFEARRAY or VT_PTR lpValue field contains a pointer to the specified element type TYPEDESC,
N
Indicating the TYPEDESC Variant type of the item description,

=======================
ELEMDESC document
Desc
Contains information about element,
Tdesc
Identify the type of element,

=================
FUNCDESC document

Field
Callconv
Specify the function calling convention,
CParams
Calculate the total number of parameters,
CParamsOpt
Optional parameter calculation,
CScodes
The return values of computing allows
ElemdescFunc
Contains a function return type,
Funckind
Specify the function is virtual, static or only supports scheduling,
Invkind
Specify the type of the attribute function,
LprgelemdescParam
The size of the indication cParams,
Lprgscode
Storage function can be returned in the 16 system error count,
Memid
Identification function member ID,
OVft
Specify FUNC_VIRTUAL offset in the VTBL
WFuncFlags
Indicates the FUNCFLAGS function,

CodePudding user response:

Enumerate COM object (IDispatch) the methods using ATL?