Share via


IVsBuildManagerAccessor2.AcquireBuildResources Method

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

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.11.0 (in Microsoft.VisualStudio.Shell.Interop.11.0.dll)

Syntax

'Declaration
Function AcquireBuildResources ( _
    fResources As VSBUILDMANAGERRESOURCE, _
    <OutAttribute> ByRef phCookie As UInteger _
) As Integer
int AcquireBuildResources(
    VSBUILDMANAGERRESOURCE fResources,
    out uint phCookie
)
int AcquireBuildResources(
    [InAttribute] VSBUILDMANAGERRESOURCE fResources, 
    [OutAttribute] unsigned int% phCookie
)
abstract AcquireBuildResources : 
        fResources:VSBUILDMANAGERRESOURCE * 
        phCookie:uint32 byref -> int
function AcquireBuildResources(
    fResources : VSBUILDMANAGERRESOURCE, 
    phCookie : uint
) : int

Parameters

  • phCookie
    Type: System.UInt32%

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

Return Value

Type: System.Int32
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.

.NET Framework Security

See Also

Reference

IVsBuildManagerAccessor2 Interface

Microsoft.VisualStudio.Shell.Interop Namespace