IVsStatusbar.Progress Method
Shows the progress of operations that take a determinate amount of time.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function Progress ( _
<OutAttribute> ByRef pdwCookie As UInteger, _
fInProgress As Integer, _
pwszLabel As String, _
nComplete As UInteger, _
nTotal As UInteger _
) As Integer
int Progress(
out uint pdwCookie,
int fInProgress,
string pwszLabel,
uint nComplete,
uint nTotal
)
int Progress(
[InAttribute] [OutAttribute] unsigned int% pdwCookie,
[InAttribute] int fInProgress,
[InAttribute] String^ pwszLabel,
[InAttribute] unsigned int nComplete,
[InAttribute] unsigned int nTotal
)
abstract Progress :
pdwCookie:uint32 byref *
fInProgress:int *
pwszLabel:string *
nComplete:uint32 *
nTotal:uint32 -> int
function Progress(
pdwCookie : uint,
fInProgress : int,
pwszLabel : String,
nComplete : uint,
nTotal : uint
) : int
Parameters
pdwCookie
Type: UInt32%[in, out] ID of the current user, to prevent multiple uses of the progress bar at the same time.
fInProgress
Type: Int32[in] true while the progress bar is in use; false when complete.
pwszLabel
Type: String[in] Text to display in status field while the progress bar is in use.
nComplete
Type: UInt32[in] Number of units currently complete in the progress bar.
nTotal
Type: UInt32[in] Total number of units for the progress bar operation.
Return Value
Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsStatusbar::Progress(
[in,out]VSCOOKIE *pdwCookie,
[in]BOOL fInProgress,
[in]LPCOLESTR pwszLabel,
[in]ULONG nComplete,
[in]ULONG nTotal
);
Progress is displayed as a growing blue bar in the progress bar area of the status bar. The first time a status bar user calls this method, pdwCookie must be set to zero. The value then returned in pdwCookie is the unique ID that that status bar user must use in future calls of this method.
This method is called to display the amount of progress being made during an operation. As such, nTotal must be known before you call this method. If nTotal cannot be ascertained beforehand and the operation is expected to take more than a couple of seconds, call the Animation method instead.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.