Bagikan melalui


IVsShell.SetProperty Method

Sets an environment property.

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

Syntax

'Declaration
Function SetProperty ( _
    propid As Integer, _
    var As Object _
) As Integer
int SetProperty(
    int propid,
    Object var
)
int SetProperty(
    [InAttribute] int propid, 
    [InAttribute] Object^ var
)
abstract SetProperty : 
        propid:int * 
        var:Object -> int 
function SetProperty(
    propid : int, 
    var : Object
) : int

Parameters

  • var
    Type: System.Object
    [in] VARIANT structure that contains information on how to set the property identified by propid.

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 vsshell.idl:

HRESULT IVsShell::SetProperty(
   [in] VSSPROPID propid,
   [in] VARIANT var
);

The VARIANT values that are passed in can be different between property types. Click on the __VSSPROPID enumeration link (above) for a description of how to set up the VARIANT structure for different property values.

.NET Framework Security

See Also

Reference

IVsShell Interface

Microsoft.VisualStudio.Shell.Interop Namespace