次の方法で共有


DoOptionsDialog

Send Feedback

This method shows the Settings dialog box if SSP is not enabled.

HRESULT DoOptionsDialog (
  HWND hwndParent, 
  LPCSTR lpszObjType, 
  IReplNotify* pntfy
);

Parameters

  • hwndParent
    HWND the SSP should use to parent any dialog box it displays when this function is called.
  • lpszObjType
    The name of the folder to show settings.
  • pntfy
    A pointer to IReplNotify:IUnknown.

Return Values

The following table shows the return values for this function.

Return value Description
NOERROR User selected. OK to save the changes.
RERR_CANCEL User selected. Cancel.

Remarks

The IReplStore::Initialize method might not have been called prior to this method being called, so you must not use any internal variables that depend on IReplStore::Initialize being called.

The SSP must be marked "Version 3" to use this interface. When you register the SSP, create a DWORD registry value Version with a value of 0x00030000 under the HKCR\<prog id> registry key.

The following code example shows how to register the SSP:

[HKEY_CLASSES_ROOT\MS.WinCE.StockPor2]
@="StockPor"
"Display Name"="Stock Sample"
"Version"=dword:00030000:

Code Example

The following code example demonstrates how to use DoOptionsDialog.

Note   To make the following code example easier to read, security checking and error handling are not included. This code example should not be used in a release configuration unless it has been modified to include them.

HRESULT DoOptionsDialog(HWND hwndParent, LPCSTR pszObjType, IReplNotify * pntfy )
{

    // The IReplStore::Initialize function might not have been called prior
    // to this function being called, so you must not use internal
    // variables that depend upon IReplStore::Initialize being called.

    //  If your SSP supports multiple folders, then the folder selected is pszObjType.
    HRESULT hrReturn = S_OK;
    int nSave;

    nSave = MessageBox(hwndParent, _T("Options for my SSP. Click Yes to save changes."), _T("My SSP"), MB_YESNO);

    if (IDYES == nSave)
    {
        hrReturn = S_OK;
    }

    else
    {
        hrReturn = RERR_CANCEL;
    }

    return hrReturn;

}

Requirements

Pocket PC: Windows Mobile Version 5.0 and later
Smartphone: Windows Mobile Version 5.0 and later
OS Versions: Windows CE 5.01 and later.
Header: Cesync.h.

See Also

IReplStore2 | OnSSPEnable | OnSSPDisable

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.