dbTalk Databases Forums  

Berkeley-db met a problem under 64bit windows of .net environment.

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss Berkeley-db met a problem under 64bit windows of .net environment. in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
500sea@gmail.com
 
Posts: n/a

Default Berkeley-db met a problem under 64bit windows of .net environment. - 10-20-2007 , 10:11 AM






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.GetdelegateForFunctionPo inter(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!


Reply With Quote
  #2  
Old   
Karl Waclawek
 
Posts: n/a

Default Re: Berkeley-db met a problem under 64bit windows of .net environment. - 11-08-2007 , 07:00 PM






500sea (AT) gmail (DOT) com wrote:
Quote:
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.GetdelegateForFunctionPo inter(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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.