|
Summary
Encode a file using BinHex format.
Syntax
| Boolean BinHexEncode (Src, Dest) |
Description
BinHex 4.0 is a popular means of encoding Macintosh files for transmission via Internet
mail. Files on the Macintosh consists of two parts, data fork and resource fork.
To encode a file using BinHex format set the Src parameter to the source path
and filename, if there is a resource fork then the BinHexResource property must contain
the full path of the resource file or else it should be set to NULL. The Dest
parameter must be set to the destination path and filename. BinHex encoding needs some
more information about the data file, therefore the application must set the BinHexType,
BinHexCreator, BinHexFlag and FileName properties before calling the BinHexEncode method.
If an error occurs, then the OnError event will be fired. The application may want to
display an error message in the OnError event to inform the user of the error. Please
check the reference page of the OnError event for a complete listing of error codes.
Calling this method is equivalent to setting the Action property to
ACTION_BINHEX_ENCODE.
Return Value
The BinHexEncode method returns True if successful; otherwise it will return False. The
application should check the return value to determine if the action was successful.
Example
Mime.BinHexCreator = "ttxt"
Mime.BinHexType = "text"
Mime.FileName = "tmp1.txt"
Mime.BinHexResource = ""
Mime.BinHexFlag = 0
Result = Mime.BinHexEncode ("c:\tmp1.txt",
"c:\tmp1.001")
If Result = True Then
MsgBox "Encoded successfully", 64, "Sample Program"
Exit Sub
End If
|