共用方式為


IVsProjectBuildSystem.SetHostObject(String, String, Object) Method

Definition

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

public:
 int SetHostObject(System::String ^ pszTargetName, System::String ^ pszTaskName, System::Object ^ punkHostObject);
public:
 int SetHostObject(Platform::String ^ pszTargetName, Platform::String ^ pszTaskName, Platform::Object ^ punkHostObject);
int SetHostObject(std::wstring const & pszTargetName, std::wstring const & pszTaskName, winrt::Windows::Foundation::IInspectable const & punkHostObject);
public int SetHostObject (string pszTargetName, string pszTaskName, object punkHostObject);
abstract member SetHostObject : string * string * obj -> int
Public Function SetHostObject (pszTargetName As String, pszTaskName As String, punkHostObject As Object) As Integer

Parameters

pszTargetName
String

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

pszTaskName
String

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

punkHostObject
Object

[in] Pointer to the Microsoft.VisualStudio.IUnknown interface of the host object.

Returns

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  
);  

Applies to