DmFindDatabase returns a LocalID, which is a UInt32. You have dbID defined
as a UInt16, which is too small. You either ignored the error/warning about
it or have them turned off.

typedef UInt32                          LocalID;                // local
(card relative) chunk IDLocalID DmFindDatabase(UInt16 cardNo, const Char
*nameP)

--------------------
Jeff Loucks
Work 425-284-1128 [EMAIL PROTECTED]
Home 253-851-8908 [EMAIL PROTECTED]
Mobile 253-691-8812


-----Original Message-----
From: steve p [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 14, 2005 8:58 PM
To: Palm Developer Forum
Subject: Re: DmDatabaseInfo crashes simulator and emulator


I know how to retrieve the version by putting &version in the argument list.

The problem is with either NULL or &version in that position - the simulator

crashes.

I can't see what I am doing wrong.

Any other suggestions?

Steven

"steve p" <[EMAIL PROTECTED]> wrote
> This little snippit crashes each time I try to use it:
>
> Char fname[25];
> UInt16    dbID;
> Err err;
> StrCopy(fname, "PEL-Template");
> dbID = DmFindDatabase(0, fname);
>
> if (dbID) {
>  err = DmDatabaseInfo (0, dbID, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
>   NULL, NULL, NULL, NULL);
>  }
>
> Stepping thru the debugger, it crashes on DmDatabaseInfo.  What am I 
> doing
> wrong??
>
> I am really tring to get the version number but could not get that 
> back
> and thought I would try passing NULL for all of the parameters.
>
> Can someone help?
>
> SWP
>
>
> 

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to