共用方式為


IVsThreadedWaitDialog.GiveTimeSlice(String, String, Int32, Int32) Method

Definition

Allows updating the text in the dialog, and checks if the user has cancelled the wait.

public:
 int GiveTimeSlice(System::String ^ bstrUpdatedWaitMessage, System::String ^ bstrIfTruncateAppend, int fDisableCancel, [Runtime::InteropServices::Out] int % pfCancelled);
int GiveTimeSlice(std::wstring const & bstrUpdatedWaitMessage, std::wstring const & bstrIfTruncateAppend, int fDisableCancel, [Runtime::InteropServices::Out] int & pfCancelled);
public int GiveTimeSlice (string bstrUpdatedWaitMessage, string bstrIfTruncateAppend, int fDisableCancel, out int pfCancelled);
abstract member GiveTimeSlice : string * string * int * int -> int
Public Function GiveTimeSlice (bstrUpdatedWaitMessage As String, bstrIfTruncateAppend As String, fDisableCancel As Integer, ByRef pfCancelled As Integer) As Integer

Parameters

bstrUpdatedWaitMessage
String

[in] The updated wait message. Can be null.

bstrIfTruncateAppend
String

[in] Can be null, should be a short string e.g. L"..." or L"...""

fDisableCancel
Int32

[in] Disable the button if the operation can no longer be cancelled.

pfCancelled
Int32

[out] Returns true if the operation was cancelled.

Returns

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

Remarks

This method is safe to access from any thread.

Applies to