I've made a really simple test application to put a few records in and trying to get them out. When I'm trying to get a record with a key which doesnt exist an exception is thrown. Well, its trying to. Within the DatabaseException class its trying to call:
[DllImport("hamsterdb-2.1.11.dll", EntryPoint = "ham_strerror",
CallingConvention=CallingConvention.Cdecl)]
static public extern String StringError(int error);
This causes to crash the application or, when Visual Studio's debugger is attached, to hang Visual Studio (2013). Only way to end the Visual Studio process is to kill it via the task manager.
Any clue what I'm doing wrong??
The code I'm using:
byte[] data = db.Find(BitConverter.GetBytes((long)7000000)); //where 7000000 doesnt exist.