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]>


------------------- original message -------------------------------------
>>
>>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-


Reply via email to