home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / core.odl < prev    next >
Text File  |  1998-04-25  |  7KB  |  391 lines

  1. //---------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright (C) Microsoft Corporation, 1996
  5. //
  6. //  File:      core.odl
  7. //
  8. //  Contents:  Core Interfaces
  9. //
  10. //----------------------------------------------------------------------------
  11.  
  12. #define DISPID_NEWENUM -4
  13.  
  14.  
  15. //
  16. // The constants below are control codes acceptable for
  17. // IADs::PutEx functions
  18. //
  19.  
  20. enum {
  21.    ADS_PROPERTY_CLEAR=1,
  22.    ADS_PROPERTY_UPDATE=2,
  23.    ADS_PROPERTY_APPEND=3,
  24.    ADS_PROPERTY_DELETE=4
  25.  
  26. };
  27.  
  28.  
  29. [ uuid(OLEDS_IID_IADs), oleautomation, dual]
  30. interface IADs : IDispatch
  31. {
  32.  
  33.     PROPERTY_RO(Name, BSTR, 2)
  34.     PROPERTY_RO(Class,  BSTR, 3)
  35.     PROPERTY_RO(GUID, BSTR, 4)
  36.     PROPERTY_RO(ADsPath, BSTR, 5)
  37.     PROPERTY_RO(Parent, BSTR, 6)
  38.     PROPERTY_RO(Schema, BSTR, 7)
  39.  
  40.     [id(8)]
  41.     HRESULT
  42.     GetInfo();
  43.  
  44.     [id(9)]
  45.     HRESULT
  46.     SetInfo();
  47.  
  48.     [id(10)]
  49.     HRESULT
  50.     Get (
  51.         [in] BSTR bstrName,
  52.         [out, retval] VARIANT *pvProp
  53.         );
  54.  
  55.     [id(11)]
  56.     HRESULT
  57.     Put (
  58.         [in] BSTR bstrName,
  59.         [in] VARIANT vProp
  60.         );
  61.  
  62.     [id(12)]
  63.     HRESULT
  64.     GetEx(
  65.         [in] BSTR bstrName,
  66.         [out, retval] VARIANT *pvProp
  67.         );
  68.  
  69.     [id(13)]
  70.     HRESULT
  71.     PutEx(
  72.         [in] long lnControlCode,
  73.         [in] BSTR bstrName,
  74.         [in] VARIANT vProp
  75.         );
  76.  
  77.     [id(14)]
  78.     HRESULT
  79.     GetInfoEx(
  80.         [in] VARIANT vProperties,
  81.         [in] long lnReserved
  82.         );
  83.  
  84.  
  85. };
  86.  
  87. [ uuid(OLEDS_IID_IADsContainer), oleautomation, dual]
  88. interface IADsContainer : IDispatch
  89. {
  90.  
  91.     [propget, id(2)]
  92.     HRESULT
  93.     Count(
  94.         [out, retval] long *retval
  95.         );
  96.  
  97.     [propget, restricted, id(DISPID_NEWENUM)]    // Must be propget.
  98.     HRESULT
  99.     _NewEnum(
  100.         [out, retval] IUnknown** retval
  101.         );
  102.  
  103.     [propget, id(3)]
  104.     HRESULT
  105.     Filter(
  106.         [out,retval] VARIANT *pVar
  107.         );
  108.  
  109.     [propput, id(3)]
  110.     HRESULT
  111.     Filter(
  112.         [in] VARIANT Var
  113.         );
  114.  
  115.     [propget, id(4)]
  116.     HRESULT
  117.     Hints(
  118.         [out,retval] VARIANT *pvFilter
  119.         );
  120.  
  121.     [propput, id(4)]
  122.     HRESULT
  123.     Hints(
  124.         [in] VARIANT vHints
  125.         );
  126.  
  127.     [id(5)]
  128.     HRESULT
  129.     GetObject(
  130.         [in] BSTR ClassName,
  131.         [in] BSTR RelativeName,
  132.         [out, retval] IDispatch **ppObject
  133.         );
  134.  
  135.     [id(6)]
  136.     HRESULT
  137.     Create(
  138.         [in]BSTR ClassName,
  139.         [in] BSTR RelativeName,
  140.         [out, retval] IDispatch **ppObject
  141.         );
  142.  
  143.     [id(7)]
  144.     HRESULT
  145.     Delete(
  146.         [in] BSTR bstrClassName,
  147.         [in] BSTR bstrRelativeName
  148.         );
  149.  
  150.     [id(8)]
  151.     HRESULT
  152.     CopyHere(
  153.         [in] BSTR SourceName,
  154.         [in] BSTR NewName,
  155.         [retval, out] IDispatch **ppObject
  156.         );
  157.  
  158.     [id(9)]
  159.     HRESULT
  160.     MoveHere(
  161.         [in] BSTR SourceName,
  162.         [in]BSTR NewName,
  163.         [retval, out] IDispatch **ppObject
  164.         );
  165. };
  166.  
  167.  
  168. [uuid(OLEDS_IID_IADsCollection), oleautomation, dual]
  169. interface IADsCollection: IDispatch
  170. {
  171.  
  172.     [id(DISPID_NEWENUM), propget]
  173.     HRESULT
  174.     _NewEnum(
  175.         [out, retval] IUnknown **ppEnumerator
  176.         );
  177.  
  178.     [id(4)]
  179.     HRESULT
  180.     Add(
  181.         [in]BSTR bstrName,
  182.         [in] VARIANT vItem
  183.         );
  184.  
  185.     [id(5)]
  186.     HRESULT
  187.     Remove(
  188.         [in] BSTR bstrItemToBeRemoved
  189.         );
  190.  
  191.     [id(6)]
  192.     HRESULT
  193.     GetObject(
  194.         [in] BSTR bstrName,
  195.         [out, retval] VARIANT *pvItem
  196.         );
  197.  
  198. };
  199.  
  200.  
  201. [uuid(OLEDS_IID_IADsMembers), oleautomation, dual]
  202. interface IADsMembers: IDispatch
  203. {
  204.     [id(2), propget]
  205.     HRESULT
  206.     Count(
  207.         [out, retval] long *plCount
  208.         );
  209.  
  210.     [id(DISPID_NEWENUM), propget]
  211.     HRESULT
  212.     _NewEnum(
  213.         [out, retval] IUnknown **ppEnumerator
  214.         );
  215.  
  216.     [id(3), propget]
  217.     HRESULT
  218.     Filter(
  219.         [out, retval] VARIANT *pvFilter
  220.         );
  221.  
  222.     [id(3), propput]
  223.     HRESULT
  224.     Filter(
  225.         [in] VARIANT pvFilter
  226.         );
  227. };
  228.  
  229.  
  230.  
  231. [uuid(OLEDS_IID_IADsPropertyList), oleautomation, dual]
  232. interface IADsPropertyList: IDispatch
  233. {
  234.     [id(2), propget]
  235.     HRESULT
  236.     PropertyCount(
  237.         [out, retval] long *plCount
  238.         );
  239.  
  240.     [id(3)]
  241.     HRESULT
  242.     Next(
  243.          [out, retval] VARIANT *pVariant
  244.          );
  245.  
  246.     [id(4)]
  247.     HRESULT
  248.     Skip([in] ULONG cElements);
  249.  
  250.     [id(5)]
  251.     HRESULT
  252.     Reset();
  253.  
  254.     [id(DISPID_VALUE)]
  255.     HRESULT
  256.     Item(
  257.         [in] VARIANT varIndex,
  258.         [out, retval] VARIANT *pVariant
  259.         );
  260.  
  261.     [id(6)]
  262.     HRESULT
  263.     GetPropertyItem(
  264.         [in] BSTR bstrName,
  265.         [in] LONG lnADsType,
  266.         [out, retval] VARIANT *pVariant
  267.         );
  268.  
  269.     [id(7)]
  270.     HRESULT
  271.     PutPropertyItem(
  272.         [in] VARIANT varData
  273.         );
  274.  
  275.     [id(8)]
  276.     HRESULT
  277.     ResetPropertyItem(
  278.         [in] VARIANT varEntry
  279.         );
  280.  
  281.  
  282.     [id(9)]
  283.     HRESULT
  284.     PurgePropertyList();
  285.  
  286. };
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294. [uuid(OLEDS_IID_IADsPropertyEntry), oleautomation, dual]
  295. interface IADsPropertyEntry: IDispatch
  296. {
  297.    [id(1)]
  298.    HRESULT
  299.    Clear();
  300.  
  301.    PROPERTY_BSTR_RW(Name, 2)
  302.  
  303.    PROPERTY_LONG_RW(ADsType, 3)
  304.  
  305.    PROPERTY_LONG_RW(ControlCode, 4)
  306.  
  307.    PROPERTY_VARIANT_RW(Values, 5)
  308.  
  309. };
  310.  
  311. [uuid(OLEDS_IID_IADsAttrInfo)]
  312. interface IADsAttrInfo: IUnknown
  313. {
  314.    HRESULT
  315.    ConvertAttrInfoToPropertyEntry(
  316.         PADS_ATTR_INFO pAttrInfo
  317.         );
  318.  
  319.    HRESULT
  320.    ConvertPropertyEntryToAttrInfo(
  321.         PADS_ATTR_INFO * ppAttrInfo
  322.         );
  323. };
  324.  
  325.  
  326.  
  327. [ uuid(OLEDS_CLSID_PropertyEntry)]
  328. coclass PropertyEntry
  329. {
  330.         [default] interface IADsPropertyEntry;
  331.                   interface IDispatch;
  332. };
  333.  
  334.  
  335. [uuid(OLEDS_IID_IADsPropertyValue), oleautomation, dual]
  336. interface IADsPropertyValue: IDispatch
  337. {
  338.  
  339.    [id(1)]
  340.    HRESULT
  341.    Clear();
  342.  
  343.    PROPERTY_LONG_RW(ADsType, 2)
  344.  
  345.    PROPERTY_BSTR_RW(DNString, 3)
  346.  
  347.    PROPERTY_BSTR_RW(CaseExactString, 4)
  348.  
  349.    PROPERTY_BSTR_RW(CaseIgnoreString, 5)
  350.  
  351.    PROPERTY_BSTR_RW(PrintableString, 6)
  352.  
  353.    PROPERTY_BSTR_RW(NumericString, 7)
  354.  
  355.    PROPERTY_LONG_RW(Boolean, 8)
  356.  
  357.    PROPERTY_LONG_RW(Integer, 9)
  358.  
  359.    PROPERTY_VARIANT_RW(OctetString, 10)
  360.  
  361.    PROPERTY_DISPATCH_RW(SecurityDescriptor, 11)
  362.  
  363.    PROPERTY_DISPATCH_RW(LargeInteger, 12)
  364.    
  365.    PROPERTY_DATE_RW(UTCTime, 13)
  366. };
  367.  
  368. [uuid(OLEDS_IID_IADsValue)]
  369. interface IADsValue: IUnknown
  370. {
  371.    HRESULT
  372.    ConvertADsValueToPropertyValue(
  373.         PADSVALUE pADsValue
  374.         );
  375.  
  376.    HRESULT
  377.    ConvertPropertyValueToADsValue(
  378.         PADSVALUE  pADsValue
  379.         );
  380. };
  381.  
  382.  
  383. [ uuid(OLEDS_CLSID_PropertyValue)]
  384. coclass PropertyValue
  385. {
  386.         [default] interface IADsPropertyValue;
  387.                   interface IDispatch;
  388. };
  389.  
  390.  
  391.