e-CryptIt Engine Xojo Plugin

BinHex.Encode Method (console safe)

To start to encode a file.
To encode a file you need to create a new class and subclass of the BinHex class so you can receive the class events. When data parts are ready to be written to a file or to a socket then the OnHqxEncode event is fired. That's where you should write the data to a file or handle it in any desired way.
It is wise to open the file output stream before you call the encode function, and to close it after it.

Encode(
   f as FolderItem,
   writeTo as IStreamWriter) as Integer

Parameters

f
The file to encode.
writeTo
Use this parameter to specify a custom stream representing the BinHex'ed data to write to. This parameter can take any object that Implements the IStreamWriter Interface.

Returns

Integer

Remarks

Returns an error code, zero for no error.
-43 Invalid folderitem
-44 Internal error
-100 Decoding was aborted

See Also

BinHex Class