You will get an error code of dlkErrParam if one of the following:
1. dlkCtlSendCallAppReply in your call to DlkControl is not a valid op-code.
(probably OK in your case)
2. Reply.dlRefP == NULL (might want to check this)
In addition, the debug ROMS will give more information on the particular error
you are getting (1 or 2). I don't see anything obviously wrong with your code.
Also, there is a Knowledge Base article describing how to use
SyncCallRemoteModule.
-Geoff Richmond
Palm Developer Support
"Sudipta Ghose" <[EMAIL PROTECTED]> on 01/04/2000 03:46:22 PM
Please respond to [EMAIL PROTECTED]
Sent by: "Sudipta Ghose" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc: (Geoff Richmond/HQ/3Com)
Subject: SyncCallRemoteModule problem
Hi all,
I am exploring the SyncCallRemoteModule function. I am able to get the
launch code in my palm app, but the DlkControl call in the palm always fails
giving an error code of 3485 (dlkErrParam). Any idea what is going wrong? By
the way, I couldn't find any documentation on DlkControl, or any DLServer
calls. I had to figure it out form the header files (may be I am making some
silly mistakes). Are they left out intentionally?
-Sugho-
Here is the code:
Conduit:
char *sParam = new char[4];
char *sRes = new char[4];
CCallModuleParams Params;
strcpy(sParam, "ZZZ");
Params.m_dwCreatorID = 'tps6';
Params.m_dwTypeID = 'appl';
Params.m_wActionCode = 999; //just a test
Params.m_dwParamSize = sizeof(long);
Params.m_pParam = sParam;
Params.m_dwResultBufSize = 4;
Params.m_pResultBuf= sRes;
lDummy = SyncCallRemoteModule(&Params);
Palm app:
switch (i_nCmd)
{
case sysAppLaunchCmdHandleSyncCallApp:
{
DlkCallAppReplyParamType Reply;
SysAppLaunchCmdHandleSyncCallAppType *pData =
(SysAppLaunchCmdHandleSyncCallAppType *)
i_pCmdPB;
pData->handled = true;
MemSet(&Reply, sizeof(DlkCallAppReplyParamType), 0);
Reply.pbSize = sizeof(DlkCallAppReplyParamType);
Reply.resultP = "AAA"; //just a test
Reply.dwResultSize = StrLen(Reply.resultP) + 1;
Reply.dlRefP = pData->dlRefP;
Reply.dwResultCode = 0;
nError = DlkControl(dlkCtlSendCallAppReply, &Reply, NULL);
}
break;
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com