11#if !defined(OWL_SHELWAPI_H)
15#if defined(BI_HAS_PRAGMA_ONCE)
19#if !defined(_INC_SHLWAPI)
44 static DWORD
DeleteKey(HKEY hkey, LPCTSTR pszSubKey);
51 static DWORD
DeleteValue(HKEY hkey, LPCTSTR pszSubKey, LPCTSTR pszValue);
52 static DWORD
GetValue(HKEY hkey, LPCTSTR pszSubKey, LPCTSTR pszValue, LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData);
53 static DWORD
SetValue(HKEY hkey, LPCTSTR pszSubKey, LPCTSTR pszValue, DWORD dwType, LPCVOID pvData, DWORD cbData);
60 static DWORD
QueryValueEx(HKEY hkey, LPCTSTR pszValue, LPDWORD pdwReserved, LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData);
64 static LONG
EnumKeyEx(HKEY hkey, DWORD dwIndex, LPTSTR pszName, LPDWORD pcchName);
67 static LONG
EnumValue(HKEY hkey, DWORD dwIndex, LPTSTR pszValueName, LPDWORD pcchValueName, LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData);
70 static LONG
QueryInfoKey(HKEY hkey, LPDWORD pcSubKeys, LPDWORD pcchMaxSubKeyLen, LPDWORD pcValues, LPDWORD pcchMaxValueNameLen);
73 static DWORD
CopyKey(HKEY hkeySrc, LPCTSTR szSrcSubKey, HKEY hkeyDest, DWORD fReserved);
76 static DWORD
RegGetPath(HKEY hkey, LPCTSTR pcszSubKey, LPCTSTR pcszValue, LPTSTR pszPath, DWORD dwFlags);
79 static DWORD
RegSetPath(HKEY hkey, LPCTSTR pcszSubKey, LPCTSTR pcszValue, LPCTSTR pcszPath, DWORD dwFlags);
100 static BOOL
AddExtension(LPTSTR pszPath, LPCTSTR pszExt);
103 static BOOL
Append(LPTSTR pszPath, LPCTSTR pMore);
106 static LPTSTR
BuildRoot(LPTSTR pszRoot,
int iDrive);
109 static BOOL
Canonicalize(LPTSTR pszBuf, LPCTSTR pszPath);
113 static LPTSTR
Combine(LPTSTR pszDest, LPCTSTR pszDir, LPCTSTR pszFile);
117 static BOOL
CompactPath(HDC hDC, LPTSTR pszPath, UINT dx);
118 static BOOL
CompactPathEx(LPTSTR pszOut, LPCTSTR pszSrc, UINT cchMax, DWORD dwFlags);
122 static int CommonPrefix(LPCTSTR pszFile1, LPCTSTR pszFile2, LPTSTR achPath);
138 static BOOL
FindOnPath(LPTSTR pszPath, LPCTSTR * ppszOtherDirs);
141 static LPTSTR
GetArgs(LPCTSTR pszPath);
144 static LPCTSTR
FindSuffixArray(LPCTSTR pszPath,
const LPCTSTR *apszSuffix,
int iArraySize);
170 static BOOL
IsPrefix(LPCTSTR pszPrefix, LPCTSTR pszPath);
176 static BOOL
IsRoot(LPCTSTR pszPath);
179 static BOOL
IsSameRoot(LPCTSTR pszPath1, LPCTSTR pszPath2);
183 static BOOL
IsUNC(LPCTSTR pszPath);
201 static BOOL
IsContentType(LPCTSTR pszPath, LPCTSTR pszContentType);
204 static BOOL
IsURL(LPCTSTR pszPath);
211 static BOOL
MatchSpec(LPCTSTR pszFile, LPCTSTR pszSpec);
222 static BOOL
RelativePathTo(LPTSTR pszPath, LPCTSTR pszFrom, DWORD dwAttrFrom, LPCTSTR pszTo, DWORD dwAttrTo);
252 static LPTSTR
SkipRoot(LPCTSTR pszPath);
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
delay loading SHLWAPI.DLL
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)
delay loading SHLWAPI.DLL
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...
Object Windows Library (OWLNext Core).