point.odl

来自「学习COM组件编程的入门示例源代码。与《COM原理与应用》一书配套。」· ODL 代码 · 共 49 行

ODL
49
字号
[
    uuid(3C591B20-1F13-101B-B826-00DD01103DE1),        // LIBID_Point.
    helpstring("Point 1.0 Type Library"),
    lcid(0x0000),
    version(1.0)
]
library Point
{
    importlib("stdole.tlb");
    [
        uuid(3C591B25-1F13-101B-B826-00DD01103DE1),  // IID_IPoint.
        helpstring("IPoint interface."),
    ]
    interface IPoint : IUnknown
    {
        [propget, helpstring("Returns and sets x coordinate.")]
        HRESULT x([out, retval] int* retval); 
        [propput, helpstring("Returns and sets x coordinate.")]
        HRESULT x([in] int Value);

        [propget, helpstring("Returns and sets y coordinate.")]
        HRESULT y([out, retval] int* retval); 
        [propput, helpstring("Returns and sets y coordinate.")]
        HRESULT y([in] int Value);

        [helpstring("Move Point To.")]
        HRESULT MoveTo([in] int newX, [in] int newy);
    }

    [
        uuid(3C591B26-1F13-101B-B826-00DD01103DE1),  // IID_DIPoint.
        helpstring("DIPoint interface."),
    ]
    dispinterface DIPoint
    {
        interface IPoint;
    }
    [
        uuid(3C591B21-1F13-101B-B826-00DD01103DE1),    // CLSID_Point
        helpstring("Point Class"),
        appobject
    ]
    coclass Point
    {
        [default] dispinterface DIPoint;
    }
}

⌨️ 快捷键说明

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