21 static const tchar shellStr[] =
_T(
"SHLWAPI.DLL");
23 static const char DuplicateKeyStr[] =
"SHRegDuplicateHKey";
25 static const char DeleteEmptyKeyStr[] =
"SHDeleteEmptyKeyW";
26 static const char DeleteKeyStr[] =
"SHDeleteKeyW";
27 static const char DeleteValueStr[] =
"SHDeleteValueW";
28 static const char GetValueStr[] =
"SHGetValueW";
29 static const char SetValueStr[] =
"SHSetValueW";
30 static const char QueryValueExStr[] =
"SHQueryValueExW";
31 static const char EnumKeyExStr[] =
"SHEnumKeyExW";
32 static const char EnumValueStr[] =
"SHEnumValueW";
33 static const char QueryInfoKeyStr[] =
"SHQueryInfoKeyW";
34 static const char CopyKeyStr[] =
"SHCopyKeyW";
35 static const char RegGetPathStr[] =
"SHRegGetPathW";
36 static const char RegSetPathStr[] =
"SHRegSetPathW";
38 static const char DeleteEmptyKeyStr[] =
"SHDeleteEmptyKeyA";
39 static const char DeleteKeyStr[] =
"SHDeleteKeyA";
40 static const char DeleteValueStr[] =
"SHDeleteValueA";
41 static const char GetValueStr[] =
"SHGetValueA";
42 static const char SetValueStr[] =
"SHSetValueA";
43 static const char QueryValueExStr[] =
"SHQueryValueExA";
44 static const char EnumKeyExStr[] =
"SHEnumKeyExA";
45 static const char EnumValueStr[] =
"SHEnumValueA";
46 static const char QueryInfoKeyStr[] =
"SHQueryInfoKeyA";
47 static const char CopyKeyStr[] =
"SHCopyKeyA";
48 static const char RegGetPathStr[] =
"SHRegGetPathA";
49 static const char RegSetPathStr[] =
"SHRegSetPathA";
175 static const char AddBackslashStr[] =
"PathAddBackslashW";
176 static const char AddExtensionStr[] =
"PathAddExtensionW";
177 static const char AppendStr[] =
"PathAppendW";
178 static const char BuildRootStr[] =
"PathBuildRootW";
179 static const char CanonicalizeStr[] =
"PathCanonicalizeW";
180 static const char CombineStr[] =
"PathCombineW";
181 static const char CompactPathStr[] =
"PathCompactPathW";
182 static const char CompactPathExStr[] =
"PathCompactPathExW";
183 static const char CommonPrefixStr[] =
"PathCommonPrefixW";
184 static const char FileExistsStr[] =
"PathFileExistsW";
185 static const char FindExtensionStr[] =
"PathFindExtensionW";
186 static const char FindFileNameStr[] =
"PathFindFileNameW";
187 static const char FindNextComponentStr[] =
"PathFindNextComponentW";
188 static const char FindOnPathStr[] =
"PathFindOnPathW";
189 static const char GetArgsStr[] =
"PathGetArgsW";
190 static const char FindSuffixArrayStr[] =
"PathFindSuffixArrayW";
191 static const char IsLFNFileSpecStr[] =
"PathIsLFNFileSpecW";
192 static const char GetCharTypeStr[] =
"PathGetCharTypeW";
193 static const char GetDriveNumberStr[] =
"PathGetDriveNumberW";
194 static const char IsDirectoryStr[] =
"PathIsDirectoryW";
195 static const char IsDirectoryEmptyStr[] =
"PathIsDirectoryEmptyW";
196 static const char IsFileSpecStr[] =
"PathIsFileSpecW";
197 static const char IsPrefixStr[] =
"PathIsPrefixW";
198 static const char IsRelativeStr[] =
"PathIsRelativeW";
199 static const char IsRootStr[] =
"PathIsRootW";
200 static const char IsSameRootStr[] =
"PathIsSameRootW";
201 static const char IsUNCStr[] =
"PathIsUNCW";
202 static const char IsNetworkPathStr[] =
"PathIsNetworkPathW";
203 static const char IsUNCServerStr[] =
"PathIsUNCServerW";
204 static const char IsUNCServerShareStr[] =
"PathIsUNCServerShareW";
205 static const char IsContentTypeStr[] =
"PathIsContentTypeW";
206 static const char IsURLStr[] =
"PathIsURLW";
207 static const char MakePrettyStr[] =
"PathMakePrettyW";
208 static const char MatchSpecStr[] =
"PathMatchSpecW";
209 static const char ParseIconLocationStr[] =
"PathParseIconLocationW";
210 static const char QuoteSpacesStr[] =
"PathQuoteSpacesW";
211 static const char RelativePathToStr[] =
"PathRelativePathToW";
212 static const char RemoveArgsStr[] =
"PathRemoveArgsW";
213 static const char RemoveBackslashStr[] =
"PathRemoveBackslashW";
214 static const char RemoveBlanksStr[] =
"PathRemoveBlanksW";
215 static const char RemoveExtensionStr[] =
"PathRemoveExtensionW";
216 static const char RemoveFileSpecStr[] =
"PathRemoveFileSpecW";
217 static const char RenameExtensionStr[] =
"PathRenameExtensionW";
218 static const char SearchAndQualifyStr[] =
"PathSearchAndQualifyW";
219 static const char SetDlgItemPathStr[] =
"PathSetDlgItemPathW";
220 static const char SkipRootStr[] =
"PathSkipRootW";
221 static const char StripPathStr[] =
"PathStripPathW";
222 static const char StripToRootStr[] =
"PathStripToRootW";
223 static const char UnquoteSpacesStr[] =
"PathUnquoteSpacesW";
224 static const char MakeSystemFolderStr[] =
"PathMakeSystemFolderW";
225 static const char UnmakeSystemFolderStr[] =
"PathUnmakeSystemFolderW";
226 static const char IsSystemFolderStr[] =
"PathIsSystemFolderW";
227 static const char UndecorateStr[] =
"PathUndecorateW";
228 static const char UnExpandEnvStringsStr[] =
"PathUnExpandEnvStringsW";
229 static const char UnExpandEnvStringsForUserStr[] =
"PathUnExpandEnvStringsForUserW";
231 static const char AddBackslashStr[] =
"PathAddBackslashA";
232 static const char AddExtensionStr[] =
"PathAddExtensionA";
233 static const char AppendStr[] =
"PathAppendA";
234 static const char BuildRootStr[] =
"PathBuildRootA";
235 static const char CanonicalizeStr[] =
"PathCanonicalizeA";
236 static const char CombineStr[] =
"PathCombineA";
237 static const char CompactPathStr[] =
"PathCompactPathA";
238 static const char CompactPathExStr[] =
"PathCompactPathExA";
239 static const char CommonPrefixStr[] =
"PathCommonPrefixA";
240 static const char FileExistsStr[] =
"PathFileExistsA";
241 static const char FindExtensionStr[] =
"PathFindExtensionA";
242 static const char FindFileNameStr[] =
"PathFindFileNameA";
243 static const char FindNextComponentStr[] =
"PathFindNextComponentA";
244 static const char FindOnPathStr[] =
"PathFindOnPathA";
245 static const char GetArgsStr[] =
"PathGetArgsA";
246 static const char FindSuffixArrayStr[] =
"PathFindSuffixArrayA";
247 static const char IsLFNFileSpecStr[] =
"PathIsLFNFileSpecA";
248 static const char GetCharTypeStr[] =
"PathGetCharTypeA";
249 static const char GetDriveNumberStr[] =
"PathGetDriveNumberA";
250 static const char IsDirectoryStr[] =
"PathIsDirectoryA";
251 static const char IsDirectoryEmptyStr[] =
"PathIsDirectoryEmptyA";
252 static const char IsFileSpecStr[] =
"PathIsFileSpecA";
253 static const char IsPrefixStr[] =
"PathIsPrefixA";
254 static const char IsRelativeStr[] =
"PathIsRelativeA";
255 static const char IsRootStr[] =
"PathIsRootA";
256 static const char IsSameRootStr[] =
"PathIsSameRootA";
257 static const char IsUNCStr[] =
"PathIsUNCA";
258 static const char IsNetworkPathStr[] =
"PathIsNetworkPathA";
259 static const char IsUNCServerStr[] =
"PathIsUNCServerA";
260 static const char IsUNCServerShareStr[] =
"PathIsUNCServerShareA";
261 static const char IsContentTypeStr[] =
"PathIsContentTypeA";
262 static const char IsURLStr[] =
"PathIsURLA";
263 static const char MakePrettyStr[] =
"PathMakePrettyA";
264 static const char MatchSpecStr[] =
"PathMatchSpecA";
265 static const char ParseIconLocationStr[] =
"PathParseIconLocationA";
266 static const char QuoteSpacesStr[] =
"PathQuoteSpacesA";
267 static const char RelativePathToStr[] =
"PathRelativePathToA";
268 static const char RemoveArgsStr[] =
"PathRemoveArgsA";
269 static const char RemoveBackslashStr[] =
"PathRemoveBackslashA";
270 static const char RemoveBlanksStr[] =
"PathRemoveBlanksA";
271 static const char RemoveExtensionStr[] =
"PathRemoveExtensionA";
272 static const char RemoveFileSpecStr[] =
"PathRemoveFileSpecA";
273 static const char RenameExtensionStr[] =
"PathRenameExtensionA";
274 static const char SearchAndQualifyStr[] =
"PathSearchAndQualifyA";
275 static const char SetDlgItemPathStr[] =
"PathSetDlgItemPathA";
276 static const char SkipRootStr[] =
"PathSkipRootA";
277 static const char StripPathStr[] =
"PathStripPathA";
278 static const char StripToRootStr[] =
"PathStripToRootA";
279 static const char UnquoteSpacesStr[] =
"PathUnquoteSpacesA";
280 static const char MakeSystemFolderStr[] =
"PathMakeSystemFolderA";
281 static const char UnmakeSystemFolderStr[] =
"PathUnmakeSystemFolderA";
282 static const char IsSystemFolderStr[] =
"PathIsSystemFolderA";
283 static const char UndecorateStr[] =
"PathUndecorateA";
284 static const char UnExpandEnvStringsStr[] =
"PathUnExpandEnvStringsA";
285 static const char UnExpandEnvStringsForUserStr[] =
"PathUnExpandEnvStringsForUserA";
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
static BOOL UnExpandEnvStrings(LPCTSTR pszPath, TCHAR *pszBuf, UINT cchBuf)
Takes a fully qualified path, and replaces several folder names with their associated environment str...
static BOOL IsSystemFolder(LPCTSTR pszPath, DWORD dwAttrb)
Determines if an existing folder contains the attributes that make it a system folder.
static BOOL IsPrefix(LPCTSTR pszPrefix, LPCTSTR pszPath)
Searches a path to determine if it contains a valid prefix of the type passed by pszPrefix.
static void RemoveBlanks(TCHAR *pszPath)
Removes all leading and trailing spaces from a string.
static BOOL FindOnPath(TCHAR *pszPath, LPCTSTR *ppszOtherDirs)
Searches for a file.
static BOOL StripToRoot(TCHAR *pszPath)
Removes all parts of the path except for the root information.
static BOOL RelativePathTo(TCHAR *pszPath, LPCTSTR pszFrom, DWORD dwAttrFrom, LPCTSTR pszTo, DWORD dwAttrTo)
Creates a relative path from one file or folder to another.
static TCHAR * FindExtension(LPCTSTR pszPath)
Searches a path for an extension.
static BOOL IsLFNFileSpec(LPCTSTR lpName)
Determines whether or not a file name is in long format.
static BOOL IsNetworkPath(LPCTSTR pszPath)
Determines whether a path string represents a network resource.
static TCHAR * FindNextComponent(LPCTSTR pszPath)
Parses a path for the next path component.
static int ParseIconLocation(TCHAR *pszIconFile)
Parses a file location string containing a file location and icon index, and returns separate values.
static void SetDlgItemPath(HWND hDlg, int id, LPCTSTR pszPath)
Sets the text of a child control in a window or dialog box, using PathCompactPath to make sure the pa...
static BOOL MatchSpec(LPCTSTR pszFile, LPCTSTR pszSpec)
Searches a string using a DOS wild card match type.
static BOOL IsUNCServer(LPCTSTR pszPath)
Determines if a string is a valid UNC (universal naming convention) for a server path only.
static void RemoveArgs(TCHAR *pszPath)
Removes any arguments from a given path.
static BOOL AddExtension(TCHAR *pszPath, LPCTSTR pszExt)
Adds a file extension to a path string.
static void RemoveExtension(TCHAR *pszPath)
Removes the file extension from a path, if there is one.
static BOOL UnExpandEnvStringsForUser(HANDLE hToken, LPCTSTR pszPath, TCHAR *pszBuf, UINT cchBuf)
static int GetDriveNumber(LPCTSTR pszPath)
Searches a path for a drive letter within the range of 'A' to 'Z' and returns the corresponding drive...
static void QuoteSpaces(TCHAR *lpsz)
Searches a path for spaces.
static int CommonPrefix(LPCTSTR pszFile1, LPCTSTR pszFile2, TCHAR *achPath)
Compares two paths to determine if they share a common prefix.
static void UnquoteSpaces(TCHAR *lpsz)
Removes quotes from the beginning and end of a path.
static TModule & GetModule()
static void Undecorate(TCHAR *pszPath)
Removes the decoration from a path string.
static TCHAR * SkipRoot(LPCTSTR pszPath)
Parses a path, ignoring the drive letter or UNC server/share path parts.
static TCHAR * BuildRoot(TCHAR *pszRoot, int iDrive)
Creates a root path from a given drive number.
static BOOL MakePretty(TCHAR *pszPath)
Converts a path to all lowercase characters to give the path a consistent appearance.
static BOOL Append(TCHAR *pszPath, LPCTSTR pMore)
Appends one path to the end of another.
static BOOL IsDirectoryEmpty(LPCTSTR pszPath)
Determines whether or not a specified path is an empty directory.
static void StripPath(TCHAR *pszPath)
Removes the path portion of a fully qualified path and file.
static TCHAR * AddBackslash(TCHAR *pszPath)
Adds a backslash to the end of a string to create the correct syntax for a path.
static BOOL IsRoot(LPCTSTR pszPath)
Parses a path to determine if it is a directory root.
static BOOL IsContentType(LPCTSTR pszPath, LPCTSTR pszContentType)
Determines if a file's registered content type matches the specified content type.
static BOOL IsRelative(LPCTSTR pszPath)
Searches a path and determines if it is relative.
static BOOL RemoveFileSpec(TCHAR *pszPath)
Removes the trailing file name and backslash from a path, if it has them.
static BOOL IsFileSpec(LPCTSTR pszPath)
Searches a path for any path delimiting characters (for example, ':' or '\' ).
static TCHAR * GetArgs(LPCTSTR pszPath)
Finds the command line arguments within a given path.
static BOOL Canonicalize(TCHAR *pszBuf, LPCTSTR pszPath)
Canonicalizes a path.
static BOOL CompactPath(HDC hDC, TCHAR *pszPath, UINT dx)
Truncates a file path to fit within a given pixel width by replacing path components with ellipses.
static BOOL IsURL(LPCTSTR pszPath)
Tests a given string to determine if it conforms to a valid URL format.
static BOOL IsUNCServerShare(LPCTSTR pszPath)
Determines if a string is a valid universal naming convention (UNC) share path, \\server\share.
static BOOL IsUNC(LPCTSTR pszPath)
Determines if the string is a valid UNC (universal naming convention) for a server and share path.
static UINT GetCharType(tchar ch)
Determines the type of character with respect to a path.
static BOOL IsDirectory(LPCTSTR pszPath)
Verifies that a path is a valid directory.
static LPCTSTR FindSuffixArray(LPCTSTR pszPath, const LPCTSTR *apszSuffix, int iArraySize)
Determines if a given file name has one of a list of suffixes.
static TCHAR * FindFileName(LPCTSTR pszPath)
Searches a path for a file name.
static BOOL UnmakeSystemFolder(LPCTSTR pszPath)
Removes the attributes from a folder that make it a system folder.
static BOOL FileExists(LPCTSTR pszPath)
Determines whether a path to a file system object such as a file or directory is valid.
static TCHAR * Combine(TCHAR *pszDest, LPCTSTR pszDir, LPCTSTR pszFile)
Concatenates two strings that represent properly formed paths into one path, as well as any relative ...
static BOOL MakeSystemFolder(LPCTSTR pszPath)
Gives an existing folder the proper attributes to become a system folder.
static TCHAR * RemoveBackslash(TCHAR *pszPath)
Removes the trailing backslash from a given path.
static BOOL SearchAndQualify(LPCTSTR pszPath, TCHAR *pszBuf, UINT cchBuf)
Determines if a given path is correctly formatted and fully qualified.
static BOOL RenameExtension(TCHAR *pszPath, LPCTSTR pszExt)
Replaces the extension of a file name with a new extension.
static BOOL IsSameRoot(LPCTSTR pszPath1, LPCTSTR pszPath2)
Compares two paths to determine if they have a common root component.
static BOOL CompactPathEx(TCHAR *pszOut, LPCTSTR pszSrc, UINT cchMax, DWORD dwFlags)
static DWORD DeleteKey(HKEY hkey, LPCTSTR pszSubKey)
DeleteKey mimics RegDeleteKey as it behaves on Win95 - deletes a subkey and all its values and descen...
static LONG QueryInfoKey(HKEY hkey, LPDWORD pcSubKeys, LPDWORD pcchMaxSubKeyLen, LPDWORD pcValues, LPDWORD pcchMaxValueNameLen)
Retrieves information about a specified registry key.
static DWORD SetValue(HKEY hkey, LPCTSTR pszSubKey, LPCTSTR pszValue, DWORD dwType, LPCVOID pvData, DWORD cbData)
static DWORD CopyKey(HKEY hkeySrc, LPCTSTR szSrcSubKey, HKEY hkeyDest, DWORD fReserved)
Recursively copies the subkeys and values of the source subkey to the destination key.
static DWORD QueryValueEx(HKEY hkey, LPCTSTR pszValue, LPDWORD pdwReserved, LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData)
This functions work just like RegQueryValueEx, except if the data type is REG_EXPAND_SZ,...
static DWORD DeleteEmptyKey(HKEY hkey, LPCTSTR pszSubKey)
DeleteEmptyKey mimics RegDeleteKey as it behaves on NT - delete the subkey only if it does not contai...
static HKEY DuplicateKey(HKEY hkey)
Duplicates a registry key's HKEY handle.
static DWORD DeleteValue(HKEY hkey, LPCTSTR pszSubKey, LPCTSTR pszValue)
These functions open the key, get/set/delete the value, then close the key.
static LONG EnumKeyEx(HKEY hkey, DWORD dwIndex, TCHAR *pszName, LPDWORD pcchName)
Enumerates the subkeys of the specified open registry key.
static DWORD GetValue(HKEY hkey, LPCTSTR pszSubKey, LPCTSTR pszValue, LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData)
static LONG EnumValue(HKEY hkey, DWORD dwIndex, TCHAR *pszValueName, LPDWORD pcchValueName, LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData)
Enumerates the values of the specified open registry key.
static DWORD RegGetPath(HKEY hkey, LPCTSTR pcszSubKey, LPCTSTR pcszValue, TCHAR *pszPath, DWORD dwFlags)
Retrieves a file path from the registry, expanding environment variables as needed.
static TModule & GetModule()
static DWORD RegSetPath(HKEY hkey, LPCTSTR pcszSubKey, LPCTSTR pcszValue, LPCTSTR pcszPath, DWORD dwFlags)
Takes a file path, replaces folder names with environment strings, and places the resulting string in...
Definition of class TModule.
Object Windows Library (OWLNext Core)
General definitions used by all ObjectWindows programs.
Definitions of Windows light-weight utility APIs: TSHReg, TSHPath.