--- Steve Orens <[EMAIL PROTECTED]> wrote:
> I am getting one of the unallocated chunk messages when 
> I am trying to use DmSetDatabaseInfo. here is some 
> pseudo-code to demonstrate what I am trying to do (rename 
> on a FileStream):
> 
> FileHand hFile = FileOpen( ... fileModeReadWrite );
> 
> if ( ! err )
> {
>     err = FileControl(fileOpGetOpenDbRef, hFile, &refDatabase, &len);

Is refDatabase a DmOpenRef and is len defined like this:
  Int32 len = sizeof(DmOpenRef);

>     err = DmOpenDatabaseInfo( refDatabase, &id, NULL, NULL, &card,
> NULL );
>     err = DmSetDatabaseInfo( card, id, szNewName, NULL... );
>     err = DmCloseDatabse( refDatabase );
>     err = FileClose( hFile );
> }

When I try this, I get an error (read from an unallocated chunk of
memory) if I try to close the database, then close the file stream. 
But it appears to work if I call FileClose() and skip
DmCloseDatabase().


__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

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

Reply via email to