home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / com / acdual / server / autoclik.odl < prev    next >
Text File  |  1998-04-02  |  6KB  |  184 lines

  1. // AutoClik.odl : type library source for AutoClik.exe
  2.  
  3. // This file will be processed by the Make Type Library (mktyplib) tool to
  4. // produce the type library (AutoClik.tlb).
  5.  
  6. // DUAL_SUPPORT_START
  7. // Original Code:
  8. //    [ uuid(FC866851-9F96-11CE-B0F2-00AA006C28B3), version(1.0) ]
  9. //    library AutoClik
  10. [ uuid(4B115284-32F0-11cf-AC85-444553540000), version(1.0) ]
  11. library ACDual
  12. // DUAL_SUPPORT_END
  13. {
  14.     importlib("stdole32.tlb");
  15.     
  16.     // DUAL_SUPPORT_START
  17.     // Original Code:
  18.     //    //  Primary dispatch interface for CAutoClickDoc
  19.     //
  20.     //    [ uuid(FC866852-9F96-11CE-B0F2-00AA006C28B3) ]
  21.     //    dispinterface IAClick
  22.  
  23.     // Primary dispatch interface for ACDual.Document
  24.     //    Used for IDispatch::Invoke access only!
  25.  
  26.     [ uuid(4B115280-32F0-11cf-AC85-444553540000) ]
  27.     dispinterface IAClick
  28.     // DUAL_SUPPORT_END
  29.     {
  30.         properties:
  31.             // NOTE - ClassWizard will maintain property information here.
  32.             //    Use extreme caution when editing this section.
  33.             //{{AFX_ODL_PROP(CAutoClickDoc)
  34.             [id(1)] short x;
  35.             [id(2)] short y;
  36.             [id(3)] IDispatch* Position;
  37.             [id(4)] BSTR text;
  38.             //}}AFX_ODL_PROP
  39.             
  40.         methods:
  41.             // NOTE - ClassWizard will maintain method information here.
  42.             //    Use extreme caution when editing this section.
  43.             //{{AFX_ODL_METHOD(CAutoClickDoc)
  44.             [id(5)] void RefreshWindow();
  45.             [id(6)] void SetAllProps(short x, short y, BSTR text);
  46.             [id(7)] void ShowWindow();
  47.             [id(8)] void TestError(short wCode);
  48.             //}}AFX_ODL_METHOD
  49.  
  50.     };
  51.  
  52.     // DUAL_INTERFACE_START
  53.     //    add equivalent interface definitions, which will be used
  54.     //    for VTBL binding. You must specify the attributes
  55.     //    "oleautomation" and "dual" for dual interfaces, and
  56.     //    your interface must be derived from IDispatch
  57.  
  58.     interface IDualAutoClickPoint;  // defined below
  59.  
  60.     [ uuid(0BDD0E81-0DD7-11cf-BBA8-444553540000),   // IID_IDualAClick
  61.       oleautomation,
  62.       dual
  63.     ]
  64.     interface IDualAClick : IDispatch
  65.     {
  66.         // For dual interfaces, methods and properties should 
  67.         // return HRESULTs and pass return values as parameters
  68.         // with the attributes "[out, retval]".
  69.  
  70.         // Convert dispinterface properties...
  71.         //    read/write properties need two entries each, one
  72.         //    for read (attribute "propget") and one for write
  73.         //    (attribute "propput"), with the same id.
  74.         [propput, id(1)] HRESULT text([in] BSTR newText);
  75.         [propget, id(1)] HRESULT text([out, retval] BSTR* retval); 
  76.  
  77.         [propput, id(2)] HRESULT x([in] short newX);
  78.         [propget, id(2)] HRESULT x([out, retval] short* retval);
  79.  
  80.         [propput, id(3)] HRESULT y([in] short newY);
  81.         [propget, id(3)] HRESULT y([out, retval] short* retval);
  82.  
  83.         [propput, id(4)] HRESULT Position([in] IDualAutoClickPoint* newPosition);
  84.         [propget, id(4)] HRESULT Position([out, retval] IDualAutoClickPoint** retval);
  85.  
  86.         // Convert dispinterface methods
  87.         [id(5)] HRESULT RefreshWindow();
  88.         [id(6)] HRESULT SetAllProps([in] short x, [in] short y, [in] BSTR text);
  89.         [id(7)] HRESULT ShowWindow();
  90.         [id(8)] HRESULT TestError([in] short wCode);
  91.  
  92.     };
  93.     // DUAL_SUPPORT_END
  94.  
  95.     // DUAL_SUPPORT_START
  96.     // Original Code:
  97.     //    //  Class information for CAutoClickDoc
  98.     //
  99.     //    [ uuid(FC866850-9F96-11CE-B0F2-00AA006C28B3) ]
  100.     //    coclass CAutoClickDoc
  101.     //    {
  102.     //         [default] dispinterface IAClick;
  103.     //    };
  104.     
  105.     // Class information for ACDual.Document
  106.     //    include both the dispinterface and dual interface,
  107.     //    but make the dual interface the default.
  108.  
  109.     [ uuid(4B115281-32F0-11cf-AC85-444553540000) ]
  110.     coclass Document
  111.     {
  112.         dispinterface IAClick;
  113.         [default] interface IDualAClick;
  114.     };
  115.     // DUAL_SUPPORT_END
  116.  
  117.  
  118.     // DUAL_SUPPORT_START
  119.     // Original Code:
  120.     //    //  Primary dispatch interface for CAutoClickPoint
  121.     //
  122.     //    [ uuid(0368D830-A050-11CE-B0F3-00AA006C28B3) ]
  123.     //    dispinterface IAutoClickPoint
  124.  
  125.     //  Primary dispatch interface for ACDual.Point
  126.     //      Used for IDispatch::Invoke access only!
  127.     
  128.     [ uuid(4B115283-32F0-11cf-AC85-444553540000) ]
  129.     dispinterface IAutoClickPoint
  130.     // DUAL_SUPPORT_END
  131.     {
  132.         properties:
  133.             // NOTE - ClassWizard will maintain property information here.
  134.             //    Use extreme caution when editing this section.
  135.             //{{AFX_ODL_PROP(CAutoClickPoint)
  136.             [id(1)] short x;
  137.             [id(2)] short y;
  138.             //}}AFX_ODL_PROP
  139.             
  140.         methods:
  141.             // NOTE - ClassWizard will maintain method information here.
  142.             //    Use extreme caution when editing this section.
  143.             //{{AFX_ODL_METHOD(CAutoClickPoint)
  144.             //}}AFX_ODL_METHOD
  145.  
  146.     };
  147.  
  148.     // DUAL_SUPPORT_START
  149.     [ uuid(0BDD0E80-0DD7-11cf-BBA8-444553540000),   // IID_IDualAutoClickPoint
  150.       oleautomation,
  151.       dual
  152.     ]
  153.     interface IDualAutoClickPoint : IDispatch
  154.     {
  155.         [propput, id(1)] HRESULT x([in] short newX);
  156.         [propget, id(1)] HRESULT x([out, retval] short* retval);
  157.         [propput, id(2)] HRESULT y([in] short newY);
  158.         [propget, id(2)] HRESULT y([out, retval] short* retval);
  159.     };
  160.     // DUAL_SUPPORT_END
  161.  
  162.     // DUAL_SUPPORT_START
  163.     // Original Code:
  164.     //     //  Class information for CAutoClickPoint
  165.     //
  166.     //     [ uuid(0368D831-A050-11CE-B0F3-00AA006C28B3) ]
  167.     //     coclass CAutoClickPoint
  168.     //     {
  169.     //         [default] dispinterface IAutoClickPoint;
  170.     //     };
  171.  
  172.     //  Class information for ACDual.Point
  173.     
  174.     [ uuid(4B115285-32F0-11cf-AC85-444553540000) ]
  175.     coclass Point
  176.     {
  177.         dispinterface IAutoClickPoint;
  178.         [default] interface IDualAutoClickPoint;
  179.     };
  180.     // DUAL_SUPPORT_END
  181.  
  182.     //{{AFX_APPEND_ODL}}
  183. };
  184.