Thanks Robert and Geoff for your help. I am doing everything suggested by 
you, but it is still not working. What I found is that the pData->dlRefP 
value is 0x4FFFF every time. This seems odd to me.
Is it possible that for some reason the Palm OS is passing a wrong value for 
DL reference or some error code? I am testing on POSE 3.0a3 with a Palm Vx 
ROM.

The knowledge base is down since yesterday, can somebody send me the article 
"Calling SyncCallRemoteModule returns a SYNCERR_UNKNOWN_REQUEST.  What is 
going wrong?"

Thanks.

-Sugho-

>From: Robert McKenzie <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: SynCallRemoteModule problem
>Date: Wed, 5 Jan 2000 10:39:40 -0800
>
>Sugho-
>
>   First off, you should consult the following FAQ:
>
>"Calling SyncCallRemoteModule returns a SYNCERR_UNKNOWN_REQUEST.  What is 
>going wrong?"
>
>which I found by doing a search on the knowledge base.
>
>here is the code I use in PilotMain, based on that FAQ
>(as the knowledge base seems to have gone on a trip to bora-bora today...)
>Note that I am not passing ANY data with the SyncCallRemoteModule call.
>
>------------- start code snippet ----------------------
>     else if (cmd == sysAppLaunchCmdHandleSyncCallApp) {
>         SysAppLaunchCmdHandleSyncCallAppType*   theCommandPtr;
>         DlkCallAppReplyParamType                theReplyParams;
>
>         // Do the real processing here.
>         HandleSyncCallApp();
>
>         // Cast the cmdPBP to a SysAppLaunchCmdHandleSyncCallAppType
>         // pointer so that we can work with it.
>         theCommandPtr = (SysAppLaunchCmdHandleSyncCallAppType*)cmdPBP;
>
>         // Create the reply to send back to the desktop.
>         // First clear out all the fields.
>         // This is necessary so that the reserved fields are set to NULL.
>         MemSet(&theReplyParams, sizeof(DlkCallAppReplyParamType), 0);
>
>         // Set the size of the reply.  This is required.
>         theReplyParams.pbSize = sizeof(DlkCallAppReplyParamType);
>
>         // Fill in the DL reference pointer.  This is required.
>         theReplyParams.dlRefP = theCommandPtr->dlRefP;
>
>         // Set the handled field to true.
>         // This is required to let the desktop know that the
>         // sysAppLaunchCmdHandleSyncCallApp was handled.
>         // If you don't set this to true,
>         // the call to SyncCallRemoteModule will return 
>SYNCERR_UNKNOWN_REQUEST.
>         theCommandPtr->handled = true;
>
>         // Set the replyErr field by passing the reply parameters to 
>DlkControl.
>         // This is required for the DLServer to properly handle the reply 
>request.
>         theCommandPtr->replyErr = DlkControl(
>                                     dlkCtlSendCallAppReply,
>                                     &theReplyParams,
>                                     NULL);
>
>
>     } // end sync calling app launch
>------------- end code snippet ----------------------
>
>The only existent documentation on DlkControl lies in the header file 
><DLServer.h>.
>You must include this header file.
>See the comments to the DlkCtlEnum enumeration and the 
>DlkCallAppReplyParamType struct.
>
>You should also note the (so far as I know absolutely undocumented) 
>requirement
>that the DlkControl call happen within 2 seconds of the conduits 
>SyncCallRemoteModule call.
>If you violate this restriction, the DlkControl call WILL bomb -- sometimes 
>in a
>quite spectacular fashion.
>
>I hope that you find this of use.
>
>-Robert McKenzie
><[EMAIL PROTECTED]>
>
>
>
>From: [EMAIL PROTECTED]
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: SyncCallRemoteModule problem
>Date: Wed, 5 Jan 2000 10:20:24 -0800
>
>
>
>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
>
>
>
>
>
>
>

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

Reply via email to