> In my app I need to get some info from a database (with DmDatabaseSize). I
> see that it returns ULongPtr's. Well, if I want to display the returned
> values (with WinDrawChars), I need them to be CharPtr's. How do I convert the
> ULongPtr's into the CharPtr's?
{
UInt32 size;
Char str[32];
UInt16 card;
LocalID dbID;
Coord x, y;
x = 10;
y = 20;
card = ...;
dbID = ...; // you should have this code somewhere
DmDatabaseSize(card, dbID, NULL, &size, NULL);
StrIToA(str, size);
WinDrawChars(str, StrLen(str), x, y);
}
DmDatabaseSize() has ULongPtr's (UInt32 * in new SDK) which basically
allow you as a developer to pass a pointer to a specific data type and
have the function write to it.. its also known as passing by reference.
check out any good C/C++ programming book - it'll tell you more about
this type of programming :))
cheers
// az "long live pointers..."
[EMAIL PROTECTED]
http://www.ardiri.com/ <--- free games!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/