cmdcst.idl 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. //-----------------------------------------------------------------------------
  2. // File: cmdcst.idl
  3. //
  4. // Copyright: Copyright (c) Microsoft Corporation
  5. //
  6. // Contents: OLE DB interface definition
  7. //
  8. // Comments:
  9. //
  10. //-----------------------------------------------------------------------------
  11. #include "idlmulti.h"
  12. //
  13. #if( OLEDBVER >= 0x0200 )
  14. REMOTED_INTERFACE(0c733a4e-2a1c-11ce-ade5-00aa0044773d)
  15. #else
  16. LOCAL_INTERFACE(0c733a4e-2a1c-11ce-ade5-00aa0044773d)
  17. #endif
  18. interface ICommandCost : IUnknown {
  19. typedef DWORD DBRESOURCEKIND;
  20. enum DBRESOURCEKINDENUM {
  21. DBRESOURCE_INVALID = 0,
  22. DBRESOURCE_TOTAL = 1,
  23. DBRESOURCE_CPU = 2,
  24. DBRESOURCE_MEMORY = 3,
  25. DBRESOURCE_DISK = 4,
  26. DBRESOURCE_NETWORK = 5,
  27. DBRESOURCE_RESPONSE = 6,
  28. DBRESOURCE_ROWS = 7,
  29. DBRESOURCE_OTHER = 8,
  30. };
  31. typedef DWORD DBCOSTUNIT;
  32. enum DBCOSTUNITENUM {
  33. DBUNIT_INVALID = 0x00000,
  34. DBUNIT_WEIGHT = 0x00001,
  35. DBUNIT_PERCENT = 0x00002,
  36. DBUNIT_MAXIMUM = 0x00004,
  37. DBUNIT_MINIMUM = 0x00008,
  38. DBUNIT_MICRO_SECOND = 0x00010,
  39. DBUNIT_MILLI_SECOND = 0x00020,
  40. DBUNIT_SECOND = 0x00040,
  41. DBUNIT_MINUTE = 0x00080,
  42. DBUNIT_HOUR = 0x00100,
  43. DBUNIT_BYTE = 0x00200,
  44. DBUNIT_KILO_BYTE = 0x00400,
  45. DBUNIT_MEGA_BYTE = 0x00800,
  46. DBUNIT_GIGA_BYTE = 0x01000,
  47. DBUNIT_NUM_MSGS = 0x02000,
  48. DBUNIT_NUM_LOCKS = 0x04000,
  49. DBUNIT_NUM_ROWS = 0x08000,
  50. DBUNIT_OTHER = 0x10000,
  51. };
  52. typedef struct tagDBCOST {
  53. DBRESOURCEKIND eKind;
  54. DBCOSTUNIT dwUnits;
  55. LONG lValue;
  56. } DBCOST;
  57. typedef DWORD DBEXECLIMITS;
  58. enum DBEXECLIMITSENUM {
  59. DBEXECLIMITS_ABORT = 1,
  60. DBEXECLIMITS_STOP = 2,
  61. DBEXECLIMITS_SUSPEND = 3
  62. };
  63. HRESULT GetAccumulatedCost(
  64. [in] LPCOLESTR pwszRowsetName,
  65. [in, out] ULONG * pcCostLimits,
  66. [out, size_is(,*pcCostLimits)] DBCOST ** prgCostLimits
  67. );
  68. HRESULT GetCostEstimate(
  69. [in] LPCOLESTR pwszRowsetName,
  70. [out] ULONG * pcCostEstimates,
  71. [out] DBCOST * prgCostEstimates
  72. );
  73. HRESULT GetCostGoals(
  74. [in] LPCOLESTR pwszRowsetName,
  75. [out] ULONG * pcCostGoals,
  76. [out] DBCOST * prgCostGoals
  77. );
  78. HRESULT GetCostLimits(
  79. [in] LPCOLESTR pwszRowsetName,
  80. [out] ULONG * pcCostLimits,
  81. [out] DBCOST * prgCostLimits
  82. );
  83. HRESULT SetCostGoals(
  84. [in] LPCOLESTR pwszRowsetName,
  85. [in] ULONG cCostGoals,
  86. [in, size_is(cCostGoals)] const DBCOST rgCostGoals[]
  87. );
  88. HRESULT SetCostLimits(
  89. [in] LPCOLESTR pwszRowsetName,
  90. [in] ULONG cCostLimits,
  91. [in] DBCOST * prgCostLimits,
  92. [in] DBEXECLIMITS dwExecutionFlags
  93. );
  94. }