Discussion:
Berkeley-db met a problem under 64bit windows of .net environment.
(too old to reply)
5***@gmail.com
2007-10-20 15:11:20 UTC
Permalink
I am using <BerkeleyDb For Net 0.95>, version 4.5. It runs well under
32bit Windows. I also download BerkeleyDB 4.5 version C codes and
compile by Microsoft visual studio 2005 and change the target platform
X64, then libdb45.dll 64bit file of 1100k. The libdb45.dll file of
32bit is 840k.

Now, I want to set up C# project by using BerkeleyDb on 64bit
window2003. When I use 32bit libdb45.dll, the system gives a warning:
Exception from HRESULT: OX8007000B. This is normal. But when I use
64bit libdb45.dll, the system says "try to access the protected
memeory. I follow up it and found: using(DB db=new
Db(DbCreateFlags.None)). After following into this function, it is
evp=db.GetEvp(); of SetOwnerDatabase function of Env object. Following
it, it goes to dbp->GetEnv(dbp); At last it goes to
"return(GetEnvFcn)Marshal.GetdelegateForFunctionPointer(get_env,
typeof(GetEnvFcn));.

Is it a problem from Net components or com components? Does the
pointer point to the wrong memory? Is there someone who can help me?
Thanks!
Karl Waclawek
2007-11-09 01:00:53 UTC
Permalink
Post by 5***@gmail.com
I am using <BerkeleyDb For Net 0.95>, version 4.5. It runs well under
32bit Windows. I also download BerkeleyDB 4.5 version C codes and
compile by Microsoft visual studio 2005 and change the target platform
X64, then libdb45.dll 64bit file of 1100k. The libdb45.dll file of
32bit is 840k.
Now, I want to set up C# project by using BerkeleyDb on 64bit
Exception from HRESULT: OX8007000B. This is normal. But when I use
64bit libdb45.dll, the system says "try to access the protected
memeory. I follow up it and found: using(DB db=new
Db(DbCreateFlags.None)). After following into this function, it is
evp=db.GetEvp(); of SetOwnerDatabase function of Env object. Following
it, it goes to dbp->GetEnv(dbp); At last it goes to
"return(GetEnvFcn)Marshal.GetdelegateForFunctionPointer(get_env,
typeof(GetEnvFcn));.
Is it a problem from Net components or com components? Does the
pointer point to the wrong memory? Is there someone who can help me?
Thanks!
I am not normally reading this newsgroup, so I only saw your post by accident.

The problem likely is that the binary layout of the 64 bit BDB dll is different
from the 32 bit dll, and so the call from C# into native code uses the wrong
memory addresses.

Unfortunately I do not have access to a 64 bit system so that I could
work on this issue.

Regards,

Karl

Loading...