Calling C DLL

Just starting out? Need help? Post your questions and find answers here.
thomasrueger
New User
New User
Posts: 3
Joined: Wed Mar 24, 2004 4:37 pm
Location: Germany
Contact:

Calling C DLL

Post by thomasrueger »

Hello, just one question from a Newbie:

I have a C DLL from a databaseserver ... With VB i could use it directly with ADO.

So i tried it with purebasic and i think there is something wrong.

I tried also with the purebasic DLL Importer, but it always stop working, so i wanna make it directly.

Here is the first function from the header file:

ISC_Status isc_Export isc_embed_dsql_release(ISC_Status ISC_FAR *, char ISC_FAR*)

i found also, that in the header ISC_STATUS is define as long, ISC_Export is define in a few ways, f.e. -stdcall and ISC_FAR has a define as _far.

So i translated it like follow:

long _stdcall ...(long _far *, char _far *)

i made in purebasic a few pointers and called the procedure, but nothing could help.

Can somebody help my by translation the header in purebasic ?

If you want the hole header file you will find it every where in the internet. Its a databaseserver "Firebird" , f.e. in sourceforge.net.

i want to make a little wrapper for use this Firebird Database Server for PureBasic, but i am not a C Programmer and i have now Problems by translating it ...

Thanks a lot

Cu Thomas
AlGonzalez
User
User
Posts: 53
Joined: Sun Feb 15, 2004 6:04 am
Location: Easley, SC, USA

Re: Calling C DLL

Post by AlGonzalez »

thomasrueger wrote:Hello, just one question from a Newbie:

I have a C DLL from a databaseserver ... With VB i could use it directly with ADO.
I'm not sure what you mean by using it directly with ADO since ADO uses COM automation and so you weren't calling the 'C' dll directly.

If you mean that ADO could be used to connect to the database, then ADO is probably talking to a driver, either ODBC or OLEDB, the supports the FireBird database.

You should be able to use the ODBC support provided by PureBasic to connect to the database.

HTH
thomasrueger
New User
New User
Posts: 3
Joined: Wed Mar 24, 2004 4:37 pm
Location: Germany
Contact:

Post by thomasrueger »

Hello AlGonzalez,

you are right..

PureBasic and ODBC and a suitable driver is working.

but i don't want to use odbc.

the dll (fbclient.dll) from firebird i a C DLL. So PureBasic seemed to have everything for directly call.
Omnius
User
User
Posts: 40
Joined: Sun Jul 10, 2005 4:40 pm
Location: Mount Airy, MD
Contact:

Results?

Post by Omnius »

What did you end up doing here? I'm trying to do this myself now.
You want -real- game graphics?...
Matt Chavez is the man you contact. He's brilliant.
Post Reply