IGetPreferencesCmd::Initialize

The Initialize method is called to initialize the GetPreferences command, by specifying which type of preferences to retrieve: site, user, or bootstrap.

void spIGetPreferencesCmd->Initialize(PreferencesType prefType);
Parameters
prefType - [in] Required PreferenceType enumeration, which specifies the type of preferences to retrieve, which can be set to the following:
- ePreferencesTypeSite, to retrieve the FileNet Workplace Site Preferences.
- ePreferencesTypeUser, to retrieve the FileNet Workplace User Preferences.
- ePreferencesTypeBootstrap, to retrieve the FileNet Workplace Site Bootstrap Preferences.
Results
This method always returns an HRESULT value of S_OK if successful.
Sample
The following is a fragment from the complete example for the GetPreferences command.
   ...
   // Instantiate the custom GetPreferences command component
   IGetPreferencesCmdPtr spIGetPreferencesCmd;
hResult = spIGetPreferencesCmd.CreateInstance(__uuidof(GetPreferencesCmd));
if (FAILED(hResult)) {
std::cout << "Could not create the GetPreferences command component.\n"; _ASSERTE(0);
} // Initialize the custom GetPreferences command component // with the type of preferences to retrieve. PreferencesType enPrefType = ePreferencesTypeBootstrap; std::cout << "Initializing the GetPreferences command component..." << std::endl; spIGetPreferencesCmd->Initialize(enPrefType); ...