IVsShell.GetProperty Method

Returns an environment property.

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


Function GetProperty ( _
    propid As Integer, _
    <OutAttribute> ByRef pvar As Object _
) As Integer
‘사용 방법
Dim instance As IVsShell
Dim propid As Integer
Dim pvar As Object
Dim returnValue As Integer

returnValue = instance.GetProperty(propid, _
int GetProperty(
    int propid,
    out Object pvar
int GetProperty(
    [InAttribute] int propid, 
    [OutAttribute] Object^% pvar
abstract GetProperty : 
        propid:int * 
        pvar:Object byref -> int 
function GetProperty(
    propid : int, 
    pvar : Object
) : int


  • pvar
    Type: System.Object%
    [out] Pointer to a VARIANT structure containing the value of the specified property.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.


COM Signature

From vsshell.idl:

HRESULT IVsShell::GetProperty(
   [in] VSSPROPID propid,
   [out] VARIANT *pvar

Each __VSSPROPID must return a VARIANT structure that contains the proper VT_ type. The caller can assume the VT_ is correct; that is, it is not required to call VariantChangeType or verify the type (beyond an ASSERT to be sure there were not header-file mismatches). This logic also applies to the caller when setting a property; the hierarchy will assume the caller has passed a VARIANT already converted to the proper VT_ type.

For more information, see IDispatch.

.NET Framework Security

See Also


IVsShell Interface

IVsShell Members

Microsoft.VisualStudio.Shell.Interop Namespace