GetFormatName

Far Manager

GetFormatName

Get archive format name.
BOOL WINAPI GetFormatName(
  int Type,
  char *FormatName,
  char *DefaultExt
);

Parameters

Type
archive type
FormatName
format name; it's used for saving parameters in the registry and for selecting the desired archive format.
DefaultExt
default file extension for the format (without '.'); used for accelerating format recognition.

Return value

TRUE in case of success. FALSE when the specified archive type is not supported.

Example

An example getting ZIP-file format name (ZIP.CPP)

BOOL WINAPI _export GetFormatName(int Type,char *FormatName,char *DefaultExt)
{
  if (Type==0)
  {
    strcpy(FormatName,"ZIP");
    strcpy(DefaultExt,"zip");
    return(TRUE);
  }
  return(FALSE);
}
See also: