共用方式為


IVsPropertyStreamIn.Read Method

Reads a property and value from the stream.

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

Syntax

'宣告
Function Read ( _
    cchPropertyName As UInteger, _
    <OutAttribute> szPropertyName As UShort(), _
    <OutAttribute> ByRef pcchPropertyNameActual As UInteger, _
    <OutAttribute> pvspspt As VSPROPERTYSTREAMPROPERTYTYPE(), _
    <OutAttribute> ByRef pvarValue As Object, _
    pIErrorLog As IErrorLog _
) As Integer
'用途
Dim instance As IVsPropertyStreamIn
Dim cchPropertyName As UInteger
Dim szPropertyName As UShort()
Dim pcchPropertyNameActual As UInteger
Dim pvspspt As VSPROPERTYSTREAMPROPERTYTYPE()
Dim pvarValue As Object
Dim pIErrorLog As IErrorLog
Dim returnValue As Integer

returnValue = instance.Read(cchPropertyName, _
    szPropertyName, pcchPropertyNameActual, _
    pvspspt, pvarValue, pIErrorLog)
int Read(
    uint cchPropertyName,
    ushort[] szPropertyName,
    out uint pcchPropertyNameActual,
    VSPROPERTYSTREAMPROPERTYTYPE[] pvspspt,
    out Object pvarValue,
    IErrorLog pIErrorLog
)
int Read(
    [InAttribute] unsigned int cchPropertyName, 
    [OutAttribute] array<unsigned short>^ szPropertyName, 
    [OutAttribute] unsigned int% pcchPropertyNameActual, 
    [OutAttribute] array<VSPROPERTYSTREAMPROPERTYTYPE>^ pvspspt, 
    [OutAttribute] Object^% pvarValue, 
    [InAttribute] IErrorLog^ pIErrorLog
)
abstract Read : 
        cchPropertyName:uint32 * 
        szPropertyName:uint16[] byref * 
        pcchPropertyNameActual:uint32 byref * 
        pvspspt:VSPROPERTYSTREAMPROPERTYTYPE[] byref * 
        pvarValue:Object byref * 
        pIErrorLog:IErrorLog -> int 
function Read(
    cchPropertyName : uint, 
    szPropertyName : ushort[], 
    pcchPropertyNameActual : uint, 
    pvspspt : VSPROPERTYSTREAMPROPERTYTYPE[], 
    pvarValue : Object, 
    pIErrorLog : IErrorLog
) : int

Parameters

  • cchPropertyName
    Type: System.UInt32
    [in] Length of szPropertyName.
  • szPropertyName
    Type: array<System.UInt16[]
    [out] String containing the property name.
  • pcchPropertyNameActual
    Type: System.UInt32%
    [out] Length of property name.
  • pvarValue
    Type: System.Object%
    [out] A VARIANT containing the property value.

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:

[C++]

HRESULT IVsPropertyStreamIn::Read(
   [in] ULONG cchPropertyName, 
   [in, out, size_is(cchPropertyName)] OLECHAR szPropertyName[], 
   [out] ULONG *pcchPropertyNameActual, 
   [out] VSPROPERTYSTREAMPROPERTYTYPE *pvspspt, 
   [out] VARIANT *pvarValue, [in] IErrorLog *pIErrorLog
);

.NET Framework Security

See Also

Reference

IVsPropertyStreamIn Interface

IVsPropertyStreamIn Members

Microsoft.VisualStudio.Shell.Interop Namespace