I have my DLL with my copy of the Sqlite3 source code.. and I compile it and it 
works fine.

I now link in a 3rd party LIB which happens to include it's own copy of Sqlite3 
code inside the LIB which isn't exported.

So yes -- they're both in the same process (I used the word should in quotes) 
but each Sqlite3 block of code is separate.. and there's obviously a conflict 
-- the question is how to address it.  Because they're both in the same process 
is the issue because of static functions and variables.. or something else?  On 
OSX there's no conflict, but on Windows there is.

According to 
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682594(v=vs.85).aspx 

"The scope of static variables is limited to the block in which the static 
variables are declared. As a result, each process has its own instance of the 
DLL global and static variables by default."

Cheers,

        Rail
-------------------------------------------------

On Apr 6, 2016, at 4:18 AM, "Keith Medcalf" <kmedcalf at dessus.com> wrote:

> 
> Does this mean that you are trying to link the LIB with the OTHER COPY of 
> sqlite into the same application tht is using the DLL, because this sure 
> sounds like what you are doing.  In which case the versions are NOT 
> independant processes soince they are both linked to the same process, or to 
> both processes.
> 
>> -----Original Message-----
>> From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-
>> bounces at mailinglists.sqlite.org] On Behalf Of Rail Jon Rogut
>> Sent: Tuesday, 5 April, 2016 21:55
>> To: SQLite mailing list
>> Subject: Re: [sqlite] SQLITE_IOERR_ACCESS with 3rd party DLL
>> 
>> Hi Simon,
>> 
>> Thanks for replying.
>> 
>> To clarify -- if I run this configuration with the 3rd party LIB I get the
>> error.  If I run my program (DLL) without the 3rd party LIB my database
>> works perfectly fine -- so the disk isn't corrupted and the database
>> itself is fine.  It's only while running my program with the 3rd party DLL
>> sqlite database open that I get the error.
>> 
>> Yes - these are completely separate databases -- the 3rd party DLL is
>> creating a database while it's running.  My database is only trying to
>> read and failing.  The two Sqlite processes 'should' be completely
>> separate -- and neither cares about the other so no trying to share code
>> or data at all.
>> 
>> So to summarize...  there's no disk corruption and the databases are fine.
>> 
>> Thanks,
>> 
>>      Rail
>> ---------------------------------

Reply via email to