dos12.hlp (Table of Contents; Topic list)
DosEditName (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DOSFILEMGR
 
USHORT DosEditName(usEditLevel, pszSrc, pszEdit, pszDst, cbDst);
USHORT usEditLevel;    /* edit level                */
PSZ pszSrc;            /* pointer to source string  */
PSZ pszEdit;           /* pointer to editing string */
PBYTE pszDst;          /* pointer to target buffer  */
USHORT cbDst;          /* length of target buffer   */
 
The DosEditName function copies a source string to a revised destination
string by using an editing string and rules for converting wildcard
characters.
 
Parameter    Description
────────────────────────────────────────────────────────────────────────────
 
usEditLevel  Specifies the version of editing semantics to use in changing
             the copy of the source string. (Editing semantics are the rules
             used by the system to convert wildcard characters.) For MS
             OS/2, version 1.2, this parameter must be 0x0001.
 
pszSrc       Points to the null-terminated string to copy. The string should
             contain only the component of the path to be edited, not the
             entire path.
 
pszEdit      Points to the null-terminated string to use for editing.
 
pszDst       Points to the buffer that contains the new string.
 
cbDst        Specifies the length (in bytes) of the buffer pointed to by the
             pszDst parameter.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be one of the following:
 
     ERROR_INVALID_NAME
     ERROR_INVALID_PARAMETER
 
Comments
 
For MS OS/2 version 1.2, the destination string is always converted to
uppercase.
 
The DosEditName function is typically used in copy and rename/move
operations.
 
Example
 
This example takes the source name abc.txt and an editing string of *.doc
and calls DosEditName to produce the string ABC.DOC:
 
CHAR szDst[14];
 
DosEditName(1, "abc.txt", "*.doc", szDst, sizeof (szDst));
 
                                      ♦