' ########################################################################################
' Microsoft Windows
' File: msdadc.inc
' 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_msdadc_PBI)
#DEFINE PBX_msdadc_PBI
%EQUATE `MSDADC_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/OAIdl.inc"
#INCLUDE ONCE "Legacy/COM/OCIdl.inc"
#INCLUDE ONCE "Legacy/COM/oledb.inc"
' ########################################################################################
' IDataConvert interface
' IID = 0C733A8D-2A1C-11CE-ADE5-00AA0044773D
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IDataConvert_INTERFACE_DEFINED)
 %IDataConvert_INTERFACE_DEFINED = 1
'typedef DWORD DBDATACONVERT;
' DBDATACONVERTENUM
%EQUATE `DBDATACONVERT_DEFAULT = 0
%EQUATE `DBDATACONVERT_SETDATABEHAVIOR = &H1
%EQUATE `DBDATACONVERT_LENGTHFROMNTS = &H2
%EQUATE `DBDATACONVERT_DSTISFIXEDLENGTH = &H4
%EQUATE `DBDATACONVERT_DECIMALSCALE = &H8
$IID_IDataConvert = GUID$("{0C733A8D-2A1C-11CE-ADE5-00AA0044773D}")
INTERFACE IDataConvert $IID_IDataConvert
 INHERIT IUnknown
 ' =====================================================================================
 METHOD DataConvert ( ' VTable offset = 12
 BYVAL wSrcType AS WORD
 , BYVAL wDstType AS WORD
 , BYVAL cbSrcLength AS DWORD
 , BYREF pcbDstLength AS DWORD
 , BYVAL pSrc AS DWORD
 , BYREF pDst AS DWORD
 , BYVAL cbDstMaxLength AS DWORD
 , BYVAL dbsSrcStatus AS DWORD
 , BYREF pdbsStatus AS DWORD
 , BYVAL bPrecision AS BYTE
 , BYVAL bScale AS BYTE
 , BYVAL dwFlags AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD CanConvert ( ' VTable offset = 16
 BYVAL wSrcType AS WORD
 , BYVAL wDstType AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetConversionType ( ' VTable offset = 20
 BYVAL wSrcType AS WORD
 , BYVAL wDstType AS WORD
 , BYVAL pcbSrcLength AS DWORD
 , BYREF pcbDstLength AS DWORD
 , BYVAL pSrc AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IDataConvert_INTERFACE_DEFINED__ */
' ########################################################################################
' IDCInfo interface
' IID = 0C733A9C-2A1C-11CE-ADE5-00AA0044773D
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IDCInfo_INTERFACE_DEFINED)
%EQUATE `IDCInfo_INTERFACE_DEFINED = 1
'typedef DWORD DCINFOTYPE;
' DCINFOTYPEENUM
%EQUATE `DCINFOTYPE_VERSION = 1
' // Size = 24 bytes
TYPE DCINFO QWORD FILL
 eInfoType AS DWORD ' DCINFOTYPE
 vData AS tagVARIANT ' VARIANT
END TYPE
$IID_IDCInfo = GUID$("{0C733A9C-2A1C-11CE-ADE5-00AA0044773D}")
INTERFACE IDCInfo $IID_IDCInfo
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetInfo ( ' VTable offset = 12
 BYVAL cInfo AS DWORD
 , BYREF rgeInfoType AS DWORD
 , BYREF prgInfo AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetInfo ( ' VTable offset = 16
 BYVAL cInfo AS DWORD
 , BYREF rgInfo AS DCINFO
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IDCInfo_INTERFACE_DEFINED__ */
'#include <poppack.h> // restore original structure packing
#ENDIF
