Sign in to follow this  
Followers 0
sensalim

Help with dllcall and this dll file

3 posts in this topic

First, I found this

http://dbftools.com/download/cdbfapi.zip

It's free but demo version... (real one is $25 or more)

Ok, so in it, I find this function.lst (a text file)... attached.

All I want to do at the moment is:

-Create (overwrite ok) a DBF file name is test.dbf in currect directory (@ScriptDir ok)

-Create 5 columns and under each, create 1 (or 2) rows of data (any data, really)

for testing purposes (for now).

I only got this far

$dll = DLLOpen("CDBFAPI.DLL")
$sPath = @ScriptDir & "\test.dbf"

$hDBF = DLLCall($dll, "ptr", "OpenBase", "str", $sPath)
MsgBox(0, "hDBF", $hDBF[0])
DLLClose($dll)

It seems to work but I don't know among those functions in the attached function.list,

which one do I use to create/write columns...

Can anyone help?

Thank you!!!

Function.List.txt

Share this post


Link to post
Share on other sites



Here are some functions I find that may help me...

//  open database (open file, allocate memory, set options, 
//  read header, fields etc)
//  Input:  pointer to filename
//  Output: pointer to struct DBF or NULL if error

struct  DBF* OpenBase   (char *filename);

//  close database (close file, release memory etc)
//  Input:  pointer to DBF file
//
void    CloseBase   (struct DBF *d);

//  read fields and allocate memory
//  Input:  pointer to DBF file
//  Output: TRUE if OK, FALSE if error
//
BOOL    ReadFields  (struct DBF *d);

//  insert string in Character field into read/write area
//  Input:  pointer to DBF file, number of field, null-terminated string
//
void    SetString   (struct DBF *d, int n, char *s);

//  insert any value into read/write area
//  Input:  pointer to DBF file, number of field, null-terminated string, double value
//  if type of field 'C', 'M', 'G', 'L' - null-terminated string is used, value is ignored
//  otherwise - value is used, null-terminated string is ignored
//
void    SetValue    (struct DBF *d, int i, char *s, double b);

Share this post


Link to post
Share on other sites

Anyone?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0