VSDK Test

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Mar 11 01:41:35 CST 2005


On 3/11/05 12:38 AM, "Thomas" <totoole at rocko.lab.csuchico.edu> wrote:

Hi Thomas,
 
> I'm running a simple test of the VDK using XCode 1.5.
> 
> int main (int argc, char * const argv[])
> {
> ValentinaInit(3*1024*1024, "", "");
> valDB myDB;
> myDB.OpenDataBase("/Users/Name/Desktop/val_sdk_test_db");
> VDK_Cursor * myCursor = myDB.SqlSelect("select * from tbl_1");
> unsigned long rcdCnt = myCursor->GetRecordCount;
> delete myCursor;
> myDB.CloseDataBase();
> ValentinaShutDown();
> }
> 
> Two things come up.
> 
> First the header indicates the cursor GetRecordCount call returns a
> ulong, but the compiler will not assign the returned value to an unsigned long
> int.

I have not catch.

    ulong is just a typedef to unsigned long

So where you see problem ?


> Am I missing something obvious? Does the value returned by
> Cursor->GetRecordCount need to be dereferenced or type cast?

No of course.

Just it is too long write

    unsigned long int

And this still long

    unsigned long

Lazy people prefer write

    ulong

:-))


> Second, after the ValentinaShutDown call, the runtime environment
> complains about double freeing memory at several addresses.
> So I see several warnings such as the following:
> 
> *** malloc[1940]: Deallocation of a pointer not malloced: 0x1112d40;
> This could be a double free(), or free() called with the middle of an
> allocated block;
> 
> Any suggestions much appreciated.

You have download and use VSDK.Framework 1.11 ?

Have you try our examples from archive ?
If they work fine ?


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------




More information about the Valentina mailing list