[unixODBC-dev] ODBC-api hooking problem
rakhimbaev at cg.ru
Thu Apr 11 07:18:44 BST 2013
10.04.2013 22:24, Nick Gorham пишет:
> On 10/04/13 16:51, jon pounder wrote:
>> On 04/10/2013 11:45 AM, Динар Рахимбаев wrote:
>> I don't know for sure but I am guessing having 2 instances of the dm
>> loaded in the same process is causing trouble since there is only one
>> odbc environment per process.
>> you should be able to simply call the dbms driver from within your
>> own driver though, every function do your special stuff then call the
>> same func in the driver - thats basically what the dm does now.
> Yep, in theory it should work, but I can imagine there may be some
> reentrancy issues going on. It would probbaly be safer to make your
> driver call the targer driver directly.
Thanks a lot for your quick responses!
Now I'm going to try another way (direct access to DBMS driver). I
think, I'll get more definite behavoir. But I'll have to include some
driver manager logic into my driver. This is what I wanted to avoid
trying to use the driver manager twice.
Ok! But, another questions: is there any way to force loading the copy
of driver manager image on demand? And how dynamic linker ( more
prcisely dl_sym() ) will resolve the symbols? I experienced the problem
of that dl_sym() gets me entry pionts of my driver instead of ones in
newly loaded shared object when I used dlopen() to load it (dlmopen()
with LM_ID_NEWLM option solved this problem).
More information about the unixODBC-dev