1/* 2 * Copyright 2009 Huw Davies 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 17 */ 18 19import "oaidl.idl"; 20import "ocidl.idl"; 21import "oledb.idl"; 22 23[ 24 object, 25 pointer_default(unique), 26 uuid(0c733a8d-2a1c-11ce-ade5-00aa0044773d) 27] 28interface IDataConvert : IUnknown 29{ 30 typedef DWORD DBDATACONVERT; 31 32 enum DBDATACONVERTENUM 33 { 34 DBDATACONVERT_DEFAULT = 0, 35 DBDATACONVERT_SETDATABEHAVIOR = 1, 36 DBDATACONVERT_LENGTHFROMNTS = 2, 37 DBDATACONVERT_DSTISFIXEDLENGTH = 4, 38 DBDATACONVERT_DECIMALSCALE = 8 39 }; 40 41 [local] HRESULT DataConvert([in] DBTYPE wSrcType, 42 [in] DBTYPE wDstType, 43 [in] DBLENGTH cbSrcLength, 44 [in, out] DBLENGTH *pcbDstLength, 45 [in] void *pSrc, 46 [out] void *pDst, 47 [in] DBLENGTH cbDstMaxLength, 48 [in] DBSTATUS dbsSrcStatus, 49 [out] DBSTATUS *pdbsDstStatus, 50 [in] BYTE bPrecision, 51 [in] BYTE bScale, 52 [in] DBDATACONVERT dwFlags); 53 54 55 HRESULT CanConvert([in] DBTYPE wSrcType, 56 [in] DBTYPE wDstType); 57 58 59 [local] HRESULT GetConversionSize([in] DBTYPE wSrcType, 60 [in] DBTYPE wDstType, 61 [in] DBLENGTH *pcbSrcLength, 62 [out] DBLENGTH *pcbDstLength, 63 [in, size_is(*pcbSrcLength)] void *pSrc); 64}; 65 66[ 67 object, 68 pointer_default(unique), 69 uuid(0c733a9c-2a1c-11ce-ade5-00aa0044773d) 70] 71interface IDCInfo : IUnknown 72{ 73 typedef DWORD DCINFOTYPE; 74 75 enum DCINFOTYPEENUM 76 { 77 DCINFOTYPE_VERSION = 1 78 }; 79 80 typedef struct tagDCINFO 81 { 82 DCINFOTYPE eInfoType; 83 VARIANT vData; 84 } DCINFO; 85 86 HRESULT GetInfo([in] ULONG cInfo, 87 [in, size_is(cInfo)] DCINFOTYPE rgeInfoType[], 88 [out, size_is(cInfo)] DCINFO **prgInfo); 89 90 HRESULT SetInfo([in] ULONG cInfo, 91 [in, size_is(cInfo)] DCINFO prgInfo[]); 92}; 93