共用方式為


IVsEditorFactory.SetSite(IServiceProvider) Method

Definition

Initializes an editor in the environment.

public:
 int SetSite(Microsoft::VisualStudio::OLE::Interop::IServiceProvider ^ psp);
public:
 int SetSite(Microsoft::VisualStudio::OLE::Interop::IServiceProvider ^ psp);
int SetSite(Microsoft::VisualStudio::OLE::Interop::IServiceProvider const & psp);
public int SetSite (Microsoft.VisualStudio.OLE.Interop.IServiceProvider psp);
abstract member SetSite : Microsoft.VisualStudio.OLE.Interop.IServiceProvider -> int
Public Function SetSite (psp As IServiceProvider) As Integer

Parameters

psp
IServiceProvider

[in] Pointer to the IServiceProvider interface which can be used by the factory to obtain other interfaces.

Returns

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsEditorFactory::SetSite(  
   [in] IServiceProvider *pSP  
);  

Applies to