IFPCPersistSink::Progress method
Applies to: desktop apps only
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.
Syntax
HRESULT Progress(
[in] long Percentage
);
FPCPersistSink.Progress( _
ByVal Percentage As Long _
)
Parameters
- Percentage [in]
A 32-bit integer that represents the current percentage of the total amount of data that will be exported or imported.
Return value
C++
This method returns S_OK if the call is successful; otherwise, it returns an error code.
VB
This method has no return values. If the call is unsuccessful, an error is raised that can be intercepted by using an error handler.
Examples
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
Minimum supported client |
Windows Vista |
Minimum supported server |
Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only) |
Version |
Forefront Threat Management Gateway (TMG) 2010 |
IDL |
Msfpccom.idl |
DLL |
Msfpccom.dll |
See also
Build date: 7/12/2010