]>
git.saurik.com Git - wxWidgets.git/blob - src/iodbc/dlproc.c
1 /** Load driver and resolve driver's function entry point
3 Copyright (C) 1995 by Ke Jin <kejin@empress.com>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
16 #include <../iodbc/iodbc.h>
18 #include <../iodbc/isql.h>
19 #include <../iodbc/isqlext.h>
21 #include <../iodbc/dlproc.h>
23 #include <../iodbc/herr.h>
24 #include <../iodbc/henv.h>
25 #include <../iodbc/hdbc.h>
27 #include <../iodbc/itrace.h>
29 #include "../iodbc/henv.ci"
31 HPROC
_iodbcdm_getproc( HDBC hdbc
, int idx
)
33 DBC_t FAR
* pdbc
= (DBC_t FAR
*)hdbc
;
38 if( idx
<= 0 || idx
> SQL_EXT_API_LAST
)
39 /* first entry naver used */
41 return SQL_NULL_HPROC
;
44 penv
= (ENV_t FAR
*)(pdbc
->henv
);
48 return SQL_NULL_HPROC
;
51 phproc
= penv
->dllproc_tab
+ idx
;
53 if( *phproc
== SQL_NULL_HPROC
)
59 en_idx
= odbcapi_symtab
[i
].en_idx
;
61 if( en_idx
== en_NullProc
)
68 *phproc
= _iodbcdm_dllproc( penv
->hdll
,
69 odbcapi_symtab
[i
].symbol
);
79 HDLL
_iodbcdm_dllopen( char FAR
* path
)
81 return (HDLL
)DLL_OPEN( path
);
84 HPROC
_iodbcdm_dllproc( HDLL hdll
, char FAR
* sym
)
86 return (HPROC
)DLL_PROC( hdll
, sym
);
89 int _iodbcdm_dllclose( HDLL hdll
)
96 char* _iodbcdm_dllerror( )