' ########################################################################################
' Microsoft Windows
' File: msmd.inc
' Microsoft MSMD OLE DB Interfaces (Analysis Services 2005)
' Contents: This file contains constants specific to Microsoft SQL Server Analysis Services
' that might be useful to client applications.
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_msmd_PBI)
#DEFINE PBX_msmd_PBI
%EQUATE `MSMD_INC = 1
#INCLUDE ONCE "Legacy/COM/oledb.inc"
'// GUIDs for DM.
$CLSID_MSDMine = GUID$("{2CB6C2D3-DD7C-11D2-AFE4-00105A994724}")
$DBPROPSET_DMSESSION = GUID$("{854C773C-1FE0-4456-BB10-78AFEE80862A}")
'// GUIDs for OLAP.
$CLSID_MSOLAP = GUID$("{A07CCD0C-8148-11D0-87BB-00C04FC33942}")
$CLSID_MSOLAP_ENUMERATOR = GUID$("{A07CCD0F-8148-11D0-87BB-00C04FC33942}")
$CLSID_MSOLAP_ERROR = GUID$("{A07CCD0D-8148-11D0-87BB-00C04FC33942}")
$DBPROPSET_MSOLAPINIT = GUID$("{A07CCD04-8148-11D0-87BB-00C04FC33942}")
$DBPROPSET_MDX_EXTENSIONS = GUID$("{A07CCD05-8148-11D0-87BB-00C04FC33942}")
$DBPROPSET_MSMDPERFSTAT = GUID$("{A07CCD0A-8148-11D0-87BB-00C04FC33942}")
$DBPROPSET_MSMDINIT = $DBPROPSET_MSOLAPINIT
'// DataSource Initialization properties.
'// These are specific to Analysis Services.
'// DBPROPSET_MSOLAPINIT
%EQUATE `DBPROP_MSMD_BASE = &H1000
%EQUATE `DBPROP_MSMD_CREATECUBE = (%DBPROP_MSMD_BASE + 1)
%EQUATE `DBPROP_MSMD_INSERTINTO = (%DBPROP_MSMD_BASE + 2)
%EQUATE `DBPROP_MSMD_SOURCE_DSN = (%DBPROP_MSMD_BASE + 3)
%EQUATE `DBPROP_MSMD_USEEXISTINGFILE = (%DBPROP_MSMD_BASE + 7)
%EQUATE `DBPROP_MSMD_ARTIFICIALDATA = (%DBPROP_MSMD_BASE + 8)
%EQUATE `DBPROP_MSMD_DATA_CACHE_SIZE = (%DBPROP_MSMD_BASE + 9)
%EQUATE `DBPROP_MSMD_SOURCE_DSN_SUFFIX = (%DBPROP_MSMD_BASE + 10)
%EQUATE `DBPROP_MSMD_AUTOSYNCHPERIOD = (%DBPROP_MSMD_BASE + 11)
%EQUATE `DBPROP_MSMD_CACHEPOLICY = (%DBPROP_MSMD_BASE + 12)
%EQUATE `DBPROP_MSMD_EXECLOCATION = (%DBPROP_MSMD_BASE + 13)
%EQUATE `DBPROP_MSMD_WRITEBACK_TIMEOUT = (%DBPROP_MSMD_BASE + 14)
%EQUATE `DBPROP_MSMD_DEFAULT_ISOLATION_MODE = (%DBPROP_MSMD_BASE + 15)
%EQUATE `DBPROP_MSMD_COMPARECASESENSITIVESTRINGFLAGS = (%DBPROP_MSMD_BASE + 16)
%EQUATE `DBPROP_MSMD_COMPARECASENOTSENSITIVESTRINGFLAGS = (%DBPROP_MSMD_BASE + 17)
%EQUATE `DBPROP_MSMD_LARGE_LEVEL_THRESHOLD = (%DBPROP_MSMD_BASE + 18)
%EQUATE `DBPROP_MSMD_READ_ONLY_SESSION = (%DBPROP_MSMD_BASE + 19)
%EQUATE `DBPROP_MSMD_SECURED_CELL_VALUE = (%DBPROP_MSMD_BASE + 20)
%EQUATE `DBPROP_MSMD_ROLES = (%DBPROP_MSMD_BASE + 21)
%EQUATE `DBPROP_MSMD_MDXCOMPATIBILITY = (%DBPROP_MSMD_BASE + 22)
%EQUATE `DBPROP_MSMD_SQLCOMPATIBILITY = (%DBPROP_MSMD_BASE + 23)
%EQUATE `DBPROP_MSMD_SSPI = (%DBPROP_MSMD_BASE + 24)
%EQUATE `DBPROP_MSMD_MDXUNIQUENAMES = (%DBPROP_MSMD_BASE + 25)
%EQUATE `DBPROP_MSMD_DISTINCTMEASURESBYKEY = (%DBPROP_MSMD_BASE + 26)
%EQUATE `DBPROP_MSMD_DONOTAPPLYCOMMANDS = (%DBPROP_MSMD_BASE + 27)
%EQUATE `DBPROP_MSMD_DEFAULT_MDX_VISUAL_MODE = (%DBPROP_MSMD_BASE + 28)
%EQUATE `DBPROP_MSMD_MDX_CALC_MEMBERS_MODE = (%DBPROP_MSMD_BASE + 29)
%EQUATE `DBPROP_MSMD_MINING_LOCATION = (%DBPROP_MSMD_BASE + 30)
%EQUATE `DBPROP_MSMD_OLAP_SESSION = (%DBPROP_MSMD_BASE + 31)
%EQUATE `DBPROP_MSMD_LOG_FILE = (%DBPROP_MSMD_BASE + 32)
%EQUATE `DBPROP_MSMD_MINING_EXECUTION_LOCATION = (%DBPROP_MSMD_BASE + 33)
%EQUATE `DBPROP_MSMD_MINING_PERSISTENCE_FORMAT = (%DBPROP_MSMD_BASE + 34)
%EQUATE `DBPROP_MSMD_SHOW_HIDDEN_CUBES = (%DBPROP_MSMD_BASE + 35)
%EQUATE `DBPROP_MSMD_DEFAULT_GUID_DIALECT = (%DBPROP_MSMD_BASE + 36)
%EQUATE `DBPROP_MSMD_SAFETY_OPTIONS = (%DBPROP_MSMD_BASE + 37)
%EQUATE `DBPROP_MSMD_CACHERATIO = (%DBPROP_MSMD_BASE + 38)
%EQUATE `DBPROP_MSMD_AUTHENTICATED_USER = (%DBPROP_MSMD_BASE + 39)
%EQUATE `DBPROP_MSMD_CACHEMODE = (%DBPROP_MSMD_BASE + 40)
%EQUATE `DBPROP_MSMD_NONEMPTYTHRESHOLD = (%DBPROP_MSMD_BASE + 41)
%EQUATE `DBPROP_MSMD_RESTRICTEDCLIENT = (%DBPROP_MSMD_BASE + 42)
%EQUATE `DBPROP_MSMD_CACHERATIO2 = (%DBPROP_MSMD_BASE + 43)
%EQUATE `DBPROP_MSMD_COMMANDTIMEOUT = (%DBPROP_MSMD_BASE + 44)
%EQUATE `DBPROP_MSMD_USEFORMULACACHE = (%DBPROP_MSMD_BASE + 45)
%EQUATE `DBPROP_MSMD_DYNAMICDEBUGLIMIT = (%DBPROP_MSMD_BASE + 46)
%EQUATE `DBPROP_MSMD_DEBUGMODE = (%DBPROP_MSMD_BASE + 47)
'//
'// Begin added in Analysis Services 2005
'//
%EQUATE `DBPROP_MSMD_DATASOURCEINFO = (%DBPROP_MSMD_BASE + 60)
%EQUATE `DBPROP_MSMD_SQLQUERYMODE = (%DBPROP_MSMD_BASE + 61)
%EQUATE `DBPROP_MSMD_CUBE = (%DBPROP_MSMD_BASE + 62)
%EQUATE `DBPROP_MSMD_PROTOCOLFORMAT = (%DBPROP_MSMD_BASE + 63)
%EQUATE `DBPROP_MSMD_TRANSPORTCOMPRESSION = (%DBPROP_MSMD_BASE + 64)
%EQUATE `DBPROP_MSMD_COMPRESSIONLEVEL = (%DBPROP_MSMD_BASE + 65)
%EQUATE `DBPROP_MSMD_CHARACTERENCODING = (%DBPROP_MSMD_BASE + 66)
%EQUATE `DBPROP_MSMD_ENCRYPTION_PASSWORD = (%DBPROP_MSMD_BASE + 67)
%EQUATE `DBPROP_MSMD_REAL_TIME_OLAP = (%DBPROP_MSMD_BASE + 68)
%EQUATE `DBPROP_MSMD_CONNECT_TO = (%DBPROP_MSMD_BASE + 69)
%EQUATE `DBPROP_MSMD_EFFECTIVE_USERNAME = (%DBPROP_MSMD_BASE + 70)
%EQUATE `DBPROP_MSMD_MDX_MISSING_MEMBER_MODE = (%DBPROP_MSMD_BASE + 71)
%EQUATE `DBPROP_MSMD_SESSIONID = (%DBPROP_MSMD_BASE + 72)
%EQUATE `DBPROP_MSMD_CUSTOMDATA = (%DBPROP_MSMD_BASE + 73)
%EQUATE `DBPROP_MSMD_ERROR_MESSAGE_MODE = (%DBPROP_MSMD_BASE + 74)
$DBPROPSET_MDCOMMAND = GUID$("{980883FF-B1FA-4FEF-AA92-3E5960B30F95}")
'// DBPROPSET_MDCOMMAND properties
%EQUATE `DBPROP_MSMD_FLATTENED_ROWSET = (%DBPROP_MSMD_BASE + 1)
%EQUATE `DBPROP_MSMD_FLATTENED2 = (%DBPROP_MSMD_BASE + 2)
'//
'// End added in Analysis Services 2005
'//
'// DataSource properties.
'// These are specific to Analysis Services.
'// DBPROPSET_MSMDPERFSTAT
%EQUATE `DBPROP_MSMD_PERFSTAT_QUERYCOUNT = (%DBPROP_MSMD_BASE + 1)
%EQUATE `DBPROP_MSMD_PERFSTAT_QUERYTIME = (%DBPROP_MSMD_BASE + 2)
%EQUATE `DBPROP_MSMD_PERFSTAT_QUERYCELLCOUNT = (%DBPROP_MSMD_BASE + 3)
%EQUATE `DBPROP_MSMD_PERFSTAT_QUERYNETCOUNT = (%DBPROP_MSMD_BASE + 4)
%EQUATE `DBPROP_MSMD_PERFSTAT_QUERYNETTIME = (%DBPROP_MSMD_BASE + 5)
'// DataSource Information properties.
'// These are specific to Analysis Services, but could be created by anyone.
'// DBPROPSET_MDX_EXTENSIONS
%EQUATE `DBPROP_MSMD_MDX_DDL_EXTENSIONS = (%DBPROP_MSMD_BASE + 1)
%EQUATE `DBPROP_MSMD_MDX_USE_EXTENSIONS = (%DBPROP_MSMD_BASE + 2)
%EQUATE `DBPROP_MSMD_MDX_CALCMEMB_EXTENSIONS = (%DBPROP_MSMD_BASE + 3)
%EQUATE `DBPROPVAL_MDX_DDL_CREATECUBE = &H0001
%EQUATE `DBPROPVAL_MDX_DDL_INSERTINTO = &H0002
%EQUATE `DBPROPVAL_MDX_DDL_REFRESHCUBE = &H0004
%EQUATE `DBPROPVAL_MDX_DLL_CREATESESSIONCUBE = &H0008
%EQUATE `DBPROPVAL_MDX_DLL_CREATEGLOBALCUBE = &H0010
%EQUATE `DBPROPVAL_MDX_USE_LIBRARY = &H0001
%EQUATE `DBPROPVAL_MDX_USE_CATALOG = &H0002
%EQUATE `DBPROPVAL_MDX_CALCMEMB_ADD = &H0001
%EQUATE `DBPROPVAL_MDX_CALCMEMB_STRIP = &H0002
%EQUATE `DBPROPVAL_MSMD_CAP_DEFAULT = &H0000
%EQUATE `DBPROPVAL_MSMD_CAP_WINDOWING = &H0001
%EQUATE `DBPROPVAL_MSMD_CAP_ALLSCAN = &H0002
%EQUATE `DBPROPVAL_MSMD_CAP_ISOLATED = &H0003
%EQUATE `DBPROPVAL_MSMD_CAP_IGNORE_VP = &H0004
%EQUATE `DBPROPVAL_MSMD_CAP_INFINITE_VP = &H0005
%EQUATE `DBPROPVAL_MSMD_CAP_LARGEST_AREA_FIRST = &H0006
%EQUATE `DBPROPVAL_MSMD_EXL_DEFAULT = &H0000
%EQUATE `DBPROPVAL_MSMD_EXL_SMART = &H0001
%EQUATE `DBPROPVAL_MSMD_EXL_CLIENT = &H0002
%EQUATE `DBPROPVAL_MSMD_EXL_SERVER = &H0003
%EQUATE `DBPROPVAL_MSMD_LARGE_LEVEL_THRESHOLD_MIN = 10
%EQUATE `DBPROPVAL_MSMD_LARGE_LEVEL_THRESHOLD_DEFAULT = 1000
%EQUATE `DBPROPVAL_MSMD_SECURED_CELL_VALUE_DEFAULT = &H0000
%EQUATE `DBPROPVAL_MSMD_SECURED_CELL_VALUE_NA = &H0001
%EQUATE `DBPROPVAL_MSMD_SECURED_CELL_VALUE_ERROR = &H0002
%EQUATE `DBPROPVAL_MSMD_SECURED_CELL_VALUE_NULL = &H0003
%EQUATE `DBPROPVAL_MSMD_SECURED_CELL_VALUE_ZERO = &H0004
%EQUATE `DBPROPVAL_MSMD_SECURED_CELL_VALUE_STRING = &H0005
%EQUATE `DBPROP_MSMD_MDXCOMPATIBILITY_DEFAULT = &H0000
%EQUATE `DBPROP_MSMD_MDXCOMPATIBILITY_70 = &H0001
%EQUATE `DBPROP_MSMD_MDXCOMPATIBILITY_7X = &H0002
%EQUATE `DBPROP_MSMD_SQLCOMPATIBILITY_DEFAULT = &H0000
%EQUATE `DBPROP_MSMD_SQLCOMPATIBILITY_NORMAL = &H0001
%EQUATE `DBPROP_MSMD_SQLCOMPATIBILITY_COMPACT = &H0002
%EQUATE `DBPROP_MSMD_SQLCOMPATIBILITY_NOFIREHOSE = &H0003
%EQUATE `DBPROP_MSMD_SQLCOMPATIBILITY_80COMPATIBLE = &H0004
%EQUATE `DBPROP_MSMD_MDXUNIQUENAMES_DEFAULT = &H0000
%EQUATE `DBPROP_MSMD_MDXUNIQUENAMES_KEYPATH = &H0001
%EQUATE `DBPROP_MSMD_MDXUNIQUENAMES_NAMEPATH = &H0002
%EQUATE `DBPROP_MSMD_MDXUNIQUENAMES_7X = &H0003
%EQUATE `DBPROPVAL_VISUAL_MODE_DEFAULT = &H0000
%EQUATE `DBPROPVAL_VISUAL_MODE_VISUAL = &H0001
%EQUATE `DBPROPVAL_VISUAL_MODE_ORIGINAL = &H0002
%EQUATE `DBPROPVAL_MSMD_CALC_MEMBERS_MODE_DEFAULT = &H0000
%EQUATE `DBPROPVAL_MSMD_CALC_MEMBERS_MODE_ADD = &H0001
%EQUATE `DBPROPVAL_MSMD_CALC_MEMBERS_MODE_STRIP = &H0002
%EQUATE `DBPROPVAL_MSMD_CALC_MEMBERS_MODE_ORIGINAL = &H0003
%EQUATE `DBPROPVAL_MSMD_SAFETY_OPTIONS_DEFAULT = &H0000
%EQUATE `DBPROPVAL_MSMD_SAFETY_OPTIONS_ALLOW_ALL = &H0001
%EQUATE `DBPROPVAL_MSMD_SAFETY_OPTIONS_ALLOW_SAFE = &H0002
%EQUATE `DBPROPVAL_MSMD_SAFETY_OPTIONS_ALLOW_NONE = &H0003
MACRO DBPROPVAL_MSMD_CACHERATIO_LOWER = 0.0
MACRO DBPROPVAL_MSMD_CACHERATIO_UPPER = 1.0
MACRO DBPROPVAL_MSMD_CACHERATIO_DEFAULT = 0.5
%EQUATE `DBPROPVAL_MSMD_CACHEMODE_DEFAULT = &H0000
%EQUATE `DBPROPVAL_MSMD_CACHEMODE_REGONLY = &H0001
%EQUATE `DBPROPVAL_MSMD_CACHEMODE_SCAN = &H0002
%EQUATE `DBPROPVAL_MSMD_NO_ERRORS = 0
%EQUATE `DBPROPVAL_MSMD_SCRIPT_ERRORS = 1
%EQUATE `DBPROPVAL_MSMD_SECURITY_ERRORS = 2
'// Constants for identifier lengths.
'// Note that these should also be returned by IDBInfo.
%EQUATE `MSMD_DBLITERAL_CATALOG_NAME_CCHMAXLEN = 24
%EQUATE `MSMD_DBLITERAL_CUBE_NAME_CCHMAXLEN = 24
%EQUATE `MSMD_DBLITERAL_DIMENSION_NAME_CCHMAXLEN = 14
%EQUATE `MSMD_DBLITERAL_HIERARCHY_NAME_CCHMAXLEN = 10
%EQUATE `MSMD_DBLITERAL_DIMENSIONHIERARCHY_NAME_CCHMAXLEN = 24
%EQUATE `MSMD_DBLITERAL_LEVEL_NAME_CCHMAXLEN = 255
%EQUATE `MSMD_DBLITERAL_MEMBER_NAME_CCHMAXLEN = 255
' Must be unicode
$MSMD_DBLITERAL_INVALID_STARTING_CHARS = "0123456789 "
$MSMD_DBLITERAL_INVALID_CHARS = "."
'// Provider-specific HRESULT codes.
%EQUATE `MSMD_E_TRANSACTION_COMMIT_TIMEOUT = &H8040F008&
'// Provider-specific schema rowsets
$DISCOVER_DATASOURCES = GUID$("{06C03D41-F66D-49F3-B1B8-987F7AF4CF18}")
$DISCOVER_PROPERTIES = GUID$("{4B40ADFB-8B09-4758-97BB-636E8AE97BCF}")
$DISCOVER_SCHEMA_ROWSETS = GUID$("{EEA0302B-7922-4992-8991-0E605D0E5593}")
$DISCOVER_ENUMERATORS = GUID$("{55A9E78B-ACCB-45B4-95A6-94C5065617A7}")
$DISCOVER_KEYWORDS = GUID$("{1426C443-4CDD-4A40-8F45-572FAB9BBAA1}")
$DISCOVER_LITERALS = GUID$("{C3EF5ECB-0A07-4665-A140-B075722DBDC2}")
$DISCOVER_XML_METADATA = GUID$("{3444B255-171E-4CB9-AD98-19E57888A75F}")
$DISCOVER_INSTANCES = GUID$("{20518699-2474-4C15-9885-0E947EC7A7E3}")
$MDSCHEMA_KPIS = GUID$("{2AE44109-ED3D-4842-B16F-B694D1CB0E3F}")
$MDSCHEMA_MEASUREGROUPS = GUID$("{E1625EBF-FA96-42FD-BEA6-DB90ADAFD96B}")
$MDSCHEMA_INPUT_DATASOURCES = GUID$("{A07CCD32-8148-11D0-87BB-00C04FC33942}")
$MDSCHEMA_MEASUREGROUP_DIMENSIONS = GUID$("{A07CCD33-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_TRACE_COLUMNS = GUID$("{A07CCD18-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_TRACE_EVENT_CATEGORIES = GUID$("{A07CCD19-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_TRACES = GUID$("{A07CCD1A-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_TRACE_DEFINITION_PROVIDERINFO = GUID$("{A07CCD1B-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_MEMORYUSAGE = GUID$("{A07CCD21-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_MEMORYGRANT = GUID$("{A07CCD23-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_LOCKS = GUID$("{A07CCD24-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_CONNECTIONS = GUID$("{A07CCD25-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_SESSIONS = GUID$("{A07CCD26-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_JOBS = GUID$("{A07CCD27-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_TRANSACTIONS = GUID$("{A07CCD28-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_MASTER_KEY = GUID$("{A07CCD29-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_DB_CONNECTIONS = GUID$("{A07CCD2A-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_PERFORMANCE_COUNTERS = GUID$("{A07CCD2E-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_LOCATIONS = GUID$("{A07CCD92-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_PARTITION_DIMENSION_STAT = GUID$("{A07CCD8E-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_PARTITION_STAT = GUID$("{A07CCD8F-8148-11D0-87BB-00C04FC33942}")
$DISCOVER_DIMENSION_STAT = GUID$("{A07CCD90-8148-11D0-87BB-00C04FC33942}")
'// Provider-specific schema rowset restrictions
%EQUATE `CRESTRICTIONS_MDSCHEMA_FUNCTIONS = 4
%EQUATE `CRESTRICTIONS_MDSCHEMA_SETS = 5
%EQUATE `CRESTRICTIONS_MDSCHEMA_COMMANDS = 5
%EQUATE `CRESTRICTIONS_MDSCHEMA_ACTIONS = 8
%EQUATE `CRESTRICTIONS_DISCOVER_DATASOURCES = 5
%EQUATE `CRESTRICTIONS_DISCOVER_PROPERTIES = 1
%EQUATE `CRESTRICTIONS_DISCOVER_SCHEMA_ROWSETS = 1
%EQUATE `CRESTRICTIONS_DISCOVER_ENUMERATORS = 1
%EQUATE `CRESTRICTIONS_DISCOVER_KEYWORDS = 1
%EQUATE `CRESTRICTIONS_DISCOVER_LITERALS = 1
%EQUATE `CRESTRICTIONS_DISCOVER_XML_METADATA = 22
%EQUATE `CRESTRICTIONS_DISCOVER_INSTANCES = 1
%EQUATE `CRESTRICTIONS_MDSCHEMA_KPIS = 5
%EQUATE `CRESTRICTIONS_MDSCHEMA_MEASUREGROUPS = 4
%EQUATE `CRESTRICTIONS_MDSCHEMA_INPUT_DATASOURCES = 4
%EQUATE `CRESTRICTIONS_MDSCHEMA_MEASUREGROUP_DIMENSIONS = 6
%EQUATE `CRESTRICTIONS_DISCOVER_TRACE_COLUMNS = 1
%EQUATE `CRESTRICTIONS_DISCOVER_TRACE_EVENT_CATEGORIES = 1
%EQUATE `CRESTRICTIONS_DISCOVER_TRACES = 1
%EQUATE `CRESTRICTIONS_DISCOVER_TRACE_DEFINITION_PROVIDERINFO = 1
%EQUATE `CRESTRICTIONS_DISCOVER_MEMORYUSAGE = 4
%EQUATE `CRESTRICTIONS_DISCOVER_MEMORYGRANT = 1
%EQUATE `CRESTRICTIONS_DISCOVER_LOCKS = 6
%EQUATE `CRESTRICTIONS_DISCOVER_CONNECTIONS = 7
%EQUATE `CRESTRICTIONS_DISCOVER_SESSIONS = 8
%EQUATE `CRESTRICTIONS_DISCOVER_JOBS = 5
%EQUATE `CRESTRICTIONS_DISCOVER_TRANSACTIONS = 2
%EQUATE `CRESTRICTIONS_DISCOVER_MASTER_KEY = 1
%EQUATE `CRESTRICTIONS_DISCOVER_DB_CONNECTIONS = 5
%EQUATE `CRESTRICTIONS_DISCOVER_PERFORMANCE_COUNTERS = 1
%EQUATE `CRESTRICTIONS_DISCOVER_LOCATIONS = 2
%EQUATE `CRESTRICTIONS_DISCOVER_PARTITION_DIMENSION_STAT = 4
%EQUATE `CRESTRICTIONS_DISCOVER_PARTITION_STAT = 4
%EQUATE `CRESTRICTIONS_DISCOVER_DIMENSION_STAT = 2
%EQUATE `MSMD_SCHEMA_FUNCTIONS_ORIGIN_MSOLAP = &H0001
%EQUATE `MSMD_SCHEMA_FUNCTIONS_ORIGIN_UDF = &H0002
'//Note: The following items may be migrated to oledb.h in a future release
%EQUATE `MD_DIMTYPE_QUANTITATIVE = &H05
%EQUATE `MD_DIMTYPE_ACCOUNTS = &H06
%EQUATE `MD_DIMTYPE_CUSTOMERS = &H07
%EQUATE `MD_DIMTYPE_PRODUCTS = &H08
%EQUATE `MD_DIMTYPE_SCENARIO = &H09
%EQUATE `MD_DIMTYPE_UTILIY = &H0A
%EQUATE `MD_DIMTYPE_CURRENCY = &H0B
%EQUATE `MD_DIMTYPE_RATES = &H0C
%EQUATE `MD_DIMTYPE_CHANNEL = &H0D
%EQUATE `MD_DIMTYPE_PROMOTION = &H0E
%EQUATE `MD_DIMTYPE_ORGANIZATION = &H0F
%EQUATE `MD_DIMTYPE_BILL_OF_MATERIALS = &H10
%EQUATE `MD_DIMTYPE_GEOGRAPHY = &H11
%EQUATE `MDLEVEL_TYPE_GEO_CONTINENT = &H2001
%EQUATE `MDLEVEL_TYPE_GEO_REGION = &H2002
%EQUATE `MDLEVEL_TYPE_GEO_COUNTRY = &H2003
%EQUATE `MDLEVEL_TYPE_GEO_STATE_OR_PROVINCE = &H2004
%EQUATE `MDLEVEL_TYPE_GEO_COUNTY = &H2005
%EQUATE `MDLEVEL_TYPE_GEO_CITY = &H2006
%EQUATE `MDLEVEL_TYPE_GEO_POSTALCODE = &H2007
%EQUATE `MDLEVEL_TYPE_GEO_POINT = &H2008
%EQUATE `MDLEVEL_TYPE_ORG_UNIT = &H1011
%EQUATE `MDLEVEL_TYPE_BOM_RESOURCE = &H1012
%EQUATE `MDLEVEL_TYPE_QUANTITATIVE = &H1013
%EQUATE `MDLEVEL_TYPE_ACCOUNT = &H1014
%EQUATE `MDLEVEL_TYPE_CUSTOMER = &H1021
%EQUATE `MDLEVEL_TYPE_CUSTOMER_GROUP = &H1022
%EQUATE `MDLEVEL_TYPE_CUSTOMER_HOUSEHOLD = &H1023
%EQUATE `MDLEVEL_TYPE_PRODUCT = &H1031
%EQUATE `MDLEVEL_TYPE_PRODUCT_GROUP = &H1032
%EQUATE `MDLEVEL_TYPE_SCENARIO = &H1015
%EQUATE `MDLEVEL_TYPE_UTILITY = &H1016
%EQUATE `MDLEVEL_TYPE_PERSON = &H1041
%EQUATE `MDLEVEL_TYPE_COMPANY = &H1042
%EQUATE `MDLEVEL_TYPE_CURRENCY_SOURCE = &H1051
%EQUATE `MDLEVEL_TYPE_CURRENCY_DESTINATION = &H1052
%EQUATE `MDLEVEL_TYPE_CHANNEL = &H1061
%EQUATE `MDLEVEL_TYPE_REPRESENTATIVE = &H1062
%EQUATE `MDLEVEL_TYPE_PROMOTION = &H1071
%EQUATE `MD_PROPTYPE_REGULAR = &H0000
%EQUATE `MD_PROPTYPE_ID = &H0001
%EQUATE `MD_PROPTYPE_RELATION_TO_PARENT = &H0002
%EQUATE `MD_PROPTYPE_ROLLUP_OPERATOR = &H0003
%EQUATE `MD_PROPTYPE_ORG_TITLE = &H0011
%EQUATE `MD_PROPTYPE_CAPTION = &H0021
%EQUATE `MD_PROPTYPE_CAPTION_SHORT = &H0022
%EQUATE `MD_PROPTYPE_CAPTION_DESCRIPTION = &H0023
%EQUATE `MD_PROPTYPE_CAPTION_ABBREVIATION = &H0024
%EQUATE `MD_PROPTYPE_WEB_URL = &H0031
%EQUATE `MD_PROPTYPE_WEB_HTML = &H0032
%EQUATE `MD_PROPTYPE_WEB_XML_OR_XSL = &H0033
%EQUATE `MD_PROPTYPE_WEB_MAIL_ALIAS = &H0034
%EQUATE `MD_PROPTYPE_ADDRESS = &H0041
%EQUATE `MD_PROPTYPE_ADDRESS_STREET = &H0042
%EQUATE `MD_PROPTYPE_ADDRESS_HOUSE = &H0043
%EQUATE `MD_PROPTYPE_ADDRESS_CITY = &H0044
%EQUATE `MD_PROPTYPE_ADDRESS_STATE_OR_PROVINCE = &H0045
%EQUATE `MD_PROPTYPE_ADDRESS_ZIP = &H0046
%EQUATE `MD_PROPTYPE_ADDRESS_QUARTER = &H0047
%EQUATE `MD_PROPTYPE_ADDRESS_COUNTRY = &H0048
%EQUATE `MD_PROPTYPE_ADDRESS_BUILDING = &H0049
%EQUATE `MD_PROPTYPE_ADDRESS_ROOM = &H004A
%EQUATE `MD_PROPTYPE_ADDRESS_FLOOR = &H004B
%EQUATE `MD_PROPTYPE_ADDRESS_FAX = &H004C
%EQUATE `MD_PROPTYPE_ADDRESS_PHONE = &H004D
%EQUATE `MD_PROPTYPE_GEO_CENTROID_X = &H0061
%EQUATE `MD_PROPTYPE_GEO_CENTROID_Y = &H0062
%EQUATE `MD_PROPTYPE_GEO_CENTROID_Z = &H0063
%EQUATE `MD_PROPTYPE_GEO_BOUNDARY_TOP = &H0064
%EQUATE `MD_PROPTYPE_GEO_BOUNDARY_LEFT = &H0065
%EQUATE `MD_PROPTYPE_GEO_BOUNDARY_BOTTOM = &H0066
%EQUATE `MD_PROPTYPE_GEO_BOUNDARY_RIGHT = &H0067
%EQUATE `MD_PROPTYPE_GEO_BOUNDARY_FRONT = &H0068
%EQUATE `MD_PROPTYPE_GEO_BOUNDARY_REAR = &H0069
%EQUATE `MD_PROPTYPE_GEO_BOUNDARY_POLYGON = &H006A
%EQUATE `MD_PROPTYPE_PHYSICAL_SIZE = &H0071
%EQUATE `MD_PROPTYPE_PHYSICAL_COLOR = &H0072
%EQUATE `MD_PROPTYPE_PHYSICAL_WEIGHT = &H0073
%EQUATE `MD_PROPTYPE_PHYSICAL_HEIGHT = &H0074
%EQUATE `MD_PROPTYPE_PHYSICAL_WIDTH = &H0075
%EQUATE `MD_PROPTYPE_PHYSICAL_DEPTH = &H0076
%EQUATE `MD_PROPTYPE_PHYSICAL_VOLUME = &H0077
%EQUATE `MD_PROPTYPE_PHYSICAL_DENSITY = &H0078
%EQUATE `MD_PROPTYPE_PERSON_FULL_NAME = &H0082
%EQUATE `MD_PROPTYPE_PERSON_FIRST_NAME = &H0083
%EQUATE `MD_PROPTYPE_PERSON_LAST_NAME = &H0084
%EQUATE `MD_PROPTYPE_PERSON_MIDDLE_NAME = &H0085
%EQUATE `MD_PROPTYPE_PERSON_DEMOGRAPHIC = &H0086
%EQUATE `MD_PROPTYPE_PERSON_CONTACT = &H0087
%EQUATE `MD_PROPTYPE_QTY_RANGE_LOW = &H0091
%EQUATE `MD_PROPTYPE_QTY_RANGE_HIGH = &H0092
%EQUATE `MD_PROPTYPE_FORMATTING_COLOR = &H00A1
%EQUATE `MD_PROPTYPE_FORMATTING_ORDER = &H00A2
%EQUATE `MD_PROPTYPE_FORMATTING_FONT = &H00A3
%EQUATE `MD_PROPTYPE_FORMATTING_FONT_EFFECTS = &H00A4
%EQUATE `MD_PROPTYPE_FORMATTING_FONT_SIZE = &H00A5
%EQUATE `MD_PROPTYPE_FORMATTING_SUB_TOTAL = &H00A1
%EQUATE `MD_PROPTYPE_DATE = &H00B1
%EQUATE `MD_PROPTYPE_DATE_START = &H00B2
%EQUATE `MD_PROPTYPE_DATE_ENDED = &H00B3
%EQUATE `MD_PROPTYPE_DATE_CANCELED = &H00B4
%EQUATE `MD_PROPTYPE_DATE_MODIFIED = &H00B5
%EQUATE `MD_PROPTYPE_DATE_DURATION = &H00B6
%EQUATE `MD_PROPTYPE_VERSION = &H00C1
'//Note: The following items may be migrated to oledb.h in a future release
%EQUATE `MD_SECURITY_ENABLE_DRILLTHROUGH = &H0001
%EQUATE `MD_SECURITY_ENABLE_WRITEBACK = &H0002
'//Note: The following items may be migrated to oledb.h in a future release
%EQUATE `MDACTION_COORDINATE_CUBE = &H00000001
%EQUATE `MDACTION_COORDINATE_DIMENSION = &H00000002
%EQUATE `MDACTION_COORDINATE_LEVEL = &H00000003
%EQUATE `MDACTION_COORDINATE_MEMBER = &H00000004
%EQUATE `MDACTION_COORDINATE_SET = &H00000005
%EQUATE `MDACTION_COORDINATE_CELL = &H00000006
%EQUATE `MDACTION_TYPE_ALL = &H00000000
%EQUATE `MDACTION_TYPE_URL = &H00000001
%EQUATE `MDACTION_TYPE_HTML = &H00000002
%EQUATE `MDACTION_TYPE_STATEMENT = &H00000004
%EQUATE `MDACTION_TYPE_DATASET = &H00000008
%EQUATE `MDACTION_TYPE_ROWSET = &H00000010
%EQUATE `MDACTION_TYPE_COMMANDLINE = &H00000020
%EQUATE `MDACTION_TYPE_PROPRIETARY = &H00000040
%EQUATE `MDACTION_TYPE_REPORT = &H00000080
%EQUATE `MDACTION_TYPE_DRILLTHROUGH = &H00000100
%EQUATE `MDDATA_TYPE_ALL = &H00000000
%EQUATE `MDDATA_TYPE_VARIANT = &H00000001
%EQUATE `MDDATA_TYPE_WSTRING = &H00000002
%EQUATE `MDACTION_INVOCATION_ALL = &H00000000
%EQUATE `MDACTION_INVOCATION_INTERACTIVE = &H00000001
%EQUATE `MDACTION_INVOCATION_ON_OPEN = &H00000002
%EQUATE `MDACTION_INVOCATION_BATCH = &H00000004
%EQUATE `MDLEVELS_CUSTOM_ROLLUP_EXPRESSION = &H00000001
%EQUATE `MDLEVELS_CUSTOM_ROLLUP_COLUMN = &H00000002
%EQUATE `MDLEVELS_SKIPPED_LEVELS = &H00000004
%EQUATE `MDLEVELS_CUSTOM_MEMBER_PROPERTIES = &H00000008
%EQUATE `MDLEVELS_UNARY_OPERATOR = &H00000010
%EQUATE `MDLEVELS_MEMBER_KEY_UNIQUE = &H00000001
%EQUATE `MDLEVELS_MEMBER_NAME_UNIQUE = &H00000002
%EQUATE `MDPROP_SYSTEM = &H00000004
%EQUATE `MDPROP_BLOB = &H00000008
%EQUATE `MDDIMENSIONS_MEMBER_KEY_UNIQUE = &H00000001
%EQUATE `MDDIMENSIONS_MEMBER_NAME_UNIQUE = &H00000002
%EQUATE `MDLEVELS_HIDEMEMBERIF_NO_HOLES = &H00000000 ' // no holes on this level
%EQUATE `MDLEVELS_HIDEMEMBERIF_ONLY_CHILD_AND_BLANK_NAME = &H00000001 ' // hole is determined if the vertex has an empty name and singleton
%EQUATE `MDLEVELS_HIDEMEMBERIF_ONLY_CHILD_AND_PARENT_NAME = &H00000002 ' // hole is determined if the vertex has a name same as the parent and singleton
%EQUATE `MDLEVELS_HIDEMEMBERIF_BLANK_NAME = &H00000003 ' // hole is determined if the vertex has an empty name
%EQUATE `MDLEVELS_HIDEMEMBERIF_PARENT_NAME = &H00000004 ' // hole is determined if the vertex has a name same as the parent
'//Note: The following items may be migrated to oledb.h in a future release
'// should be 10 and we should use that one instead of this one
'// everywhere in the code
%EQUATE `CRESTRICTIONS_MDSCHEMA_PROPERTIES_7x = 10
'// Measure type distinct count
'//Note: The following items may be migrated to oledb.h in a future release
%EQUATE `MDMEASURE_AGGR_DST = &H08
'// Measures types for semiadditive measures.
'//Note: The following items may be migrated to oledb.h in a future release
%EQUATE `MDMEASURE_AGGR_NONE = &H09
%EQUATE `MDMEASURE_AGGR_AVGCHILDREN = &H0A
%EQUATE `MDMEASURE_AGGR_FIRSTCHILD = &H0B
%EQUATE `MDMEASURE_AGGR_LASTCHILD = &H0C
%EQUATE `MDMEASURE_AGGR_FIRSTNONEMPTY = &H0D
%EQUATE `MDMEASURE_AGGR_LASTNONEMPTY = &H0E
%EQUATE `MDMEASURE_AGGR_BYACCOUNT = &H0F
'//Note: The following items may be migrated to oledb.h in a future release
' enum DBPROPENUM27
%EQUATE `DBPROP_PROVIDEROLEDBOLAPVER = &H101&
%EQUATE `DBPROP_DATASOURCE_CONNECTION_TYPE = &H102&
%EQUATE `DBPROPVAL_MDX_DCT_SERVER = &H0001
%EQUATE `DBPROPVAL_MDX_DCT_LOCAL = &H0002
%EQUATE `DBPROPVAL_MDX_DCT_HTTP = &H0004
%EQUATE `MD_STRUCTURE_FULLYBALANCED = &H0000
%EQUATE `MD_STRUCTURE_RAGGEDBALANCED = &H0001
%EQUATE `MD_STRUCTURE_UNBALANCED = &H0002
%EQUATE `MD_STRUCTURE_NETWORK = &H0003
%EQUATE `MDSET_SCOPE_GLOBAL = &H00001
%EQUATE `MDSET_SCOPE_SESSION = &H00002
%EQUATE `DBPROP_VISUALMODE = (%DBPROP_SESS_AUTOCOMMITISOLEVELS + 1)
'//property values for UPDATE cell property
%EQUATE `MD_MASK_ENABLED = &H00000000
%EQUATE `MD_MASK_NOT_ENABLED = &H10000000
%EQUATE `DBPROP_CELL_UPDATE_ENABLED = %MD_MASK_ENABLED OR &H00000001 ' // can update
%EQUATE `DBPROP_CELL_UPDATE_ENABLED_WITH_UPDATE = %MD_MASK_ENABLED OR &H00000002 ' // can update using UPDATE function
%EQUATE `DBPROP_CELL_UPDATE_NOT_ENABLED_FORMULA = %MD_MASK_NOT_ENABLED OR &H00000001 ' // cannot update formula
%EQUATE `DBPROP_CELL_UPDATE_NOT_ENABLED_NONSUM_MEASURE = %MD_MASK_NOT_ENABLED OR &H00000002 ' // cannot update non-sum type measure
%EQUATE `DBPROP_CELL_UPDATE_NOT_ENABLED_NACELL_VIRTUALCUBE = %MD_MASK_NOT_ENABLED OR &H00000003 ' // cannot update N/A cell in virtual cube
%EQUATE `DBPROP_CELL_UPDATE_NOT_ENABLED_UPDATETONULL = %MD_MASK_NOT_ENABLED OR &H00000004 ' // cannot store a NULL in a non NULL cell
%EQUATE `DBPROP_CELL_UPDATE_NOT_ENABLED_SECURE = %MD_MASK_NOT_ENABLED OR &H00000005 ' // cannot update because cell is secured
%EQUATE `DBPROP_CELL_UPDATE_NOT_ENABLED_CALCLEVEL = %MD_MASK_NOT_ENABLED OR &H00000006 ' // cannot update for calculated level
%EQUATE `DBPROP_CELL_UPDATE_NOT_ENABLED_CANNOTUPDATE = %MD_MASK_NOT_ENABLED OR &H00000007 ' // cannot update for internal reason
%EQUATE `DBPROP_CELL_UPDATE_NOT_ENABLED_INVALIDDIMENSIONTYPE = %MD_MASK_NOT_ENABLED OR &H00000009 ' // cannot update if special dimensions (ref, MM, DM) non trivial coordinates
$MDGUID_DM = GUID$("{62C58FED-CCA5-44F1-83B6-7B45682B3904}")
'//
'// Begin added in Analysis Services 2005
'//
'// Enum values for <object>_ORIGIN
%EQUATE `MD_ORIGIN_USER_DEFINED = &H00000001
%EQUATE `MD_ORIGIN_ATTRIBUTE = &H00000002
%EQUATE `MD_ORIGIN_KEY_ATTRIBUTE = &H00000004
%EQUATE `MD_ORIGIN_INTERNAL = &H00000008
'// Enum values for INSTANCE_SELECTION
%EQUATE `MD_INSTANCE_SELECTION_NONE = &H00000000
%EQUATE `MD_INSTANCE_SELECTION_DROPDOWN = &H00000001
%EQUATE `MD_INSTANCE_SELECTION_LIST = &H00000002
%EQUATE `MD_INSTANCE_SELECTION_FILTEREDLIST = &H00000003
%EQUATE `MD_INSTANCE_SELECTION_MANDATORYFILTER = &H00000004
'// Enum values for GROUPING_BEHAVIOR
%EQUATE `MD_GROUPING_BEHAVIOR_ENCOURAGE = &H00000001
%EQUATE `MD_GROUPING_BEHAVIOR_DISCOURAGE = &H00000002
'// Enum values for CUBE_SOURCE property
%EQUATE `MD_CUBE_SOURCE_CUBE = &H0001
%EQUATE `MD_CUBE_SOURCE_DIMENSION = &H0002
'//
'// End added in Analysis Services 2005
'//
'//////////////////////////////////////////////////////////////////////////
'// Begin: Interface and related structure definitions for IMDDatasetInfo
'//////////////////////////////////////////////////////////////////////////
' // Size = 16 bytes
TYPE MDAXISINFOEX DWORD
 cbSize AS DWORD ' DBLENGTH
 iAxis AS DWORD ' DBCOUNTITEM
 cHierarchies AS DWORD ' DBCOUNTITEM
 rgpwszHierarchyNames AS WSTRINGZ PTR ' LPOLESTR* [array]
END TYPE
' // Size = 28 bytes
TYPE MDCUBEINFO DWORD
 cbSize AS DWORD ' DBLENGTH
 iCube AS DWORD ' DBCOUNTITEM
 wszCubeName AS WSTRINGZ PTR
 LastDataUpdate AS DOUBLE ' DATE
 LastSchemaUpdate AS DOUBLE ' DATE
END TYPE
' ########################################################################################
' Interface name = IMDDatasetInfo
' IID = A07CCD16-8148-11D0-87BB-00C04FC33942
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMDDatasetInfo_INTERFACE_DEFINED)
 %IMDDatasetInfo_INTERFACE_DEFINED = 1
$IID_IMDDatasetInfo = GUID$("{A07CCD16-8148-11D0-87BB-00C04FC33942}")
INTERFACE IMDDatasetInfo $IID_IMDDatasetInfo
 INHERIT IUnknown
 ' =====================================================================================
 METHOD FreeAxisInfo ( ' VTable offset = 12
 BYVAL cAxes AS DWORD
 , BYREF rgAxisInfo AS MDAXISINFOEX
 ) AS LONG
 ' =====================================================================================
 METHOD GetAxisInfo ( ' VTable offset = 16
 BYREF pcAxes AS DWORD
 , BYREF prgAxisInfo AS MDAXISINFOEX
 ) AS LONG
 ' =====================================================================================
 METHOD FreeCubeInfo ( ' VTable offset = 20
 BYVAL cCubes AS DWORD
 , BYREF rgCubeInfo AS MDCUBEINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetCubeInfo ( ' VTable offset = 24
 BYREF pcCubes AS DWORD
 , BYREF prgCubeInfo AS MDCUBEINFO
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMDDatasetInfo_INTERFACE_DEFINED__ */
'//////////////////////////////////////////////////////////////////////////
'// END: Interface and related structure definitions for IMDDatasetInfo
'//////////////////////////////////////////////////////////////////////////
#ENDIF
