Jacob Vitas Vogelstein <[EMAIL PROTECTED]> wrote:
>  hrecord = DmNewRecord( prevAppHackDB, (UInt*)PREVAPP_RECORD_LOC,
> DB_PREVAPP_RECORD_SIZE );

It's hard to know what might be going wrong here without knowing what
PREVAPP_RECORD_LOC and DB_PREVAPP_RECORD_SIZE might be.  The way you feel
the need to cast PREVAPP_RECORD_LOC suggests that PREVAPP_RECORD_LOC
is not of the right type and your problems may be due to abuse of this
parameter to DmNewRecord.  (But this doesn't explain why this works from
the hack code.  But we don't really know what's going on...)

In general, I think one should always be suspicious of explicit casting.

Roger Chaplin <[EMAIL PROTECTED]> suggested:
>>    if( ((error = DmCreateDatabase(0, "PrevAppHackDB", 'JVV-', 'prev',
> 
> Here is your problem ------------------^^^^^^^^^^^^^^^
> The linker puts this string literal in a segment that does not end up 
> being part of the code resource that goes into your hack PRC. [...] If 
> you're using prc-tools, simply add a string resource to your .rcp file 
> that contains the name of the database, then use something like

This is not necessary.  The prc-tools linker does indeed put the string
literal into the same code resource as the surrounding code.  (If you
have a test case that does otherwise, please send it to me.)

    John

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

Reply via email to