home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / ole / acdual / server / autoclik.odl < prev    next >
Encoding:
Microsoft Object Description Language  |  1998-03-27  |  5.4 KB  |  185 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)] BSTR text;
  35.             [id(2)] short x;
  36.             [id(3)] short y;
  37.             [id(4)] IDispatch* Position;
  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.         [propputref, id(4)] HRESULT Position([in] IDualAutoClickPoint* newPosition);
  86.  
  87.         // Convert dispinterface methods
  88.         [id(5)] HRESULT RefreshWindow();
  89.         [id(6)] HRESULT SetAllProps([in] short x, [in] short y, [in] BSTR text);
  90.         [id(7)] HRESULT ShowWindow();
  91.         [id(8)] HRESULT TestError([in] short wCode);
  92.  
  93.     };
  94.     // DUAL_SUPPORT_END
  95.  
  96.     // DUAL_SUPPORT_START
  97.     // Original Code:
  98.     //      //  Class information for CAutoClickDoc
  99.     //
  100.     //    [ uuid(FC866850-9F96-11CE-B0F2-00AA006C28B3) ]
  101.     //    coclass CAutoClickDoc
  102.     //    {
  103.     //         [default] dispinterface IAClick;
  104.     //    };
  105.     
  106.     // Class information for ACDual.Document
  107.     //      include both the dispinterface and dual interface,
  108.     //    but make the dual interface the default.
  109.  
  110.     [ uuid(4B115281-32F0-11cf-AC85-444553540000) ]
  111.     coclass Document
  112.     {
  113.         dispinterface IAClick;
  114.         [default] interface IDualAClick;
  115.     };
  116.     // DUAL_SUPPORT_END
  117.  
  118.  
  119.     // DUAL_SUPPORT_START
  120.     // Original Code:
  121.     //    //  Primary dispatch interface for CAutoClickPoint
  122.     //
  123.     //    [ uuid(0368D830-A050-11CE-B0F3-00AA006C28B3) ]
  124.     //    dispinterface IAutoClickPoint
  125.  
  126.     //  Primary dispatch interface for ACDual.Point
  127.     //        Used for IDispatch::Invoke access only!
  128.     
  129.     [ uuid(4B115283-32F0-11cf-AC85-444553540000) ]
  130.     dispinterface IAutoClickPoint
  131.     // DUAL_SUPPORT_END
  132.     {
  133.         properties:
  134.             // NOTE - ClassWizard will maintain property information here.
  135.             //    Use extreme caution when editing this section.
  136.             //{{AFX_ODL_PROP(CAutoClickPoint)
  137.             [id(1)] short x;
  138.             [id(2)] short y;
  139.             //}}AFX_ODL_PROP
  140.             
  141.         methods:
  142.             // NOTE - ClassWizard will maintain method information here.
  143.             //    Use extreme caution when editing this section.
  144.             //{{AFX_ODL_METHOD(CAutoClickPoint)
  145.             //}}AFX_ODL_METHOD
  146.  
  147.     };
  148.  
  149.     // DUAL_SUPPORT_START
  150.     [ uuid(0BDD0E80-0DD7-11cf-BBA8-444553540000),    // IID_IDualAutoClickPoint
  151.       oleautomation,
  152.       dual
  153.     ]
  154.     interface IDualAutoClickPoint : IDispatch
  155.     {
  156.         [propput, id(1)] HRESULT x([in] short newX);
  157.         [propget, id(1)] HRESULT x([out, retval] short* retval);
  158.         [propput, id(2)] HRESULT y([in] short newY);
  159.         [propget, id(2)] HRESULT y([out, retval] short* retval);
  160.     };
  161.     // DUAL_SUPPORT_END
  162.  
  163.     // DUAL_SUPPORT_START
  164.     // Original Code:
  165.     //     //  Class information for CAutoClickPoint
  166.     //
  167.     //     [ uuid(0368D831-A050-11CE-B0F3-00AA006C28B3) ]
  168.     //     coclass CAutoClickPoint
  169.     //     {
  170.     //         [default] dispinterface IAutoClickPoint;
  171.     //     };
  172.  
  173.     //  Class information for ACDual.Point
  174.     
  175.     [ uuid(4B115285-32F0-11cf-AC85-444553540000) ]
  176.     coclass Point
  177.     {
  178.         dispinterface IAutoClickPoint;
  179.         [default] interface IDualAutoClickPoint;
  180.     };
  181.     // DUAL_SUPPORT_END
  182.  
  183.     //{{AFX_APPEND_ODL}}
  184. };
  185.