Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns an environment property.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function GetProperty ( _
propid As Integer, _
<OutAttribute> ByRef pvar As Object _
) As Integer
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
Parameters
- propid
Type: System.Int32
[in] Identifier of the environment property. For more information, see __VSSPROPID.
- 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.
Remarks
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.