|
BOOL WINAPI DecodeFile( |
|
LPCTSTR lpszInputFile, |
|
|
LPCTSTR lpszOutputFile, |
|
|
DWORD dwOptions, |
|
|
DWORD dwReserved |
|
); |
The DecodeFile function opens and decodes an encoded file,
storing the contents in the specified file.
Parameters
- lpszInputFile
- A pointer to a string which specifies the name
of the file to be decoded. The file must exist, and it must be a
regular file that can be opened for reading by the current process.
An error will be returned if a character device, such as CON: is
specified as the file name.
- lpszOutputFile
- The name of the file that is to contain the decoded file data.
If the file exists, it must be a regular file that can be opened
for writing by the current process and will be overwritten. If the
file does not exist, it will be created. An error will be returned
if a character device, such as CON: is specified as the file
name.
- dwOptions
- An unsigned integer that specifies one or more options. This
parameter is constructed by using a bitwise operator with any of
the following values:
Value |
Description |
FILE_DECODE_BASE64 |
Use the base64 algorithm for decoding the file. This is the
encoding method that is used by most modern email client
software. Note that this option cannot be combined with other
decoding methods. |
FILE_DECODE_QUOTED |
Use the quoted-printable algorithm for decoding the file.
Note that this option cannot be combined with the other
decoding methods. |
FILE_DECODE_UUCODE |
Use the uudecode algorithm for decoding the file. This is a
common encoding method used in UNIX systems and older email
client software. Note that this option cannot be combined with
other decoding methods. |
FILE_DECODE_YENCODE |
Use the yEnc algorithm for decoding the file. Note that
this option cannot be combined with other decoding
methods. |
FILE_DECODE_COMPRESSED |
The file was compressed prior to being encoded, and should
be expanded after the decoding has completed successfully. This
option should only be used if it was specified when the file
was encoded. |
- dwReserved
- This parameter is reserved and should always be set to
zero.
Return Value
A non-zero value is returned if the file was successfully decoded.
A zero value indicates that the file does not exist, the encoded file
was damaged or the output file could not be created.
Remarks
The DecodeFile function decodes files that were previously
encoded through a call to the EncodeFile function or by a
third-party application such as an email client. The option to
expand a previously compressed file requires that the function be
able to create a temporary file on the local system in the directory
specified by the TEMP environment variable. This function can only
expand a file that was previously compressed with the
EncodeFile or CompressFile functions.
Requirements
Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools11.h
Import Library: csncdv11.lib
Unicode: Implemented as Unicode and ANSI versions
See Also
CompressFile,
EncodeFile,
ExpandFile,
GetMessageDigest
|
|