Freigeben über


Type Library Foundation Class

Category File Utilities
Default Catalog Visual FoxPro Catalog\Foundation Classes\Utilities
Class _typelib
Base Class Container
Class Library _utility.vcx
Parent Class _container
Sample ...\Samples\Solution\Winapi\typelib.scx

Remarks

This class uses the TlbInf32 COM component to read type information from type libraries. The main routine ExportTypeLib creates a text file with Type library output.

To use, drop the class on a project or form or, from the Component Gallery Item Shortcut Menu, select Add to Project or Add to Form. When you add the class to a project, you can choose between adding the class or creating a subclass. When you add the class to a form, Visual FoxPro places the class icon on the form. You can then specify the appropriate property values on the form in the Form Designer.

See Guidelines for Using Visual FoxPro Foundation Classes for more information on using foundation classes.

Properties, Events, Methods Description
aTypeAttr[1,0] property Specifies the array for the TypeAttr
structure.
Default: .F.
aTypeFuncDesc[1,0] property Specifies an array for the FuncDesc
structure.
Default: .F.
aTypeFuncDocs[3,0] property Specifies an array for function
documentation.
Default: .F.
aTypeFuncNames[1,0] property Specifies an array of function names.
Default: .F.
aTypeFuncParms[1,0] property Specifies an array of the function
parameters.
Default: .F.
aTypeInfoDocs[3,0] property Specifies an array for TypeInfo
documentation.
Default: .F.
aTypeLibDocs[3,0] property Specifies an array for TypeLib
documentation.
Default: .F.
FuncNamesCount property Specifies the number of names for
TypeInfo function. This is equivalent to
total parameters+1.
Default: .F.
TypeInfoCount property Specifies the number of TypeInfos in
TypeLib.
Default: .F.
TypeInfoIndex property An index reference to TypeInfo.
Default: .F.
TypeLibHandle property The handle to TypeLib.
Default: .F.
TypeLibName property Specifies the name of the type library.
Default: .F.
ExportTypeLib method Exports contents of a TypeLib to a text
file.
Syntax: ExportTypeLib(cExportFile,
lViewFile)
Return: m.exportfile
Arguments:
cExportFile specifies the file to export.
lViewFile specifies whether to open the
file in a viewer after export.
GetDataType method Returns data type of function.
Syntax: GetDataType(m.nvt)
Return: name of data type
Arguments:
m.nvt Specifies a data item reference.
GetFuncDesc method Obtains TypeInfo function info and
populates arrays.
Syntax: GetFuncDesc(nFuncIndex)
Return: TypeInfo arrays, aTypeFuncParms, aTypeFuncNames,
aTypeFuncDocs
Arguments:
nFuncIndex specifies the index of the
function.
GetTypeInfo method Obtains TypeInfo and populates TypeInfo
arrays.
Syntax: GetTypeInfo(nTypeInfoNum)
Return: none
Arguments:
nTypeInfoNum specifies a reference to
the Typeinfo key.
GetTypeLib method Obtains TypeLib info and populates
arrays.
Syntax: GetTypeLib( )
Return: none
Arguments: none

See Also

Guidelines for Using Visual FoxPro Foundation Classes | Visual FoxPro Foundation Classes A-Z | Visual FoxPro Foundation Class Samples