cmdcst.idl
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:3k
源码类别:

模拟服务器

开发平台:

C/C++

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