⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 itypelibdefs.odl

📁 利用windows的API来注册自动OCX
💻 ODL
字号:

// Brad Martinez, http://www.mvps.org

typedef LONG DISPID;
typedef DISPID MEMBERID;
typedef DWORD HREFTYPE;

typedef enum tagTYPEKIND {
    TKIND_ENUM = 0,
    TKIND_RECORD,
    TKIND_MODULE,
    TKIND_INTERFACE,
    TKIND_DISPATCH,
    TKIND_COCLASS,
    TKIND_ALIAS,
    TKIND_UNION,
    TKIND_MAX                   /* end of enum marker */
} TYPEKIND;


[
    helpstring("ITypeLib Interface"),
    uuid(00020402-0000-0000-C000-000000000046),
    odl
]

interface ITypeLib : IUnknown
{
    typedef enum tagSYSKIND {
        SYS_WIN16 = 0,
        SYS_WIN32 = 1,
        SYS_MAC   = 2
    } SYSKIND;

    typedef enum tagLIBFLAGS {
        LIBFLAG_FRESTRICTED   = 0x01,
        LIBFLAG_FCONTROL      = 0x02,
        LIBFLAG_FHIDDEN       = 0x04,
        LIBFLAG_FHASDISKIMAGE = 0x08
    } LIBFLAGS;

    typedef ITypeLib * LPTYPELIB;

    typedef struct tagTLIBATTR {
        GUID guid;
        LCID lcid;
        SYSKIND syskind;
        WORD wMajorVerNum;
        WORD wMinorVerNum;
        WORD wLibFlags;
    } TLIBATTR;
    typedef TLIBATTR * LPTLIBATTR;

    // all long rtn vals were HRESULTS

    [helpstring("Retrieves the number of type descriptions in the library.")]
    UINT GetTypeInfoCount(
                void
            );

    [helpstring("Retrieves the specified type description in the library.")]
    long GetTypeInfo(
                [in]     UINT        index,
//                [in,out] ITypeInfo * ppTInfo
                [in,out] void      * ppTInfo
            );

    [helpstring("Retrieves the type of a type description.")]
    long GetTypeInfoType(
                [in]     UINT        index,
                [in,out] TYPEKIND  * pTKind
            );

    [helpstring("Retrieves the type description corresponding to the specified GUID.")]
    long GetTypeInfoOfGuid(
                [in]  REFGUID        guid,
//                [in,out] ITypeInfo * ppTInfo
                [in,out] void      * ppTInfo
            );

    [helpstring("Retrieves the structure containing the library抯 attributes.")]
    long GetLibAttr(
// can't do this since VB DWORD aligns the struct (it has 3 WORD members)
//                [in,out] TLIBATTR * ppTLibAttr
                [in,out] void     * ppTLibAttr  
            );

    [helpstring("Retrieves a pointer to the ITypeComp for a type library. This enables a client compiler to bind to the library抯 types, variables, constants, and global functions.")]
    long GetTypeComp(
//                [in,out] ITypeComp * ppTComp
                [in,out] void     * ppTComp
            );

    [helpstring("Retrieves the library抯 documentation string, name of the complete Help file name and path, and the context ID for the library Help topic.")]
    long GetDocumentation(
                [in]     INT        index,
                [in,out] BSTR     * pBstrName,
                [in,out] BSTR     * pBstrDocString,
                [in,out] DWORD    * pdwHelpContext,
                [in,out] BSTR     * pBstrHelpFile
            );

    [helpstring("Indicates whether a passed-in string contains the name of a type, or a member described in the library.")]
    long IsName(
                [in,out] LPOLESTR   szNameBuf,
                [in]     ULONG      lHashVal,
                [in,out] BOOL     * pfName
            );

    [helpstring("Finds occurrences of a type description in a type library.")]
    long FindName(
                [in]     LPOLESTR   szNameBuf,
                [in]     ULONG      lHashVal,
//                [in,out] ITypeInfo * rgptinfo,
                [in,out] void      * rgptinfo,
                [in,out] MEMBERID  * rgMemId,
//                [in,out] USHORT    * pcFound  ??
                [in,out] int       * pcFound
            );

    [helpstring("Releases TLIBATTR, originally obtained from ITypeLib::GetLibAttr.")]
    long ReleaseTLibAttr(
                [in] TLIBATTR      * pTLibAttr
            );

}  // interface 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -