共用方式為


IVsGeneratorProgress.Progress Method

Sets an index that specifies how much of the generation has been completed.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'宣告
Function Progress ( _
    nComplete As UInteger, _
    nTotal As UInteger _
) As Integer
'用途
Dim instance As IVsGeneratorProgress
Dim nComplete As UInteger
Dim nTotal As UInteger
Dim returnValue As Integer

returnValue = instance.Progress(nComplete, _
    nTotal)
int Progress(
    uint nComplete,
    uint nTotal
)
int Progress(
    [InAttribute] unsigned int nComplete, 
    [InAttribute] unsigned int nTotal
)
abstract Progress : 
        nComplete:uint32 * 
        nTotal:uint32 -> int 
function Progress(
    nComplete : uint, 
    nTotal : uint
) : int

Parameters

  • nComplete
    Type: System.UInt32
    [in] Index that specifies how much of the generation has been completed. This value can range from zero to nTotal..
  • nTotal
    Type: System.UInt32
    [in] The maximum value for nComplete.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsGeneratorProgress::Progress(

   [in] ULONG nComplete,

   [in] ULONG nTotal

);

The percent of the generation that has been completed is calculated by the project system as (nComplete / nTotal) * 100.

The Visual Basic and Visual C# project systems do not display custom tool progress to the user. However, custom tools should still implement this method to take advantage of progress reporting that may be available in a future version of Visual Studio.

.NET Framework Security

See Also

Reference

IVsGeneratorProgress Interface

IVsGeneratorProgress Members

Microsoft.VisualStudio.Shell.Interop Namespace