Compartir a través de


IVsWritableSettingsStore.SetBinary Method

Sets the value of a binary property with the specified byte array. If the previous data type of the property is not SettingsType_Binary, this method overwrites it. If the property does not exist, it creates one

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assemblies:   Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.0.dll)
  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
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
)
int SetBinary(
    [InAttribute] String^ collectionPath, 
    [InAttribute] String^ propertyName, 
    [InAttribute] unsigned int byteLength, 
    [InAttribute] array<unsigned char>^ pBytes
)
abstract SetBinary : 
        collectionPath:string * 
        propertyName:string * 
        byteLength:uint32 * 
        pBytes:byte[] -> int
function SetBinary(
    collectionPath : String, 
    propertyName : String, 
    byteLength : uint, 
    pBytes : byte[]
) : int

Parameters

  • collectionPath
    Type: String

    [in] The path to the collection.

  • propertyName
    Type: String

    [in] The name of the property.

  • byteLength
    Type: UInt32

    [in] The number of bytes to write.

  • pBytes
    Type: array<Byte[]

    [in] The array of bytes to write.

Return Value

Type: Int32
Returns S_OK if the property was set. If the collection does not exist, the method returns E_INVALIDARG.

Remarks

If byteLength is 0, then pBytes can be null, but otherwise it should point to a BYTE array of specified size.

.NET Framework Security

See Also

Reference

IVsWritableSettingsStore Interface

Microsoft.VisualStudio.Shell.Interop Namespace