Freigeben über


IVsWritableSettingsStore.SetBinary(String, String, UInt32, Byte[]) Method

Definition

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

public:
 int SetBinary(System::String ^ collectionPath, System::String ^ propertyName, System::UInt32 byteLength, cli::array <System::Byte> ^ pBytes);
public:
 int SetBinary(Platform::String ^ collectionPath, Platform::String ^ propertyName, unsigned int byteLength, Platform::Array <byte> ^ pBytes);
int SetBinary(std::wstring const & collectionPath, std::wstring const & propertyName, unsigned int byteLength, std::Array <byte> const & pBytes);
public int SetBinary (string collectionPath, string propertyName, uint byteLength, byte[] pBytes);
abstract member SetBinary : string * string * uint32 * byte[] -> int
Public Function SetBinary (collectionPath As String, propertyName As String, byteLength As UInteger, pBytes As Byte()) As Integer

Parameters

collectionPath
String

[in] The path to the collection.

propertyName
String

[in] The name of the property.

byteLength
UInt32

[in] The number of bytes to write.

pBytes
Byte[]

[in] The array of bytes to write.

Returns

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

Remarks

This method is safe to access from any thread.

Applies to