Access Violation when using Berkely DB in C-Language Function in VS2005

From: chaoyong wang <catcher_wang(at)hotmail(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Access Violation when using Berkely DB in C-Language Function in VS2005
Date: 2010-03-25 13:00:38
Message-ID: BAY119-W31DB3972E0444A95DD0A63E5240@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
I'm trying to use Berkely DB in C-Language Function in VS2005, following Magnus Hagander's advice, I successfully loaded BDB's library.

But when it goes to the following to statement, it shows an "int postgres.exe: access violation" error message box:
env->set_data_dir(env, data_dir);
db->open(db,NULL,relation_name,NULL,DB_BTREE,dbflags,0);

and quickly goes to line 4262 of backend/utils/misc/guc.c

This error usually ocurs when overbound, overflow or sth. like that, but I didn't figure out why?

The attachment includes my sourcefile and the scenario image. Thanks~~

Best Regards
Cristian


_________________________________________________________________
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969

Attachment Content-Type Size
access violation.jpg image/jpeg 109.9 KB
xml_index.h text/plain 768 bytes
xml_index.c text/plain 1.9 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-03-25 13:43:53 Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL
Previous Message Heikki Linnakangas 2010-03-25 12:55:42 Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL