读取一个特性和值从流。
命名空间: Microsoft.VisualStudio.Shell.Interop
程序集: Microsoft.VisualStudio.Shell.Interop(在 Microsoft.VisualStudio.Shell.Interop.dll 中)
语法
声明
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
int Read(
uint cchPropertyName,
ushort[] szPropertyName,
out uint pcchPropertyNameActual,
VSPROPERTYSTREAMPROPERTYTYPE[] pvspspt,
out Object pvarValue,
IErrorLog pIErrorLog
)
参数
- cchPropertyName
类型:System.UInt32
[in] szPropertyName的长度。
- szPropertyName
类型:array<System.UInt16[]
[out] 包含属性名称的字符串。
- pcchPropertyNameActual
类型:System.UInt32%
[out] 属性名的长度。
- pvspspt
类型:array<Microsoft.VisualStudio.Shell.Interop.VSPROPERTYSTREAMPROPERTYTYPE[]
[out] 对一个值的指针从指示是否的 VSPROPERTYSTREAMPROPERTYTYPE 枚举是一个简单的或属性的流的 substream。
- pvarValue
类型:System.Object%
[out] 包含属性值的变量。
- pIErrorLog
类型:Microsoft.VisualStudio.OLE.Interop.IErrorLog
[in] 使用的 IErrorLog 接口为报告错误。
返回值
类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。
备注
COM 签名
从 vsshell.idl:
[C++]
HRESULT IVsPropertyFileIn::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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。