Xceed Binary Encoding Library Documentation
ProcessFile method
Xceed Binary Encoding control reference > Methods > ProcessFile method

Description

The ProcessFile method can encode or decode data from one file to another.

Parameters
 

Parameter Description
sSourceFilename  The path and filename of the source file to encode or decode.
lSourceOffset  The starting offset in the source file to begin processing data from. Specify 0 to begin processing data from the beginning of the file.
lSourceSize  The amount of data to process. Specify 0 to process data from the starting offset until the end of the file.
eAction  The type of processing that should be performed. Specify bfpEncode to encode the data. Specify bfpDecode to encode the data.
sDestFilename  The path and filename of the file to write the encoded or decoded data to. If the file does not already exist, it will be created and written to. If the file already exists, the library can either clear the file and write to it as a new file, or it can append the processed data to the end of the destination file.

When decoding a UUEncoded, XXEncoded or BinHexed file (or data) and the IncludeHeaderFooter property is set to True, you do not need to specify a filename in this parameter. You can specify only a path. In this case, the header information in the UUEncoded, XXEncoded or BinHexed data stream or file will provide the filename. Make sure the path you specify in this parameter ends with a "\".
bAppend  Determines the behavior of the library when the destination file already exists. Specify True to append to an existing file, or False to clear the file and write processed data to it as a new file.
vaBytesRead  You must provide a variable in this parameter. Right before the ProcessFile method completes and returns, the library will write to the variable the amount of bytes read and processed from the source file.

Return value

Returns a long integer indicating the amount of bytes written to the destination file..

Associated properties

The EncodingFormat property allows you to specify which encoding format to use when encoding or decoding data.

Remarks

When calling the ProcessFile method with the bEndOfData parameter specified as False, you cannot call any other Xceed Binary Encoding control method (of the same instance of the control) until you have completed processing a stream of data by calling the ProcessFile method with the bEndOfData parameter specified as True.

Declaration (DXceedBinaryEncoding) Copy Code
HRESULT ProcessFile
(
  [in] BSTR sSourceFilename,
  [in] long lSourceOffset,
  [in] long lSourceSize,
  [in] EXBFileProcessing eAction,
  [in] VARIANT_BOOL bEndOfData,
  [in] BSTR sDestFilename,
  [in] VARIANT_BOOL bAppend,
  [out] VARIANT* vaBytesRead,
  [out, retval] long* plWritten
)
Declaration (IXceedBinaryEncoding) Copy Code

HRESULT ProcessFile
(
  [in] BSTR sSourceFilename,
  [in] DWORD dwSourceOffset,
  [in] DWORD dwSourceSize,
  [in] EXBFileProcessing eAction,
  [in] BOOL bEndOfData,
  [in] BSTR sDestFilename,
  [in] BOOL bAppend,
  [out] DWORD* pdwBytesRead,
  [out, retval] DWORD* pdwWritten
)