Hello All,

  I am following the minimal sales conduit example in O'Reilly's book "Palm
Programming". The tools I am using are a little different than the ones
mentioned in the book. I am using Visual C++ 6.0 and HotSync Manager 3.0.2.
Everything else in the example worked. However, if I invoke Custom menu in
HotSync manager and click Change, the conduit will crash. The
ConfigureConduit entry point doesn't work. Following is the code stub. Does
someone know the reason? Thanks.


__declspec(dllexport) long ConfigureConduit(CSyncPreference& pref) {

        AFX_MANAGE_STATE(AfxGetStaticModuleState());
        long nRtn = -1;
        
        // defined in ActDlg.h
        CHotSyncActionDlg actDlg;

        pref.m_SyncPref = eNoPreference;
        actDlg.m_csGroupText = kConduitName;

        switch (pref.m_SyncType) {
                
                case eFast:
                case eSlow:
                        actDlg.m_nActionIndex = 0;
                        break;

                case ePCtoHH:
                        actDlg.m_nActionIndex = 1;
                        break;

                case eHHtoPC:
                        actDlg.m_nActionIndex = 2;
                        break;

                case eDoNothing:
                default:
                        actDlg.m_nActionIndex = 3;
                        break;

        }

        if (actDlg.DoModal() == IDOK) {
                
                switch (actDlg.m_nActionIndex) {

                        case 0:
                                pref.m_SyncType = eFast;
                                break;

                        case 1:
                                pref.m_SyncType = ePCtoHH;
                                break;

                        case 2:
                                pref.m_SyncType = eHHtoPC;
                                break;

                        case 3:
                        default:
                                pref.m_SyncType = eDoNothing;
                                break;

                }

                pref.m_SyncPref = (actDlg.m_bMakeDefault) ? 
                        ePermanentPreference : eTemporaryPreference;

                nRtn = 0;

        }
        
        return nRtn;
}

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to