设置二进制属性的值与指定的字节数组的。如果属性以前的数据类型不是 SettingsType_Binary,此方法将其复盖。如果属性不存在,则创建一个
命名空间: Microsoft.VisualStudio.Shell.Interop
程序集: Microsoft.VisualStudio.Shell.Interop.10.0(在 Microsoft.VisualStudio.Shell.Interop.10.0.dll 中)
Microsoft.VisualStudio.Shell.11.0(在 Microsoft.VisualStudio.Shell.11.0.dll 中)
语法
声明
Function SetBinary ( _
collectionPath As String, _
propertyName As String, _
byteLength As UInteger, _
pBytes As Byte() _
) As Integer
int SetBinary(
string collectionPath,
string propertyName,
uint byteLength,
byte[] pBytes
)
参数
- collectionPath
类型:System.String
[in] 集合的路径。
- propertyName
类型:System.String
[in] 属性的名称。
- byteLength
类型:System.UInt32
[in] 字节数写入的。
- pBytes
类型:array<System.Byte[]
[in] 写入的字节。
返回值
类型:System.Int32
,如果设置属性,返回 S_OK 。如果集合不存在,则方法返回 E_INVALIDARG。
备注
如果 byteLength 为 0,则 pBytes 可以为空,但是,它应否则指向字节指定的范围。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。