-- v3: msdasql: Use DBINITCONSTANTS to get guid values include: Add some DBCOLUMN defines
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
--- dlls/oledb32/datainit.c | 1 - include/dbs.idl | 13 ++++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/oledb32/datainit.c b/dlls/oledb32/datainit.c index 325de558584..3694ac67fec 100644 --- a/dlls/oledb32/datainit.c +++ b/dlls/oledb32/datainit.c @@ -33,7 +33,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(oledb);
-DEFINE_GUID(DB_NULLGUID, 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); DEFINE_GUID(DBGUID_SESSION, 0xc8b522f5, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); DEFINE_GUID(DBGUID_ROWSET, 0xc8b522f6, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); DEFINE_GUID(DBGUID_ROW, 0xc8b522f7, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); diff --git a/include/dbs.idl b/include/dbs.idl index d3cc46b4010..009fcf06e95 100644 --- a/include/dbs.idl +++ b/include/dbs.idl @@ -510,12 +510,18 @@ cpp_quote(" const GUID name DECLSPEC_HIDDEN; \") cpp_quote(" const GUID name = \") cpp_quote(" { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }") cpp_quote("#endif") +cpp_quote("#define DEFINE_DBID(name, dbguid, kind, val) \") +cpp_quote(" const DBID name = { dbguid, kind, {(LPOLESTR)val} };") cpp_quote("#else") cpp_quote("#define DEFINE_DBGUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \") cpp_quote(" EXTERN_C const GUID name DECLSPEC_HIDDEN") +cpp_quote("#define DEFINE_DBID(name, dbguid, kind, val) \") +cpp_quote(" EXTERN_C const DBID name;") cpp_quote("#endif")
-cpp_quote("DEFINE_DBGUID(DB_NULLGUID, 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);") +cpp_quote("#define DBCIDGUID {0x0c733a81, 0x2a1c, 0x11ce, {0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d}}") +cpp_quote("#define DB_NULLGUID {0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}") + cpp_quote("DEFINE_DBGUID(DBGUID_SQL, 0xc8b522d7, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);") cpp_quote("DEFINE_DBGUID(DBGUID_DEFAULT, 0xc8b521fb, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);") cpp_quote("DEFINE_DBGUID(DBGUID_SESSION, 0xc8b522f5, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);") @@ -538,6 +544,11 @@ cpp_quote("DEFINE_DBGUID(DBPROPSET_SESSIONALL, 0xc8b522c7, 0x5cf3, 0x11ce cpp_quote("DEFINE_DBGUID(DBPROPSET_DBINITALL, 0xc8b522ca, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);") cpp_quote("DEFINE_DBGUID(DBPROPSET_PROPERTIESINERROR, 0xc8b522d4, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);")
+cpp_quote("DEFINE_DBID(DB_NULLID, DB_NULLGUID, 0, 0)") +cpp_quote("DEFINE_DBID(DBCOLUMN_BASECOLUMNNAME, DBCIDGUID, DBKIND_GUID_PROPID, 10)") +cpp_quote("DEFINE_DBID(DBCOLUMN_BASETABLENAME, DBCIDGUID, DBKIND_GUID_PROPID, 11)") +cpp_quote("DEFINE_DBID(DBCOLUMN_KEYCOLUMN, DBCIDGUID, DBKIND_GUID_PROPID, 41)") + cpp_quote("#define DBPROMPT_PROMPT 0x01") cpp_quote("#define DBPROMPT_COMPLETE 0x02") cpp_quote("#define DBPROMPT_COMPLETEREQUIRED 0x03")
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
--- dlls/msdasql/msdasql_main.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/dlls/msdasql/msdasql_main.c b/dlls/msdasql/msdasql_main.c index 2f25498abca..7ec35678b6f 100644 --- a/dlls/msdasql/msdasql_main.c +++ b/dlls/msdasql/msdasql_main.c @@ -17,6 +17,7 @@ */
#define COBJMACROS +#define DBINITCONSTANTS
#include <stdarg.h>
@@ -38,12 +39,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(msdasql);
-DEFINE_GUID(DBPROPSET_DATASOURCEINFO, 0xc8b522bb, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); -DEFINE_GUID(DBPROPSET_DBINIT, 0xc8b522bc, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); -DEFINE_GUID(DBPROPSET_ROWSET, 0xc8b522be, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); - -DEFINE_GUID(DBGUID_DEFAULT, 0xc8b521fb, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); - void dump_sql_diag_records(SQLSMALLINT type, SQLHANDLE handle) { SQLCHAR state[6], msg[SQL_MAX_MESSAGE_LENGTH];