This documentation is archived and is not being maintained.

IOleComponentUIManager.OnUIEventProgress Method

Requests the display of a progress indicator during a long-term operation.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

int OnUIEventProgress (
	[InAttribute] out uint pdwCookie,
	[InAttribute] int fInProgress,
	[InAttribute] string pwszLabel,
	[InAttribute] uint nComplete,
	[InAttribute] uint nTotal
)
int OnUIEventProgress (
	/** @attribute InAttribute() */ /** @attribute OutAttribute() */ /** @ref */ UInt32 pdwCookie, 
	/** @attribute InAttribute() */ int fInProgress, 
	/** @attribute InAttribute() */ String pwszLabel, 
	/** @attribute InAttribute() */ UInt32 nComplete, 
	/** @attribute InAttribute() */ UInt32 nTotal
)
JScript does not support passing value-type arguments by reference.

Parameters

pdwCookie

[in] Identifies a progress indicator. Setting pdwCookie to zero indicates that the SOleComponentUIManager service should start a new progress indicator. If pdwCookie is not set to zero, the service should display the current progress indicator.

fInProgress

[in] Set to true to start or continue display of a progress indicator and false to cancel the progress display.

pwszLabel

[in] Points to the label that explains the purpose of the progress indicator. If pswzLabel is set to null on subsequent calls to update the progress of an on-going progress indicator, the previous value of the label is used.

nComplete

[in] Specifies the time that has already passed for the operation.

nTotal

[in] Specifies the total duration of the operation.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

COM Signature

From oleipc.idl:

HRESULT IOleComponentUIManager::OnUIEventProgress(
   [in][out] DWORD_PTR *pdwCookie,
   [in] BOOL fInProgress,
   [in] LPOLESTR pwszLabel,
   [in] ULONG nComplete,
   [in] ULONG nTotal
);

To start a new progress indicator, a VSPackage object calls OnUIEventProgress, setting pdwCookie to null and fInProgress to TRUE. The SOleComponentUIManager service returns a value to identify the particular progress indicator. The VSPackage object must use this value on all subsequent calls to update the progress indicator state. The VSPackage object calls OnUIEventProgress with fInProgress set to false to discontinue the progress indicator.

The SOleComponentUIManager service controls whether or not multiple progress indicators can be running simultaneously. Typically pdwCookie is set to 1 to indicate that only one progress indicator at a time is allowed.

Show: