Progress Method of the IFPCPersistSink Interface

The Progress method handles progress events that are raised during an export or import operation. The progress is passed as the current percentage of the total amount of data that will be exported or imported.

[C++]

Syntax

HRESULT Progress(
  [in]  long Percentage
);

Parameters

Percentage

A 32-bit integer that represents the current percentage of the total amount of data that will be exported or imported.

Return Value

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

[Visual Basic]

Syntax

Sub Progress( _
  ByVal Percentage As Long _
)

Parameters

Percentage

A 32-bit integer that represents the current percentage of the total amount of data that will be exported or imported.

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

The following code example demonstrates how to declare an object that will receive notification of progress events raised during export or import operations, and implements the event handler. This code example must be part of Visual Basic program with a form object.
Option Explicit
Dim WithEvents arr As FPCArray
 
Private Sub arr_Progress(ByVal Percentage As Long)
  Debug.Print "Export progress: " & Percentage & "%"
End Sub
Private Sub Form_Load()
  Const serverSpecificData = 4  
  Dim root As FPCLib.FPC
  Set root = New FPC
  Set arr = root.GetContainingArray()
  
  ' Export the configuration to a file with 
  ' server-specific optional data. 
  arr.ExportToFile "d:\Config.xml", serverSpecificData
End Sub

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

FPCPersistSink


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.

[an error occurred while processing this directive]