BinaryResourceEncoder: Encode

Encode

Stores a byte array to be written out to a resource (.RES) file.



 Public Function Encode(
	  ByRef Value As Variant,
	  ByRef ResourceName As Variant,
	  Optional ByRef ResourceType As Variant,
	  Optional ByRef LanguageID As Variant ) As Boolean

Parameters

Value
[ByRef] Variant. The byte array to be written to the .RES file.
ResourceName
[ByRef] Variant. The name or ID of the resource.
ResourceType
[ByRef] Optional. Variant. The type of value being encoded.
LanguageID
[ByRef] Optional. Variant. The LocaleID the bitmap is associated with.

Return Values

Boolean -  Returns True if the encoder was able to encode the value, False otherwise.

Remarks

Any value can be passed in. No exception is thrown. If the value is not a Byte array then the function returns False.

The ResourceName and ResourceType must be a String or a Numeric value.

The LanguageID can be a CultureInfo object, a culture name, or an LCID. If the LanguageID is not supplied, then the current culture is used.

Null arrays are not encoded. False will be returned.

See Also

Project CorLib Overview

Class BinaryResourceEncoder Overview