DoOptionsDialog
A version of this page is also available for
4/8/2010
This method shows the Settings dialog box if SSP is not enabled.
Syntax
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 Value
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 registry key 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
Header | cesync.h |
Windows Embedded CE | Windows Embedded CE 6.0 and later |
Windows Mobile | Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later |