Package.QueryClose(Boolean) Method

Definition

Called to ask the package if the shell can be closed.

C++/WinRT
 virtual int QueryClose([Runtime::InteropServices::Out] bool & canClose);

Parameters

canClose
Boolean

Set canClose to false if you want to prevent the shell from closing

Returns

HRESULT

Remarks

By default this method returns canClose as true and S_OK.

Applies to

Proizvod Verzije
Visual Studio SDK 2015, 2017, 2019, 2022