ExportToFile Method of the IFPCPersist Interface

The ExportToFile method recursively writes the all of the properties of the object and its subobjects to the specified XML file. For a collection, the method also writes all of its elements and their properties to the XML file.

[C++]

Syntax

HRESULT ExportToFile(
  [in]			BSTR XmlFileName,
  [in]			long OptionalData,
  [in, optional]  BSTR EncryptionPassword,
  [in, optional]  BSTR Comment
);

Parameters

XmlFileName
BSTR that specifies the name of the XML file to which the data will be exported.
OptionalData

A 32-bit integer value that specifies what optional data to include in the export. This value is a bitwise combination of values from the FpcExportImportOptionalData enumerated type.

EncryptionPassword
BSTR that specifies a password for encrypting the exported information. The default value is an empty BSTR. This parameter must be specified if the fpcExportImportPasswords bit is set in the OptionalData parameter.
Comment
BSTR that specifies a comment for the exported information. This parameter contains an empty string by default.

Return Value

This method returns S_OK if the call is successful; otherwise, it returns an error code.

[Visual Basic]

Syntax

Sub ExportToFile( _
  ByVal XmlFileName As String, _
  ByVal OptionalData As Long, _
  [ ByVal EncryptionPassword As String ], _
  [ ByVal Comment As String ] _
)

Parameters

XmlFileName
String that specifies the name of the XML file to which the data will be exported.
OptionalData

A 32-bit integer value that specifies what optional data to include in the export. This value is a bitwise combination of values from the FpcExportImportOptionalData enumerated type.

EncryptionPassword
String that specifies a password for encrypting the exported information. The default value is an empty string. This parameter must be specified if the fpcExportImportPasswords bit is set in the OptionalData parameter.
Comment
String that specifies a comment for the exported information. This parameter is an empty string by default.

Return Value

This method has no return values. If the call is unsuccessful, an error is raised that can be intercepted by using an error handler.

Example Code

For a VBScript code example that shows how to use this method to export the configuration of a Forefront TMG computer to a specified .xml file, see Exporting and Importing a Forefront TMG Configuration.

Remarks

For more information, see About Persistence.

Requirements

Client Requires Windows Vista or Windows XP.
Server Requires Windows Server 2008.
Version Requires Forefront Threat Management Gateway (TMG).
IDL

Declared in Msfpccom.idl.

DLL

Requires Msfpccom.dll.

See Also

FPCPersist


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.