From: Alistair Leslie-Hughes Subject: [PATCH] include: Add IColumnsInfo interface (resend) Message-Id: Date: Thu, 4 Feb 2016 20:31:14 +1100 Signed-off-by: Alistair Leslie-Hughes --- dlls/msdaps/usrmarshal.c | 30 ++++++++++++++++++++++++++++++ include/colinf.idl | 45 +++++++++++++++++++++++++++++++++++++++++++++ include/dbs.idl | 28 ++++++++++++++++++++++++++++ include/oledb.idl | 1 + 4 files changed, 104 insertions(+) create mode 100644 include/colinf.idl diff --git a/dlls/msdaps/usrmarshal.c b/dlls/msdaps/usrmarshal.c index 1243e48..a93a661 100644 --- a/dlls/msdaps/usrmarshal.c +++ b/dlls/msdaps/usrmarshal.c @@ -1513,3 +1513,33 @@ HRESULT CALLBACK IChapteredRowset_ReleaseChapter_Proxy(IChapteredRowset* This, H FIXME("(%p)->(%lx %p): stub\n", This, chapter, refcount); return E_NOTIMPL; } + +HRESULT CALLBACK IColumnsInfo_GetColumnInfo_Proxy(IColumnsInfo* This, DBORDINAL *columns, + DBCOLUMNINFO **colinfo, OLECHAR *stringsbuffer) +{ + FIXME("(%p)->(%p %p %p): stub\n", This, columns, colinfo, stringsbuffer); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IColumnsInfo_GetColumnInfo_Stub(IColumnsInfo* This, DBORDINAL *columns, DBCOLUMNINFO **col_info, + DBBYTEOFFSET **name_offsets, DBBYTEOFFSET **columnid_offsets, DBLENGTH *string_len, OLECHAR **stringsbuffer, + IErrorInfo **error) +{ + FIXME("(%p)->(%p %p %p %p %p %p %p): stub\n", This, columns, col_info, name_offsets, columnid_offsets, + string_len, stringsbuffer, error); + return E_NOTIMPL; +} + +HRESULT CALLBACK IColumnsInfo_MapColumnIDs_Proxy(IColumnsInfo* This, DBORDINAL column_ids, const DBID *dbids, + DBORDINAL *columns) +{ + FIXME("(%p)->(%ld %p %p): stub\n", This, column_ids, dbids, columns); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB IColumnsInfo_MapColumnIDs_Stub(IColumnsInfo* This,DBORDINAL column_ids, const DBID *dbids, + DBORDINAL *columns, IErrorInfo **error) +{ + FIXME("(%p)->(%ld %p %p %p): stub\n", This, column_ids, dbids, columns, error); + return E_NOTIMPL; +} diff --git a/include/colinf.idl b/include/colinf.idl new file mode 100644 index 0000000..9d2d4f5 --- /dev/null +++ b/include/colinf.idl @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2015 Alistair Leslie-Hughes + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + + +[ + object, + uuid(0c733a11-2a1c-11ce-ade5-00aa0044773d), + pointer_default(unique) +] +interface IColumnsInfo : IUnknown +{ + [local] + HRESULT GetColumnInfo([in, out] DBORDINAL *columns,[out, size_is(*columns)] DBCOLUMNINFO **colinfo, + [out] OLECHAR *stringsbuffer); + + [call_as(GetColumnInfo)] + HRESULT RemoteGetColumnInfo([in, out] DBORDINAL *columns, [out, size_is((ULONG)*columns)] DBCOLUMNINFO **col_info, + [out, size_is((ULONG)*columns)] DBBYTEOFFSET **name_offsets, + [out, size_is((ULONG)*columns)] DBBYTEOFFSET **columnid_offsets, + [in, out] DBLENGTH *string_len, [in, out, unique, size_is((ULONG)*string_len)] OLECHAR **stringsbuffer, + [out] IErrorInfo **error); + + [local] + HRESULT MapColumnIDs([in] DBORDINAL column_ids, [in, size_is(column_ids)] const DBID *dbids, + [out, size_is(column_ids)] DBORDINAL *columns); + + [call_as(MapColumnIDs)] + HRESULT RemoteMapColumnIDs([in] DBORDINAL column_ids, [in, size_is((ULONG)column_ids)] const DBID *dbids, + [out, size_is((ULONG)column_ids)] DBORDINAL *columns, [out] IErrorInfo **error); +} diff --git a/include/dbs.idl b/include/dbs.idl index 2c46c2b..00e16f9 100644 --- a/include/dbs.idl +++ b/include/dbs.idl @@ -733,3 +733,31 @@ enum DBREASONENUM15 { DBREASON_ROWPOSITION_CLEARED, DBREASON_ROW_ASYNCHINSERT }; + +typedef DWORD DBCOLUMNFLAGS; + +enum DBCOLUMNFLAGSENUM { + DBCOLUMNFLAGS_ISBOOKMARK = 0x0001, + DBCOLUMNFLAGS_MAYDEFER = 0x0002, + DBCOLUMNFLAGS_WRITE = 0x0004, + DBCOLUMNFLAGS_WRITEUNKNOWN = 0x0008, + DBCOLUMNFLAGS_ISFIXEDLENGTH = 0x0010, + DBCOLUMNFLAGS_ISNULLABLE = 0x0020, + DBCOLUMNFLAGS_MAYBENULL = 0x0040, + DBCOLUMNFLAGS_ISLONG = 0x0080, + DBCOLUMNFLAGS_ISROWID = 0x0100, + DBCOLUMNFLAGS_ISROWVER = 0x0200, + DBCOLUMNFLAGS_CACHEDEFERRED = 0x1000 +}; + +typedef struct tagDBCOLUMNINFO { + LPOLESTR pwszName; + ITypeInfo *pTypeInfo; + DBORDINAL iOrdinal; + DBCOLUMNFLAGS dwFlags; + DBLENGTH ulColumnSize; + DBTYPE wType; + BYTE bPrecision; + BYTE bScale; + DBID columnid; +} DBCOLUMNINFO; diff --git a/include/oledb.idl b/include/oledb.idl index 8d7f001..537bb21 100644 --- a/include/oledb.idl +++ b/include/oledb.idl @@ -50,6 +50,7 @@ typedef DWORD_PTR DBHASHVALUE; #include "chprst.idl" #include "cmdbas.idl" #include "cmdtxt.idl" +#include "colinf.idl" #include "dbccmd.idl" #include "dbcses.idl" #include "srcrst.idl" -- 1.9.1