EXTERNAL: Re: [odb-users] Question on Using ODB within a DLL
thomas.szumowski at lmco.com
Fri Jun 24 10:45:41 EDT 2011
I attached a MSVC++ 2010 project that results in the described error. Remove the .allow extension so that it is a .zip and unzip the archive.
The VC++ solution has two projects. TestDatabase is a project that generates a dll, and dbtest is the driver that uses the DLL file. The testbasic() dll call succeeded because it just is a print statement from the DLL. The test() call fails upon create_database.
Thank you for your assistance,
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: Friday, June 24, 2011 8:38 AM
To: Szumowski, Thomas
Cc: odb-users at codesynthesis.com
Subject: EXTERNAL: Re: [odb-users] Question on Using ODB within a DLL
Szumowski, Thomas <thomas.szumowski at lmco.com> writes:
> And the null pointer exception occurs in the return line of
> transaction::current() in transaction.cxx:
> bool transaction::
> has_current ()
> return tls_get (current_transaction) != 0;
Hm, this is strange. I don't see why ODB cannot be used from the DLL
and one shouldn't need to do anything special for that. It looks like
the TLS support was not initialized properly in the ODB DLL. Would
you be able to create a small test case that reproduces this problem?
I will then try to figure out what's going on.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 12013 bytes
Url : http://codesynthesis.com/pipermail/odb-users/attachments/20110624/f138ea8e/testdb.zip-0001.obj
More information about the odb-users