]>
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.
17 #include <../iodbc/iodbc.h>
19 #include <../iodbc/isql.h>
20 #include <../iodbc/isqlext.h>
22 #include <../iodbc/dlproc.h>
24 #include <../iodbc/herr.h>
25 #include <../iodbc/henv.h>
26 #include <../iodbc/hdbc.h>
28 #include <../iodbc/itrace.h>
30 #include "../iodbc/henv.ci"
32 HPROC
_iodbcdm_getproc( HDBC hdbc
, int idx
)
34 DBC_t FAR
* pdbc
= (DBC_t FAR
*)hdbc
;
37 static HPROC FAR
* phproc
;
39 if( idx
<= 0 || idx
> SQL_EXT_API_LAST
)
40 /* first entry never used */
42 return SQL_NULL_HPROC
;
45 penv
= (ENV_t FAR
*)(pdbc
->henv
);
49 return SQL_NULL_HPROC
;
52 phproc
= penv
->dllproc_tab
+ idx
;
54 if( *phproc
== SQL_NULL_HPROC
)
60 en_idx
= odbcapi_symtab
[i
].en_idx
;
62 if( en_idx
== en_NullProc
)
69 *phproc
= _iodbcdm_dllproc( penv
->hdll
,
70 odbcapi_symtab
[i
].symbol
);
80 HDLL
_iodbcdm_dllopen( char FAR
* path
)
82 return (HDLL
)DLL_OPEN( path
);
85 HPROC
_iodbcdm_dllproc( HDLL hdll
, char FAR
* sym
)
87 return (HPROC
)DLL_PROC( hdll
, sym
);
90 int _iodbcdm_dllclose( HDLL hdll
)
97 char* _iodbcdm_dllerror( )