IVsProjectBuildSystem.SetHostObject Method

Sets the object used to communicate between MSBuild and the host IDE.

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

Syntax

'宣言
Function SetHostObject ( _
    pszTargetName As String, _
    pszTaskName As String, _
    punkHostObject As Object _
) As Integer
'使用
Dim instance As IVsProjectBuildSystem
Dim pszTargetName As String
Dim pszTaskName As String
Dim punkHostObject As Object
Dim returnValue As Integer

returnValue = instance.SetHostObject(pszTargetName, _
    pszTaskName, punkHostObject)
int SetHostObject(
    string pszTargetName,
    string pszTaskName,
    Object punkHostObject
)
int SetHostObject(
    [InAttribute] String^ pszTargetName, 
    [InAttribute] String^ pszTaskName, 
    [InAttribute] Object^ punkHostObject
)
function SetHostObject(
    pszTargetName : String, 
    pszTaskName : String, 
    punkHostObject : Object
) : int

Parameters

  • pszTargetName
    Type: System.String

    [in] Pointer to a string containing the name of the build target.

  • pszTaskName
    Type: System.String

    [in] Pointer to a string containing the name of the task for MSBuild to perform.

Return Value

Type: System.Int32

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

Remarks

COM Signature

From vsshell80.idl:

[C++]

HRESULT IVsProjectBuildSystem::SetHostObject(
   [in] LPCOLESTR pszTargetName, 
   [in] LPCOLESTR pszTaskName, 
   [in] IUnknown* punkHostObject
);

Permissions

See Also

Reference

IVsProjectBuildSystem Interface

IVsProjectBuildSystem Members

Microsoft.VisualStudio.Shell.Interop Namespace