Group: Shell Lightweight Utility APIs -- Path Functions - Library: shlwapi
Concatenates two strings that represent properly formed paths into one path; also concatenates any relative path elements.
How to display Windows On-Screen Keyboard
LPTSTR PathCombine(
__out LPTSTR lpszDest,
__in_opt LPCTSTR lpszDir,
__in LPCTSTR lpszFile
); DECLARE INTEGER PathCombine IN shlwapi;
STRING @lpszDest,;
STRING lpszDir,;
STRING lpszFile lpszDest [out] Type: LPTSTR A pointer to a buffer with the null-terminated string to hold the combined path string.
lpszDir [in, optional] Type: LPCTSTR A pointer to a null-terminated string of maximum length MAX_PATH that contains the directory path. This value can be NULL.
lpszFile [in] Type: LPCTSTR A pointer to a null-terminated string of maximum length MAX_PATH that contains the file path. This value can be NULL.
Returns a pointer to a string with the concatenated path if successful, or NULL otherwise.
The directory path should be in the form of A:,B:, ..., Z:.
The file path should be in a correct form that represents the file part of the path. The file path must not be null, and if it ends with a backslash, the backslash will be maintained.
Home