Commit 8551f8ca authored by Alexandre Julliard's avatar Alexandre Julliard

Xiang Li

Implementation of a proxy ODBC32 dll.
parent 1dc551cf
......@@ -50,6 +50,7 @@ LIBSUBDIRS = \
dlls/msnet32 \
dlls/msvideo \
dlls/ntdll \
dlls/odbc32 \
dlls/ole32 \
dlls/oleaut32 \
dlls/olecli \
......@@ -163,6 +164,7 @@ LIBOBJS = \
dlls/msnet32/msnet32.o \
dlls/msvideo/msvideo.o \
dlls/ntdll/ntdll.o \
dlls/odbc32/odbc32.o \
dlls/ole32/ole32.o \
dlls/oleaut32/oleaut32.o \
dlls/olecli/olecli.o \
......
......@@ -5858,6 +5858,7 @@ dlls/msacm32/Makefile
dlls/msnet32/Makefile
dlls/msvideo/Makefile
dlls/ntdll/Makefile
dlls/odbc32/Makefile
dlls/ole32/Makefile
dlls/oleaut32/Makefile
dlls/olecli/Makefile
......@@ -6064,6 +6065,7 @@ dlls/msacm32/Makefile
dlls/msnet32/Makefile
dlls/msvideo/Makefile
dlls/ntdll/Makefile
dlls/odbc32/Makefile
dlls/ole32/Makefile
dlls/oleaut32/Makefile
dlls/olecli/Makefile
......
......@@ -883,6 +883,7 @@ dlls/msacm32/Makefile
dlls/msnet32/Makefile
dlls/msvideo/Makefile
dlls/ntdll/Makefile
dlls/odbc32/Makefile
dlls/ole32/Makefile
dlls/oleaut32/Makefile
dlls/olecli/Makefile
......
......@@ -19,6 +19,7 @@ SUBDIRS = \
msnet32 \
msvideo \
ntdll \
odbc32 \
ole32 \
oleaut32 \
olecli \
......
Makefile
odbc32.spec.c
DEFS = @DLLFLAGS@ -D__WINE__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = odbc32
SPEC_SRCS = odbc32.spec
C_SRCS = \
proxyodbc.c
all: $(MODULE).o
@MAKE_RULES@
### Dependencies:
name odbc32
type win32
init MAIN_OdbcInit
001 stdcall SQLAllocConnect(long ptr) SQLAllocConnect
002 stdcall SQLAllocEnv(ptr) SQLAllocEnv
003 stdcall SQLAllocStmt(long ptr) SQLAllocStmt
004 stdcall SQLBindCol(long long long ptr long ptr) SQLBindCol
005 stdcall SQLCancel(long) SQLCancel
006 stdcall SQLColAttributes(long long long ptr long ptr ptr) SQLColAttributes
007 stdcall SQLConnect(long str long str long str long) SQLConnect
008 stdcall SQLDescribeCol(long long str long ptr ptr ptr ptr ptr) SQLDescribeCol
009 stdcall SQLDisconnect(long) SQLDisconnect
010 stdcall SQLError(long long long str ptr str long ptr) SQLError
011 stdcall SQLExecDirect(long str long) SQLExecDirect
012 stdcall SQLExecute(long) SQLExecute
013 stdcall SQLFetch(long) SQLFetch
014 stdcall SQLFreeConnect(long) SQLFreeConnect
015 stdcall SQLFreeEnv(long) SQLFreeEnv
016 stdcall SQLFreeStmt(long long ) SQLFreeStmt
017 stdcall SQLGetCursorName(long str long ptr) SQLGetCursorName
018 stdcall SQLNumResultCols(long ptr) SQLNumResultCols
019 stdcall SQLPrepare(long str long) SQLPrepare
020 stdcall SQLRowCount(long ptr) SQLRowCount
021 stdcall SQLSetCursorName(long str long) SQLSetCursorName
022 stdcall SQLSetParam(long long long long long long ptr ptr) SQLSetParam
023 stdcall SQLTransact(long long long) SQLTransact
024 stdcall SQLAllocHandle(long long ptr) SQLAllocHandle
025 stdcall SQLBindParam(long long long long long long ptr ptr) SQLBindParam
026 stdcall SQLCloseCursor(long) SQLCloseCursor
027 stdcall SQLColAttribute(long long long ptr long ptr ptr) SQLColAttribute
028 stdcall SQLCopyDesc(long long) SQLCopyDesc
029 stdcall SQLEndTran(long long long) SQLEndTran
030 stdcall SQLFetchScroll(long long long) SQLFetchScroll
031 stdcall SQLFreeHandle(long long) SQLFreeHandle
032 stdcall SQLGetConnectAttr(long long ptr ptr) SQLGetConnectAttr
033 stdcall SQLGetDescField(long long long ptr long ptr) SQLGetDescField
034 stdcall SQLGetDescRec(long long str long ptr ptr ptr ptr ptr ptr ptr) SQLGetDescRec
035 stdcall SQLGetDiagField(long long long long ptr long ptr) SQLGetDiagField
036 stdcall SQLGetDiagRec(long long long str ptr str long ptr) SQLGetDiagRec
037 stdcall SQLGetEnvAttr(long long ptr long ptr) SQLGetEnvAttr
038 stdcall SQLGetStmtAttr(long long ptr long ptr) SQLGetStmtAttr
039 stdcall SQLSetConnectAttr(long long ptr long) SQLSetConnectAttr
040 stdcall SQLColumns(long str long str long str long str long) SQLColumns
041 stdcall SQLDriverConnect(long long str long str long str long) SQLDriverConnect
042 stdcall SQLGetConnectOption(long long ptr) SQLGetConnectOption
043 stdcall SQLGetData(long long long ptr long ptr) SQLGetData
044 stdcall SQLGetFunctions(long long ptr) SQLGetFunctions
045 stdcall SQLGetInfo(long long ptr long ptr) SQLGetInfo
046 stdcall SQLGetStmtOption(long long ptr) SQLGetStmtOption
047 stdcall SQLGetTypeInfo(long long) SQLGetTypeInfo
048 stdcall SQLParamData(long ptr) SQLParamData
049 stdcall SQLPutData(long ptr long) SQLPutData
050 stdcall SQLSetConnectOption(long long long) SQLSetConnectOption
051 stdcall SQLSetStmtOption(long long long) SQLSetStmtOption
052 stdcall SQLSpecialColumns(long long str long str long str long long long) SQLSpecialColumns
053 stdcall SQLStatistics(long str long str long str long long long) SQLStatistics
054 stdcall SQLTables(long str long str long str long str long) SQLTables
055 stdcall SQLBrowseConnect(long str long str long ptr) SQLBrowseConnect
056 stdcall SQLColumnPrivileges(long str long str long str long str long) SQLColumnPrivileges
057 stdcall SQLDataSources(long long str long ptr str long ptr) SQLDataSources
058 stdcall SQLDescribeParam(long long ptr ptr ptr ptr) SQLDescribeParam
059 stdcall SQLExtendedFetch(long long long ptr ptr) SQLExtendedFetch
060 stdcall SQLForeignKeys(long str long str long str long str long str long str long) SQLForeignKeys
061 stdcall SQLMoreResults(long str long str long ptr) SQLMoreResults
062 stdcall SQLNativeSql(long str long str long str long) SQLNativeSql
063 stdcall SQLNumParams(long ptr) SQLNumParams
064 stdcall SQLParamOptions(long str long str long str long) SQLParamOptions
065 stdcall SQLPrimaryKeys(long str long str long str long) SQLPrimaryKeys
066 stdcall SQLProcedureColumns(long str long str long str long str long) SQLProcedureColumns
067 stdcall SQLProcedures(long str long str long str long) SQLProcedures
068 stdcall SQLSetPos(long long long long) SQLSetPos
069 stdcall SQLSetScrollOptions(long long long long) SQLSetScrollOptions
070 stdcall SQLTablePrivileges(long str long str long str long) SQLTablePrivileges
071 stdcall SQLDrivers(long long str long ptr str long ptr) SQLDrivers
072 stdcall SQLBindParameter(long long long long long long long ptr long ptr) SQLBindParameter
073 stdcall SQLSetDescField(long long long ptr long) SQLSetDescField
074 stdcall SQLSetDescRec(long long long long long long long ptr ptr ptr) SQLSetDescRec
075 stdcall SQLSetEnvAttr(long long ptr long) SQLSetEnvAttr
076 stdcall SQLSetStmtAttr(long long ptr long) SQLSetStmtAttr
077 stdcall SQLAllocHandleStd(long long ptr) SQLAllocHandleStd
078 stdcall SQLBulkOperations(long long) SQLBulkOperations
079 stub CloseODBCPerfData
080 stub CollectODBCPerfData
081 stub CursorLibLockDbc
082 stub CursorLibLockDesc
083 stub CursorLibLockStmt
084 stub ODBCGetTryWaitValue
085 stub CursorLibTransact
086 stub ODBSetTryWaitValue
087 stub LockHandle
088 stub ODBCInternalConnectW
089 stub ODBCSharedPerfMon
090 stub ODBCSharedVSFlag
091 stub OpenODBCPerfData
092 stub PostComponentError
093 stub PostODBCComponentError
094 stub PostODBCError
095 stub SearchStatusCode
096 stub VFreeErrors
097 stub VRetrieveDriverErrorsRowCol
098 stub ValidateErrorQueue
099 stub SQLColAttributesW
100 stub SQLConnectW
101 stub SQLDescribeColW
102 stub SQLErrorW
103 stub SQLExecDirectW
104 stub SQLGetCursorNameW
105 stub SQLPrepareW
106 stub SQLSetCursorNameW
107 stub SQLColAttributeW
108 stub SQLGetConnectAttrW
109 stub SQLGetDescFieldW
110 stub SQLGetDescRecW
111 stub SQLGetDiagFieldW
112 stub SQLGetDiagRecW
113 stub SQLGetStmtAttrW
114 stub SQLSetConnectAttrW
115 stub SQLColumnsW
116 stub SQLDriverConnectW
117 stub SQLGetConnectOptionW
118 stub SQLGetInfoW
119 stub SQLGetTypeInfoW
120 stub SQLSetConnectOptionW
121 stub SQLSpecialColumnsA
122 stub SQLStatisticsW
123 stub SQLTablesW
124 stub SQLBrowseConnectW
125 stub SQLDataSourcesW
126 stub SQLColumnPrivilegesW
127 stub SQLForeignKeysW
128 stub SQLNativeSqlW
129 stub SQLPrimaryKeysW
130 stub SQLProcedureColumnsW
131 stub SQLProceduresW
132 stub SQLTablePrivilegesW
133 stub SQLDriversW
134 stub SQLSetDescFieldW
135 stub SQLSetStmtAttrW
136 stub SQLColAttributesW
137 stub SQLConnectA
138 stub SQLDescribeColA
139 stub SQLErrorA
140 stub SQLExecDirectA
141 stub SQLGetCursorNameA
142 stub SQLPrepareA
143 stub SQLSetCursorNameA
144 stub SQLColAttributeA
145 stub SQLGetConnectAttrA
146 stub SQLGetDescFieldA
147 stub SQLGetDescRecA
148 stub SQLGetDiagFieldA
149 stub SQLGetDiagRecA
150 stub SQLGetStmtAttrA
151 stub SQLSetConnectAttrA
152 stub SQLColumnsA
153 stub SQLDriverConnectA
154 stub SQLGetConnectOptionA
155 stub SQLGetInfoA
156 stub SQLGetTypeInfoA
157 stub SQLSetConnectOptionA
158 stub SQLSpecialColumnsA
159 stub SQLStatisticsA
160 stub SQLTablesA
161 stub SQLBrowseConnectA
162 stub SQLColumnPrivilegesA
163 stub SQLDataSourcesA
164 stub SQLForeignKeysA
165 stub SQLNativeSqlA
166 stub SQLPrimaryKeysA
167 stub SQLProcedureColumnsA
168 stub SQLProceduresA
169 stub SQLTablePrivilegesA
170 stub SQLDriversA
171 stub SQLSetDescFieldA
172 stub SQLSetStmtAttrA
173 stub ODBCSharedTraceFlag
174 stub ODBCQualifyFileDSNW
#ifndef _PROXYMANAGER_H
#define _PROXYMANAGER_H
#define NUM_SQLFUNC 78
#define ERROR_FREE 0
#define ERROR_SQLERROR 1
#define ERROR_LIBRARY_NOT_FOUND 2
#define ERROR_FUNCTIONS_NOT_LOADED 3
#define ODBCVER 0x0351
typedef struct dm_func /* driver manager functions */
{
int ordinal;
char *name;
void *d_func;
SQLRETURN (*func)();
} DM_FUNC;
typedef struct proxyhandle
{
void *dmHandle; /* driver manager handle */
BOOL isWindowsDriver; /* is driver a Windows version*/
BOOL bCallbackReady; /* procs taken from Windows driver placed in driver manager as callbacks */
BOOL bFunctionReady;
int nErrorType;
DM_FUNC functions[NUM_SQLFUNC]; /* entry point for driver manager functions */
char driverLibName[200]; /* ODBC driver SO name */
char dmLibName[200]; /* driver manager library name */
char ServerName[200]; /* keep server name */
char UserName[50]; /* keep username */
} PROXYHANDLE;
BOOL ODBC_LoadDriverManager();
BOOL ODBC_LoadDMFunctions();
#define /* 00 */ SQLAPI_INDEX_SQLALLOCCONNECT 0
#define /* 01 */ SQLAPI_INDEX_SQLALLOCENV 1
#define /* 02 */ SQLAPI_INDEX_SQLALLOCHANDLE 2
#define /* 03 */ SQLAPI_INDEX_SQLALLOCSTMT 3
#define /* 04 */ SQLAPI_INDEX_SQLALLOCHANDLESTD 4
#define /* 05 */ SQLAPI_INDEX_SQLBINDCOL 5
#define /* 06 */ SQLAPI_INDEX_SQLBINDPARAM 6
#define /* 07 */ SQLAPI_INDEX_SQLBINDPARAMETER 7
#define /* 08 */ SQLAPI_INDEX_SQLBROWSECONNECT 8
#define /* 09 */ SQLAPI_INDEX_SQLBULKOPERATIONS 9
#define /* 10 */ SQLAPI_INDEX_SQLCANCEL 10
#define /* 11 */ SQLAPI_INDEX_SQLCLOSECURSOR 11
#define /* 12 */ SQLAPI_INDEX_SQLCOLATTRIBUTE 12
#define /* 13 */ SQLAPI_INDEX_SQLCOLATTRIBUTES 13
#define /* 14 */ SQLAPI_INDEX_SQLCOLUMNPRIVILEGES 14
#define /* 15 */ SQLAPI_INDEX_SQLCOLUMNS 15
#define /* 16 */ SQLAPI_INDEX_SQLCONNECT 16
#define /* 17 */ SQLAPI_INDEX_SQLCOPYDESC 17
#define /* 18 */ SQLAPI_INDEX_SQLDATASOURCES 18
#define /* 19 */ SQLAPI_INDEX_SQLDESCRIBECOL 19
#define /* 20 */ SQLAPI_INDEX_SQLDESCRIBEPARAM 20
#define /* 21 */ SQLAPI_INDEX_SQLDISCONNECT 21
#define /* 22 */ SQLAPI_INDEX_SQLDRIVERCONNECT 22
#define /* 23 */ SQLAPI_INDEX_SQLDRIVERS 23
#define /* 24 */ SQLAPI_INDEX_SQLENDTRAN 24
#define /* 25 */ SQLAPI_INDEX_SQLERROR 25
#define /* 26 */ SQLAPI_INDEX_SQLEXECDIRECT 26
#define /* 27 */ SQLAPI_INDEX_SQLEXECUTE 27
#define /* 28 */ SQLAPI_INDEX_SQLEXTENDEDFETCH 28
#define /* 29 */ SQLAPI_INDEX_SQLFETCH 29
#define /* 30 */ SQLAPI_INDEX_SQLFETCHSCROLL 30
#define /* 31 */ SQLAPI_INDEX_SQLFOREIGNKEYS 31
#define /* 32 */ SQLAPI_INDEX_SQLFREEENV 32
#define /* 33 */ SQLAPI_INDEX_SQLFREEHANDLE 33
#define /* 34 */ SQLAPI_INDEX_SQLFREESTMT 34
#define /* 35 */ SQLAPI_INDEX_SQLFREECONNECT 35
#define /* 36 */ SQLAPI_INDEX_SQLGETCONNECTATTR 36
#define /* 37 */ SQLAPI_INDEX_SQLGETCONNECTOPTION 37
#define /* 38 */ SQLAPI_INDEX_SQLGETCURSORNAME 38
#define /* 39 */ SQLAPI_INDEX_SQLGETDATA 39
#define /* 40 */ SQLAPI_INDEX_SQLGETDESCFIELD 40
#define /* 41 */ SQLAPI_INDEX_SQLGETDESCREC 41
#define /* 42 */ SQLAPI_INDEX_SQLGETDIAGFIELD 42
#define /* 43 */ SQLAPI_INDEX_SQLGETENVATTR 43
#define /* 44 */ SQLAPI_INDEX_SQLGETFUNCTIONS 44
#define /* 45 */ SQLAPI_INDEX_SQLGETINFO 45
#define /* 46 */ SQLAPI_INDEX_SQLGETSTMTATTR 46
#define /* 47 */ SQLAPI_INDEX_SQLGETSTMTOPTION 47
#define /* 48 */ SQLAPI_INDEX_SQLGETTYPEINFO 48
#define /* 49 */ SQLAPI_INDEX_SQLMORERESULTS 49
#define /* 50 */ SQLAPI_INDEX_SQLNATIVESQL 50
#define /* 51 */ SQLAPI_INDEX_SQLNUMPARAMS 51
#define /* 52 */ SQLAPI_INDEX_SQLNUMRESULTCOLS 52
#define /* 53 */ SQLAPI_INDEX_SQLPARAMDATA 53
#define /* 54 */ SQLAPI_INDEX_SQLPARAMOPTIONS 54
#define /* 55 */ SQLAPI_INDEX_SQLPREPARE 55
#define /* 56 */ SQLAPI_INDEX_SQLPRIMARYKEYS 56
#define /* 57 */ SQLAPI_INDEX_SQLPROCEDURECOLUMNS 57
#define /* 58 */ SQLAPI_INDEX_SQLPROCEDURES 58
#define /* 59 */ SQLAPI_INDEX_SQLPUTDATA 59
#define /* 60 */ SQLAPI_INDEX_SQLROWCOUNT 60
#define /* 61 */ SQLAPI_INDEX_SQLSETCONNECTATTR 61
#define /* 62 */ SQLAPI_INDEX_SQLSETCONNECTOPTION 62
#define /* 63 */ SQLAPI_INDEX_SQLSETCURSORNAME 63
#define /* 64 */ SQLAPI_INDEX_SQLSETDESCFIELD 64
#define /* 65 */ SQLAPI_INDEX_SQLSETDESCREC 65
#define /* 66 */ SQLAPI_INDEX_SQLSETENVATTR 66
#define /* 67 */ SQLAPI_INDEX_SQLSETPARAM 67
#define /* 68 */ SQLAPI_INDEX_SQLSETPOS 68
#define /* 69 */ SQLAPI_INDEX_SQLSETSCROLLOPTIONS 69
#define /* 70 */ SQLAPI_INDEX_SQLSETSTMTATTR 70
#define /* 71 */ SQLAPI_INDEX_SQLSETSTMTOPTION 71
#define /* 72 */ SQLAPI_INDEX_SQLSPECIALCOLUMNS 72
#define /* 73 */ SQLAPI_INDEX_SQLSTATISTICS 73
#define /* 74 */ SQLAPI_INDEX_SQLTABLEPRIVILEGES 74
#define /* 75 */ SQLAPI_INDEX_SQLTABLES 75
#define /* 76 */ SQLAPI_INDEX_SQLTRANSACT 76
#define /* 77 */ SQLAPI_INDEX_SQLGETDIAGREC 77
#endif
......@@ -102,73 +102,74 @@ const int dbch_msvideo = 90;
const int dbch_nativefont = 91;
const int dbch_nonclient = 92;
const int dbch_ntdll = 93;
const int dbch_ole = 94;
const int dbch_pager = 95;
const int dbch_palette = 96;
const int dbch_pidl = 97;
const int dbch_print = 98;
const int dbch_process = 99;
const int dbch_profile = 100;
const int dbch_progress = 101;
const int dbch_prop = 102;
const int dbch_propsheet = 103;
const int dbch_psapi = 104;
const int dbch_psdrv = 105;
const int dbch_ras = 106;
const int dbch_rebar = 107;
const int dbch_reg = 108;
const int dbch_region = 109;
const int dbch_relay = 110;
const int dbch_resource = 111;
const int dbch_scroll = 112;
const int dbch_security = 113;
const int dbch_segment = 114;
const int dbch_seh = 115;
const int dbch_selector = 116;
const int dbch_sendmsg = 117;
const int dbch_server = 118;
const int dbch_shell = 119;
const int dbch_snoop = 120;
const int dbch_sound = 121;
const int dbch_static = 122;
const int dbch_statusbar = 123;
const int dbch_storage = 124;
const int dbch_stress = 125;
const int dbch_string = 126;
const int dbch_syscolor = 127;
const int dbch_system = 128;
const int dbch_tab = 129;
const int dbch_tape = 130;
const int dbch_tapi = 131;
const int dbch_task = 132;
const int dbch_text = 133;
const int dbch_thread = 134;
const int dbch_thunk = 135;
const int dbch_timer = 136;
const int dbch_toolbar = 137;
const int dbch_toolhelp = 138;
const int dbch_tooltips = 139;
const int dbch_trackbar = 140;
const int dbch_treeview = 141;
const int dbch_ttydrv = 142;
const int dbch_tweak = 143;
const int dbch_typelib = 144;
const int dbch_updown = 145;
const int dbch_ver = 146;
const int dbch_virtual = 147;
const int dbch_vxd = 148;
const int dbch_wave = 149;
const int dbch_win = 150;
const int dbch_win16drv = 151;
const int dbch_win32 = 152;
const int dbch_wing = 153;
const int dbch_winsock = 154;
const int dbch_winspool = 155;
const int dbch_wnet = 156;
const int dbch_x11 = 157;
const int dbch_x11drv = 158;
const int dbch_odbc = 94;
const int dbch_ole = 95;
const int dbch_pager = 96;
const int dbch_palette = 97;
const int dbch_pidl = 98;
const int dbch_print = 99;
const int dbch_process = 100;
const int dbch_profile = 101;
const int dbch_progress = 102;
const int dbch_prop = 103;
const int dbch_propsheet = 104;
const int dbch_psapi = 105;
const int dbch_psdrv = 106;
const int dbch_ras = 107;
const int dbch_rebar = 108;
const int dbch_reg = 109;
const int dbch_region = 110;
const int dbch_relay = 111;
const int dbch_resource = 112;
const int dbch_scroll = 113;
const int dbch_security = 114;
const int dbch_segment = 115;
const int dbch_seh = 116;
const int dbch_selector = 117;
const int dbch_sendmsg = 118;
const int dbch_server = 119;
const int dbch_shell = 120;
const int dbch_snoop = 121;
const int dbch_sound = 122;
const int dbch_static = 123;
const int dbch_statusbar = 124;
const int dbch_storage = 125;
const int dbch_stress = 126;
const int dbch_string = 127;
const int dbch_syscolor = 128;
const int dbch_system = 129;
const int dbch_tab = 130;
const int dbch_tape = 131;
const int dbch_tapi = 132;
const int dbch_task = 133;
const int dbch_text = 134;
const int dbch_thread = 135;
const int dbch_thunk = 136;
const int dbch_timer = 137;
const int dbch_toolbar = 138;
const int dbch_toolhelp = 139;
const int dbch_tooltips = 140;
const int dbch_trackbar = 141;
const int dbch_treeview = 142;
const int dbch_ttydrv = 143;
const int dbch_tweak = 144;
const int dbch_typelib = 145;
const int dbch_updown = 146;
const int dbch_ver = 147;
const int dbch_virtual = 148;
const int dbch_vxd = 149;
const int dbch_wave = 150;
const int dbch_win = 151;
const int dbch_win16drv = 152;
const int dbch_win32 = 153;
const int dbch_wing = 154;
const int dbch_winsock = 155;
const int dbch_winspool = 156;
const int dbch_wnet = 157;
const int dbch_x11 = 158;
const int dbch_x11drv = 159;
#define DEBUG_CHANNEL_COUNT 159
#define DEBUG_CHANNEL_COUNT 160
char __debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = {
{1, 1, 0, 0},
......@@ -329,6 +330,7 @@ char __debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = {
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0}
};
......@@ -427,6 +429,7 @@ const char * const debug_ch_name[DEBUG_CHANNEL_COUNT] = {
"nativefont",
"nonclient",
"ntdll",
"odbc",
"ole",
"pager",
"palette",
......
This diff is collapsed. Click to expand it.
/*
* sqltypes.h
*/
#ifndef __SQLTYPES_H
#define __SQLTYPES_H
#ifndef ODBCVER
#define ODBCVER 0x0351
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _WINDOWS
#define FAR
#define CALLBACK
#define SQL_API
#define BOOL int
typedef void* HWND;
typedef char* GUID;
#define GUID_DEFINED
typedef char CHAR;
typedef void VOID;
typedef unsigned short WORD;
typedef unsigned long DWORD;
typedef unsigned char BYTE;
typedef unsigned short WCHAR;
typedef WCHAR* LPWSTR;
typedef const char* LPCSTR;
typedef char* LPSTR;
typedef DWORD* LPDWORD;
#endif
typedef unsigned char SQLCHAR;
#if (ODBCVER >= 0x0300)
typedef unsigned char SQLDATE;
typedef unsigned char SQLDECIMAL;
typedef double SQLDOUBLE;
typedef double SQLFLOAT;
#endif
typedef long SQLINTEGER;
#if (ODBCVER >= 0x0300)
typedef unsigned char SQLNUMERIC;
#endif
typedef void * SQLPOINTER;
#if (ODBCVER >= 0x0300)
typedef float SQLREAL;
#endif
typedef signed short int SQLSMALLINT;
typedef unsigned short SQLUSMALLINT;
#if (ODBCVER >= 0x0300)
typedef unsigned char SQLTIME;
typedef unsigned char SQLTIMESTAMP;
typedef unsigned char SQLVARCHAR;
#endif
typedef SQLSMALLINT SQLRETURN;
/* typedef void * SQLHANDLE; */
typedef SQLINTEGER SQLHANDLE;
#if (ODBCVER >= 0x0300)
typedef SQLHANDLE SQLHENV;
typedef SQLHANDLE SQLHDBC;
typedef SQLHANDLE SQLHSTMT;
typedef SQLHANDLE SQLHDESC;
#else
typedef SQLINTEGER SQLHENV;
typedef SQLINTEGER SQLHDBC;
typedef SQLINTEGER SQLHSTMT;
#endif
typedef signed char SCHAR;
typedef SCHAR SQLSCHAR;
typedef long int SDWORD;
typedef signed short int SWORD;
typedef unsigned long int UDWORD;
typedef unsigned short int UWORD;
typedef UDWORD SQLUINTEGER;
typedef signed long SLONG;
typedef signed short SSHORT;
typedef double SDOUBLE;
typedef double LDOUBLE;
typedef float SFLOAT;
typedef void* PTR;
typedef signed short RETCODE;
typedef void* SQLHWND;
typedef SQLHANDLE HENV;
typedef SQLHANDLE HDBC;
typedef SQLHANDLE HSTMT;
#ifndef __SQLDATE
#define __SQLDATE
typedef struct tagDATE_STRUCT
{
SQLSMALLINT year;
SQLUSMALLINT month;
SQLUSMALLINT day;
} DATE_STRUCT;
#if (ODBCVER >= 0x0300)
typedef DATE_STRUCT SQL_DATE_STRUCT;
#endif
typedef struct tagTIME_STRUCT
{
SQLUSMALLINT hour;
SQLUSMALLINT minute;
SQLUSMALLINT second;
} TIME_STRUCT;
#if (ODBCVER >= 0x0300)
typedef TIME_STRUCT SQL_TIME_STRUCT;
#endif
typedef struct tagTIMESTAMP_STRUCT
{
SQLSMALLINT year;
SQLUSMALLINT month;
SQLUSMALLINT day;
SQLUSMALLINT hour;
SQLUSMALLINT minute;
SQLUSMALLINT second;
SQLUINTEGER fraction;
} TIMESTAMP_STRUCT;
#if (ODBCVER >= 0x0300)
typedef TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT;
#endif
#if (ODBCVER >= 0x0300)
typedef enum
{
SQL_IS_YEAR = 1,
SQL_IS_MONTH = 2,
SQL_IS_DAY = 3,
SQL_IS_HOUR = 4,
SQL_IS_MINUTE = 5,
SQL_IS_SECOND = 6,
SQL_IS_YEAR_TO_MONTH = 7,
SQL_IS_DAY_TO_HOUR = 8,
SQL_IS_DAY_TO_MINUTE = 9,
SQL_IS_DAY_TO_SECOND = 10,
SQL_IS_HOUR_TO_MINUTE = 11,
SQL_IS_HOUR_TO_SECOND = 12,
SQL_IS_MINUTE_TO_SECOND = 13
} SQLINTERVAL;
#endif
#if (ODBCVER >= 0x0300)
typedef struct tagSQL_YEAR_MONTH
{
SQLUINTEGER year;
SQLUINTEGER month;
} SQL_YEAR_MONTH_STRUCT;
typedef struct tagSQL_DAY_SECOND
{
SQLUINTEGER day;
SQLUINTEGER hour;
SQLUINTEGER minute;
SQLUINTEGER second;
SQLUINTEGER fraction;
} SQL_DAY_SECOND_STRUCT;
typedef struct tagSQL_INTERVAL_STRUCT
{
SQLINTERVAL interval_type;
SQLSMALLINT interval_sign;
union {
SQL_YEAR_MONTH_STRUCT year_month;
SQL_DAY_SECOND_STRUCT day_second;
} intval;
} SQL_INTERVAL_STRUCT;
#endif
#endif
#if (ODBCVER >= 0x0300)
#define ODBCINT64 long
#ifdef ODBCINT64
typedef ODBCINT64 SQLBIGINT;
typedef unsigned ODBCINT64 SQLUBIGINT;
#endif
#endif
#if (ODBCVER >= 0x0300)
#define SQL_MAX_NUMERIC_LEN 16
typedef struct tagSQL_NUMERIC_STRUCT
{
SQLCHAR precision;
SQLSCHAR scale;
SQLCHAR sign; /* 1=pos 0=neg */
SQLCHAR val[SQL_MAX_NUMERIC_LEN];
} SQL_NUMERIC_STRUCT;
#endif
#if (ODBCVER >= 0x0350)
#ifdef GUID_DEFINED
typedef GUID SQLGUID;
#else
typedef struct tagSQLGUID
{
DWORD Data1;
WORD Data2;
WORD Data3;
BYTE Data4[ 8 ];
} SQLGUID;
#endif
#endif
typedef unsigned long int BOOKMARK;
#define SQL_WCHAR (-8)
#define SQL_C_WCHAR SQL_WCHAR
#ifdef __cplusplus
}
#endif
#endif
......@@ -58,6 +58,7 @@ static struct tagDllOverride {
{"icmp", "builtin"},
/* we have to use libglide2x.so instead of glide2x.dll ... */
{"glide2x", "so,native"},
{"odbc32", "builtin"},
{NULL,NULL},
};
......
......@@ -77,6 +77,7 @@ extern const BUILTIN32_DESCRIPTOR MSACMMAP_Descriptor;
extern const BUILTIN32_DESCRIPTOR MSNET32_Descriptor;
extern const BUILTIN32_DESCRIPTOR MSVFW32_Descriptor;
extern const BUILTIN32_DESCRIPTOR NTDLL_Descriptor;
extern const BUILTIN32_DESCRIPTOR ODBC32_Descriptor;
extern const BUILTIN32_DESCRIPTOR OLE32_Descriptor;
extern const BUILTIN32_DESCRIPTOR OLEAUT32_Descriptor;
extern const BUILTIN32_DESCRIPTOR OLECLI32_Descriptor;
......@@ -134,6 +135,7 @@ static BUILTIN32_DLL BuiltinDLLs[] =
{ &MSNET32_Descriptor, 0, 0, NULL },
{ &MSVFW32_Descriptor, 0, 0, NULL },
{ &NTDLL_Descriptor, 0, 0, NULL },
{ &ODBC32_Descriptor, 0, 0, NULL },
{ &OLE32_Descriptor, 0, 0, NULL },
{ &OLEAUT32_Descriptor, 0, 0, NULL },
{ &OLECLI32_Descriptor, 0, 0, NULL },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment