IsCustomFilenameTemplateValid

 

#include “BlackIceDEVMODE.h”

 

int       IsCustomFilenameTemplateValid (BlackIceDEVMODE* pDevMode, LPCWSTR pszFilenameTemplate);

Description

This function checks the validation of the template string.

Parameters

BlackIceDEVMODE* pDevMode               - pointer to the BlackIceDEVMODE structure.

LPCWSTR pszFilenameTemplate            - template string to check

Return value

If the template is valid the return value is zero. Otherwise the return value is the error code.

 

Available error codes:

 

FNG_NO_ERROR (0): No error

FNG_ERROR_TEMPLATE_IS_TOO_LONG (120): Filename template length is longer than maximum filename length.

FNG_ERROR_TEMPLATE_IS_TOO_SHORT   (121): Filename template length is too short for a valid filename template.

FNG_ERROR_TOO_MANY_SEPARATORS (122): Filename template contains too many separator characters ('<<', '>>').

FNG_ERROR_TOO_FEW_SEPARATORS (123): Filename template contains too few separator characters ('<<', '>>').

FNG_ERROR_TOO_FEW_SEPARATORS_PREVIOUS_DOT (124): Filename template contains too many separator characters before extension ('<<', '>>').

FNG_ERROR_TOO_MANY_SEPARATORS_PREVIOUS_DOT (125): Filename template contains too few separator characters before extension ('<<', '>>').

FNG_ERROR_INVALID_SEPARATORS_USING (126): Invalid separator using in Filename template.

FNG_ERROR_MISSING_DOT_OF_EXTENSION (127): Filename template does not contain dot before extension.

FNG_ERROR_TOO_LONG_EXTENSION (128): Extension of Filename template is longer than maximum extension length (4).

FNG_ERROR_FORBIDDEN_CHAR_IN_EXTENSION (129): Extension of Filename template contains forbidden character(s). ('\', '/', ':', '*', '?', '"', '<', '>', '|', '.')

FNG_ERROR_EXTENSION_CONTAINS_DOT (130): Extension of Filename template contains dot character.

FNG_ERROR_TOO_LONG_PREFIX (131): Prefix of Filename template is longer than the maximum prefix length (4).

FNG_ERROR_FORBIDDEN_CHAR_IN_PREFIX (132): Prefix of Filename template contains forbidden character(s). ('\', '/', ':', '*', '?', '"', '<', '>', '|',)

FNG_ERROR_EMPTY_OPTIONALFIELD1 (133): Tag of First Optional field of Filename template is empty.

FNG_ERROR_INVALID_OPTIONALFIELD1 (134): Tag of First Optional field of Filename template is invalid.

FNG_ERROR_EMPTY_OPTIONALFIELD2 (135): Tag of Second Optional field of Filename template is empty.

FNG_ERROR_INVALID_OPTIONALFIELD2 (136): Tag of Second Optional field of Filename template is invalid.

FNG_ERROR_TOO_LONG_CUSTOMFIELD (137): Custom field of Filename template is longer than maximum custom field length (64).

FNG_ERROR_FORBIDDEN_CHAR_IN_CUSTOMFIELD      (138): Custom field of Filename template contains forbidden character(s). ('\', '/', ':', '*', '?', '"', '<', '>', '|',)

FNG_ERROR_EMPTY_FILENAME_TEMPLATE (139): Filename template is empty.

FNG_ERROR_START_WITH_WHITE_SPACE (140): Fist character of Filename template is white space.

 

Programming Notes

For the format of the template string please see the description of the SetCustomFilenameTemplate function.

Code Example

None