Partager via


IVoIPConfigurationDataStore::UpdateSettingsFromFile (Windows CE 5.0)

Send Feedback

This method updates all of the specified settings in the data store using information retrieved from the specified file. The file must contain XML that follows the same format as required by IVoIPConfigurationDataStore::UpdateSettingsFromXML.

HRESULT UpdateSettingsFromFile(  const WCHAR* c_wszFileName,  UINT fSettingsToUpdate,   UINT* pfUpdatedSettings);

Parameters

  • c_wszFileName
    The name of a file that contains the values to be read. Only values contained in this file that are also specified in the fSettingsToUpdate parameter will be used to update the data store. Other values will be ignored. The contents of the file must contain XML that follows the format described in more detail in the Remarks section below. If the file name does not contain a path, first the Windows directory and then the Release directory (for debugger-enabled builds) are checked for the specified file.
  • fSettingsToUpdate
    A single number that represents all settings to be updated, using CONFIG_DATA_ constants. Multiple settings can be specified by combining multiple CONFIG_DATA_ values using the OR operator.
  • pfUpdatedSettings
    Pointer to a caller-allocated UINT that this method uses to store a single number that consists of CONFIG_DATA_ values combined using the OR operator. This number represents all settings that were successfully updated. Settings that have been overridden manually by the phone's user won't be updated. If this parameter is NULL, this method does not return the successfully updated settings.

Return Values

This method can return XML DOM parser or file system error values.

The following table shows additional possible return values.

Value Description
E_FAIL The XML read from the file could not be loaded or parsed. The XML may not be valid or well-formed.

Also, the file may not contain valid Unicode data.

E_INVALIDARG The fSettingsToUpdate parameter is zero and does not specify any settings to update.
E_OUTOFMEMORY There was not enough memory to complete the update operation.
E_POINTER The address in c_wszFileName is not valid.
S_OK The settings specified in the pfUpdatedSettings output parameter were updated successfully.
VOIP_E_NOTINITIALIZED The data store is not initialized. It must be initialized using IVoIPConfigurationDataStore::Initialize.

Remarks

A valid XML string read from the specified file has a root element with the name VoIPConfiguration, and one or more child elements named appropriately for the setting and containing the setting value. For more information about the element name to use for each setting, see CONFIG_DATA_. For an example XML fragment that demonstrates the correct usage, see Configuration Data Store Example XML.

Requirements

OS Versions: Windows CE 5.0 and later.
Header: Voipconfigurationdatastore.idl, Voipconfigurationdatastore.h.
Link Library: Voipguid.lib.

See Also

IVoIPConfigurationDataStore | IVoIPConfigurationDataStore::Initialize | IVoIPConfigurationDataStore::UpdateSettingsFromXML

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.