On 2/25/16 10:31 AM, Igor Korot wrote: > Hi, > I'm trying to design/make a program where I will use SQLite from the DLL. > > What I mean is I will establish a connection inside a DLL but disconnect from > the database in my main application. > > It turns out that doing so I am getting the crash when I try to disconnect > from > the database file. > > Connecting to the DB and issuing the query works OK and the data is retrieved. > > I put up some small demo if you need a code to look at. > > Thank you. > This sounds like the classic multi-run time problem. If the DLL and the mainline are using different copies of the run time this can happen (your giving free a block of memory its malloc didn't allocate). The general fix is that if you are using DLL's then EVERYTHING in the program needs to use DLLs for anything used in any DLL to use the same copy.
-- Richard Damon