|
|
|
ITypeInfo Interface |
|
IID_ITypeInfo |
{00020401-0000-0000-C000-000000000146} |
|
This section describes ITypeInfo, an interface typically used for reading information about objects. For example, an object browser tool can use ITypeInfo to extract information about the characteristics and capabilities of objects from type libraries.
Type information interfaces are intended to describe the parts of the application that can be called by outside clients, rather than those that might be used internally to build an application. The ITypeInfo interface provides access to the following:
The type description of an IDispatch interface can be used to implement the interface. For more information, see the description of CreateStdDispatch in Dispatch Interface and API Functions.
An instance of ITypeInfo provides various information about the type of an object, and is used in different ways. A compiler can use an ITypeInfo to compile references to members of the type. A type interface browser can use it to find information about each member of the type. An IDispatch implementor can use it to provide automatic delegation of IDispatch calls to an interface.
|
|
Methods in VTable order |
|
|
IUnknown Methods |
Description |
|
QueryInterface |
Returns pointers to supported interfaces. |
|
AddRef |
Increments reference count. |
|
Release |
Decrements reference count. |
|
ITypeInfo Methods |
Description |
|
GetTypeAttr |
Retrieves a TYPEATTR structure that contains the attributes of the type description. |
|
GetTypeComp |
Retrieves the ITypeComp interface for the type description, which enables a client compiler to bind to the type description's members. |
|
GetFuncDesc |
Retrieves the FUNCDESC structure that contains information about a specified function. |
|
GetVarDesc |
Retrieves a VARDESC structure that describes the specified variable. |
|
GetNames |
Retrieves the variable with the specified member ID (or the name of the property or method and its parameters) that correspond to the specified function ID. |
|
GetRefTypeOfImplType |
If a type description describes a COM class, it retrieves the type description of the implemented interface types. For an interface, GetRefTypeOfImplType returns the type information for inherited interfaces, if any exist. |
|
GetImplTypeFlags |
Retrieves the IMPLTYPEFLAGS enumeration for one implemented interface or base interface in a type description. |
|
GetIDsOfNames |
Maps between member names and member IDs, and parameter names and parameter IDs. |
|
Invoke |
Invokes a method, or accesses a property of an object, that implements the interface described by the type description. |
|
GetDocumentation |
Retrieves the documentation string, the complete Help file name and path, and the context ID for the Help topic for a specified type description. |
|
GetDllEntry |
Retrieves a description or specification of an entry point for a function in a DLL. |
|
GetRefTypeInfo |
If a type description references other type descriptions, it retrieves the referenced type descriptions. |
|
AddressOfMember |
Retrieves the addresses of static functions or variables, such as those defined in a DLL. |
|
CreateInstance |
Creates a new instance of a type that describes a component object class (coclass). |
|
GetMops |
Retrieves marshaling information. |
|
GetContainingTypeLib |
Retrieves the containing type library and the index of the type description within that type library. |
|
ReleaseTypeAttr |
Releases a TYPEATTR previously returned by GetTypeAttr. |
|
ReleaseFuncDesc |
Releases a FUNCDESC previously returned by GetFuncDesc. |
|
ReleaseVarDesc |
Releases a VARDESC previously returned by GetVarDesc. |
|
CALLCONV Enumeration |
|
%CC_FASTCALL = 0
|
|
FUNCFLAGS Enumeration |
|
%FUNCFLAG_FRESTRICTED
= &H1
|
|
FUNCKIND Enumeration |
|
%FUNC_VIRTUAL = 0
|
|
IDLFLAG Enumeration |
|
%IDLFLAG_NONE = 0
|
|
IMPLTYPEFLAGS Enumeration |
|
%IMPLTYPEFLAG_FDEFAULT = &H1
|
|
INVOKEKIND Enumeration |
|
%INVOKE_FUNC = 1
|
|
PARAMFLAGS Enumeration |
|
%PARAMFLAG_NONE = &H0
|
|
TYPEFLAGS Enumeration |
|
%TYPEFLAG_FAPPOBJECT
= &H1
|
|
TYPEKIND Enumeration |
|
%TKIND_ENUM = 0
|
|
VARFLAGS Enumeration |
|
%VARFLAG_FREADONLY =
&H1
|
|
VARKIND Enumeration |
|
%VAR_PERINSTANCE = 0
|
|
ARRAYDESC Structure |
|
TYPE ARRAYDESC DWORD
' // Must be DWORD aligned
|
|
ELEMDESC Structure |
|
TYPE ELEMDESC
|
|
FUNCDESC Structure |
|
TYPE FUNCDESC
|
|
IDLDESC Structure |
|
TYPE IDLDESC DWORD
' // Must be DWORD aligned wIDLFlags AS WORD END TYPE
|
|
PARAMDESCEX Structure |
|
TYPE PARAMDESCEX
filler
AS DWORD
' // To keep 24-bytes
alignment
|
|
PARAMDESC Structure |
|
TYPE PARAMDESC DWORD
' // Must be DWORD aligned
|
|
SAFEARRAY Structure |
|
TYPE SAFEARRAY fFeatures AS WORD cbElements AS DWORD cLocks AS DWORD pvData AS DWORD rgsabound(0) AS SAFEARRAYBOUND ' // Variable-length array END TYPE
|
|
SAFEARRAYBOUND Structure |
|
TYPE SAFEARRAYBOUND
|
|
TYPEATTR Structure |
|
TYPE TYPEATTR
cFuncs AS WORD
|
|
TYPEDESC Structure |
|
UNION TYPEDESCDATA END TYPE
|
|
VARDESC Structure |
|
UNION VARDESCDATA
oInst AS DWORD
|
|
GetTypeAttr |
|
FUNCTION ITypeInfo_GetTypeAttr ( _ BYVAL pthis AS DWORD PTR _ , BYREF ppTypeAttr AS DWORD _
) AS
LONG
|
|
GetTypeComp |
|
FUNCTION ITypeInfo_GetTypeComp ( _ BYVAL pthis AS DWORD PTR _ , BYREF ppTComp AS DWORD _
) AS LONG
|
|
GetFuncDesc |
|
FUNCTION ITypeInfo_GetFuncDesc ( _ BYVAL pthis AS DWORD PTR _ , BYVAL index AS DWORD _ , BYREF ppFuncDesc AS DWORD _
) AS
LONG
|
|
GetVarDesc |
|
FUNCTION ITypeInfo_GetVarDesc ( _ BYVAL pthis AS DWORD PTR _ , BYVAL index AS DWORD _ , BYREF ppVarDesc AS DWORD _
) AS
LONG
|
|
GetNames |
|
FUNCTION ITypeInfo_GetNames ( _ BYVAL pthis AS DWORD PTR _ , BYVAL memid AS LONG _ , BYVAL rgbstrNames AS DWORD _ , BYVAL cMaxNames AS DWORD _ , BYREF pcNames AS DWORD _
)
AS LONG
|
|
GetRefTypeOfImplType |
|
FUNCTION ITypeInfo_GetRefTypeOfImplType ( _ BYVAL pthis AS DWORD PTR _ , BYVAL index AS DWORD _ , BYREF pRefType AS DWORD _
) AS
LONG
|
|
GetImplTypeFlags |
|
FUNCTION ITypeInfo_GetImplTypeFlags ( _ BYVAL pthis AS DWORD PTR _ , BYVAL index AS DWORD _ , BYREF pImplTypeFlags AS LONG _
)
AS LONG
|
|
GetIDsOfNames |
|
FUNCTION ITypeInfo_GetIDsOfNames ( _ BYVAL pthis AS DWORD PTR _ , BYVAL rgszNames AS DWORD _ , BYVAL cNames AS DWORD _ , BYREF pMemId AS LONG _
) AS LONG
|
|
Invoke |
|
FUNCTION ITypeInfo_Invoke ( _ BYVAL pthis AS DWORD PTR _ , BYVAL pvInstance AS DWORD _ , BYVAL memid AS LONG _ , BYVAL wFlags AS WORD _ , BYREF pDispParams AS DISPPARAMS _ , BYREF pVarResult AS VARIANT _ , BYREF pExcepInfo AS EXCEPINFO _ , BYREF puArgErr AS DWORD _
)
AS LONG
|
|
GetDocumentation |
|
FUNCTION ITypeInfo_GetDocumentation ( _ BYVAL pthis AS DWORD PTR _ , BYVAL memid AS LONG _ , BYREF strName AS STRING _ , BYREF strDocString AS STRING _ , BYREF pdwHelpContext AS DWORD _ , BYREF strHelpFile AS STRING _
) AS LONG
|
|
GetDllEntry |
|
FUNCTION ITypeInfo_GetDllEntry ( _ BYVAL pthis AS DWORD PTR _ , BYVAL memid AS LONG _ , BYVAL invkind AS LONG _ , BYREF strDllName AS STRING _ , BYREF strName AS STRING _ , BYREF pwOrdinal AS WORD _
)
AS LONG strDllName = ACODE$(strDllName) strName
= ACODE$(strName)
|
|
GetRefTypeInfo |
|
FUNCTION ITypeInfo_GetRefTypeInfo ( _ BYVAL pthis AS DWORD PTR _ , BYVAL hRefType AS DWORD _ , BYREF ppTInfo AS DWORD _
) AS LONG
|
|
AddressOfMember |
|
FUNCTION ITypeInfo_AddressOfMember ( _ BYVAL pthis AS DWORD PTR _ , BYVAL memid AS LONG _ , BYVAL invkind AS LONG _ , BYREF ppv AS DWORD _
) AS LONG
|
|
CreateInstance |
|
FUNCTION ITypeInfo_CreateInstance ( _ BYVAL pthis AS DWORD PTR _ , BYVAL pUnkOuter AS DWORD _ , BYREF riid AS GUID _ , BYREF ppvObj AS DWORD _
) AS LONG
|
|
GetMops |
|
FUNCTION ITypeInfo_GetMops ( _ BYVAL pthis AS DWORD PTR _ , BYVAL memid AS LONG _ , BYREF strMops AS STRING _
) AS
LONG strMops
= ACODE$(strMops)
|
|
GetContainingTypelib |
|
FUNCTION ITypeInfo_GetContainingTypeLib ( _ BYVAL pthis AS DWORD PTR _ , BYREF ppTLib AS DWORD _ , BYREF pIndex AS DWORD _
) AS LONG
|
|
ReleaseTypeAttr |
|
SUB ITypeInfo_ReleaseTypeAttr ( _ BYVAL pthis AS DWORD PTR _ , BYVAL pTypeAttr AS DWORD _
)
|
|
ReleaseFuncDesc |
|
SUB ITypeInfo_ReleaseFuncDesc ( _ BYVAL pthis AS DWORD PTR _ , BYVAL pFuncDesc AS DWORD _
)
|
|
ReleaseVarDesc |
|
SUB ITypeInfo_ReleaseVarDesc ( _ BYVAL pthis AS DWORD PTR _ , BYVAL pVarDesc AS DWORD _
)
|
Page last updated on Monday, 27 March 2006 12:54:42 +0100