Partager via


IVsBuildManagerAccessor2.AcquireBuildResources Method

Definition

Acquires the design-time build resource and/or the UI thread for a build, if they are available.

public:
 int AcquireBuildResources(Microsoft::VisualStudio::Shell::Interop::VSBUILDMANAGERRESOURCE fResources, [Runtime::InteropServices::Out] System::UInt32 % phCookie);
int AcquireBuildResources(Microsoft::VisualStudio::Shell::Interop::VSBUILDMANAGERRESOURCE fResources, [Runtime::InteropServices::Out] unsigned int & phCookie);
public int AcquireBuildResources (Microsoft.VisualStudio.Shell.Interop.VSBUILDMANAGERRESOURCE fResources, out uint phCookie);
abstract member AcquireBuildResources : Microsoft.VisualStudio.Shell.Interop.VSBUILDMANAGERRESOURCE * uint32 -> int
Public Function AcquireBuildResources (fResources As VSBUILDMANAGERRESOURCE, ByRef phCookie As UInteger) As Integer

Parameters

fResources
VSBUILDMANAGERRESOURCE

[in] The type of resource to acquire.

phCookie
UInt32

[out] A cookie that identifies the resource, and can be used to release the resource(s).

Returns

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

Remarks

This method deprecates BeginDesignTimeBuild and ClaimUIThreadForBuild, and resources acquired using this method can only be released by the ReleaseBuildResources method.

This method returns E_PENDING if all the resources requested are not immediately available. Otherwise the requested resources are claimed and S_OK is returned.

Applies to