I am trying to write a function that means the current application and
it a shared library. Is this possible? First I send the app then I
send the library. When I run the code, the recieving device asks if
you want to except the app, but it never says anything about the
library. Afterwards, the app is present on the recieving device, but
not the library. Any ideas? Thanks
static Err WriteDBData(const void* dataP, UInt32* sizeP, void*
userDataP)
{
Err err;
// Try to send as many bytes as were requested by the caller
*sizeP = ExgSend((ExgSocketPtr)userDataP, (void*)dataP,
*sizeP, &err);
return err;
}
//////////////////////////////////////////////////////////////////////////////
static Err SendDatabases ()
{
ExgSocketType exgSocket;
Err err;
UInt16 cardNo = 0;
LocalID dbID;
Char *descriptionP = "Beamer Test application";
DmSearchStateType searchState;
// Create exgSocket structure
MemSet(&exgSocket, sizeof(exgSocket), 0);
exgSocket.description = descriptionP;
exgSocket.name = "BeamerTest.prc";
exgSocket.target = sysFileCLauncher;
exgSocket.count = 2;
// Start and exchange put operation
err = ExgPut(&exgSocket);
if (err)
{
return err;
}
SysCurAppDatabase(&cardNo, &dbID);
dbID = DmFindDatabase(0, "BeamerTest-Beam");
err = ExgDBWrite(WriteDBData, &exgSocket, NULL, dbID, cardNo);
err = DmGetNextDatabaseByTypeCreator(true, &searchState,
sysFileTLibrary, 'XXXX', true, &cardNo, &dbID);
if (dbID == 0)
{
err = DmGetLastErr();
FrmAlert(LibraryNotFoundAlert);
}
else
{
err = ExgDBWrite(WriteDBData, &exgSocket, NULL, dbID,
cardNo);
}
if (err)
{
return err;
}
// Disconnect Exg and pass error
err = ExgDisconnect(&exgSocket, err);
return err;
}//end SendDatabase
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/