ReactOS 0.4.16-dev-1946-g52006dd
shlwapi.h File Reference
#include <objbase.h>
#include <shtypes.h>
#include <pshpack8.h>
#include <poppack.h>
Include dependency graph for shlwapi.h:

Go to the source code of this file.

Classes

struct  tagPARSEDURLA
 
struct  tagPARSEDURLW
 
struct  _DllVersionInfo
 
struct  _DLLVERSIONINFO2
 
struct  QITAB
 

Macros

#define WINSHLWAPI   DECLSPEC_IMPORT
 
#define GetAcceptLanguages   WINELIB_NAME_AW(GetAcceptLanguages)
 
#define SHDeleteEmptyKey   WINELIB_NAME_AW(SHDeleteEmptyKey)
 
#define SHDeleteKey   WINELIB_NAME_AW(SHDeleteKey)
 
#define SHDeleteValue   WINELIB_NAME_AW(SHDeleteValue)
 
#define SHGetValue   WINELIB_NAME_AW(SHGetValue)
 
#define SHSetValue   WINELIB_NAME_AW(SHSetValue)
 
#define SHQueryValueEx   WINELIB_NAME_AW(SHQueryValueEx)
 
#define SHEnumKeyEx   WINELIB_NAME_AW(SHEnumKeyEx)
 
#define SHEnumValue   WINELIB_NAME_AW(SHEnumValue)
 
#define SHQueryInfoKey   WINELIB_NAME_AW(SHQueryInfoKey)
 
#define SHRegGetPath   WINELIB_NAME_AW(SHRegGetPath)
 
#define SHRegSetPath   WINELIB_NAME_AW(SHRegSetPath)
 
#define SHCopyKey   WINELIB_NAME_AW(SHCopyKey)
 
#define SRRF_RT_REG_NONE   0x1
 
#define SRRF_RT_REG_SZ   0x2
 
#define SRRF_RT_REG_EXPAND_SZ   0x4
 
#define SRRF_RT_REG_BINARY   0x8
 
#define SRRF_RT_REG_DWORD   0x10
 
#define SRRF_RT_REG_MULTI_SZ   0x20
 
#define SRRF_RT_REG_QWORD   0x40
 
#define SRRF_RT_DWORD   (SRRF_RT_REG_BINARY|SRRF_RT_REG_DWORD)
 
#define SRRF_RT_QWORD   (SRRF_RT_REG_BINARY|SRRF_RT_REG_QWORD)
 
#define SRRF_RT_ANY   0xffff
 
#define SRRF_RM_ANY   0
 
#define SRRF_RM_NORMAL   0x10000
 
#define SRRF_RM_SAFE   0x20000
 
#define SRRF_RM_SAFENETWORK   0x40000
 
#define SRRF_NOEXPAND   0x10000000
 
#define SRRF_ZEROONFAILURE   0x20000000
 
#define SRRF_NOVIRT   0x40000000
 
#define SHRegGetValue   WINELIB_NAME_AW(SHRegGetValue)
 
#define SHDeleteOrphanKey   WINELIB_NAME_AW(SHDeleteOrphanKey)
 
#define SHREGSET_HKCU   0x1 /* Apply to HKCU if empty */
 
#define SHREGSET_FORCE_HKCU   0x2 /* Always apply to HKCU */
 
#define SHREGSET_HKLM   0x4 /* Apply to HKLM if empty */
 
#define SHREGSET_FORCE_HKLM   0x8 /* Always apply to HKLM */
 
#define SHREGSET_DEFAULT   (SHREGSET_FORCE_HKCU | SHREGSET_HKLM)
 
#define SHRegCreateUSKey   WINELIB_NAME_AW(SHRegCreateUSKey)
 
#define SHRegOpenUSKey   WINELIB_NAME_AW(SHRegOpenUSKey)
 
#define SHRegQueryUSValue   WINELIB_NAME_AW(SHRegQueryUSValue)
 
#define SHRegWriteUSValue   WINELIB_NAME_AW(SHRegWriteUSValue)
 
#define SHRegDeleteUSValue   WINELIB_NAME_AW(SHRegDeleteUSValue)
 
#define SHRegDeleteEmptyUSKey   WINELIB_NAME_AW(SHRegDeleteEmptyUSKey)
 
#define SHRegEnumUSKey   WINELIB_NAME_AW(SHRegEnumUSKey)
 
#define SHRegEnumUSValue   WINELIB_NAME_AW(SHRegEnumUSValue)
 
#define SHRegQueryInfoUSKey   WINELIB_NAME_AW(SHRegQueryInfoUSKey)
 
#define SHRegGetUSValue   WINELIB_NAME_AW(SHRegGetUSValue)
 
#define SHRegSetUSValue   WINELIB_NAME_AW(SHRegSetUSValue)
 
#define SHRegGetBoolUSValue   WINELIB_NAME_AW(SHRegGetBoolUSValue)
 
#define INTERFACE   IQueryAssociations
 
#define IQueryAssociations_QueryInterface(p, a, b)   (p)->lpVtbl->QueryInterface(p,a,b)
 
#define IQueryAssociations_AddRef(p)   (p)->lpVtbl->AddRef(p)
 
#define IQueryAssociations_Release(p)   (p)->lpVtbl->Release(p)
 
#define IQueryAssociations_Init(p, a, b, c, d)   (p)->lpVtbl->Init(p,a,b,c,d)
 
#define IQueryAssociations_GetString(p, a, b, c, d, e)   (p)->lpVtbl->GetString(p,a,b,c,d,e)
 
#define IQueryAssociations_GetKey(p, a, b, c, d)   (p)->lpVtbl->GetKey(p,a,b,c,d)
 
#define IQueryAssociations_GetData(p, a, b, c, d, e)   (p)->lpVtbl->GetData(p,a,b,c,d,e)
 
#define IQueryAssociations_GetEnum(p, a, b, c, d, e)   (p)->lpVtbl->GetEnum(p,a,b,c,d,e)
 
#define AssocQueryString   WINELIB_NAME_AW(AssocQueryString)
 
#define AssocQueryStringByKey   WINELIB_NAME_AW(AssocQueryStringByKey)
 
#define AssocQueryKey   WINELIB_NAME_AW(AssocQueryKey)
 
#define GCT_INVALID   0x0
 
#define GCT_LFNCHAR   0x1
 
#define GCT_SHORTCHAR   0x2
 
#define GCT_WILD   0x4
 
#define GCT_SEPARATOR   0x8
 
#define PathAddBackslash   WINELIB_NAME_AW(PathAddBackslash)
 
#define PathAddExtension   WINELIB_NAME_AW(PathAddExtension)
 
#define PathAppend   WINELIB_NAME_AW(PathAppend)
 
#define PathBuildRoot   WINELIB_NAME_AW(PathBuiltRoot)
 
#define PathCanonicalize   WINELIB_NAME_AW(PathCanonicalize)
 
#define PathCombine   WINELIB_NAME_AW(PathCombine)
 
#define PathCompactPath   WINELIB_NAME_AW(PathCompactPath)
 
#define PathCompactPathEx   WINELIB_NAME_AW(PathCompactPathEx)
 
#define PathCommonPrefix   WINELIB_NAME_AW(PathCommonPrefix)
 
#define PathCreateFromUrl   WINELIB_NAME_AW(PathCreateFromUrl)
 
#define PathFileExists   WINELIB_NAME_AW(PathFileExists)
 
#define PathFileExistsAndAttributes   WINELIB_NAME_AW(PathFileExistsAndAttributes)
 
#define PathFindExtension   WINELIB_NAME_AW(PathFindExtension)
 
#define PathFindFileName   WINELIB_NAME_AW(PathFindFileName)
 
#define PathFindNextComponent   WINELIB_NAME_AW(PathFindNextComponent)
 
#define PathFindOnPath   WINELIB_NAME_AW(PathFindOnPath)
 
#define PathGetArgs   WINELIB_NAME_AW(PathGetArgs)
 
#define PathGetCharType   WINELIB_NAME_AW(PathGetCharType)
 
#define PathGetDriveNumber   WINELIB_NAME_AW(PathGetDriveNumber)
 
#define PathIsDirectory   WINELIB_NAME_AW(PathIsDirectory)
 
#define PathIsDirectoryEmpty   WINELIB_NAME_AW(PathIsDirectoryEmpty)
 
#define PathIsFileSpec   WINELIB_NAME_AW(PathIsFileSpec)
 
#define PathIsPrefix   WINELIB_NAME_AW(PathIsPrefix)
 
#define PathIsRelative   WINELIB_NAME_AW(PathIsRelative)
 
#define PathIsRoot   WINELIB_NAME_AW(PathIsRoot)
 
#define PathIsSameRoot   WINELIB_NAME_AW(PathIsSameRoot)
 
#define PathIsUNC   WINELIB_NAME_AW(PathIsUNC)
 
#define PathIsUNCServer   WINELIB_NAME_AW(PathIsUNCServer)
 
#define PathIsUNCServerShare   WINELIB_NAME_AW(PathIsUNCServerShare)
 
#define PathIsContentType   WINELIB_NAME_AW(PathIsContentType)
 
#define PathIsURL   WINELIB_NAME_AW(PathIsURL)
 
#define PathMakePretty   WINELIB_NAME_AW(PathMakePretty)
 
#define PathMatchSpec   WINELIB_NAME_AW(PathMatchSpec)
 
#define PMSF_NORMAL   0x00000000
 
#define PMSF_MULTIPLE   0x00000001
 
#define PMSF_DONT_STRIP_SPACES   0x00010000
 
#define PathMatchSpecEx   WINELIB_NAME_AW(PathMatchSpecEx)
 
#define PathParseIconLocation   WINELIB_NAME_AW(PathParseIconLocation)
 
#define PathQuoteSpaces   WINELIB_NAME_AW(PathQuoteSpaces)
 
#define PathRelativePathTo   WINELIB_NAME_AW(PathRelativePathTo)
 
#define PathRemoveArgs   WINELIB_NAME_AW(PathRemoveArgs)
 
#define PathRemoveBackslash   WINELIB_NAME_AW(PathRemoveBackslash)
 
#define PathRemoveBlanks   WINELIB_NAME_AW(PathRemoveBlanks)
 
#define PathRemoveExtension   WINELIB_NAME_AW(PathRemoveExtension)
 
#define PathRemoveFileSpec   WINELIB_NAME_AW(PathRemoveFileSpec)
 
#define PathRenameExtension   WINELIB_NAME_AW(PathRenameExtension)
 
#define PathSearchAndQualify   WINELIB_NAME_AW(PathSearchAndQualify)
 
#define PathSetDlgItemPath   WINELIB_NAME_AW(PathSetDlgItemPath)
 
#define PathSkipRoot   WINELIB_NAME_AW(PathSkipRoot)
 
#define PathStripPath   WINELIB_NAME_AW(PathStripPath)
 
#define PathStripToRoot   WINELIB_NAME_AW(PathStripToRoot)
 
#define PathUnquoteSpaces   WINELIB_NAME_AW(PathUnquoteSpaces)
 
#define PathMakeSystemFolder   WINELIB_NAME_AW(PathMakeSystemFolder)
 
#define PathUnmakeSystemFolder   WINELIB_NAME_AW(PathUnmakeSystemFolder)
 
#define PathIsSystemFolder   WINELIB_NAME_AW(PathIsSystemFolder)
 
#define PathIsNetworkPath   WINELIB_NAME_AW(PathIsNetworkPath)
 
#define PathIsLFNFileSpec   WINELIB_NAME_AW(PathIsLFNFileSpec)
 
#define PathFindSuffixArray   WINELIB_NAME_AW(PathFindSuffixArray)
 
#define PathUndecorate   WINELIB_NAME_AW(PathUndecorate)
 
#define PathUnExpandEnvStrings   WINELIB_NAME_AW(PathUnExpandEnvStrings)
 
#define URL_PARTFLAG_KEEPSCHEME   0x00000001
 
#define URL_APPLY_FORCEAPPLY   0x00000008
 
#define URL_APPLY_GUESSFILE   0x00000004
 
#define URL_APPLY_GUESSSCHEME   0x00000002
 
#define URL_APPLY_DEFAULT   0x00000001
 
#define URL_WININET_COMPATIBILITY   0x80000000
 
#define URL_PLUGGABLE_PROTOCOL   0x40000000
 
#define URL_ESCAPE_UNSAFE   0x20000000
 
#define URL_UNESCAPE   0x10000000
 
#define URL_DONT_SIMPLIFY   0x08000000
 
#define URL_ESCAPE_SPACES_ONLY   0x04000000
 
#define URL_DONT_ESCAPE_EXTRA_INFO   0x02000000
 
#define URL_INTERNAL_PATH   0x00800000
 
#define URL_UNESCAPE_HIGH_ANSI_ONLY   0x00400000
 
#define URL_CONVERT_IF_DOSPATH   0x00200000
 
#define URL_UNESCAPE_INPLACE   0x00100000
 
#define URL_ESCAPE_ASCII_URI_COMPONENT   0x00080000
 
#define URL_ESCAPE_AS_UTF8   0x00040000
 
#define URL_DONT_UNESCAPE   0x00020000
 
#define URL_FILE_USE_PATHURL   0x00010000
 
#define URL_ESCAPE_SEGMENT_ONLY   0x00002000
 
#define URL_ESCAPE_PERCENT   0x00001000
 
#define URL_BROWSER_MODE   URL_DONT_ESCAPE_EXTRA_INFO
 
#define URL_DONT_UNESCAPE_EXTRA_INFO   URL_DONT_ESCAPE_EXTRA_INFO
 
#define URL_ESCAPE_URI_COMPONENT   (URL_ESCAPE_ASCII_URI_COMPONENT | URL_ESCAPE_AS_UTF8)
 
#define URL_NO_META   URL_DONT_SIMPLIFY
 
#define URL_UNESCAPE_AS_UTF8   URL_ESCAPE_AS_UTF8
 
#define URL_UNESCAPE_URI_COMPONENT   URL_UNESCAPE_AS_UTF8
 
#define UrlApplyScheme   WINELIB_NAME_AW(UrlApplyScheme)
 
#define UrlCanonicalize   WINELIB_NAME_AW(UrlCanonicalize)
 
#define UrlCombine   WINELIB_NAME_AW(UrlCombine)
 
#define UrlCompare   WINELIB_NAME_AW(UrlCompare)
 
#define UrlEscape   WINELIB_NAME_AW(UrlEscape)
 
#define UrlEscapeSpacesA(x, y, z)
 
#define UrlEscapeSpacesW(x, y, z)
 
#define UrlEscapeSpaces   WINELIB_NAME_AW(UrlEscapeSpaces)
 
#define UrlGetLocation   WINELIB_NAME_AW(UrlGetLocation)
 
#define UrlGetPart   WINELIB_NAME_AW(UrlGetPart)
 
#define UrlHash   WINELIB_NAME_AW(UrlHash)
 
#define UrlIs   WINELIB_NAME_AW(UrlIs)
 
#define UrlIsNoHistory   WINELIB_NAME_AW(UrlIsNoHistory)
 
#define UrlIsOpaque   WINELIB_NAME_AW(UrlIsOpaque)
 
#define UrlIsFileUrlA(x)   UrlIsA(x, URLIS_FILEURL)
 
#define UrlIsFileUrlW(x)   UrlIsW(x, URLIS_FILEURL)
 
#define UrlIsFileUrl   WINELIB_NAME_AW(UrlIsFileUrl)
 
#define UrlUnescape   WINELIB_NAME_AW(UrlUnescape)
 
#define UrlUnescapeInPlaceA(x, y)
 
#define UrlUnescapeInPlaceW(x, y)
 
#define UrlUnescapeInPlace   WINELIB_NAME_AW(UrlUnescapeInPlace)
 
#define UrlCreateFromPath   WINELIB_NAME_AW(UrlCreateFromPath)
 
#define ParseURL   WINELIB_NAME_AW(ParseUrl)
 
#define STIF_DEFAULT   __MSABI_LONG(0x0)
 
#define STIF_SUPPORT_HEX   __MSABI_LONG(0x1)
 
#define ChrCmpI   WINELIB_NAME_AW(ChrCmpI)
 
#define StrCSpn   WINELIB_NAME_AW(StrCSpn)
 
#define StrCSpnI   WINELIB_NAME_AW(StrCSpnI)
 
#define StrCatA   lstrcatA
 
#define StrCat   WINELIB_NAME_AW(StrCat)
 
#define StrCatBuff   WINELIB_NAME_AW(StrCatBuff)
 
#define StrChr   WINELIB_NAME_AW(StrChr)
 
#define StrChrI   WINELIB_NAME_AW(StrChrI)
 
#define StrCmpA   lstrcmpA
 
#define StrCmp   WINELIB_NAME_AW(StrCmp)
 
#define StrCmpIA   lstrcmpiA
 
#define StrCmpI   WINELIB_NAME_AW(StrCmpI)
 
#define StrCpyA   lstrcpyA
 
#define StrCpy   WINELIB_NAME_AW(StrCpy)
 
#define StrCpyNA   lstrcpynA
 
#define StrCpyN   WINELIB_NAME_AW(StrCpyN)
 
#define StrNCpy   WINELIB_NAME_AW(StrCpyN)
 
#define StrCmpN   WINELIB_NAME_AW(StrCmpN)
 
#define StrNCmp   WINELIB_NAME_AW(StrCmpN)
 
#define StrCmpNI   WINELIB_NAME_AW(StrCmpNI)
 
#define StrNCmpI   WINELIB_NAME_AW(StrCmpNI)
 
#define StrDup   WINELIB_NAME_AW(StrDup)
 
#define SHStrDup   WINELIB_NAME_AW(SHStrDup)
 
#define StrFormatByteSize   StrFormatByteSize64A
 
#define StrFormatKBSize   WINELIB_NAME_AW(StrFormatKBSize)
 
#define StrFromTimeInterval   WINELIB_NAME_AW(StrFromTimeInterval)
 
#define StrIsIntlEqual   WINELIB_NAME_AW(StrIsIntlEqual)
 
#define StrIntlEqNA(a, b, c)   StrIsIntlEqualA(TRUE,a,b,c)
 
#define StrIntlEqNW(a, b, c)   StrIsIntlEqualW(TRUE,a,b,c)
 
#define StrIntlEqNIA(a, b, c)   StrIsIntlEqualA(FALSE,a,b,c)
 
#define StrIntlEqNIW(a, b, c)   StrIsIntlEqualW(FALSE,a,b,c)
 
#define StrNCat   WINELIB_NAME_AW(StrNCat)
 
#define StrCatN   WINELIB_NAME_AW(StrNCat)
 
#define StrPBrk   WINELIB_NAME_AW(StrPBrk)
 
#define StrRChr   WINELIB_NAME_AW(StrRChr)
 
#define StrRChrI   WINELIB_NAME_AW(StrRChrI)
 
#define StrRStrI   WINELIB_NAME_AW(StrRStrI)
 
#define StrSpn   WINELIB_NAME_AW(StrSpn)
 
#define StrStr   WINELIB_NAME_AW(StrStr)
 
#define StrStrI   WINELIB_NAME_AW(StrStrI)
 
#define StrToInt   WINELIB_NAME_AW(StrToInt)
 
#define StrToLong   WINELIB_NAME_AW(StrToInt)
 
#define StrToIntEx   WINELIB_NAME_AW(StrToIntEx)
 
#define StrToIntEx64   WINELIB_NAME_AW(StrToIntEx64)
 
#define StrTrim   WINELIB_NAME_AW(StrTrim)
 
#define wnsprintf   WINELIB_NAME_AW(wnsprintf)
 
#define IntlStrEqWorker   WINELIB_NAME_AW(IntlStrEqWorker)
 
#define IntlStrEqNA(s1, s2, n)   IntlStrEqWorkerA(TRUE,s1,s2,n)
 
#define IntlStrEqNW(s1, s2, n)   IntlStrEqWorkerW(TRUE,s1,s2,n)
 
#define IntlStrEqN   WINELIB_NAME_AW(IntlStrEqN)
 
#define IntlStrEqNIA(s1, s2, n)   IntlStrEqWorkerA(FALSE,s1,s2,n)
 
#define IntlStrEqNIW(s1, s2, n)   IntlStrEqWorkerW(FALSE,s1,s2,n)
 
#define IntlStrEqNI   WINELIB_NAME_AW(IntlStrEqNI)
 
#define StrRetToStr   WINELIB_NAME_AW(StrRetToStr)
 
#define StrRetToBuf   WINELIB_NAME_AW(StrRetToBuf)
 
#define IsCharSpace   WINELIB_NAME_AW(IsCharSpace)
 
#define SHOpenRegStream   WINELIB_NAME_AW(SHOpenRegStream2) /* Uses version 2 */
 
#define SHOpenRegStream2   WINELIB_NAME_AW(SHOpenRegStream2)
 
#define SHCreateStreamOnFile   WINELIB_NAME_AW(SHCreateStreamOnFile)
 
#define SHACF_DEFAULT   0x00000000
 
#define SHACF_FILESYSTEM   0x00000001
 
#define SHACF_URLHISTORY   0x00000002
 
#define SHACF_URLMRU   0x00000004
 
#define SHACF_URLALL   (SHACF_URLHISTORY|SHACF_URLMRU)
 
#define SHACF_USETAB   0x00000008
 
#define SHACF_FILESYS_ONLY   0x00000010
 
#define SHACF_FILESYS_DIRS   0x00000020
 
#define SHACF_AUTOSUGGEST_FORCE_ON   0x10000000
 
#define SHACF_AUTOSUGGEST_FORCE_OFF   0x20000000
 
#define SHACF_AUTOAPPEND_FORCE_ON   0x40000000
 
#define SHACF_AUTOAPPEND_FORCE_OFF   0x80000000
 
#define DLLVER_PLATFORM_WINDOWS   0x01 /* Win9x */
 
#define DLLVER_PLATFORM_NT   0x02 /* WinNT */
 
#define DLLVER_MAJOR_MASK   0xFFFF000000000000
 
#define DLLVER_MINOR_MASK   0x0000FFFF00000000
 
#define DLLVER_BUILD_MASK   0x00000000FFFF0000
 
#define DLLVER_QFE_MASK   0x000000000000FFFF
 
#define MAKEDLLVERULL(mjr, mnr, bld, qfe)
 
#define OS_WIN32SORGREATER   0x00
 
#define OS_NT   0x01
 
#define OS_WIN95ORGREATER   0x02
 
#define OS_NT4ORGREATER   0x03
 
#define OS_WIN2000ORGREATER_ALT   0x04
 
#define OS_WIN98ORGREATER   0x05
 
#define OS_WIN98_GOLD   0x06
 
#define OS_WIN2000ORGREATER   0x07
 
#define OS_WIN2000PRO   0x08
 
#define OS_WIN2000SERVER   0x09
 
#define OS_WIN2000ADVSERVER   0x0A
 
#define OS_WIN2000DATACENTER   0x0B
 
#define OS_WIN2000TERMINAL   0x0C
 
#define OS_EMBEDDED   0x0D
 
#define OS_TERMINALCLIENT   0x0E
 
#define OS_TERMINALREMOTEADMIN   0x0F
 
#define OS_WIN95_GOLD   0x10
 
#define OS_MEORGREATER   0x11
 
#define OS_XPORGREATER   0x12
 
#define OS_HOME   0x13
 
#define OS_PROFESSIONAL   0x14
 
#define OS_DATACENTER   0x15
 
#define OS_ADVSERVER   0x16
 
#define OS_SERVER   0x17
 
#define OS_TERMINALSERVER   0x18
 
#define OS_PERSONALTERMINALSERVER   0x19
 
#define OS_FASTUSERSWITCHING   0x1A
 
#define OS_WELCOMELOGONUI   0x1B
 
#define OS_DOMAINMEMBER   0x1C
 
#define OS_ANYSERVER   0x1D
 
#define OS_WOW6432   0x1E
 
#define OS_WEBSERVER   0x1F
 
#define OS_SMALLBUSINESSSERVER   0x20
 
#define OS_TABLETPC   0x21
 
#define OS_SERVERADMINUI   0x22
 
#define OS_MEDIACENTER   0x23
 
#define OS_APPLIANCE   0x24
 
#define TPS_EXECUTEIO   0x00000001
 
#define TPS_LONGEXECTIME   0x00000008
 
#define FDTF_SHORTTIME   0x00000001
 
#define FDTF_SHORTDATE   0x00000002
 
#define FDTF_DEFAULT   (FDTF_SHORTDATE | FDTF_SHORTTIME)
 
#define FDTF_LONGDATE   0x00000004
 
#define FDTF_LONGTIME   0x00000008
 
#define FDTF_RELATIVE   0x00000010
 
#define FDTF_LTRDATE   0x00000100
 
#define FDTF_RTLDATE   0x00000200
 
#define FDTF_NOAUTOREADINGORDER   0x00000400
 
#define PLATFORM_UNKNOWN   0
 
#define PLATFORM_IE3   1
 
#define PLATFORM_BROWSERONLY   1
 
#define PLATFORM_INTEGRATED   2
 
#define SHGVSPB_PERUSER   0x00000001
 
#define SHGVSPB_ALLUSERS   0x00000002
 
#define SHGVSPB_PERFOLDER   0x00000004
 
#define SHGVSPB_ALLFOLDERS   0x00000008
 
#define SHGVSPB_INHERIT   0x00000010
 
#define SHGVSPB_ROAM   0x00000020
 
#define SHGVSPB_NOAUTODEFAULTS   0x80000000
 
#define SHGVSPB_FOLDER   (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER)
 
#define SHGVSPB_FOLDERNODEFAULTS   (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER | SHGVSPB_NOAUTODEFAULTS)
 
#define SHGVSPB_USERDEFAULTS   (SHGVSPB_PERUSER | SHGVSPB_ALLFOLDERS)
 
#define SHGVSPB_GLOBALDEFAULTS   (SHGVSPB_ALLUSERS | SHGVSPB_ALLFOLDERS)
 
#define ILMM_IE4   0
 

Typedefs

typedef INT SRRF
 
typedef HANDLE HUSKEY
 
typedef HUSKEYPHUSKEY
 
typedef DWORD ASSOCF
 
typedef struct IQueryAssociations * LPQUERYASSOCIATIONS
 
typedef struct tagPARSEDURLA PARSEDURLA
 
typedef struct tagPARSEDURLAPPARSEDURLA
 
typedef struct tagPARSEDURLW PARSEDURLW
 
typedef struct tagPARSEDURLWPPARSEDURLW
 
typedef struct _DllVersionInfo DLLVERSIONINFO
 
typedef HRESULT(CALLBACKDLLGETVERSIONPROC) (DLLVERSIONINFO *)
 
typedef struct _DLLVERSIONINFO2 DLLVERSIONINFO2
 
typedef struct QITABLPQITAB
 

Enumerations

enum  SHREGDEL_FLAGS {
  SHREGDEL_DEFAULT = 0 , SHREGDEL_HKCU = 0x1 , SHREGDEL_HKLM = 0x10 , SHREGDEL_BOTH = SHREGDEL_HKLM | SHREGDEL_HKCU ,
  SHREGDEL_DEFAULT = 0 , SHREGDEL_HKCU = 0x1 , SHREGDEL_HKLM = 0x10 , SHREGDEL_BOTH = SHREGDEL_HKLM | SHREGDEL_HKCU
}
 
enum  SHREGENUM_FLAGS {
  SHREGENUM_DEFAULT = 0 , SHREGENUM_HKCU = 0x1 , SHREGENUM_HKLM = 0x10 , SHREGENUM_BOTH = SHREGENUM_HKLM | SHREGENUM_HKCU ,
  SHREGENUM_DEFAULT = 0 , SHREGENUM_HKCU = 0x1 , SHREGENUM_HKLM = 0x10 , SHREGENUM_BOTH = SHREGENUM_HKLM | SHREGENUM_HKCU
}
 
enum  {
  ASSOCF_NONE = 0x0000 , ASSOCF_INIT_NOREMAPCLSID = 0x0001 , ASSOCF_INIT_BYEXENAME = 0x0002 , ASSOCF_OPEN_BYEXENAME = 0x0002 ,
  ASSOCF_INIT_DEFAULTTOSTAR = 0x0004 , ASSOCF_INIT_DEFAULTTOFOLDER = 0x0008 , ASSOCF_NOUSERSETTINGS = 0x0010 , ASSOCF_NOTRUNCATE = 0x0020 ,
  ASSOCF_VERIFY = 0x0040 , ASSOCF_REMAPRUNDLL = 0x0080 , ASSOCF_NOFIXUPS = 0x0100 , ASSOCF_IGNOREBASECLASS = 0x0200 ,
  ASSOCF_INIT_IGNOREUNKNOWN = 0x0400 , ASSOCF_INIT_FIXED_PROGID = 0x0800 , ASSOCF_IS_PROTOCOL = 0x1000 , ASSOCF_INIT_FOR_FILE = 0x2000
}
 
enum  ASSOCSTR {
  ASSOCSTR_COMMAND = 1 , ASSOCSTR_EXECUTABLE , ASSOCSTR_FRIENDLYDOCNAME , ASSOCSTR_FRIENDLYAPPNAME ,
  ASSOCSTR_NOOPEN , ASSOCSTR_SHELLNEWVALUE , ASSOCSTR_DDECOMMAND , ASSOCSTR_DDEIFEXEC ,
  ASSOCSTR_DDEAPPLICATION , ASSOCSTR_DDETOPIC , ASSOCSTR_INFOTIP , ASSOCSTR_QUICKTIP ,
  ASSOCSTR_TILEINFO , ASSOCSTR_CONTENTTYPE , ASSOCSTR_DEFAULTICON , ASSOCSTR_SHELLEXTENSION ,
  ASSOCSTR_DROPTARGET , ASSOCSTR_DELEGATEEXECUTE , ASSOCSTR_SUPPORTED_URI_PROTOCOLS , ASSOCSTR_PROGID ,
  ASSOCSTR_APPID , ASSOCSTR_APPPUBLISHER , ASSOCSTR_APPICONREFERENCE , ASSOCSTR_MAX ,
  ASSOCSTR_COMMAND = 1 , ASSOCSTR_EXECUTABLE , ASSOCSTR_FRIENDLYDOCNAME , ASSOCSTR_FRIENDLYAPPNAME ,
  ASSOCSTR_NOOPEN , ASSOCSTR_SHELLNEWVALUE , ASSOCSTR_DDECOMMAND , ASSOCSTR_DDEIFEXEC ,
  ASSOCSTR_DDEAPPLICATION , ASSOCSTR_DDETOPIC , ASSOCSTR_INFOTIP , ASSOCSTR_QUICKTIP ,
  ASSOCSTR_TILEINFO , ASSOCSTR_CONTENTTYPE , ASSOCSTR_DEFAULTICON , ASSOCSTR_SHELLEXTENSION ,
  ASSOCSTR_MAX
}
 
enum  ASSOCKEY {
  ASSOCKEY_SHELLEXECCLASS = 1 , ASSOCKEY_APP , ASSOCKEY_CLASS , ASSOCKEY_BASECLASS ,
  ASSOCKEY_MAX , ASSOCKEY_SHELLEXECCLASS = 1 , ASSOCKEY_APP , ASSOCKEY_CLASS ,
  ASSOCKEY_BASECLASS , ASSOCKEY_MAX
}
 
enum  ASSOCDATA {
  ASSOCDATA_MSIDESCRIPTOR = 1 , ASSOCDATA_NOACTIVATEHANDLER , ASSOCDATA_QUERYCLASSSTORE , ASSOCDATA_HASPERUSERASSOC ,
  ASSOCDATA_EDITFLAGS , ASSOCDATA_VALUE , ASSOCDATA_MAX , ASSOCDATA_MSIDESCRIPTOR = 1 ,
  ASSOCDATA_NOACTIVATEHANDLER , ASSOCDATA_QUERYCLASSSTORE , ASSOCDATA_HASPERUSERASSOC , ASSOCDATA_EDITFLAGS ,
  ASSOCDATA_VALUE , ASSOCDATA_MAX
}
 
enum  ASSOCENUM { ASSOCENUM_NONE , ASSOCENUM_NONE }
 
enum  URL_SCHEME {
  URL_SCHEME_INVALID = -1 , URL_SCHEME_UNKNOWN = 0 , URL_SCHEME_FTP , URL_SCHEME_HTTP ,
  URL_SCHEME_GOPHER , URL_SCHEME_MAILTO , URL_SCHEME_NEWS , URL_SCHEME_NNTP ,
  URL_SCHEME_TELNET , URL_SCHEME_WAIS , URL_SCHEME_FILE , URL_SCHEME_MK ,
  URL_SCHEME_HTTPS , URL_SCHEME_SHELL , URL_SCHEME_SNEWS , URL_SCHEME_LOCAL ,
  URL_SCHEME_JAVASCRIPT , URL_SCHEME_VBSCRIPT , URL_SCHEME_ABOUT , URL_SCHEME_RES ,
  URL_SCHEME_MSSHELLROOTED , URL_SCHEME_MSSHELLIDLIST , URL_SCHEME_MSHELP , URL_SCHEME_MSSHELLDEVICE ,
  URL_SCHEME_WILDCARD , URL_SCHEME_SEARCH_MS , URL_SCHEME_SEARCH , URL_SCHEME_KNOWNFOLDER ,
  URL_SCHEME_MAXVALUE , URL_SCHEME_INVALID = -1 , URL_SCHEME_UNKNOWN = 0 , URL_SCHEME_FTP ,
  URL_SCHEME_HTTP , URL_SCHEME_GOPHER , URL_SCHEME_MAILTO , URL_SCHEME_NEWS ,
  URL_SCHEME_NNTP , URL_SCHEME_TELNET , URL_SCHEME_WAIS , URL_SCHEME_FILE ,
  URL_SCHEME_MK , URL_SCHEME_HTTPS , URL_SCHEME_SHELL , URL_SCHEME_SNEWS ,
  URL_SCHEME_LOCAL , URL_SCHEME_JAVASCRIPT , URL_SCHEME_VBSCRIPT , URL_SCHEME_ABOUT ,
  URL_SCHEME_RES , URL_SCHEME_MSSHELLROOTED , URL_SCHEME_MSSHELLIDLIST , URL_SCHEME_MSHELP ,
  URL_SCHEME_MSSHELLDEVICE , URL_SCHEME_WILDCARD , URL_SCHEME_SEARCH_MS , URL_SCHEME_SEARCH ,
  URL_SCHEME_KNOWNFOLDER , URL_SCHEME_MAXVALUE
}
 
enum  URL_PART {
  URL_PART_NONE = 0 , URL_PART_SCHEME = 1 , URL_PART_HOSTNAME , URL_PART_USERNAME ,
  URL_PART_PASSWORD , URL_PART_PORT , URL_PART_QUERY , URL_PART_NONE = 0 ,
  URL_PART_SCHEME = 1 , URL_PART_HOSTNAME , URL_PART_USERNAME , URL_PART_PASSWORD ,
  URL_PART_PORT , URL_PART_QUERY
}
 
enum  URLIS {
  URLIS_URL , URLIS_OPAQUE , URLIS_NOHISTORY , URLIS_FILEURL ,
  URLIS_APPLIABLE , URLIS_DIRECTORY , URLIS_HASQUERY , URLIS_URL ,
  URLIS_OPAQUE , URLIS_NOHISTORY , URLIS_FILEURL , URLIS_APPLIABLE ,
  URLIS_DIRECTORY , URLIS_HASQUERY
}
 
enum  SFBS_FLAGS { SFBS_FLAGS_ROUND_TO_NEAREST_DISPLAYED_DIGIT = 0x1 , SFBS_FLAGS_TRUNCATE_UNDISPLAYED_DECIMAL_DIGITS = 0x2 }
 
enum  {
  CTF_INSIST = 0x00000001 , CTF_THREAD_REF = 0x00000002 , CTF_PROCESS_REF = 0x00000004 , CTF_COINIT_STA = 0x00000008 ,
  CTF_COINIT = 0x00000008 , CTF_FREELIBANDEXIT = 0x00000010 , CTF_REF_COUNTED = 0x00000020 , CTF_WAIT_ALLOWCOM = 0x00000040 ,
  CTF_UNUSED = 0x00000080 , CTF_INHERITWOW64 = 0x00000100 , CTF_WAIT_NO_REENTRACY = 0x00000200 , CTF_KEYBOARD_LOCALE = 0x00000400 ,
  CTF_OLEINITIALIZE = 0x00000800 , CTF_COINIT_MTA = 0x00001000 , CTF_NOADDREFLIB = 0x00002000
}
 

Functions

WINSHLWAPI HRESULT WINAPI GetAcceptLanguagesA (char *buffer, DWORD *buff_len)
 
WINSHLWAPI HRESULT WINAPI GetAcceptLanguagesW (WCHAR *buffer, DWORD *buff_len)
 
WINSHLWAPI DWORD WINAPI SHDeleteEmptyKeyA (HKEY, LPCSTR)
 
WINSHLWAPI DWORD WINAPI SHDeleteEmptyKeyW (HKEY, LPCWSTR)
 
WINSHLWAPI DWORD WINAPI SHDeleteKeyA (HKEY, LPCSTR)
 
WINSHLWAPI DWORD WINAPI SHDeleteKeyW (HKEY, LPCWSTR)
 
WINSHLWAPI DWORD WINAPI SHDeleteValueA (HKEY, LPCSTR, LPCSTR)
 
WINSHLWAPI DWORD WINAPI SHDeleteValueW (HKEY, LPCWSTR, LPCWSTR)
 
WINSHLWAPI DWORD WINAPI SHGetValueA (HKEY, LPCSTR, LPCSTR, LPDWORD, LPVOID, LPDWORD)
 
WINSHLWAPI DWORD WINAPI SHGetValueW (HKEY, LPCWSTR, LPCWSTR, LPDWORD, LPVOID, LPDWORD)
 
WINSHLWAPI DWORD WINAPI SHSetValueA (HKEY, LPCSTR, LPCSTR, DWORD, LPCVOID, DWORD)
 
WINSHLWAPI DWORD WINAPI SHSetValueW (HKEY, LPCWSTR, LPCWSTR, DWORD, LPCVOID, DWORD)
 
WINSHLWAPI DWORD WINAPI SHQueryValueExA (HKEY, LPCSTR, LPDWORD, LPDWORD, LPVOID, LPDWORD)
 
WINSHLWAPI DWORD WINAPI SHQueryValueExW (HKEY, LPCWSTR, LPDWORD, LPDWORD, LPVOID, LPDWORD)
 
WINSHLWAPI LONG WINAPI SHEnumKeyExA (HKEY, DWORD, LPSTR, LPDWORD)
 
WINSHLWAPI LONG WINAPI SHEnumKeyExW (HKEY, DWORD, LPWSTR, LPDWORD)
 
WINSHLWAPI LONG WINAPI SHEnumValueA (HKEY, DWORD, LPSTR, LPDWORD, LPDWORD, LPVOID, LPDWORD)
 
WINSHLWAPI LONG WINAPI SHEnumValueW (HKEY, DWORD, LPWSTR, LPDWORD, LPDWORD, LPVOID, LPDWORD)
 
WINSHLWAPI LONG WINAPI SHQueryInfoKeyA (HKEY, LPDWORD, LPDWORD, LPDWORD, LPDWORD)
 
WINSHLWAPI LONG WINAPI SHQueryInfoKeyW (HKEY, LPDWORD, LPDWORD, LPDWORD, LPDWORD)
 
WINSHLWAPI DWORD WINAPI SHRegGetPathA (HKEY, LPCSTR, LPCSTR, LPSTR, DWORD)
 
WINSHLWAPI DWORD WINAPI SHRegGetPathW (HKEY, LPCWSTR, LPCWSTR, LPWSTR, DWORD)
 
WINSHLWAPI DWORD WINAPI SHRegSetPathA (HKEY, LPCSTR, LPCSTR, LPCSTR, DWORD)
 
WINSHLWAPI DWORD WINAPI SHRegSetPathW (HKEY, LPCWSTR, LPCWSTR, LPCWSTR, DWORD)
 
WINSHLWAPI DWORD WINAPI SHCopyKeyA (HKEY, LPCSTR, HKEY, DWORD)
 
WINSHLWAPI DWORD WINAPI SHCopyKeyW (HKEY, LPCWSTR, HKEY, DWORD)
 
WINSHLWAPI HKEY WINAPI SHRegDuplicateHKey (HKEY)
 
WINSHLWAPI LSTATUS WINAPI SHRegGetValueA (HKEY, LPCSTR, LPCSTR, SRRF, LPDWORD, LPVOID, LPDWORD)
 
WINSHLWAPI LSTATUS WINAPI SHRegGetValueW (HKEY, LPCWSTR, LPCWSTR, SRRF, LPDWORD, LPVOID, LPDWORD)
 
WINSHLWAPI DWORD WINAPI SHDeleteOrphanKeyA (HKEY, LPCSTR)
 
WINSHLWAPI DWORD WINAPI SHDeleteOrphanKeyW (HKEY, LPCWSTR)
 
WINSHLWAPI LONG WINAPI SHRegCreateUSKeyA (LPCSTR, REGSAM, HUSKEY, PHUSKEY, DWORD)
 
WINSHLWAPI LONG WINAPI SHRegCreateUSKeyW (LPCWSTR, REGSAM, HUSKEY, PHUSKEY, DWORD)
 
WINSHLWAPI LONG WINAPI SHRegOpenUSKeyA (LPCSTR, REGSAM, HUSKEY, PHUSKEY, BOOL)
 
WINSHLWAPI LONG WINAPI SHRegOpenUSKeyW (LPCWSTR, REGSAM, HUSKEY, PHUSKEY, BOOL)
 
WINSHLWAPI LONG WINAPI SHRegQueryUSValueA (HUSKEY, LPCSTR, LPDWORD, LPVOID, LPDWORD, BOOL, LPVOID, DWORD)
 
WINSHLWAPI LONG WINAPI SHRegQueryUSValueW (HUSKEY, LPCWSTR, LPDWORD, LPVOID, LPDWORD, BOOL, LPVOID, DWORD)
 
WINSHLWAPI LONG WINAPI SHRegWriteUSValueA (HUSKEY, LPCSTR, DWORD, LPVOID, DWORD, DWORD)
 
WINSHLWAPI LONG WINAPI SHRegWriteUSValueW (HUSKEY, LPCWSTR, DWORD, LPVOID, DWORD, DWORD)
 
WINSHLWAPI LONG WINAPI SHRegDeleteUSValueA (HUSKEY, LPCSTR, SHREGDEL_FLAGS)
 
WINSHLWAPI LONG WINAPI SHRegDeleteUSValueW (HUSKEY, LPCWSTR, SHREGDEL_FLAGS)
 
WINSHLWAPI LONG WINAPI SHRegDeleteEmptyUSKeyA (HUSKEY, LPCSTR, SHREGDEL_FLAGS)
 
WINSHLWAPI LONG WINAPI SHRegDeleteEmptyUSKeyW (HUSKEY, LPCWSTR, SHREGDEL_FLAGS)
 
WINSHLWAPI LONG WINAPI SHRegEnumUSKeyA (HUSKEY, DWORD, LPSTR, LPDWORD, SHREGENUM_FLAGS)
 
WINSHLWAPI LONG WINAPI SHRegEnumUSKeyW (HUSKEY, DWORD, LPWSTR, LPDWORD, SHREGENUM_FLAGS)
 
WINSHLWAPI LONG WINAPI SHRegEnumUSValueA (HUSKEY, DWORD, LPSTR, LPDWORD, LPDWORD, LPVOID, LPDWORD, SHREGENUM_FLAGS)
 
WINSHLWAPI LONG WINAPI SHRegEnumUSValueW (HUSKEY, DWORD, LPWSTR, LPDWORD, LPDWORD, LPVOID, LPDWORD, SHREGENUM_FLAGS)
 
WINSHLWAPI LONG WINAPI SHRegQueryInfoUSKeyA (HUSKEY, LPDWORD, LPDWORD, LPDWORD, LPDWORD, SHREGENUM_FLAGS)
 
WINSHLWAPI LONG WINAPI SHRegQueryInfoUSKeyW (HUSKEY, LPDWORD, LPDWORD, LPDWORD, LPDWORD, SHREGENUM_FLAGS)
 
WINSHLWAPI LONG WINAPI SHRegCloseUSKey (HUSKEY)
 
WINSHLWAPI LONG WINAPI SHRegGetUSValueA (LPCSTR, LPCSTR, LPDWORD, LPVOID, LPDWORD, BOOL, LPVOID, DWORD)
 
WINSHLWAPI LONG WINAPI SHRegGetUSValueW (LPCWSTR, LPCWSTR, LPDWORD, LPVOID, LPDWORD, BOOL, LPVOID, DWORD)
 
WINSHLWAPI LONG WINAPI SHRegSetUSValueA (LPCSTR, LPCSTR, DWORD, LPVOID, DWORD, DWORD)
 
WINSHLWAPI LONG WINAPI SHRegSetUSValueW (LPCWSTR, LPCWSTR, DWORD, LPVOID, DWORD, DWORD)
 
WINSHLWAPI BOOL WINAPI SHRegGetBoolUSValueA (LPCSTR, LPCSTR, BOOL, BOOL)
 
WINSHLWAPI BOOL WINAPI SHRegGetBoolUSValueW (LPCWSTR, LPCWSTR, BOOL, BOOL)
 
WINSHLWAPI int WINAPI SHRegGetIntW (HKEY, LPCWSTR, int)
 
 DECLARE_INTERFACE_ (IQueryAssociations, IUnknown)
 
WINSHLWAPI HRESULT WINAPI AssocCreate (CLSID, REFIID, LPVOID *)
 
WINSHLWAPI HRESULT WINAPI AssocQueryStringA (ASSOCF, ASSOCSTR, LPCSTR, LPCSTR, LPSTR, LPDWORD)
 
WINSHLWAPI HRESULT WINAPI AssocQueryStringW (ASSOCF, ASSOCSTR, LPCWSTR, LPCWSTR, LPWSTR, LPDWORD)
 
WINSHLWAPI HRESULT WINAPI AssocQueryStringByKeyA (ASSOCF, ASSOCSTR, HKEY, LPCSTR, LPSTR, LPDWORD)
 
WINSHLWAPI HRESULT WINAPI AssocQueryStringByKeyW (ASSOCF, ASSOCSTR, HKEY, LPCWSTR, LPWSTR, LPDWORD)
 
WINSHLWAPI HRESULT WINAPI AssocQueryKeyA (ASSOCF, ASSOCKEY, LPCSTR, LPCSTR, PHKEY)
 
WINSHLWAPI HRESULT WINAPI AssocQueryKeyW (ASSOCF, ASSOCKEY, LPCWSTR, LPCWSTR, PHKEY)
 
WINSHLWAPI BOOL WINAPI AssocIsDangerous (LPCWSTR)
 
WINSHLWAPI void WINAPI IUnknown_Set (IUnknown **ppunk, IUnknown *punk)
 
WINSHLWAPI void WINAPI IUnknown_AtomicRelease (IUnknown **punk)
 
WINSHLWAPI HRESULT WINAPI IUnknown_GetWindow (IUnknown *punk, HWND *phwnd)
 
WINSHLWAPI HRESULT WINAPI IUnknown_SetSite (IUnknown *punk, IUnknown *punkSite)
 
WINSHLWAPI HRESULT WINAPI IUnknown_GetSite (IUnknown *punk, REFIID riid, void **ppv)
 
WINSHLWAPI HRESULT WINAPI IUnknown_QueryService (IUnknown *punk, REFGUID guidService, REFIID riid, void **ppvOut)
 
WINSHLWAPI LPSTR WINAPI PathAddBackslashA (LPSTR)
 
WINSHLWAPI LPWSTR WINAPI PathAddBackslashW (LPWSTR)
 
WINSHLWAPI BOOL WINAPI PathAddExtensionA (LPSTR, LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathAddExtensionW (LPWSTR, LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathAppendA (LPSTR, LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathAppendW (LPWSTR, LPCWSTR)
 
WINSHLWAPI LPSTR WINAPI PathBuildRootA (LPSTR, int)
 
WINSHLWAPI LPWSTR WINAPI PathBuildRootW (LPWSTR, int)
 
WINSHLWAPI BOOL WINAPI PathCanonicalizeA (LPSTR, LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathCanonicalizeW (LPWSTR, LPCWSTR)
 
WINSHLWAPI LPSTR WINAPI PathCombineA (LPSTR, LPCSTR, LPCSTR)
 
WINSHLWAPI LPWSTR WINAPI PathCombineW (LPWSTR, LPCWSTR, LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathCompactPathA (HDC, LPSTR, UINT)
 
WINSHLWAPI BOOL WINAPI PathCompactPathW (HDC, LPWSTR, UINT)
 
WINSHLWAPI BOOL WINAPI PathCompactPathExA (LPSTR, LPCSTR, UINT, DWORD)
 
WINSHLWAPI BOOL WINAPI PathCompactPathExW (LPWSTR, LPCWSTR, UINT, DWORD)
 
WINSHLWAPI int WINAPI PathCommonPrefixA (LPCSTR, LPCSTR, LPSTR)
 
WINSHLWAPI int WINAPI PathCommonPrefixW (LPCWSTR, LPCWSTR, LPWSTR)
 
WINSHLWAPI HRESULT WINAPI PathCreateFromUrlA (LPCSTR, LPSTR, LPDWORD, DWORD)
 
WINSHLWAPI HRESULT WINAPI PathCreateFromUrlW (LPCWSTR, LPWSTR, LPDWORD, DWORD)
 
WINSHLWAPI HRESULT WINAPI PathCreateFromUrlAlloc (LPCWSTR, LPWSTR *, DWORD)
 
WINSHLWAPI BOOL WINAPI PathFileExistsA (LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathFileExistsW (LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathFileExistsAndAttributesA (LPCSTR, DWORD *)
 
WINSHLWAPI BOOL WINAPI PathFileExistsAndAttributesW (LPCWSTR, DWORD *)
 
WINSHLWAPI LPSTR WINAPI PathFindExtensionA (LPCSTR)
 
WINSHLWAPI LPWSTR WINAPI PathFindExtensionW (LPCWSTR)
 
WINSHLWAPI LPSTR WINAPI PathFindFileNameA (LPCSTR)
 
WINSHLWAPI LPWSTR WINAPI PathFindFileNameW (LPCWSTR)
 
WINSHLWAPI LPSTR WINAPI PathFindNextComponentA (LPCSTR)
 
WINSHLWAPI LPWSTR WINAPI PathFindNextComponentW (LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathFindOnPathA (LPSTR, LPCSTR *)
 
WINSHLWAPI BOOL WINAPI PathFindOnPathW (LPWSTR, LPCWSTR *)
 
WINSHLWAPI LPSTR WINAPI PathGetArgsA (LPCSTR)
 
WINSHLWAPI LPWSTR WINAPI PathGetArgsW (LPCWSTR)
 
WINSHLWAPI UINT WINAPI PathGetCharTypeA (UCHAR)
 
WINSHLWAPI UINT WINAPI PathGetCharTypeW (WCHAR)
 
WINSHLWAPI int WINAPI PathGetDriveNumberA (LPCSTR)
 
WINSHLWAPI int WINAPI PathGetDriveNumberW (LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathIsDirectoryA (LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathIsDirectoryW (LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathIsDirectoryEmptyA (LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathIsDirectoryEmptyW (LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathIsFileSpecA (LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathIsFileSpecW (LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathIsPrefixA (LPCSTR, LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathIsPrefixW (LPCWSTR, LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathIsRelativeA (LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathIsRelativeW (LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathIsRootA (LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathIsRootW (LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathIsSameRootA (LPCSTR, LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathIsSameRootW (LPCWSTR, LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathIsUNCA (LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathIsUNCW (LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathIsUNCServerA (LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathIsUNCServerW (LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathIsUNCServerShareA (LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathIsUNCServerShareW (LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathIsContentTypeA (LPCSTR, LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathIsContentTypeW (LPCWSTR, LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathIsURLA (LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathIsURLW (LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathMakePrettyA (LPSTR)
 
WINSHLWAPI BOOL WINAPI PathMakePrettyW (LPWSTR)
 
WINSHLWAPI BOOL WINAPI PathMatchSpecA (LPCSTR, LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathMatchSpecW (LPCWSTR, LPCWSTR)
 
WINSHLWAPI HRESULT WINAPI PathMatchSpecExA (LPCSTR, LPCSTR, DWORD)
 
WINSHLWAPI HRESULT WINAPI PathMatchSpecExW (LPCWSTR, LPCWSTR, DWORD)
 
WINSHLWAPI int WINAPI PathParseIconLocationA (LPSTR)
 
WINSHLWAPI int WINAPI PathParseIconLocationW (LPWSTR)
 
WINSHLWAPI VOID WINAPI PathQuoteSpacesA (LPSTR)
 
WINSHLWAPI VOID WINAPI PathQuoteSpacesW (LPWSTR)
 
WINSHLWAPI BOOL WINAPI PathRelativePathToA (LPSTR, LPCSTR, DWORD, LPCSTR, DWORD)
 
WINSHLWAPI BOOL WINAPI PathRelativePathToW (LPWSTR, LPCWSTR, DWORD, LPCWSTR, DWORD)
 
WINSHLWAPI VOID WINAPI PathRemoveArgsA (LPSTR)
 
WINSHLWAPI VOID WINAPI PathRemoveArgsW (LPWSTR)
 
WINSHLWAPI LPSTR WINAPI PathRemoveBackslashA (LPSTR)
 
WINSHLWAPI LPWSTR WINAPI PathRemoveBackslashW (LPWSTR)
 
WINSHLWAPI VOID WINAPI PathRemoveBlanksA (LPSTR)
 
WINSHLWAPI VOID WINAPI PathRemoveBlanksW (LPWSTR)
 
WINSHLWAPI VOID WINAPI PathRemoveExtensionA (LPSTR)
 
WINSHLWAPI VOID WINAPI PathRemoveExtensionW (LPWSTR)
 
WINSHLWAPI BOOL WINAPI PathRemoveFileSpecA (LPSTR)
 
WINSHLWAPI BOOL WINAPI PathRemoveFileSpecW (LPWSTR)
 
WINSHLWAPI BOOL WINAPI PathRenameExtensionA (LPSTR, LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathRenameExtensionW (LPWSTR, LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathSearchAndQualifyA (LPCSTR, LPSTR, UINT)
 
WINSHLWAPI BOOL WINAPI PathSearchAndQualifyW (LPCWSTR, LPWSTR, UINT)
 
WINSHLWAPI VOID WINAPI PathSetDlgItemPathA (HWND, int, LPCSTR)
 
WINSHLWAPI VOID WINAPI PathSetDlgItemPathW (HWND, int, LPCWSTR)
 
WINSHLWAPI LPSTR WINAPI PathSkipRootA (LPCSTR)
 
WINSHLWAPI LPWSTR WINAPI PathSkipRootW (LPCWSTR)
 
WINSHLWAPI VOID WINAPI PathStripPathA (LPSTR)
 
WINSHLWAPI VOID WINAPI PathStripPathW (LPWSTR)
 
WINSHLWAPI BOOL WINAPI PathStripToRootA (LPSTR)
 
WINSHLWAPI BOOL WINAPI PathStripToRootW (LPWSTR)
 
WINSHLWAPI VOID WINAPI PathUnquoteSpacesA (LPSTR)
 
WINSHLWAPI VOID WINAPI PathUnquoteSpacesW (LPWSTR)
 
WINSHLWAPI BOOL WINAPI PathMakeSystemFolderA (LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathMakeSystemFolderW (LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathUnmakeSystemFolderA (LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathUnmakeSystemFolderW (LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathIsSystemFolderA (LPCSTR, DWORD)
 
WINSHLWAPI BOOL WINAPI PathIsSystemFolderW (LPCWSTR, DWORD)
 
WINSHLWAPI BOOL WINAPI PathIsNetworkPathA (LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathIsNetworkPathW (LPCWSTR)
 
WINSHLWAPI BOOL WINAPI PathIsLFNFileSpecA (LPCSTR)
 
WINSHLWAPI BOOL WINAPI PathIsLFNFileSpecW (LPCWSTR)
 
WINSHLWAPI LPCSTR WINAPI PathFindSuffixArrayA (LPCSTR, LPCSTR *, int)
 
WINSHLWAPI LPCWSTR WINAPI PathFindSuffixArrayW (LPCWSTR, LPCWSTR *, int)
 
WINSHLWAPI VOID WINAPI PathUndecorateA (LPSTR)
 
WINSHLWAPI VOID WINAPI PathUndecorateW (LPWSTR)
 
WINSHLWAPI BOOL WINAPI PathUnExpandEnvStringsA (LPCSTR, LPSTR, UINT)
 
WINSHLWAPI BOOL WINAPI PathUnExpandEnvStringsW (LPCWSTR, LPWSTR, UINT)
 
WINSHLWAPI HRESULT WINAPI UrlApplySchemeA (LPCSTR, LPSTR, LPDWORD, DWORD)
 
WINSHLWAPI HRESULT WINAPI UrlApplySchemeW (LPCWSTR, LPWSTR, LPDWORD, DWORD)
 
WINSHLWAPI HRESULT WINAPI UrlCanonicalizeA (LPCSTR, LPSTR, LPDWORD, DWORD)
 
WINSHLWAPI HRESULT WINAPI UrlCanonicalizeW (LPCWSTR, LPWSTR, LPDWORD, DWORD)
 
WINSHLWAPI HRESULT WINAPI UrlCombineA (LPCSTR, LPCSTR, LPSTR, LPDWORD, DWORD)
 
WINSHLWAPI HRESULT WINAPI UrlCombineW (LPCWSTR, LPCWSTR, LPWSTR, LPDWORD, DWORD)
 
WINSHLWAPI INT WINAPI UrlCompareA (LPCSTR, LPCSTR, BOOL)
 
WINSHLWAPI INT WINAPI UrlCompareW (LPCWSTR, LPCWSTR, BOOL)
 
WINSHLWAPI HRESULT WINAPI UrlEscapeA (LPCSTR, LPSTR, LPDWORD, DWORD)
 
WINSHLWAPI HRESULT WINAPI UrlEscapeW (LPCWSTR, LPWSTR, LPDWORD, DWORD)
 
WINSHLWAPI LPCSTR WINAPI UrlGetLocationA (LPCSTR)
 
WINSHLWAPI LPCWSTR WINAPI UrlGetLocationW (LPCWSTR)
 
WINSHLWAPI HRESULT WINAPI UrlGetPartA (LPCSTR, LPSTR, LPDWORD, DWORD, DWORD)
 
WINSHLWAPI HRESULT WINAPI UrlGetPartW (LPCWSTR, LPWSTR, LPDWORD, DWORD, DWORD)
 
WINSHLWAPI HRESULT WINAPI HashData (const unsigned char *, DWORD, unsigned char *lpDest, DWORD)
 
WINSHLWAPI HRESULT WINAPI UrlHashA (LPCSTR, unsigned char *, DWORD)
 
WINSHLWAPI HRESULT WINAPI UrlHashW (LPCWSTR, unsigned char *, DWORD)
 
WINSHLWAPI BOOL WINAPI UrlIsA (LPCSTR, URLIS)
 
WINSHLWAPI BOOL WINAPI UrlIsW (LPCWSTR, URLIS)
 
WINSHLWAPI BOOL WINAPI UrlIsNoHistoryA (LPCSTR)
 
WINSHLWAPI BOOL WINAPI UrlIsNoHistoryW (LPCWSTR)
 
WINSHLWAPI BOOL WINAPI UrlIsOpaqueA (LPCSTR)
 
WINSHLWAPI BOOL WINAPI UrlIsOpaqueW (LPCWSTR)
 
WINSHLWAPI HRESULT WINAPI UrlUnescapeA (LPSTR, LPSTR, LPDWORD, DWORD)
 
WINSHLWAPI HRESULT WINAPI UrlUnescapeW (LPWSTR, LPWSTR, LPDWORD, DWORD)
 
WINSHLWAPI HRESULT WINAPI UrlCreateFromPathA (LPCSTR, LPSTR, LPDWORD, DWORD)
 
WINSHLWAPI HRESULT WINAPI UrlCreateFromPathW (LPCWSTR, LPWSTR, LPDWORD, DWORD)
 
WINSHLWAPI HRESULT WINAPI ParseURLA (LPCSTR pszUrl, PARSEDURLA *ppu)
 
WINSHLWAPI HRESULT WINAPI ParseURLW (LPCWSTR pszUrl, PARSEDURLW *ppu)
 
WINSHLWAPI BOOL WINAPI ChrCmpIA (WORD, WORD)
 
WINSHLWAPI BOOL WINAPI ChrCmpIW (WCHAR, WCHAR)
 
WINSHLWAPI INT WINAPI StrCSpnA (LPCSTR, LPCSTR)
 
WINSHLWAPI INT WINAPI StrCSpnW (LPCWSTR, LPCWSTR)
 
WINSHLWAPI INT WINAPI StrCSpnIA (LPCSTR, LPCSTR)
 
WINSHLWAPI INT WINAPI StrCSpnIW (LPCWSTR, LPCWSTR)
 
WINSHLWAPI LPWSTR WINAPI StrCatW (LPWSTR, LPCWSTR)
 
WINSHLWAPI LPSTR WINAPI StrCatBuffA (LPSTR, LPCSTR, INT)
 
WINSHLWAPI LPWSTR WINAPI StrCatBuffW (LPWSTR, LPCWSTR, INT)
 
WINSHLWAPI DWORD WINAPI StrCatChainW (LPWSTR, DWORD, DWORD, LPCWSTR)
 
WINSHLWAPI LPSTR WINAPI StrChrA (LPCSTR, WORD)
 
WINSHLWAPI LPWSTR WINAPI StrChrW (LPCWSTR, WCHAR)
 
WINSHLWAPI LPSTR WINAPI StrChrIA (LPCSTR, WORD)
 
WINSHLWAPI LPWSTR WINAPI StrChrIW (LPCWSTR, WCHAR)
 
WINSHLWAPI int WINAPI StrCmpW (LPCWSTR, LPCWSTR)
 
WINSHLWAPI int WINAPI StrCmpIW (LPCWSTR, LPCWSTR)
 
WINSHLWAPI LPWSTR WINAPI StrCpyW (LPWSTR, LPCWSTR)
 
WINSHLWAPI LPWSTR WINAPI StrCpyNW (LPWSTR, LPCWSTR, int)
 
WINSHLWAPI INT WINAPI StrCmpLogicalW (LPCWSTR, LPCWSTR)
 
WINSHLWAPI INT WINAPI StrCmpNA (LPCSTR, LPCSTR, INT)
 
WINSHLWAPI INT WINAPI StrCmpNW (LPCWSTR, LPCWSTR, INT)
 
WINSHLWAPI INT WINAPI StrCmpNIA (LPCSTR, LPCSTR, INT)
 
WINSHLWAPI INT WINAPI StrCmpNIW (LPCWSTR, LPCWSTR, INT)
 
WINSHLWAPI char *WINAPI StrDupA (const char *) __WINE_DEALLOC(LocalFree) __WINE_MALLOC
 
WINSHLWAPI WCHAR *WINAPI StrDupW (const WCHAR *) __WINE_DEALLOC(LocalFree) __WINE_MALLOC
 
WINSHLWAPI HRESULT WINAPI SHStrDupA (LPCSTR, WCHAR **)
 
WINSHLWAPI HRESULT WINAPI SHStrDupW (LPCWSTR, WCHAR **)
 
WINSHLWAPI LPSTR WINAPI StrFormatByteSizeA (DWORD, LPSTR, UINT)
 
WINSHLWAPI HRESULT WINAPI StrFormatByteSizeEx (LONGLONG, SFBS_FLAGS, LPWSTR, UINT)
 
WINSHLWAPI LPSTR WINAPI StrFormatByteSize64A (LONGLONG, LPSTR, UINT)
 
WINSHLWAPI LPWSTR WINAPI StrFormatByteSizeW (LONGLONG, LPWSTR, UINT)
 
WINSHLWAPI LPSTR WINAPI StrFormatKBSizeA (LONGLONG, LPSTR, UINT)
 
WINSHLWAPI LPWSTR WINAPI StrFormatKBSizeW (LONGLONG, LPWSTR, UINT)
 
WINSHLWAPI int WINAPI StrFromTimeIntervalA (LPSTR, UINT, DWORD, int)
 
WINSHLWAPI int WINAPI StrFromTimeIntervalW (LPWSTR, UINT, DWORD, int)
 
WINSHLWAPI BOOL WINAPI StrIsIntlEqualA (BOOL, LPCSTR, LPCSTR, int)
 
WINSHLWAPI BOOL WINAPI StrIsIntlEqualW (BOOL, LPCWSTR, LPCWSTR, int)
 
WINSHLWAPI LPSTR WINAPI StrNCatA (LPSTR, LPCSTR, int)
 
WINSHLWAPI LPWSTR WINAPI StrNCatW (LPWSTR, LPCWSTR, int)
 
WINSHLWAPI LPSTR WINAPI StrPBrkA (LPCSTR, LPCSTR)
 
WINSHLWAPI LPWSTR WINAPI StrPBrkW (LPCWSTR, LPCWSTR)
 
WINSHLWAPI LPSTR WINAPI StrRChrA (LPCSTR, LPCSTR, WORD)
 
WINSHLWAPI LPWSTR WINAPI StrRChrW (LPCWSTR, LPCWSTR, WORD)
 
WINSHLWAPI LPSTR WINAPI StrRChrIA (LPCSTR, LPCSTR, WORD)
 
WINSHLWAPI LPWSTR WINAPI StrRChrIW (LPCWSTR, LPCWSTR, WORD)
 
WINSHLWAPI LPSTR WINAPI StrRStrIA (LPCSTR, LPCSTR, LPCSTR)
 
WINSHLWAPI LPWSTR WINAPI StrRStrIW (LPCWSTR, LPCWSTR, LPCWSTR)
 
WINSHLWAPI int WINAPI StrSpnA (LPCSTR, LPCSTR)
 
WINSHLWAPI int WINAPI StrSpnW (LPCWSTR, LPCWSTR)
 
WINSHLWAPI LPSTR WINAPI StrStrA (LPCSTR, LPCSTR)
 
WINSHLWAPI LPWSTR WINAPI StrStrW (LPCWSTR, LPCWSTR)
 
WINSHLWAPI LPSTR WINAPI StrStrIA (LPCSTR, LPCSTR)
 
WINSHLWAPI LPWSTR WINAPI StrStrIW (LPCWSTR, LPCWSTR)
 
WINSHLWAPI LPWSTR WINAPI StrStrNW (LPCWSTR, LPCWSTR, UINT)
 
WINSHLWAPI LPWSTR WINAPI StrStrNIW (LPCWSTR, LPCWSTR, UINT)
 
WINSHLWAPI int WINAPI StrToIntA (LPCSTR)
 
WINSHLWAPI int WINAPI StrToIntW (LPCWSTR)
 
WINSHLWAPI BOOL WINAPI StrToIntExA (LPCSTR, DWORD, int *)
 
WINSHLWAPI BOOL WINAPI StrToIntExW (LPCWSTR, DWORD, int *)
 
WINSHLWAPI BOOL WINAPI StrToInt64ExA (LPCSTR, DWORD, LONGLONG *)
 
WINSHLWAPI BOOL WINAPI StrToInt64ExW (LPCWSTR, DWORD, LONGLONG *)
 
WINSHLWAPI BOOL WINAPI StrTrimA (LPSTR, LPCSTR)
 
WINSHLWAPI BOOL WINAPI StrTrimW (LPWSTR, LPCWSTR)
 
WINSHLWAPI INT WINAPIV wnsprintfA (LPSTR, INT, LPCSTR,...)
 
WINSHLWAPI INT WINAPIV wnsprintfW (LPWSTR, INT, LPCWSTR,...)
 
WINSHLWAPI HRESULT WINAPI SHLoadIndirectString (LPCWSTR, LPWSTR, UINT, PVOID *)
 
WINSHLWAPI BOOL WINAPI IntlStrEqWorkerA (BOOL, LPCSTR, LPCSTR, int)
 
WINSHLWAPI BOOL WINAPI IntlStrEqWorkerW (BOOL, LPCWSTR, LPCWSTR, int)
 
WINSHLWAPI HRESULT WINAPI StrRetToStrA (STRRET *, LPCITEMIDLIST, LPSTR *)
 
WINSHLWAPI HRESULT WINAPI StrRetToStrW (STRRET *, LPCITEMIDLIST, LPWSTR *)
 
WINSHLWAPI HRESULT WINAPI StrRetToBufA (STRRET *, LPCITEMIDLIST, LPSTR, UINT)
 
WINSHLWAPI HRESULT WINAPI StrRetToBufW (STRRET *, LPCITEMIDLIST, LPWSTR, UINT)
 
WINSHLWAPI HRESULT WINAPI StrRetToBSTR (STRRET *, LPCITEMIDLIST, BSTR *)
 
WINSHLWAPI BOOL WINAPI IsCharSpaceA (CHAR)
 
WINSHLWAPI BOOL WINAPI IsCharSpaceW (WCHAR)
 
WINSHLWAPI HPALETTE WINAPI SHCreateShellPalette (HDC)
 
WINSHLWAPI COLORREF WINAPI ColorHLSToRGB (WORD, WORD, WORD)
 
WINSHLWAPI COLORREF WINAPI ColorAdjustLuma (COLORREF, int, BOOL)
 
WINSHLWAPI VOID WINAPI ColorRGBToHLS (COLORREF, LPWORD, LPWORD, LPWORD)
 
WINSHLWAPI BOOL WINAPI IsInternetESCEnabled (void)
 
WINSHLWAPI struct IStream *WINAPI SHOpenRegStreamA (HKEY, LPCSTR, LPCSTR, DWORD)
 
WINSHLWAPI struct IStream *WINAPI SHOpenRegStreamW (HKEY, LPCWSTR, LPCWSTR, DWORD)
 
WINSHLWAPI struct IStream *WINAPI SHOpenRegStream2A (HKEY, LPCSTR, LPCSTR, DWORD)
 
WINSHLWAPI struct IStream *WINAPI SHOpenRegStream2W (HKEY, LPCWSTR, LPCWSTR, DWORD)
 
WINSHLWAPI HRESULT WINAPI SHCreateStreamOnFileA (LPCSTR, DWORD, struct IStream **)
 
WINSHLWAPI HRESULT WINAPI SHCreateStreamOnFileW (LPCWSTR, DWORD, struct IStream **)
 
WINSHLWAPI struct IStream *WINAPI SHCreateMemStream (const BYTE *, UINT)
 
WINSHLWAPI HRESULT WINAPI SHCreateStreamOnFileEx (LPCWSTR, DWORD, DWORD, BOOL, struct IStream *, struct IStream **)
 
WINSHLWAPI HRESULT WINAPI SHCreateStreamWrapper (LPBYTE, DWORD, DWORD, struct IStream **)
 
WINSHLWAPI HRESULT WINAPI IStream_Reset (IStream *)
 
WINSHLWAPI HRESULT WINAPI IStream_Size (IStream *, ULARGE_INTEGER *)
 
WINSHLWAPI HRESULT WINAPI SHAutoComplete (HWND, DWORD)
 
WINSHLWAPI HRESULT WINAPI SHCreateThreadRef (LONG *, IUnknown **)
 
WINSHLWAPI HRESULT WINAPI SHGetThreadRef (IUnknown **)
 
WINSHLWAPI HRESULT WINAPI SHSetThreadRef (IUnknown *)
 
WINSHLWAPI HRESULT WINAPI SHReleaseThreadRef (void)
 
WINSHLWAPI BOOL WINAPI SHCreateThread (LPTHREAD_START_ROUTINE, void *, DWORD, LPTHREAD_START_ROUTINE)
 
WINSHLWAPI BOOL WINAPI SHSkipJunction (struct IBindCtx *, const CLSID *)
 
HRESULT WINAPI DllInstall (BOOL, LPCWSTR)
 
WINSHLWAPI BOOL WINAPI IsOS (DWORD)
 
WINSHLWAPI int WINAPI SHFormatDateTimeA (const FILETIME *filetime, DWORD *flags, LPSTR buffer, UINT size)
 
WINSHLWAPI int WINAPI SHFormatDateTimeW (const FILETIME *filetime, DWORD *flags, LPWSTR buffer, UINT size)
 
WINSHLWAPI HRESULT WINAPI QISearch (void *base, const QITAB *pqit, REFIID riid, void **ppv)
 
WINSHLWAPI UINT WINAPI WhichPlatform (void)
 
WINSHLWAPI HRESULT WINAPI SHGetViewStatePropertyBag (PCIDLIST_ABSOLUTE pidl, PCWSTR bagname, DWORD flags, REFIID riid, void **ppv)
 
WINSHLWAPI BOOL WINAPI SHIsLowMemoryMachine (DWORD type)
 
WINSHLWAPI HANDLE WINAPI SHAllocShared (const void *data, DWORD size, DWORD pid)
 
WINSHLWAPI BOOL WINAPI SHFreeShared (HANDLE handle, DWORD pid)
 
WINSHLWAPI void *WINAPI SHLockShared (HANDLE handle, DWORD pid)
 
WINSHLWAPI BOOL WINAPI SHUnlockShared (void *data)
 

Macro Definition Documentation

◆ AssocQueryKey

#define AssocQueryKey   WINELIB_NAME_AW(AssocQueryKey)

Definition at line 341 of file shlwapi.h.

◆ AssocQueryString

#define AssocQueryString   WINELIB_NAME_AW(AssocQueryString)

Definition at line 333 of file shlwapi.h.

◆ AssocQueryStringByKey

#define AssocQueryStringByKey   WINELIB_NAME_AW(AssocQueryStringByKey)

Definition at line 337 of file shlwapi.h.

◆ ChrCmpI

#define ChrCmpI   WINELIB_NAME_AW(ChrCmpI)

Definition at line 797 of file shlwapi.h.

◆ DLLVER_BUILD_MASK

#define DLLVER_BUILD_MASK   0x00000000FFFF0000

Definition at line 1108 of file shlwapi.h.

◆ DLLVER_MAJOR_MASK

#define DLLVER_MAJOR_MASK   0xFFFF000000000000

Definition at line 1106 of file shlwapi.h.

◆ DLLVER_MINOR_MASK

#define DLLVER_MINOR_MASK   0x0000FFFF00000000

Definition at line 1107 of file shlwapi.h.

◆ DLLVER_PLATFORM_NT

#define DLLVER_PLATFORM_NT   0x02 /* WinNT */

Definition at line 1091 of file shlwapi.h.

◆ DLLVER_PLATFORM_WINDOWS

#define DLLVER_PLATFORM_WINDOWS   0x01 /* Win9x */

Definition at line 1090 of file shlwapi.h.

◆ DLLVER_QFE_MASK

#define DLLVER_QFE_MASK   0x000000000000FFFF

Definition at line 1109 of file shlwapi.h.

◆ FDTF_DEFAULT

#define FDTF_DEFAULT   (FDTF_SHORTDATE | FDTF_SHORTTIME)

Definition at line 1166 of file shlwapi.h.

◆ FDTF_LONGDATE

#define FDTF_LONGDATE   0x00000004

Definition at line 1167 of file shlwapi.h.

◆ FDTF_LONGTIME

#define FDTF_LONGTIME   0x00000008

Definition at line 1168 of file shlwapi.h.

◆ FDTF_LTRDATE

#define FDTF_LTRDATE   0x00000100

Definition at line 1170 of file shlwapi.h.

◆ FDTF_NOAUTOREADINGORDER

#define FDTF_NOAUTOREADINGORDER   0x00000400

Definition at line 1172 of file shlwapi.h.

◆ FDTF_RELATIVE

#define FDTF_RELATIVE   0x00000010

Definition at line 1169 of file shlwapi.h.

◆ FDTF_RTLDATE

#define FDTF_RTLDATE   0x00000200

Definition at line 1171 of file shlwapi.h.

◆ FDTF_SHORTDATE

#define FDTF_SHORTDATE   0x00000002

Definition at line 1165 of file shlwapi.h.

◆ FDTF_SHORTTIME

#define FDTF_SHORTTIME   0x00000001

Definition at line 1164 of file shlwapi.h.

◆ GCT_INVALID

#define GCT_INVALID   0x0

Definition at line 358 of file shlwapi.h.

◆ GCT_LFNCHAR

#define GCT_LFNCHAR   0x1

Definition at line 359 of file shlwapi.h.

◆ GCT_SEPARATOR

#define GCT_SEPARATOR   0x8

Definition at line 362 of file shlwapi.h.

◆ GCT_SHORTCHAR

#define GCT_SHORTCHAR   0x2

Definition at line 360 of file shlwapi.h.

◆ GCT_WILD

#define GCT_WILD   0x4

Definition at line 361 of file shlwapi.h.

◆ GetAcceptLanguages

#define GetAcceptLanguages   WINELIB_NAME_AW(GetAcceptLanguages)

Definition at line 46 of file shlwapi.h.

◆ ILMM_IE4

#define ILMM_IE4   0

Definition at line 1206 of file shlwapi.h.

◆ INTERFACE

#define INTERFACE   IQueryAssociations

Definition at line 302 of file shlwapi.h.

◆ IntlStrEqN

#define IntlStrEqN   WINELIB_NAME_AW(IntlStrEqN)

Definition at line 971 of file shlwapi.h.

◆ IntlStrEqNA

#define IntlStrEqNA (   s1,
  s2,
  n 
)    IntlStrEqWorkerA(TRUE,s1,s2,n)

Definition at line 969 of file shlwapi.h.

◆ IntlStrEqNI

#define IntlStrEqNI   WINELIB_NAME_AW(IntlStrEqNI)

Definition at line 975 of file shlwapi.h.

◆ IntlStrEqNIA

#define IntlStrEqNIA (   s1,
  s2,
  n 
)    IntlStrEqWorkerA(FALSE,s1,s2,n)

Definition at line 973 of file shlwapi.h.

◆ IntlStrEqNIW

#define IntlStrEqNIW (   s1,
  s2,
  n 
)    IntlStrEqWorkerW(FALSE,s1,s2,n)

Definition at line 974 of file shlwapi.h.

◆ IntlStrEqNW

#define IntlStrEqNW (   s1,
  s2,
  n 
)    IntlStrEqWorkerW(TRUE,s1,s2,n)

Definition at line 970 of file shlwapi.h.

◆ IntlStrEqWorker

#define IntlStrEqWorker   WINELIB_NAME_AW(IntlStrEqWorker)

Definition at line 967 of file shlwapi.h.

◆ IQueryAssociations_AddRef

#define IQueryAssociations_AddRef (   p)    (p)->lpVtbl->AddRef(p)

Definition at line 320 of file shlwapi.h.

◆ IQueryAssociations_GetData

#define IQueryAssociations_GetData (   p,
  a,
  b,
  c,
  d,
  e 
)    (p)->lpVtbl->GetData(p,a,b,c,d,e)

Definition at line 325 of file shlwapi.h.

◆ IQueryAssociations_GetEnum

#define IQueryAssociations_GetEnum (   p,
  a,
  b,
  c,
  d,
  e 
)    (p)->lpVtbl->GetEnum(p,a,b,c,d,e)

Definition at line 326 of file shlwapi.h.

◆ IQueryAssociations_GetKey

#define IQueryAssociations_GetKey (   p,
  a,
  b,
  c,
  d 
)    (p)->lpVtbl->GetKey(p,a,b,c,d)

Definition at line 324 of file shlwapi.h.

◆ IQueryAssociations_GetString

#define IQueryAssociations_GetString (   p,
  a,
  b,
  c,
  d,
  e 
)    (p)->lpVtbl->GetString(p,a,b,c,d,e)

Definition at line 323 of file shlwapi.h.

◆ IQueryAssociations_Init

#define IQueryAssociations_Init (   p,
  a,
  b,
  c,
  d 
)    (p)->lpVtbl->Init(p,a,b,c,d)

Definition at line 322 of file shlwapi.h.

◆ IQueryAssociations_QueryInterface

#define IQueryAssociations_QueryInterface (   p,
  a,
  b 
)    (p)->lpVtbl->QueryInterface(p,a,b)

Definition at line 319 of file shlwapi.h.

◆ IQueryAssociations_Release

#define IQueryAssociations_Release (   p)    (p)->lpVtbl->Release(p)

Definition at line 321 of file shlwapi.h.

◆ IsCharSpace

#define IsCharSpace   WINELIB_NAME_AW(IsCharSpace)

Definition at line 989 of file shlwapi.h.

◆ MAKEDLLVERULL

#define MAKEDLLVERULL (   mjr,
  mnr,
  bld,
  qfe 
)
Value:
(((ULONGLONG)(mjr)<< 48)| \
((ULONGLONG)(mnr)<< 32) | ((ULONGLONG)(bld)<< 16) | (ULONGLONG)(qfe))
uint64_t ULONGLONG
Definition: typedefs.h:67

Definition at line 1111 of file shlwapi.h.

◆ OS_ADVSERVER

#define OS_ADVSERVER   0x16

Definition at line 1141 of file shlwapi.h.

◆ OS_ANYSERVER

#define OS_ANYSERVER   0x1D

Definition at line 1148 of file shlwapi.h.

◆ OS_APPLIANCE

#define OS_APPLIANCE   0x24

Definition at line 1155 of file shlwapi.h.

◆ OS_DATACENTER

#define OS_DATACENTER   0x15

Definition at line 1140 of file shlwapi.h.

◆ OS_DOMAINMEMBER

#define OS_DOMAINMEMBER   0x1C

Definition at line 1147 of file shlwapi.h.

◆ OS_EMBEDDED

#define OS_EMBEDDED   0x0D

Definition at line 1132 of file shlwapi.h.

◆ OS_FASTUSERSWITCHING

#define OS_FASTUSERSWITCHING   0x1A

Definition at line 1145 of file shlwapi.h.

◆ OS_HOME

#define OS_HOME   0x13

Definition at line 1138 of file shlwapi.h.

◆ OS_MEDIACENTER

#define OS_MEDIACENTER   0x23

Definition at line 1154 of file shlwapi.h.

◆ OS_MEORGREATER

#define OS_MEORGREATER   0x11

Definition at line 1136 of file shlwapi.h.

◆ OS_NT

#define OS_NT   0x01

Definition at line 1120 of file shlwapi.h.

◆ OS_NT4ORGREATER

#define OS_NT4ORGREATER   0x03

Definition at line 1122 of file shlwapi.h.

◆ OS_PERSONALTERMINALSERVER

#define OS_PERSONALTERMINALSERVER   0x19

Definition at line 1144 of file shlwapi.h.

◆ OS_PROFESSIONAL

#define OS_PROFESSIONAL   0x14

Definition at line 1139 of file shlwapi.h.

◆ OS_SERVER

#define OS_SERVER   0x17

Definition at line 1142 of file shlwapi.h.

◆ OS_SERVERADMINUI

#define OS_SERVERADMINUI   0x22

Definition at line 1153 of file shlwapi.h.

◆ OS_SMALLBUSINESSSERVER

#define OS_SMALLBUSINESSSERVER   0x20

Definition at line 1151 of file shlwapi.h.

◆ OS_TABLETPC

#define OS_TABLETPC   0x21

Definition at line 1152 of file shlwapi.h.

◆ OS_TERMINALCLIENT

#define OS_TERMINALCLIENT   0x0E

Definition at line 1133 of file shlwapi.h.

◆ OS_TERMINALREMOTEADMIN

#define OS_TERMINALREMOTEADMIN   0x0F

Definition at line 1134 of file shlwapi.h.

◆ OS_TERMINALSERVER

#define OS_TERMINALSERVER   0x18

Definition at line 1143 of file shlwapi.h.

◆ OS_WEBSERVER

#define OS_WEBSERVER   0x1F

Definition at line 1150 of file shlwapi.h.

◆ OS_WELCOMELOGONUI

#define OS_WELCOMELOGONUI   0x1B

Definition at line 1146 of file shlwapi.h.

◆ OS_WIN2000ADVSERVER

#define OS_WIN2000ADVSERVER   0x0A

Definition at line 1129 of file shlwapi.h.

◆ OS_WIN2000DATACENTER

#define OS_WIN2000DATACENTER   0x0B

Definition at line 1130 of file shlwapi.h.

◆ OS_WIN2000ORGREATER

#define OS_WIN2000ORGREATER   0x07

Definition at line 1126 of file shlwapi.h.

◆ OS_WIN2000ORGREATER_ALT

#define OS_WIN2000ORGREATER_ALT   0x04

Definition at line 1123 of file shlwapi.h.

◆ OS_WIN2000PRO

#define OS_WIN2000PRO   0x08

Definition at line 1127 of file shlwapi.h.

◆ OS_WIN2000SERVER

#define OS_WIN2000SERVER   0x09

Definition at line 1128 of file shlwapi.h.

◆ OS_WIN2000TERMINAL

#define OS_WIN2000TERMINAL   0x0C

Definition at line 1131 of file shlwapi.h.

◆ OS_WIN32SORGREATER

#define OS_WIN32SORGREATER   0x00

Definition at line 1119 of file shlwapi.h.

◆ OS_WIN95_GOLD

#define OS_WIN95_GOLD   0x10

Definition at line 1135 of file shlwapi.h.

◆ OS_WIN95ORGREATER

#define OS_WIN95ORGREATER   0x02

Definition at line 1121 of file shlwapi.h.

◆ OS_WIN98_GOLD

#define OS_WIN98_GOLD   0x06

Definition at line 1125 of file shlwapi.h.

◆ OS_WIN98ORGREATER

#define OS_WIN98ORGREATER   0x05

Definition at line 1124 of file shlwapi.h.

◆ OS_WOW6432

#define OS_WOW6432   0x1E

Definition at line 1149 of file shlwapi.h.

◆ OS_XPORGREATER

#define OS_XPORGREATER   0x12

Definition at line 1137 of file shlwapi.h.

◆ ParseURL

#define ParseURL   WINELIB_NAME_AW(ParseUrl)

Definition at line 783 of file shlwapi.h.

◆ PathAddBackslash

#define PathAddBackslash   WINELIB_NAME_AW(PathAddBackslash)

Definition at line 366 of file shlwapi.h.

◆ PathAddExtension

#define PathAddExtension   WINELIB_NAME_AW(PathAddExtension)

Definition at line 370 of file shlwapi.h.

◆ PathAppend

#define PathAppend   WINELIB_NAME_AW(PathAppend)

Definition at line 374 of file shlwapi.h.

◆ PathBuildRoot

#define PathBuildRoot   WINELIB_NAME_AW(PathBuiltRoot)

Definition at line 378 of file shlwapi.h.

◆ PathCanonicalize

#define PathCanonicalize   WINELIB_NAME_AW(PathCanonicalize)

Definition at line 382 of file shlwapi.h.

◆ PathCombine

#define PathCombine   WINELIB_NAME_AW(PathCombine)

Definition at line 386 of file shlwapi.h.

◆ PathCommonPrefix

#define PathCommonPrefix   WINELIB_NAME_AW(PathCommonPrefix)

Definition at line 398 of file shlwapi.h.

◆ PathCompactPath

#define PathCompactPath   WINELIB_NAME_AW(PathCompactPath)

Definition at line 390 of file shlwapi.h.

◆ PathCompactPathEx

#define PathCompactPathEx   WINELIB_NAME_AW(PathCompactPathEx)

Definition at line 394 of file shlwapi.h.

◆ PathCreateFromUrl

#define PathCreateFromUrl   WINELIB_NAME_AW(PathCreateFromUrl)

Definition at line 402 of file shlwapi.h.

◆ PathFileExists

#define PathFileExists   WINELIB_NAME_AW(PathFileExists)

Definition at line 408 of file shlwapi.h.

◆ PathFileExistsAndAttributes

#define PathFileExistsAndAttributes   WINELIB_NAME_AW(PathFileExistsAndAttributes)

Definition at line 412 of file shlwapi.h.

◆ PathFindExtension

#define PathFindExtension   WINELIB_NAME_AW(PathFindExtension)

Definition at line 416 of file shlwapi.h.

◆ PathFindFileName

#define PathFindFileName   WINELIB_NAME_AW(PathFindFileName)

Definition at line 420 of file shlwapi.h.

◆ PathFindNextComponent

#define PathFindNextComponent   WINELIB_NAME_AW(PathFindNextComponent)

Definition at line 424 of file shlwapi.h.

◆ PathFindOnPath

#define PathFindOnPath   WINELIB_NAME_AW(PathFindOnPath)

Definition at line 428 of file shlwapi.h.

◆ PathFindSuffixArray

#define PathFindSuffixArray   WINELIB_NAME_AW(PathFindSuffixArray)

Definition at line 588 of file shlwapi.h.

◆ PathGetArgs

#define PathGetArgs   WINELIB_NAME_AW(PathGetArgs)

Definition at line 432 of file shlwapi.h.

◆ PathGetCharType

#define PathGetCharType   WINELIB_NAME_AW(PathGetCharType)

Definition at line 436 of file shlwapi.h.

◆ PathGetDriveNumber

#define PathGetDriveNumber   WINELIB_NAME_AW(PathGetDriveNumber)

Definition at line 440 of file shlwapi.h.

◆ PathIsContentType

#define PathIsContentType   WINELIB_NAME_AW(PathIsContentType)

Definition at line 484 of file shlwapi.h.

◆ PathIsDirectory

#define PathIsDirectory   WINELIB_NAME_AW(PathIsDirectory)

Definition at line 444 of file shlwapi.h.

◆ PathIsDirectoryEmpty

#define PathIsDirectoryEmpty   WINELIB_NAME_AW(PathIsDirectoryEmpty)

Definition at line 448 of file shlwapi.h.

◆ PathIsFileSpec

#define PathIsFileSpec   WINELIB_NAME_AW(PathIsFileSpec)

Definition at line 452 of file shlwapi.h.

◆ PathIsLFNFileSpec

#define PathIsLFNFileSpec   WINELIB_NAME_AW(PathIsLFNFileSpec)

Definition at line 584 of file shlwapi.h.

◆ PathIsNetworkPath

#define PathIsNetworkPath   WINELIB_NAME_AW(PathIsNetworkPath)

Definition at line 580 of file shlwapi.h.

◆ PathIsPrefix

#define PathIsPrefix   WINELIB_NAME_AW(PathIsPrefix)

Definition at line 456 of file shlwapi.h.

◆ PathIsRelative

#define PathIsRelative   WINELIB_NAME_AW(PathIsRelative)

Definition at line 460 of file shlwapi.h.

◆ PathIsRoot

#define PathIsRoot   WINELIB_NAME_AW(PathIsRoot)

Definition at line 464 of file shlwapi.h.

◆ PathIsSameRoot

#define PathIsSameRoot   WINELIB_NAME_AW(PathIsSameRoot)

Definition at line 468 of file shlwapi.h.

◆ PathIsSystemFolder

#define PathIsSystemFolder   WINELIB_NAME_AW(PathIsSystemFolder)

Definition at line 576 of file shlwapi.h.

◆ PathIsUNC

#define PathIsUNC   WINELIB_NAME_AW(PathIsUNC)

Definition at line 472 of file shlwapi.h.

◆ PathIsUNCServer

#define PathIsUNCServer   WINELIB_NAME_AW(PathIsUNCServer)

Definition at line 476 of file shlwapi.h.

◆ PathIsUNCServerShare

#define PathIsUNCServerShare   WINELIB_NAME_AW(PathIsUNCServerShare)

Definition at line 480 of file shlwapi.h.

◆ PathIsURL

#define PathIsURL   WINELIB_NAME_AW(PathIsURL)

Definition at line 488 of file shlwapi.h.

◆ PathMakePretty

#define PathMakePretty   WINELIB_NAME_AW(PathMakePretty)

Definition at line 492 of file shlwapi.h.

◆ PathMakeSystemFolder

#define PathMakeSystemFolder   WINELIB_NAME_AW(PathMakeSystemFolder)

Definition at line 568 of file shlwapi.h.

◆ PathMatchSpec

#define PathMatchSpec   WINELIB_NAME_AW(PathMatchSpec)

Definition at line 496 of file shlwapi.h.

◆ PathMatchSpecEx

#define PathMatchSpecEx   WINELIB_NAME_AW(PathMatchSpecEx)

Definition at line 504 of file shlwapi.h.

◆ PathParseIconLocation

#define PathParseIconLocation   WINELIB_NAME_AW(PathParseIconLocation)

Definition at line 508 of file shlwapi.h.

◆ PathQuoteSpaces

#define PathQuoteSpaces   WINELIB_NAME_AW(PathQuoteSpaces)

Definition at line 512 of file shlwapi.h.

◆ PathRelativePathTo

#define PathRelativePathTo   WINELIB_NAME_AW(PathRelativePathTo)

Definition at line 516 of file shlwapi.h.

◆ PathRemoveArgs

#define PathRemoveArgs   WINELIB_NAME_AW(PathRemoveArgs)

Definition at line 520 of file shlwapi.h.

◆ PathRemoveBackslash

#define PathRemoveBackslash   WINELIB_NAME_AW(PathRemoveBackslash)

Definition at line 524 of file shlwapi.h.

◆ PathRemoveBlanks

#define PathRemoveBlanks   WINELIB_NAME_AW(PathRemoveBlanks)

Definition at line 528 of file shlwapi.h.

◆ PathRemoveExtension

#define PathRemoveExtension   WINELIB_NAME_AW(PathRemoveExtension)

Definition at line 532 of file shlwapi.h.

◆ PathRemoveFileSpec

#define PathRemoveFileSpec   WINELIB_NAME_AW(PathRemoveFileSpec)

Definition at line 536 of file shlwapi.h.

◆ PathRenameExtension

#define PathRenameExtension   WINELIB_NAME_AW(PathRenameExtension)

Definition at line 540 of file shlwapi.h.

◆ PathSearchAndQualify

#define PathSearchAndQualify   WINELIB_NAME_AW(PathSearchAndQualify)

Definition at line 544 of file shlwapi.h.

◆ PathSetDlgItemPath

#define PathSetDlgItemPath   WINELIB_NAME_AW(PathSetDlgItemPath)

Definition at line 548 of file shlwapi.h.

◆ PathSkipRoot

#define PathSkipRoot   WINELIB_NAME_AW(PathSkipRoot)

Definition at line 552 of file shlwapi.h.

◆ PathStripPath

#define PathStripPath   WINELIB_NAME_AW(PathStripPath)

Definition at line 556 of file shlwapi.h.

◆ PathStripToRoot

#define PathStripToRoot   WINELIB_NAME_AW(PathStripToRoot)

Definition at line 560 of file shlwapi.h.

◆ PathUndecorate

#define PathUndecorate   WINELIB_NAME_AW(PathUndecorate)

Definition at line 592 of file shlwapi.h.

◆ PathUnExpandEnvStrings

#define PathUnExpandEnvStrings   WINELIB_NAME_AW(PathUnExpandEnvStrings)

Definition at line 596 of file shlwapi.h.

◆ PathUnmakeSystemFolder

#define PathUnmakeSystemFolder   WINELIB_NAME_AW(PathUnmakeSystemFolder)

Definition at line 572 of file shlwapi.h.

◆ PathUnquoteSpaces

#define PathUnquoteSpaces   WINELIB_NAME_AW(PathUnquoteSpaces)

Definition at line 564 of file shlwapi.h.

◆ PLATFORM_BROWSERONLY

#define PLATFORM_BROWSERONLY   1

Definition at line 1187 of file shlwapi.h.

◆ PLATFORM_IE3

#define PLATFORM_IE3   1

Definition at line 1186 of file shlwapi.h.

◆ PLATFORM_INTEGRATED

#define PLATFORM_INTEGRATED   2

Definition at line 1188 of file shlwapi.h.

◆ PLATFORM_UNKNOWN

#define PLATFORM_UNKNOWN   0

Definition at line 1185 of file shlwapi.h.

◆ PMSF_DONT_STRIP_SPACES

#define PMSF_DONT_STRIP_SPACES   0x00010000

Definition at line 500 of file shlwapi.h.

◆ PMSF_MULTIPLE

#define PMSF_MULTIPLE   0x00000001

Definition at line 499 of file shlwapi.h.

◆ PMSF_NORMAL

#define PMSF_NORMAL   0x00000000

Definition at line 498 of file shlwapi.h.

◆ SHACF_AUTOAPPEND_FORCE_OFF

#define SHACF_AUTOAPPEND_FORCE_OFF   0x80000000

Definition at line 1046 of file shlwapi.h.

◆ SHACF_AUTOAPPEND_FORCE_ON

#define SHACF_AUTOAPPEND_FORCE_ON   0x40000000

Definition at line 1045 of file shlwapi.h.

◆ SHACF_AUTOSUGGEST_FORCE_OFF

#define SHACF_AUTOSUGGEST_FORCE_OFF   0x20000000

Definition at line 1044 of file shlwapi.h.

◆ SHACF_AUTOSUGGEST_FORCE_ON

#define SHACF_AUTOSUGGEST_FORCE_ON   0x10000000

Definition at line 1043 of file shlwapi.h.

◆ SHACF_DEFAULT

#define SHACF_DEFAULT   0x00000000

Definition at line 1035 of file shlwapi.h.

◆ SHACF_FILESYS_DIRS

#define SHACF_FILESYS_DIRS   0x00000020

Definition at line 1042 of file shlwapi.h.

◆ SHACF_FILESYS_ONLY

#define SHACF_FILESYS_ONLY   0x00000010

Definition at line 1041 of file shlwapi.h.

◆ SHACF_FILESYSTEM

#define SHACF_FILESYSTEM   0x00000001

Definition at line 1036 of file shlwapi.h.

◆ SHACF_URLALL

#define SHACF_URLALL   (SHACF_URLHISTORY|SHACF_URLMRU)

Definition at line 1039 of file shlwapi.h.

◆ SHACF_URLHISTORY

#define SHACF_URLHISTORY   0x00000002

Definition at line 1037 of file shlwapi.h.

◆ SHACF_URLMRU

#define SHACF_URLMRU   0x00000004

Definition at line 1038 of file shlwapi.h.

◆ SHACF_USETAB

#define SHACF_USETAB   0x00000008

Definition at line 1040 of file shlwapi.h.

◆ SHCopyKey

#define SHCopyKey   WINELIB_NAME_AW(SHCopyKey)

Definition at line 105 of file shlwapi.h.

◆ SHCreateStreamOnFile

#define SHCreateStreamOnFile   WINELIB_NAME_AW(SHCreateStreamOnFile)

Definition at line 1023 of file shlwapi.h.

◆ SHDeleteEmptyKey

#define SHDeleteEmptyKey   WINELIB_NAME_AW(SHDeleteEmptyKey)

Definition at line 61 of file shlwapi.h.

◆ SHDeleteKey

#define SHDeleteKey   WINELIB_NAME_AW(SHDeleteKey)

Definition at line 65 of file shlwapi.h.

◆ SHDeleteOrphanKey

#define SHDeleteOrphanKey   WINELIB_NAME_AW(SHDeleteOrphanKey)

Definition at line 141 of file shlwapi.h.

◆ SHDeleteValue

#define SHDeleteValue   WINELIB_NAME_AW(SHDeleteValue)

Definition at line 69 of file shlwapi.h.

◆ SHEnumKeyEx

#define SHEnumKeyEx   WINELIB_NAME_AW(SHEnumKeyEx)

Definition at line 85 of file shlwapi.h.

◆ SHEnumValue

#define SHEnumValue   WINELIB_NAME_AW(SHEnumValue)

Definition at line 89 of file shlwapi.h.

◆ SHGetValue

#define SHGetValue   WINELIB_NAME_AW(SHGetValue)

Definition at line 73 of file shlwapi.h.

◆ SHGVSPB_ALLFOLDERS

#define SHGVSPB_ALLFOLDERS   0x00000008

Definition at line 1195 of file shlwapi.h.

◆ SHGVSPB_ALLUSERS

#define SHGVSPB_ALLUSERS   0x00000002

Definition at line 1193 of file shlwapi.h.

◆ SHGVSPB_FOLDER

#define SHGVSPB_FOLDER   (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER)

Definition at line 1199 of file shlwapi.h.

◆ SHGVSPB_FOLDERNODEFAULTS

#define SHGVSPB_FOLDERNODEFAULTS   (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER | SHGVSPB_NOAUTODEFAULTS)

Definition at line 1200 of file shlwapi.h.

◆ SHGVSPB_GLOBALDEFAULTS

#define SHGVSPB_GLOBALDEFAULTS   (SHGVSPB_ALLUSERS | SHGVSPB_ALLFOLDERS)

Definition at line 1202 of file shlwapi.h.

◆ SHGVSPB_INHERIT

#define SHGVSPB_INHERIT   0x00000010

Definition at line 1196 of file shlwapi.h.

◆ SHGVSPB_NOAUTODEFAULTS

#define SHGVSPB_NOAUTODEFAULTS   0x80000000

Definition at line 1198 of file shlwapi.h.

◆ SHGVSPB_PERFOLDER

#define SHGVSPB_PERFOLDER   0x00000004

Definition at line 1194 of file shlwapi.h.

◆ SHGVSPB_PERUSER

#define SHGVSPB_PERUSER   0x00000001

Definition at line 1192 of file shlwapi.h.

◆ SHGVSPB_ROAM

#define SHGVSPB_ROAM   0x00000020

Definition at line 1197 of file shlwapi.h.

◆ SHGVSPB_USERDEFAULTS

#define SHGVSPB_USERDEFAULTS   (SHGVSPB_PERUSER | SHGVSPB_ALLFOLDERS)

Definition at line 1201 of file shlwapi.h.

◆ SHOpenRegStream

#define SHOpenRegStream   WINELIB_NAME_AW(SHOpenRegStream2) /* Uses version 2 */

Definition at line 1015 of file shlwapi.h.

◆ SHOpenRegStream2

#define SHOpenRegStream2   WINELIB_NAME_AW(SHOpenRegStream2)

Definition at line 1019 of file shlwapi.h.

◆ SHQueryInfoKey

#define SHQueryInfoKey   WINELIB_NAME_AW(SHQueryInfoKey)

Definition at line 93 of file shlwapi.h.

◆ SHQueryValueEx

#define SHQueryValueEx   WINELIB_NAME_AW(SHQueryValueEx)

Definition at line 81 of file shlwapi.h.

◆ SHRegCreateUSKey

#define SHRegCreateUSKey   WINELIB_NAME_AW(SHRegCreateUSKey)

Definition at line 173 of file shlwapi.h.

◆ SHRegDeleteEmptyUSKey

#define SHRegDeleteEmptyUSKey   WINELIB_NAME_AW(SHRegDeleteEmptyUSKey)

Definition at line 195 of file shlwapi.h.

◆ SHRegDeleteUSValue

#define SHRegDeleteUSValue   WINELIB_NAME_AW(SHRegDeleteUSValue)

Definition at line 191 of file shlwapi.h.

◆ SHRegEnumUSKey

#define SHRegEnumUSKey   WINELIB_NAME_AW(SHRegEnumUSKey)

Definition at line 199 of file shlwapi.h.

◆ SHRegEnumUSValue

#define SHRegEnumUSValue   WINELIB_NAME_AW(SHRegEnumUSValue)

Definition at line 205 of file shlwapi.h.

◆ SHRegGetBoolUSValue

#define SHRegGetBoolUSValue   WINELIB_NAME_AW(SHRegGetBoolUSValue)

Definition at line 227 of file shlwapi.h.

◆ SHRegGetPath

#define SHRegGetPath   WINELIB_NAME_AW(SHRegGetPath)

Definition at line 97 of file shlwapi.h.

◆ SHRegGetUSValue

#define SHRegGetUSValue   WINELIB_NAME_AW(SHRegGetUSValue)

Definition at line 219 of file shlwapi.h.

◆ SHRegGetValue

#define SHRegGetValue   WINELIB_NAME_AW(SHRegGetValue)

Definition at line 135 of file shlwapi.h.

◆ SHRegOpenUSKey

#define SHRegOpenUSKey   WINELIB_NAME_AW(SHRegOpenUSKey)

Definition at line 177 of file shlwapi.h.

◆ SHRegQueryInfoUSKey

#define SHRegQueryInfoUSKey   WINELIB_NAME_AW(SHRegQueryInfoUSKey)

Definition at line 211 of file shlwapi.h.

◆ SHRegQueryUSValue

#define SHRegQueryUSValue   WINELIB_NAME_AW(SHRegQueryUSValue)

Definition at line 183 of file shlwapi.h.

◆ SHREGSET_DEFAULT

#define SHREGSET_DEFAULT   (SHREGSET_FORCE_HKCU | SHREGSET_HKLM)

Definition at line 166 of file shlwapi.h.

◆ SHREGSET_FORCE_HKCU

#define SHREGSET_FORCE_HKCU   0x2 /* Always apply to HKCU */

Definition at line 163 of file shlwapi.h.

◆ SHREGSET_FORCE_HKLM

#define SHREGSET_FORCE_HKLM   0x8 /* Always apply to HKLM */

Definition at line 165 of file shlwapi.h.

◆ SHREGSET_HKCU

#define SHREGSET_HKCU   0x1 /* Apply to HKCU if empty */

Definition at line 162 of file shlwapi.h.

◆ SHREGSET_HKLM

#define SHREGSET_HKLM   0x4 /* Apply to HKLM if empty */

Definition at line 164 of file shlwapi.h.

◆ SHRegSetPath

#define SHRegSetPath   WINELIB_NAME_AW(SHRegSetPath)

Definition at line 101 of file shlwapi.h.

◆ SHRegSetUSValue

#define SHRegSetUSValue   WINELIB_NAME_AW(SHRegSetUSValue)

Definition at line 223 of file shlwapi.h.

◆ SHRegWriteUSValue

#define SHRegWriteUSValue   WINELIB_NAME_AW(SHRegWriteUSValue)

Definition at line 187 of file shlwapi.h.

◆ SHSetValue

#define SHSetValue   WINELIB_NAME_AW(SHSetValue)

Definition at line 77 of file shlwapi.h.

◆ SHStrDup

#define SHStrDup   WINELIB_NAME_AW(SHStrDup)

Definition at line 860 of file shlwapi.h.

◆ SRRF_NOEXPAND

#define SRRF_NOEXPAND   0x10000000

Definition at line 129 of file shlwapi.h.

◆ SRRF_NOVIRT

#define SRRF_NOVIRT   0x40000000

Definition at line 131 of file shlwapi.h.

◆ SRRF_RM_ANY

#define SRRF_RM_ANY   0

Definition at line 124 of file shlwapi.h.

◆ SRRF_RM_NORMAL

#define SRRF_RM_NORMAL   0x10000

Definition at line 125 of file shlwapi.h.

◆ SRRF_RM_SAFE

#define SRRF_RM_SAFE   0x20000

Definition at line 126 of file shlwapi.h.

◆ SRRF_RM_SAFENETWORK

#define SRRF_RM_SAFENETWORK   0x40000

Definition at line 127 of file shlwapi.h.

◆ SRRF_RT_ANY

#define SRRF_RT_ANY   0xffff

Definition at line 122 of file shlwapi.h.

◆ SRRF_RT_DWORD

Definition at line 120 of file shlwapi.h.

◆ SRRF_RT_QWORD

Definition at line 121 of file shlwapi.h.

◆ SRRF_RT_REG_BINARY

#define SRRF_RT_REG_BINARY   0x8

Definition at line 115 of file shlwapi.h.

◆ SRRF_RT_REG_DWORD

#define SRRF_RT_REG_DWORD   0x10

Definition at line 116 of file shlwapi.h.

◆ SRRF_RT_REG_EXPAND_SZ

#define SRRF_RT_REG_EXPAND_SZ   0x4

Definition at line 114 of file shlwapi.h.

◆ SRRF_RT_REG_MULTI_SZ

#define SRRF_RT_REG_MULTI_SZ   0x20

Definition at line 117 of file shlwapi.h.

◆ SRRF_RT_REG_NONE

#define SRRF_RT_REG_NONE   0x1

Definition at line 112 of file shlwapi.h.

◆ SRRF_RT_REG_QWORD

#define SRRF_RT_REG_QWORD   0x40

Definition at line 118 of file shlwapi.h.

◆ SRRF_RT_REG_SZ

#define SRRF_RT_REG_SZ   0x2

Definition at line 113 of file shlwapi.h.

◆ SRRF_ZEROONFAILURE

#define SRRF_ZEROONFAILURE   0x20000000

Definition at line 130 of file shlwapi.h.

◆ STIF_DEFAULT

#define STIF_DEFAULT   __MSABI_LONG(0x0)

Definition at line 792 of file shlwapi.h.

◆ STIF_SUPPORT_HEX

#define STIF_SUPPORT_HEX   __MSABI_LONG(0x1)

Definition at line 793 of file shlwapi.h.

◆ StrCat

#define StrCat   WINELIB_NAME_AW(StrCat)

Definition at line 809 of file shlwapi.h.

◆ StrCatA

#define StrCatA   lstrcatA

Definition at line 807 of file shlwapi.h.

◆ StrCatBuff

#define StrCatBuff   WINELIB_NAME_AW(StrCatBuff)

Definition at line 813 of file shlwapi.h.

◆ StrCatN

#define StrCatN   WINELIB_NAME_AW(StrNCat)

Definition at line 903 of file shlwapi.h.

◆ StrChr

#define StrChr   WINELIB_NAME_AW(StrChr)

Definition at line 819 of file shlwapi.h.

◆ StrChrI

#define StrChrI   WINELIB_NAME_AW(StrChrI)

Definition at line 823 of file shlwapi.h.

◆ StrCmp

#define StrCmp   WINELIB_NAME_AW(StrCmp)

Definition at line 827 of file shlwapi.h.

◆ StrCmpA

#define StrCmpA   lstrcmpA

Definition at line 825 of file shlwapi.h.

◆ StrCmpI

#define StrCmpI   WINELIB_NAME_AW(StrCmpI)

Definition at line 831 of file shlwapi.h.

◆ StrCmpIA

#define StrCmpIA   lstrcmpiA

Definition at line 829 of file shlwapi.h.

◆ StrCmpN

#define StrCmpN   WINELIB_NAME_AW(StrCmpN)

Definition at line 846 of file shlwapi.h.

◆ StrCmpNI

#define StrCmpNI   WINELIB_NAME_AW(StrCmpNI)

Definition at line 851 of file shlwapi.h.

◆ StrCpy

#define StrCpy   WINELIB_NAME_AW(StrCpy)

Definition at line 835 of file shlwapi.h.

◆ StrCpyA

#define StrCpyA   lstrcpyA

Definition at line 833 of file shlwapi.h.

◆ StrCpyN

#define StrCpyN   WINELIB_NAME_AW(StrCpyN)

Definition at line 839 of file shlwapi.h.

◆ StrCpyNA

#define StrCpyNA   lstrcpynA

Definition at line 837 of file shlwapi.h.

◆ StrCSpn

#define StrCSpn   WINELIB_NAME_AW(StrCSpn)

Definition at line 801 of file shlwapi.h.

◆ StrCSpnI

#define StrCSpnI   WINELIB_NAME_AW(StrCSpnI)

Definition at line 805 of file shlwapi.h.

◆ StrDup

#define StrDup   WINELIB_NAME_AW(StrDup)

Definition at line 856 of file shlwapi.h.

◆ StrFormatByteSize

#define StrFormatByteSize   StrFormatByteSize64A

Definition at line 878 of file shlwapi.h.

◆ StrFormatKBSize

#define StrFormatKBSize   WINELIB_NAME_AW(StrFormatKBSize)

Definition at line 884 of file shlwapi.h.

◆ StrFromTimeInterval

#define StrFromTimeInterval   WINELIB_NAME_AW(StrFromTimeInterval)

Definition at line 888 of file shlwapi.h.

◆ StrIntlEqNA

#define StrIntlEqNA (   a,
  b,
  c 
)    StrIsIntlEqualA(TRUE,a,b,c)

Definition at line 894 of file shlwapi.h.

◆ StrIntlEqNIA

#define StrIntlEqNIA (   a,
  b,
  c 
)    StrIsIntlEqualA(FALSE,a,b,c)

Definition at line 897 of file shlwapi.h.

◆ StrIntlEqNIW

#define StrIntlEqNIW (   a,
  b,
  c 
)    StrIsIntlEqualW(FALSE,a,b,c)

Definition at line 898 of file shlwapi.h.

◆ StrIntlEqNW

#define StrIntlEqNW (   a,
  b,
  c 
)    StrIsIntlEqualW(TRUE,a,b,c)

Definition at line 895 of file shlwapi.h.

◆ StrIsIntlEqual

#define StrIsIntlEqual   WINELIB_NAME_AW(StrIsIntlEqual)

Definition at line 892 of file shlwapi.h.

◆ StrNCat

#define StrNCat   WINELIB_NAME_AW(StrNCat)

Definition at line 902 of file shlwapi.h.

◆ StrNCmp

#define StrNCmp   WINELIB_NAME_AW(StrCmpN)

Definition at line 847 of file shlwapi.h.

◆ StrNCmpI

#define StrNCmpI   WINELIB_NAME_AW(StrCmpNI)

Definition at line 852 of file shlwapi.h.

◆ StrNCpy

#define StrNCpy   WINELIB_NAME_AW(StrCpyN)

Definition at line 840 of file shlwapi.h.

◆ StrPBrk

#define StrPBrk   WINELIB_NAME_AW(StrPBrk)

Definition at line 907 of file shlwapi.h.

◆ StrRChr

#define StrRChr   WINELIB_NAME_AW(StrRChr)

Definition at line 911 of file shlwapi.h.

◆ StrRChrI

#define StrRChrI   WINELIB_NAME_AW(StrRChrI)

Definition at line 915 of file shlwapi.h.

◆ StrRetToBuf

#define StrRetToBuf   WINELIB_NAME_AW(StrRetToBuf)

Definition at line 983 of file shlwapi.h.

◆ StrRetToStr

#define StrRetToStr   WINELIB_NAME_AW(StrRetToStr)

Definition at line 979 of file shlwapi.h.

◆ StrRStrI

#define StrRStrI   WINELIB_NAME_AW(StrRStrI)

Definition at line 919 of file shlwapi.h.

◆ StrSpn

#define StrSpn   WINELIB_NAME_AW(StrSpn)

Definition at line 923 of file shlwapi.h.

◆ StrStr

#define StrStr   WINELIB_NAME_AW(StrStr)

Definition at line 927 of file shlwapi.h.

◆ StrStrI

#define StrStrI   WINELIB_NAME_AW(StrStrI)

Definition at line 931 of file shlwapi.h.

◆ StrToInt

#define StrToInt   WINELIB_NAME_AW(StrToInt)

Definition at line 938 of file shlwapi.h.

◆ StrToIntEx

#define StrToIntEx   WINELIB_NAME_AW(StrToIntEx)

Definition at line 943 of file shlwapi.h.

◆ StrToIntEx64

#define StrToIntEx64   WINELIB_NAME_AW(StrToIntEx64)

Definition at line 947 of file shlwapi.h.

◆ StrToLong

#define StrToLong   WINELIB_NAME_AW(StrToInt)

Definition at line 939 of file shlwapi.h.

◆ StrTrim

#define StrTrim   WINELIB_NAME_AW(StrTrim)

Definition at line 951 of file shlwapi.h.

◆ TPS_EXECUTEIO

#define TPS_EXECUTEIO   0x00000001

Definition at line 1160 of file shlwapi.h.

◆ TPS_LONGEXECTIME

#define TPS_LONGEXECTIME   0x00000008

Definition at line 1161 of file shlwapi.h.

◆ URL_APPLY_DEFAULT

#define URL_APPLY_DEFAULT   0x00000001

Definition at line 659 of file shlwapi.h.

◆ URL_APPLY_FORCEAPPLY

#define URL_APPLY_FORCEAPPLY   0x00000008

Definition at line 656 of file shlwapi.h.

◆ URL_APPLY_GUESSFILE

#define URL_APPLY_GUESSFILE   0x00000004

Definition at line 657 of file shlwapi.h.

◆ URL_APPLY_GUESSSCHEME

#define URL_APPLY_GUESSSCHEME   0x00000002

Definition at line 658 of file shlwapi.h.

◆ URL_BROWSER_MODE

#define URL_BROWSER_MODE   URL_DONT_ESCAPE_EXTRA_INFO

Definition at line 686 of file shlwapi.h.

◆ URL_CONVERT_IF_DOSPATH

#define URL_CONVERT_IF_DOSPATH   0x00200000

Definition at line 675 of file shlwapi.h.

◆ URL_DONT_ESCAPE_EXTRA_INFO

#define URL_DONT_ESCAPE_EXTRA_INFO   0x02000000

Definition at line 671 of file shlwapi.h.

◆ URL_DONT_SIMPLIFY

#define URL_DONT_SIMPLIFY   0x08000000

Definition at line 669 of file shlwapi.h.

◆ URL_DONT_UNESCAPE

#define URL_DONT_UNESCAPE   0x00020000

Definition at line 680 of file shlwapi.h.

◆ URL_DONT_UNESCAPE_EXTRA_INFO

#define URL_DONT_UNESCAPE_EXTRA_INFO   URL_DONT_ESCAPE_EXTRA_INFO

Definition at line 687 of file shlwapi.h.

◆ URL_ESCAPE_AS_UTF8

#define URL_ESCAPE_AS_UTF8   0x00040000

Definition at line 679 of file shlwapi.h.

◆ URL_ESCAPE_ASCII_URI_COMPONENT

#define URL_ESCAPE_ASCII_URI_COMPONENT   0x00080000

Definition at line 678 of file shlwapi.h.

◆ URL_ESCAPE_PERCENT

#define URL_ESCAPE_PERCENT   0x00001000

Definition at line 684 of file shlwapi.h.

◆ URL_ESCAPE_SEGMENT_ONLY

#define URL_ESCAPE_SEGMENT_ONLY   0x00002000

Definition at line 683 of file shlwapi.h.

◆ URL_ESCAPE_SPACES_ONLY

#define URL_ESCAPE_SPACES_ONLY   0x04000000

Definition at line 670 of file shlwapi.h.

◆ URL_ESCAPE_UNSAFE

#define URL_ESCAPE_UNSAFE   0x20000000

Definition at line 666 of file shlwapi.h.

◆ URL_ESCAPE_URI_COMPONENT

#define URL_ESCAPE_URI_COMPONENT   (URL_ESCAPE_ASCII_URI_COMPONENT | URL_ESCAPE_AS_UTF8)

Definition at line 688 of file shlwapi.h.

◆ URL_FILE_USE_PATHURL

#define URL_FILE_USE_PATHURL   0x00010000

Definition at line 681 of file shlwapi.h.

◆ URL_INTERNAL_PATH

#define URL_INTERNAL_PATH   0x00800000

Definition at line 673 of file shlwapi.h.

◆ URL_NO_META

#define URL_NO_META   URL_DONT_SIMPLIFY

Definition at line 689 of file shlwapi.h.

◆ URL_PARTFLAG_KEEPSCHEME

#define URL_PARTFLAG_KEEPSCHEME   0x00000001

Definition at line 642 of file shlwapi.h.

◆ URL_PLUGGABLE_PROTOCOL

#define URL_PLUGGABLE_PROTOCOL   0x40000000

Definition at line 665 of file shlwapi.h.

◆ URL_UNESCAPE

#define URL_UNESCAPE   0x10000000

Definition at line 667 of file shlwapi.h.

◆ URL_UNESCAPE_AS_UTF8

#define URL_UNESCAPE_AS_UTF8   URL_ESCAPE_AS_UTF8

Definition at line 690 of file shlwapi.h.

◆ URL_UNESCAPE_HIGH_ANSI_ONLY

#define URL_UNESCAPE_HIGH_ANSI_ONLY   0x00400000

Definition at line 674 of file shlwapi.h.

◆ URL_UNESCAPE_INPLACE

#define URL_UNESCAPE_INPLACE   0x00100000

Definition at line 676 of file shlwapi.h.

◆ URL_UNESCAPE_URI_COMPONENT

#define URL_UNESCAPE_URI_COMPONENT   URL_UNESCAPE_AS_UTF8

Definition at line 691 of file shlwapi.h.

◆ URL_WININET_COMPATIBILITY

#define URL_WININET_COMPATIBILITY   0x80000000

Definition at line 664 of file shlwapi.h.

◆ UrlApplyScheme

#define UrlApplyScheme   WINELIB_NAME_AW(UrlApplyScheme)

Definition at line 695 of file shlwapi.h.

◆ UrlCanonicalize

#define UrlCanonicalize   WINELIB_NAME_AW(UrlCanonicalize)

Definition at line 699 of file shlwapi.h.

◆ UrlCombine

#define UrlCombine   WINELIB_NAME_AW(UrlCombine)

Definition at line 703 of file shlwapi.h.

◆ UrlCompare

#define UrlCompare   WINELIB_NAME_AW(UrlCompare)

Definition at line 707 of file shlwapi.h.

◆ UrlCreateFromPath

#define UrlCreateFromPath   WINELIB_NAME_AW(UrlCreateFromPath)

Definition at line 761 of file shlwapi.h.

◆ UrlEscape

#define UrlEscape   WINELIB_NAME_AW(UrlEscape)

Definition at line 711 of file shlwapi.h.

◆ UrlEscapeSpaces

#define UrlEscapeSpaces   WINELIB_NAME_AW(UrlEscapeSpaces)

Definition at line 717 of file shlwapi.h.

◆ UrlEscapeSpacesA

#define UrlEscapeSpacesA (   x,
  y,
  z 
)
Value:
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLdouble GLdouble z
Definition: glext.h:5874
WINSHLWAPI HRESULT WINAPI UrlCanonicalizeA(LPCSTR, LPSTR, LPDWORD, DWORD)
Definition: url.c:247
#define URL_DONT_ESCAPE_EXTRA_INFO
Definition: shlwapi.h:671
#define URL_ESCAPE_SPACES_ONLY
Definition: shlwapi.h:670

Definition at line 713 of file shlwapi.h.

◆ UrlEscapeSpacesW

#define UrlEscapeSpacesW (   x,
  y,
  z 
)
Value:
WINSHLWAPI HRESULT WINAPI UrlCanonicalizeW(LPCWSTR, LPWSTR, LPDWORD, DWORD)
Definition: url.c:282

Definition at line 715 of file shlwapi.h.

◆ UrlGetLocation

#define UrlGetLocation   WINELIB_NAME_AW(UrlGetLocation)

Definition at line 721 of file shlwapi.h.

◆ UrlGetPart

#define UrlGetPart   WINELIB_NAME_AW(UrlGetPart)

Definition at line 725 of file shlwapi.h.

◆ UrlHash

#define UrlHash   WINELIB_NAME_AW(UrlHash)

Definition at line 731 of file shlwapi.h.

◆ UrlIs

#define UrlIs   WINELIB_NAME_AW(UrlIs)

Definition at line 735 of file shlwapi.h.

◆ UrlIsFileUrl

#define UrlIsFileUrl   WINELIB_NAME_AW(UrlIsFileUrl)

Definition at line 747 of file shlwapi.h.

◆ UrlIsFileUrlA

#define UrlIsFileUrlA (   x)    UrlIsA(x, URLIS_FILEURL)

Definition at line 745 of file shlwapi.h.

◆ UrlIsFileUrlW

#define UrlIsFileUrlW (   x)    UrlIsW(x, URLIS_FILEURL)

Definition at line 746 of file shlwapi.h.

◆ UrlIsNoHistory

#define UrlIsNoHistory   WINELIB_NAME_AW(UrlIsNoHistory)

Definition at line 739 of file shlwapi.h.

◆ UrlIsOpaque

#define UrlIsOpaque   WINELIB_NAME_AW(UrlIsOpaque)

Definition at line 743 of file shlwapi.h.

◆ UrlUnescape

#define UrlUnescape   WINELIB_NAME_AW(UrlUnescape)

Definition at line 751 of file shlwapi.h.

◆ UrlUnescapeInPlace

#define UrlUnescapeInPlace   WINELIB_NAME_AW(UrlUnescapeInPlace)

Definition at line 757 of file shlwapi.h.

◆ UrlUnescapeInPlaceA

#define UrlUnescapeInPlaceA (   x,
  y 
)
Value:
#define NULL
Definition: types.h:112
WINSHLWAPI HRESULT WINAPI UrlUnescapeA(LPSTR, LPSTR, LPDWORD, DWORD)
Definition: url.c:1298
#define URL_UNESCAPE_INPLACE
Definition: shlwapi.h:676

Definition at line 753 of file shlwapi.h.

◆ UrlUnescapeInPlaceW

#define UrlUnescapeInPlaceW (   x,
  y 
)
Value:
WINSHLWAPI HRESULT WINAPI UrlUnescapeW(LPWSTR, LPWSTR, LPDWORD, DWORD)
Definition: url.c:1367

Definition at line 755 of file shlwapi.h.

◆ WINSHLWAPI

#define WINSHLWAPI   DECLSPEC_IMPORT

Definition at line 36 of file shlwapi.h.

◆ wnsprintf

#define wnsprintf   WINELIB_NAME_AW(wnsprintf)

Definition at line 961 of file shlwapi.h.

Typedef Documentation

◆ ASSOCF

typedef DWORD ASSOCF

Definition at line 252 of file shlwapi.h.

◆ DLLGETVERSIONPROC

typedef HRESULT(CALLBACK * DLLGETVERSIONPROC) (DLLVERSIONINFO *)

Definition at line 1093 of file shlwapi.h.

◆ DLLVERSIONINFO

◆ DLLVERSIONINFO2

◆ HUSKEY

typedef HANDLE HUSKEY

Definition at line 168 of file shlwapi.h.

◆ LPQITAB

typedef struct QITAB * LPQITAB

◆ LPQUERYASSOCIATIONS

typedef struct IQueryAssociations* LPQUERYASSOCIATIONS

Definition at line 300 of file shlwapi.h.

◆ PARSEDURLA

◆ PARSEDURLW

◆ PHUSKEY

typedef HUSKEY* PHUSKEY

Definition at line 169 of file shlwapi.h.

◆ PPARSEDURLA

◆ PPARSEDURLW

◆ SRRF

typedef INT SRRF

Definition at line 110 of file shlwapi.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ASSOCF_NONE 
ASSOCF_INIT_NOREMAPCLSID 
ASSOCF_INIT_BYEXENAME 
ASSOCF_OPEN_BYEXENAME 
ASSOCF_INIT_DEFAULTTOSTAR 
ASSOCF_INIT_DEFAULTTOFOLDER 
ASSOCF_NOUSERSETTINGS 
ASSOCF_NOTRUNCATE 
ASSOCF_VERIFY 
ASSOCF_REMAPRUNDLL 
ASSOCF_NOFIXUPS 
ASSOCF_IGNOREBASECLASS 
ASSOCF_INIT_IGNOREUNKNOWN 
ASSOCF_INIT_FIXED_PROGID 
ASSOCF_IS_PROTOCOL 
ASSOCF_INIT_FOR_FILE 

Definition at line 232 of file shlwapi.h.

233{
234 ASSOCF_NONE = 0x0000,
235 ASSOCF_INIT_NOREMAPCLSID = 0x0001, /* Don't map clsid->progid */
236 ASSOCF_INIT_BYEXENAME = 0x0002, /* .exe name given */
237 ASSOCF_OPEN_BYEXENAME = 0x0002, /* Synonym */
238 ASSOCF_INIT_DEFAULTTOSTAR = 0x0004, /* Use * as base */
239 ASSOCF_INIT_DEFAULTTOFOLDER = 0x0008, /* Use folder as base */
240 ASSOCF_NOUSERSETTINGS = 0x0010, /* No HKCU reads */
241 ASSOCF_NOTRUNCATE = 0x0020, /* Don't truncate return */
242 ASSOCF_VERIFY = 0x0040, /* Verify data */
243 ASSOCF_REMAPRUNDLL = 0x0080, /* Get rundll args */
244 ASSOCF_NOFIXUPS = 0x0100, /* Don't fixup errors */
245 ASSOCF_IGNOREBASECLASS = 0x0200, /* Don't read baseclass */
246 ASSOCF_INIT_IGNOREUNKNOWN = 0x0400, /* Fail for unknown progid */
247 ASSOCF_INIT_FIXED_PROGID = 0x0800, /* Used passed string as progid, don't try to map it */
248 ASSOCF_IS_PROTOCOL = 0x1000, /* Treat as protocol, that should be mapped */
249 ASSOCF_INIT_FOR_FILE = 0x2000, /* progid is for file extension association */
250};
@ ASSOCF_REMAPRUNDLL
Definition: shlwapi.h:867
@ ASSOCF_IS_PROTOCOL
Definition: shlwapi.h:873
@ ASSOCF_INIT_FIXED_PROGID
Definition: shlwapi.h:872
@ ASSOCF_NOFIXUPS
Definition: shlwapi.h:868
@ ASSOCF_INIT_DEFAULTTOSTAR
Definition: shlwapi.h:862
@ ASSOCF_INIT_DEFAULTTOFOLDER
Definition: shlwapi.h:863
@ ASSOCF_IGNOREBASECLASS
Definition: shlwapi.h:869
@ ASSOCF_INIT_NOREMAPCLSID
Definition: shlwapi.h:859
@ ASSOCF_VERIFY
Definition: shlwapi.h:866
@ ASSOCF_INIT_IGNOREUNKNOWN
Definition: shlwapi.h:870
@ ASSOCF_NOUSERSETTINGS
Definition: shlwapi.h:864
@ ASSOCF_OPEN_BYEXENAME
Definition: shlwapi.h:861
@ ASSOCF_NONE
Definition: shlwapi.h:858
@ ASSOCF_INIT_FOR_FILE
Definition: shlwapi.h:874
@ ASSOCF_NOTRUNCATE
Definition: shlwapi.h:865
@ ASSOCF_INIT_BYEXENAME
Definition: shlwapi.h:860

◆ anonymous enum

anonymous enum
Enumerator
CTF_INSIST 
CTF_THREAD_REF 
CTF_PROCESS_REF 
CTF_COINIT_STA 
CTF_COINIT 
CTF_FREELIBANDEXIT 
CTF_REF_COUNTED 
CTF_WAIT_ALLOWCOM 
CTF_UNUSED 
CTF_INHERITWOW64 
CTF_WAIT_NO_REENTRACY 
CTF_KEYBOARD_LOCALE 
CTF_OLEINITIALIZE 
CTF_COINIT_MTA 
CTF_NOADDREFLIB 

Definition at line 1057 of file shlwapi.h.

1058{
1059 CTF_INSIST = 0x00000001, /* Always call */
1060 CTF_THREAD_REF = 0x00000002, /* Hold thread ref */
1061 CTF_PROCESS_REF = 0x00000004, /* Hold process ref */
1062 CTF_COINIT_STA = 0x00000008,
1063 CTF_COINIT = 0x00000008, /* Startup COM first */
1064 CTF_FREELIBANDEXIT = 0x00000010, /* Hold DLL ref */
1065 CTF_REF_COUNTED = 0x00000020, /* Thread is ref counted */
1066 CTF_WAIT_ALLOWCOM = 0x00000040, /* Allow marshalling */
1067 CTF_UNUSED = 0x00000080,
1068 CTF_INHERITWOW64 = 0x00000100,
1069 CTF_WAIT_NO_REENTRACY = 0x00000200,
1070 CTF_KEYBOARD_LOCALE = 0x00000400,
1071 CTF_OLEINITIALIZE = 0x00000800,
1072 CTF_COINIT_MTA = 0x00001000,
1073 CTF_NOADDREFLIB = 0x00002000,
1074};
@ CTF_PROCESS_REF
Definition: shlwapi.h:73
@ CTF_NOADDREFLIB
Definition: shlwapi.h:92
@ CTF_INSIST
Definition: shlwapi.h:71
@ CTF_UNUSED
Definition: shlwapi.h:82
@ CTF_KEYBOARD_LOCALE
Definition: shlwapi.h:89
@ CTF_WAIT_ALLOWCOM
Definition: shlwapi.h:79
@ CTF_COINIT_STA
Definition: shlwapi.h:74
@ CTF_INHERITWOW64
Definition: shlwapi.h:83
@ CTF_OLEINITIALIZE
Definition: shlwapi.h:90
@ CTF_REF_COUNTED
Definition: shlwapi.h:78
@ CTF_COINIT_MTA
Definition: shlwapi.h:91
@ CTF_COINIT
Definition: shlwapi.h:75
@ CTF_THREAD_REF
Definition: shlwapi.h:72
@ CTF_FREELIBANDEXIT
Definition: shlwapi.h:77
@ CTF_WAIT_NO_REENTRACY
Definition: shlwapi.h:1069

◆ ASSOCDATA

Enumerator
ASSOCDATA_MSIDESCRIPTOR 
ASSOCDATA_NOACTIVATEHANDLER 
ASSOCDATA_QUERYCLASSSTORE 
ASSOCDATA_HASPERUSERASSOC 
ASSOCDATA_EDITFLAGS 
ASSOCDATA_VALUE 
ASSOCDATA_MAX 
ASSOCDATA_MSIDESCRIPTOR 
ASSOCDATA_NOACTIVATEHANDLER 
ASSOCDATA_QUERYCLASSSTORE 
ASSOCDATA_HASPERUSERASSOC 
ASSOCDATA_EDITFLAGS 
ASSOCDATA_VALUE 
ASSOCDATA_MAX 

Definition at line 284 of file shlwapi.h.

285{
286 ASSOCDATA_MSIDESCRIPTOR = 1, /* Component descriptor */
287 ASSOCDATA_NOACTIVATEHANDLER, /* Don't activate */
288 ASSOCDATA_QUERYCLASSSTORE, /* Look in Class Store */
289 ASSOCDATA_HASPERUSERASSOC, /* Use user association */
290 ASSOCDATA_EDITFLAGS, /* Edit flags */
291 ASSOCDATA_VALUE, /* pszExtra is value */
293} ASSOCDATA;
ASSOCDATA
Definition: shlwapi.h:926
@ ASSOCDATA_HASPERUSERASSOC
Definition: shlwapi.h:930
@ ASSOCDATA_EDITFLAGS
Definition: shlwapi.h:932
@ ASSOCDATA_MSIDESCRIPTOR
Definition: shlwapi.h:927
@ ASSOCDATA_VALUE
Definition: shlwapi.h:933
@ ASSOCDATA_NOACTIVATEHANDLER
Definition: shlwapi.h:928
@ ASSOCDATA_MAX
Definition: shlwapi.h:935
@ ASSOCDATA_QUERYCLASSSTORE
Definition: shlwapi.h:929

◆ ASSOCENUM

Enumerator
ASSOCENUM_NONE 
ASSOCENUM_NONE 

Definition at line 295 of file shlwapi.h.

296{
298} ASSOCENUM;
ASSOCENUM
Definition: shlwapi.h:938
@ ASSOCENUM_NONE
Definition: shlwapi.h:939

◆ ASSOCKEY

Enumerator
ASSOCKEY_SHELLEXECCLASS 
ASSOCKEY_APP 
ASSOCKEY_CLASS 
ASSOCKEY_BASECLASS 
ASSOCKEY_MAX 
ASSOCKEY_SHELLEXECCLASS 
ASSOCKEY_APP 
ASSOCKEY_CLASS 
ASSOCKEY_BASECLASS 
ASSOCKEY_MAX 

Definition at line 275 of file shlwapi.h.

276{
277 ASSOCKEY_SHELLEXECCLASS = 1, /* Key for ShellExec */
278 ASSOCKEY_APP, /* Application */
279 ASSOCKEY_CLASS, /* Progid or class */
280 ASSOCKEY_BASECLASS, /* Base class */
282} ASSOCKEY;
ASSOCKEY
Definition: shlwapi.h:918
@ ASSOCKEY_CLASS
Definition: shlwapi.h:921
@ ASSOCKEY_SHELLEXECCLASS
Definition: shlwapi.h:919
@ ASSOCKEY_MAX
Definition: shlwapi.h:923
@ ASSOCKEY_BASECLASS
Definition: shlwapi.h:922
@ ASSOCKEY_APP
Definition: shlwapi.h:920

◆ ASSOCSTR

Enumerator
ASSOCSTR_COMMAND 
ASSOCSTR_EXECUTABLE 
ASSOCSTR_FRIENDLYDOCNAME 
ASSOCSTR_FRIENDLYAPPNAME 
ASSOCSTR_NOOPEN 
ASSOCSTR_SHELLNEWVALUE 
ASSOCSTR_DDECOMMAND 
ASSOCSTR_DDEIFEXEC 
ASSOCSTR_DDEAPPLICATION 
ASSOCSTR_DDETOPIC 
ASSOCSTR_INFOTIP 
ASSOCSTR_QUICKTIP 
ASSOCSTR_TILEINFO 
ASSOCSTR_CONTENTTYPE 
ASSOCSTR_DEFAULTICON 
ASSOCSTR_SHELLEXTENSION 
ASSOCSTR_DROPTARGET 
ASSOCSTR_DELEGATEEXECUTE 
ASSOCSTR_SUPPORTED_URI_PROTOCOLS 
ASSOCSTR_PROGID 
ASSOCSTR_APPID 
ASSOCSTR_APPPUBLISHER 
ASSOCSTR_APPICONREFERENCE 
ASSOCSTR_MAX 
ASSOCSTR_COMMAND 
ASSOCSTR_EXECUTABLE 
ASSOCSTR_FRIENDLYDOCNAME 
ASSOCSTR_FRIENDLYAPPNAME 
ASSOCSTR_NOOPEN 
ASSOCSTR_SHELLNEWVALUE 
ASSOCSTR_DDECOMMAND 
ASSOCSTR_DDEIFEXEC 
ASSOCSTR_DDEAPPLICATION 
ASSOCSTR_DDETOPIC 
ASSOCSTR_INFOTIP 
ASSOCSTR_QUICKTIP 
ASSOCSTR_TILEINFO 
ASSOCSTR_CONTENTTYPE 
ASSOCSTR_DEFAULTICON 
ASSOCSTR_SHELLEXTENSION 
ASSOCSTR_MAX 

Definition at line 254 of file shlwapi.h.

255{
256 ASSOCSTR_COMMAND = 1, /* Verb command */
257 ASSOCSTR_EXECUTABLE, /* .exe from command string */
258 ASSOCSTR_FRIENDLYDOCNAME, /* Friendly doc type name */
259 ASSOCSTR_FRIENDLYAPPNAME, /* Friendly .exe name */
260 ASSOCSTR_NOOPEN, /* noopen value */
261 ASSOCSTR_SHELLNEWVALUE, /* Use shellnew key */
262 ASSOCSTR_DDECOMMAND, /* DDE command template */
263 ASSOCSTR_DDEIFEXEC, /* DDE command for process create */
264 ASSOCSTR_DDEAPPLICATION, /* DDE app name */
265 ASSOCSTR_DDETOPIC, /* DDE topic */
266 ASSOCSTR_INFOTIP, /* Infotip */
267 ASSOCSTR_QUICKTIP, /* Quick infotip */
268 ASSOCSTR_TILEINFO, /* Properties for tileview */
269 ASSOCSTR_CONTENTTYPE, /* Mimetype */
270 ASSOCSTR_DEFAULTICON, /* Icon */
271 ASSOCSTR_SHELLEXTENSION, /* GUID for shell extension handler */
273} ASSOCSTR;
ASSOCSTR
Definition: shlwapi.h:885
@ ASSOCSTR_CONTENTTYPE
Definition: shlwapi.h:900
@ ASSOCSTR_SHELLEXTENSION
Definition: shlwapi.h:902
@ ASSOCSTR_TILEINFO
Definition: shlwapi.h:899
@ ASSOCSTR_SHELLNEWVALUE
Definition: shlwapi.h:891
@ ASSOCSTR_COMMAND
Definition: shlwapi.h:886
@ ASSOCSTR_DDEAPPLICATION
Definition: shlwapi.h:894
@ ASSOCSTR_DDECOMMAND
Definition: shlwapi.h:892
@ ASSOCSTR_FRIENDLYDOCNAME
Definition: shlwapi.h:888
@ ASSOCSTR_MAX
Definition: shlwapi.h:915
@ ASSOCSTR_NOOPEN
Definition: shlwapi.h:890
@ ASSOCSTR_DDETOPIC
Definition: shlwapi.h:895
@ ASSOCSTR_DDEIFEXEC
Definition: shlwapi.h:893
@ ASSOCSTR_INFOTIP
Definition: shlwapi.h:896
@ ASSOCSTR_FRIENDLYAPPNAME
Definition: shlwapi.h:889
@ ASSOCSTR_EXECUTABLE
Definition: shlwapi.h:887
@ ASSOCSTR_DEFAULTICON
Definition: shlwapi.h:901
@ ASSOCSTR_QUICKTIP
Definition: shlwapi.h:898

◆ SFBS_FLAGS

Enumerator
SFBS_FLAGS_ROUND_TO_NEAREST_DISPLAYED_DIGIT 
SFBS_FLAGS_TRUNCATE_UNDISPLAYED_DECIMAL_DIGITS 

Definition at line 864 of file shlwapi.h.

864 {
867} SFBS_FLAGS;
@ SFBS_FLAGS_TRUNCATE_UNDISPLAYED_DECIMAL_DIGITS
Definition: shlwapi.h:1265
@ SFBS_FLAGS_ROUND_TO_NEAREST_DISPLAYED_DIGIT
Definition: shlwapi.h:1264
SFBS_FLAGS
Definition: shlwapi.h:864

◆ SHREGDEL_FLAGS

Enumerator
SHREGDEL_DEFAULT 
SHREGDEL_HKCU 
SHREGDEL_HKLM 
SHREGDEL_BOTH 
SHREGDEL_DEFAULT 
SHREGDEL_HKCU 
SHREGDEL_HKLM 
SHREGDEL_BOTH 

Definition at line 146 of file shlwapi.h.

147{
149 SHREGDEL_HKCU = 0x1,
150 SHREGDEL_HKLM = 0x10,
SHREGDEL_FLAGS
Definition: shlwapi.h:725
@ SHREGDEL_HKLM
Definition: shlwapi.h:728
@ SHREGDEL_BOTH
Definition: shlwapi.h:729
@ SHREGDEL_HKCU
Definition: shlwapi.h:727
@ SHREGDEL_DEFAULT
Definition: shlwapi.h:726

◆ SHREGENUM_FLAGS

Enumerator
SHREGENUM_DEFAULT 
SHREGENUM_HKCU 
SHREGENUM_HKLM 
SHREGENUM_BOTH 
SHREGENUM_DEFAULT 
SHREGENUM_HKCU 
SHREGENUM_HKLM 
SHREGENUM_BOTH 

Definition at line 154 of file shlwapi.h.

155{
157 SHREGENUM_HKCU = 0x1,
158 SHREGENUM_HKLM = 0x10,
SHREGENUM_FLAGS
Definition: shlwapi.h:732
@ SHREGENUM_HKCU
Definition: shlwapi.h:734
@ SHREGENUM_BOTH
Definition: shlwapi.h:736
@ SHREGENUM_DEFAULT
Definition: shlwapi.h:733
@ SHREGENUM_HKLM
Definition: shlwapi.h:735

◆ URL_PART

Enumerator
URL_PART_NONE 
URL_PART_SCHEME 
URL_PART_HOSTNAME 
URL_PART_USERNAME 
URL_PART_PASSWORD 
URL_PART_PORT 
URL_PART_QUERY 
URL_PART_NONE 
URL_PART_SCHEME 
URL_PART_HOSTNAME 
URL_PART_USERNAME 
URL_PART_PASSWORD 
URL_PART_PORT 
URL_PART_QUERY 

Definition at line 632 of file shlwapi.h.

632 {
633 URL_PART_NONE = 0,
634 URL_PART_SCHEME = 1,
640} URL_PART;
URL_PART
Definition: shlwapi.h:584
@ URL_PART_SCHEME
Definition: shlwapi.h:586
@ URL_PART_QUERY
Definition: shlwapi.h:591
@ URL_PART_HOSTNAME
Definition: shlwapi.h:587
@ URL_PART_NONE
Definition: shlwapi.h:585
@ URL_PART_USERNAME
Definition: shlwapi.h:588
@ URL_PART_PORT
Definition: shlwapi.h:590
@ URL_PART_PASSWORD
Definition: shlwapi.h:589

◆ URL_SCHEME

Enumerator
URL_SCHEME_INVALID 
URL_SCHEME_UNKNOWN 
URL_SCHEME_FTP 
URL_SCHEME_HTTP 
URL_SCHEME_GOPHER 
URL_SCHEME_MAILTO 
URL_SCHEME_NEWS 
URL_SCHEME_NNTP 
URL_SCHEME_TELNET 
URL_SCHEME_WAIS 
URL_SCHEME_FILE 
URL_SCHEME_MK 
URL_SCHEME_HTTPS 
URL_SCHEME_SHELL 
URL_SCHEME_SNEWS 
URL_SCHEME_LOCAL 
URL_SCHEME_JAVASCRIPT 
URL_SCHEME_VBSCRIPT 
URL_SCHEME_ABOUT 
URL_SCHEME_RES 
URL_SCHEME_MSSHELLROOTED 
URL_SCHEME_MSSHELLIDLIST 
URL_SCHEME_MSHELP 
URL_SCHEME_MSSHELLDEVICE 
URL_SCHEME_WILDCARD 
URL_SCHEME_SEARCH_MS 
URL_SCHEME_SEARCH 
URL_SCHEME_KNOWNFOLDER 
URL_SCHEME_MAXVALUE 
URL_SCHEME_INVALID 
URL_SCHEME_UNKNOWN 
URL_SCHEME_FTP 
URL_SCHEME_HTTP 
URL_SCHEME_GOPHER 
URL_SCHEME_MAILTO 
URL_SCHEME_NEWS 
URL_SCHEME_NNTP 
URL_SCHEME_TELNET 
URL_SCHEME_WAIS 
URL_SCHEME_FILE 
URL_SCHEME_MK 
URL_SCHEME_HTTPS 
URL_SCHEME_SHELL 
URL_SCHEME_SNEWS 
URL_SCHEME_LOCAL 
URL_SCHEME_JAVASCRIPT 
URL_SCHEME_VBSCRIPT 
URL_SCHEME_ABOUT 
URL_SCHEME_RES 
URL_SCHEME_MSSHELLROOTED 
URL_SCHEME_MSSHELLIDLIST 
URL_SCHEME_MSHELP 
URL_SCHEME_MSSHELLDEVICE 
URL_SCHEME_WILDCARD 
URL_SCHEME_SEARCH_MS 
URL_SCHEME_SEARCH 
URL_SCHEME_KNOWNFOLDER 
URL_SCHEME_MAXVALUE 

Definition at line 599 of file shlwapi.h.

599 {
629} URL_SCHEME;
URL_SCHEME
Definition: shlwapi.h:542
@ URL_SCHEME_SNEWS
Definition: shlwapi.h:557
@ URL_SCHEME_MAILTO
Definition: shlwapi.h:548
@ URL_SCHEME_KNOWNFOLDER
Definition: shlwapi.h:579
@ URL_SCHEME_LOCAL
Definition: shlwapi.h:558
@ URL_SCHEME_MK
Definition: shlwapi.h:554
@ URL_SCHEME_TELNET
Definition: shlwapi.h:551
@ URL_SCHEME_UNKNOWN
Definition: shlwapi.h:544
@ URL_SCHEME_MSSHELLROOTED
Definition: shlwapi.h:564
@ URL_SCHEME_WAIS
Definition: shlwapi.h:552
@ URL_SCHEME_HTTPS
Definition: shlwapi.h:555
@ URL_SCHEME_SEARCH
Definition: shlwapi.h:576
@ URL_SCHEME_FTP
Definition: shlwapi.h:545
@ URL_SCHEME_RES
Definition: shlwapi.h:562
@ URL_SCHEME_NEWS
Definition: shlwapi.h:549
@ URL_SCHEME_MSSHELLIDLIST
Definition: shlwapi.h:565
@ URL_SCHEME_HTTP
Definition: shlwapi.h:546
@ URL_SCHEME_FILE
Definition: shlwapi.h:553
@ URL_SCHEME_WILDCARD
Definition: shlwapi.h:570
@ URL_SCHEME_ABOUT
Definition: shlwapi.h:561
@ URL_SCHEME_NNTP
Definition: shlwapi.h:550
@ URL_SCHEME_INVALID
Definition: shlwapi.h:543
@ URL_SCHEME_SHELL
Definition: shlwapi.h:556
@ URL_SCHEME_MSSHELLDEVICE
Definition: shlwapi.h:569
@ URL_SCHEME_VBSCRIPT
Definition: shlwapi.h:560
@ URL_SCHEME_MSHELP
Definition: shlwapi.h:566
@ URL_SCHEME_SEARCH_MS
Definition: shlwapi.h:573
@ URL_SCHEME_GOPHER
Definition: shlwapi.h:547
@ URL_SCHEME_JAVASCRIPT
Definition: shlwapi.h:559
@ URL_SCHEME_MAXVALUE
Definition: shlwapi.h:581

◆ URLIS

Enumerator
URLIS_URL 
URLIS_OPAQUE 
URLIS_NOHISTORY 
URLIS_FILEURL 
URLIS_APPLIABLE 
URLIS_DIRECTORY 
URLIS_HASQUERY 
URLIS_URL 
URLIS_OPAQUE 
URLIS_NOHISTORY 
URLIS_FILEURL 
URLIS_APPLIABLE 
URLIS_DIRECTORY 
URLIS_HASQUERY 

Definition at line 645 of file shlwapi.h.

645 {
646 URLIS_URL,
653} URLIS;
URLIS
Definition: shlwapi.h:596
@ URLIS_NOHISTORY
Definition: shlwapi.h:599
@ URLIS_OPAQUE
Definition: shlwapi.h:598
@ URLIS_APPLIABLE
Definition: shlwapi.h:601
@ URLIS_DIRECTORY
Definition: shlwapi.h:602
@ URLIS_FILEURL
Definition: shlwapi.h:600
@ URLIS_URL
Definition: shlwapi.h:597
@ URLIS_HASQUERY
Definition: shlwapi.h:603

Function Documentation

◆ AssocCreate()

WINSHLWAPI HRESULT WINAPI AssocCreate ( CLSID  ,
REFIID  ,
LPVOID  
)

◆ AssocIsDangerous()

WINSHLWAPI BOOL WINAPI AssocIsDangerous ( LPCWSTR  lpszAssoc)

Definition at line 634 of file assoc.c.

635{
636 FIXME("%s\n", debugstr_w(lpszAssoc));
637 return FALSE;
638}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define FALSE
Definition: types.h:117
#define debugstr_w
Definition: kernel32.h:32

◆ AssocQueryKeyA()

WINSHLWAPI HRESULT WINAPI AssocQueryKeyA ( ASSOCF  ,
ASSOCKEY  ,
LPCSTR  ,
LPCSTR  ,
PHKEY   
)

◆ AssocQueryKeyW()

WINSHLWAPI HRESULT WINAPI AssocQueryKeyW ( ASSOCF  ,
ASSOCKEY  ,
LPCWSTR  ,
LPCWSTR  ,
PHKEY   
)

◆ AssocQueryStringA()

WINSHLWAPI HRESULT WINAPI AssocQueryStringA ( ASSOCF  ,
ASSOCSTR  ,
LPCSTR  ,
LPCSTR  ,
LPSTR  ,
LPDWORD   
)

◆ AssocQueryStringByKeyA()

WINSHLWAPI HRESULT WINAPI AssocQueryStringByKeyA ( ASSOCF  ,
ASSOCSTR  ,
HKEY  ,
LPCSTR  ,
LPSTR  ,
LPDWORD   
)

◆ AssocQueryStringByKeyW()

WINSHLWAPI HRESULT WINAPI AssocQueryStringByKeyW ( ASSOCF  ,
ASSOCSTR  ,
HKEY  ,
LPCWSTR  ,
LPWSTR  ,
LPDWORD   
)

◆ AssocQueryStringW()

WINSHLWAPI HRESULT WINAPI AssocQueryStringW ( ASSOCF  ,
ASSOCSTR  ,
LPCWSTR  ,
LPCWSTR  ,
LPWSTR  ,
LPDWORD   
)

◆ ChrCmpIA()

WINSHLWAPI BOOL WINAPI ChrCmpIA ( WORD  ch1,
WORD  ch2 
)

Definition at line 334 of file string.c.

335{
336 TRACE("%#x, %#x\n", ch1, ch2);
337
338 return char_compare(ch1, ch2, NORM_IGNORECASE);
339}
static BOOL char_compare(WORD ch1, WORD ch2, DWORD flags)
Definition: string.c:33
#define TRACE(s)
Definition: solgame.cpp:4
#define NORM_IGNORECASE
Definition: winnls.h:187

Referenced by StrChrIA(), StrRChrIA(), and StrRStrIA().

◆ ChrCmpIW()

WINSHLWAPI BOOL WINAPI ChrCmpIW ( WCHAR  ch1,
WCHAR  ch2 
)

Definition at line 341 of file string.c.

342{
343 return CompareStringW(GetThreadLocale(), NORM_IGNORECASE, &ch1, 1, &ch2, 1) - CSTR_EQUAL;
344}
LCID WINAPI GetThreadLocale(void)
Definition: locale.c:2803
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
Definition: locale.c:4017
#define CSTR_EQUAL
Definition: winnls.h:500

Referenced by CAutoComplete::DoAutoAppend(), StrCmpLogicalW(), StrRChrIW(), StrRStrIW(), url_guess_scheme(), and URL_GuessScheme().

◆ ColorAdjustLuma()

WINSHLWAPI COLORREF WINAPI ColorAdjustLuma ( COLORREF  cRGB,
int  dwLuma,
BOOL  bUnknown 
)

Definition at line 3909 of file ordinal.c.

3910{
3911 TRACE("(0x%8x,%d,%d)\n", cRGB, dwLuma, bUnknown);
3912
3913 if (dwLuma)
3914 {
3915 WORD wH, wL, wS;
3916
3917 ColorRGBToHLS(cRGB, &wH, &wL, &wS);
3918
3919 FIXME("Ignoring luma adjustment\n");
3920
3921 /* FIXME: The adjustment is not linear */
3922
3923 cRGB = ColorHLSToRGB(wH, wL, wS);
3924 }
3925 return cRGB;
3926}
COLORREF WINAPI ColorHLSToRGB(WORD wHue, WORD wLuminosity, WORD wSaturation)
Definition: ordinal.c:4043
VOID WINAPI ColorRGBToHLS(COLORREF cRGB, LPWORD pwHue, LPWORD pwLuminance, LPWORD pwSaturation)
Definition: ordinal.c:4506
unsigned short WORD
Definition: ntddk_ex.h:93

◆ ColorHLSToRGB()

WINSHLWAPI COLORREF WINAPI ColorHLSToRGB ( WORD  wHue,
WORD  wLuminosity,
WORD  wSaturation 
)

Definition at line 4043 of file ordinal.c.

4044{
4045 WORD wRed;
4046
4047 if (wSaturation)
4048 {
4049 WORD wGreen, wBlue, wMid1, wMid2;
4050
4051 if (wLuminosity > 120)
4052 wMid2 = wSaturation + wLuminosity - (wSaturation * wLuminosity + 120) / 240;
4053 else
4054 wMid2 = ((wSaturation + 240) * wLuminosity + 120) / 240;
4055
4056 wMid1 = wLuminosity * 2 - wMid2;
4057
4058 wRed = GET_RGB(wHue + 80);
4059 wGreen = GET_RGB(wHue);
4060 wBlue = GET_RGB(wHue - 80);
4061
4062 return RGB(wRed, wGreen, wBlue);
4063 }
4064
4065 wRed = wLuminosity * 255 / 240;
4066 return RGB(wRed, wRed, wRed);
4067}
#define GET_RGB(h)
Definition: ordinal.c:4025
#define RGB(r, g, b)
Definition: precomp.h:71

Referenced by ColorAdjustLuma().

◆ ColorRGBToHLS()

WINSHLWAPI VOID WINAPI ColorRGBToHLS ( COLORREF  cRGB,
LPWORD  pwHue,
LPWORD  pwLuminance,
LPWORD  pwSaturation 
)

Definition at line 4506 of file ordinal.c.

4508{
4509 int wR, wG, wB, wMax, wMin, wHue, wLuminosity, wSaturation;
4510
4511 TRACE("(%08x,%p,%p,%p)\n", cRGB, pwHue, pwLuminance, pwSaturation);
4512
4513 wR = GetRValue(cRGB);
4514 wG = GetGValue(cRGB);
4515 wB = GetBValue(cRGB);
4516
4517 wMax = max(wR, max(wG, wB));
4518 wMin = min(wR, min(wG, wB));
4519
4520 /* Luminosity */
4521 wLuminosity = ((wMax + wMin) * 240 + 255) / 510;
4522
4523 if (wMax == wMin)
4524 {
4525 /* Achromatic case */
4526 wSaturation = 0;
4527 /* Hue is now unrepresentable, but this is what native returns... */
4528 wHue = 160;
4529 }
4530 else
4531 {
4532 /* Chromatic case */
4533 int wDelta = wMax - wMin, wRNorm, wGNorm, wBNorm;
4534
4535 /* Saturation */
4536 if (wLuminosity <= 120)
4537 wSaturation = ((wMax + wMin)/2 + wDelta * 240) / (wMax + wMin);
4538 else
4539 wSaturation = ((510 - wMax - wMin)/2 + wDelta * 240) / (510 - wMax - wMin);
4540
4541 /* Hue */
4542 wRNorm = (wDelta/2 + wMax * 40 - wR * 40) / wDelta;
4543 wGNorm = (wDelta/2 + wMax * 40 - wG * 40) / wDelta;
4544 wBNorm = (wDelta/2 + wMax * 40 - wB * 40) / wDelta;
4545
4546 if (wR == wMax)
4547 wHue = wBNorm - wGNorm;
4548 else if (wG == wMax)
4549 wHue = 80 + wRNorm - wBNorm;
4550 else
4551 wHue = 160 + wGNorm - wRNorm;
4552 if (wHue < 0)
4553 wHue += 240;
4554 else if (wHue > 240)
4555 wHue -= 240;
4556 }
4557 if (pwHue)
4558 *pwHue = wHue;
4559 if (pwLuminance)
4560 *pwLuminance = wLuminosity;
4561 if (pwSaturation)
4562 *pwSaturation = wSaturation;
4563}
#define GetBValue(quad)
Definition: precomp.h:75
#define GetGValue(quad)
Definition: precomp.h:74
#define GetRValue(quad)
Definition: precomp.h:73
#define min(a, b)
Definition: monoChain.cc:55
#define max(a, b)
Definition: svc.c:63

Referenced by ColorAdjustLuma().

◆ DECLARE_INTERFACE_()

DECLARE_INTERFACE_ ( IQueryAssociations  ,
IUnknown   
)

Definition at line 303 of file shlwapi.h.

304{
305 /*** IUnknown methods ***/
309 /*** IQueryAssociations methods ***/
310 STDMETHOD(Init)(THIS_ ASSOCF flags, LPCWSTR pszAssoc, HKEY hkProgid, HWND hwnd) PURE;
311 STDMETHOD(GetString)(THIS_ ASSOCF flags, ASSOCSTR str, LPCWSTR pszExtra, LPWSTR pszOut, DWORD * pcchOut) PURE;
312 STDMETHOD(GetKey)(THIS_ ASSOCF flags, ASSOCKEY key, LPCWSTR pszExtra, HKEY * phkeyOut) PURE;
313 STDMETHOD(GetData)(THIS_ ASSOCF flags, ASSOCDATA data, LPCWSTR pszExtra, LPVOID pvOut, DWORD * pcbOut) PURE;
314 STDMETHOD(GetEnum)(THIS_ ASSOCF flags, ASSOCENUM assocenum, LPCWSTR pszExtra, REFIID riid, LPVOID * ppvOut) PURE;
315};
#define PURE
Definition: basetyps.h:64
#define THIS_
Definition: basetyps.h:65
#define THIS
Definition: basetyps.h:66
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
#define STDMETHOD(m)
Definition: basetyps.h:62
_In_ BOOLEAN Release
Definition: cdrom.h:920
unsigned long DWORD
Definition: ntddk_ex.h:95
static BYTE * GetData(BYTE *pData, ULONG *pLength)
Definition: assembly.c:114
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
REFIID riid
Definition: atlbase.h:39
static HRESULT QueryInterface(REFIID, void **)
Definition: events.c:2587
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:83
#define REFIID
Definition: guiddef.h:118
DWORD ASSOCF
Definition: shlwapi.h:967
_In_opt_ void _In_ DWORD flags
Definition: shlwapi.h:66
const WCHAR * str
Definition: copy.c:22
uint32_t ULONG
Definition: typedefs.h:59
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ DllInstall()

HRESULT WINAPI DllInstall ( BOOL  bInstall,
LPCWSTR  cmdline 
)

Definition at line 18 of file shsvcs.c.

19{
20 return S_OK;
21}
#define S_OK
Definition: intsafe.h:52

◆ GetAcceptLanguagesA()

WINSHLWAPI HRESULT WINAPI GetAcceptLanguagesA ( char buffer,
DWORD buff_len 
)

◆ GetAcceptLanguagesW()

WINSHLWAPI HRESULT WINAPI GetAcceptLanguagesW ( WCHAR buffer,
DWORD buff_len 
)

Definition at line 529 of file main.c.

530{
531 DWORD mystrlen, mytype;
532 WCHAR *mystr;
533 LCID mylcid;
534 HKEY mykey;
535 LONG lres;
536 DWORD len;
537
538 TRACE("%p, %p, *%p: %ld\n", langbuf, buflen, buflen, buflen ? *buflen : -1);
539
540 if (!langbuf || !buflen || !*buflen)
541 return E_FAIL;
542
543 mystrlen = (*buflen > 20) ? *buflen : 20 ;
544 len = mystrlen * sizeof(WCHAR);
545 mystr = heap_alloc(len);
546 mystr[0] = 0;
547 RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Internet Explorer\\International",
548 0, KEY_QUERY_VALUE, &mykey);
549 lres = RegQueryValueExW(mykey, L"AcceptLanguage", 0, &mytype, (PBYTE)mystr, &len);
550 RegCloseKey(mykey);
551 len = lstrlenW(mystr);
552
553 if (!lres && (*buflen > len))
554 {
555 lstrcpyW(langbuf, mystr);
556 *buflen = len;
557 heap_free(mystr);
558 return S_OK;
559 }
560
561 /* Did not find a value in the registry or the user buffer is too small */
562 mylcid = GetUserDefaultLCID();
563 lcid_to_rfc1766(mylcid, mystr, mystrlen);
564 len = lstrlenW(mystr);
565
566 memcpy(langbuf, mystr, min(*buflen, len + 1)*sizeof(WCHAR));
567 heap_free(mystr);
568
569 if (*buflen > len)
570 {
571 *buflen = len;
572 return S_OK;
573 }
574
575 *buflen = 0;
577}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define RegCloseKey(hKey)
Definition: registry.h:49
#define E_FAIL
Definition: ddrawi.h:102
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
LCID WINAPI GetUserDefaultLCID(void)
Definition: locale.c:1216
static HRESULT lcid_to_rfc1766(LCID lcid, WCHAR *rfc1766, INT len)
Definition: main.c:502
#define L(x)
Definition: resources.c:13
GLenum GLsizei len
Definition: glext.h:6722
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define KEY_QUERY_VALUE
Definition: nt_native.h:1019
BYTE * PBYTE
Definition: pedump.c:66
long LONG
Definition: pedump.c:60
DWORD LCID
Definition: nls.h:13
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:3437
#define HKEY_CURRENT_USER
Definition: winreg.h:11
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by GetAcceptLanguagesA().

◆ HashData()

WINSHLWAPI HRESULT WINAPI HashData ( const unsigned char src,
DWORD  src_len,
unsigned char lpDest,
DWORD  dest_len 
)

Definition at line 5243 of file path.c.

5244{
5245 INT src_count = src_len - 1, dest_count = dest_len - 1;
5246
5247 if (!src || !dest)
5248 return E_INVALIDARG;
5249
5250 while (dest_count >= 0)
5251 {
5252 dest[dest_count] = (dest_count & 0xff);
5253 dest_count--;
5254 }
5255
5256 while (src_count >= 0)
5257 {
5258 dest_count = dest_len - 1;
5259 while (dest_count >= 0)
5260 {
5261 dest[dest_count] = hashdata_lookup[src[src_count] ^ dest[dest_count]];
5262 dest_count--;
5263 }
5264 src_count--;
5265 }
5266
5267 return S_OK;
5268}
#define E_INVALIDARG
Definition: ddrawi.h:101
static const unsigned char hashdata_lookup[256]
Definition: path.c:94
GLenum src
Definition: glext.h:6340
static char * dest
Definition: rtl.c:135
int32_t INT
Definition: typedefs.h:58

Referenced by test_HashData(), UrlHashA(), and UrlHashW().

◆ IntlStrEqWorkerA()

WINSHLWAPI BOOL WINAPI IntlStrEqWorkerA ( BOOL  bCase,
LPCSTR  lpszStr,
LPCSTR  lpszComp,
int  iLen 
)

Definition at line 860 of file string.c.

862{
864 int iRet;
865
866 TRACE("(%d,%s,%s,%d)\n", bCase,
867 debugstr_a(lpszStr), debugstr_a(lpszComp), iLen);
868
869 /* FIXME: This flag is undocumented and unknown by our CompareString.
870 */
872 if (!bCase) dwFlags |= NORM_IGNORECASE;
873
875 dwFlags, lpszStr, iLen, lpszComp, iLen);
876
877 if (!iRet)
878 iRet = CompareStringA(2048, dwFlags, lpszStr, iLen, lpszComp, iLen);
879
880 return iRet == CSTR_EQUAL;
881}
INT WINAPI CompareStringA(LCID lcid, DWORD flags, LPCSTR str1, INT len1, LPCSTR str2, INT len2)
Definition: locale.c:4086
#define debugstr_a
Definition: kernel32.h:31
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
#define LOCALE_RETURN_GENITIVE_NAMES
Definition: winnls.h:24

◆ IntlStrEqWorkerW()

WINSHLWAPI BOOL WINAPI IntlStrEqWorkerW ( BOOL  bCase,
LPCWSTR  lpszStr,
LPCWSTR  lpszComp,
int  iLen 
)

Definition at line 888 of file string.c.

890{
892 int iRet;
893
894 TRACE("(%d,%s,%s,%d)\n", bCase,
895 debugstr_w(lpszStr),debugstr_w(lpszComp), iLen);
896
897 /* FIXME: This flag is undocumented and unknown by our CompareString.
898 */
900 if (!bCase) dwFlags |= NORM_IGNORECASE;
901
903 dwFlags, lpszStr, iLen, lpszComp, iLen);
904
905 if (!iRet)
906 iRet = CompareStringW(2048, dwFlags, lpszStr, iLen, lpszComp, iLen);
907
908 return iRet == CSTR_EQUAL;
909}

◆ IsCharSpaceA()

WINSHLWAPI BOOL WINAPI IsCharSpaceA ( CHAR  c)

Definition at line 6598 of file locale.c.

6599{
6600 WCHAR wc;
6601 DWORD reslen;
6602 RtlMultiByteToUnicodeN( &wc, sizeof(WCHAR), &reslen, &c, 1 );
6603 return reslen && (get_char_type( CT_CTYPE1, wc ) & C1_SPACE);
6604}
static WORD get_char_type(DWORD type, WCHAR ch)
Definition: locale.c:2034
const GLubyte * c
Definition: glext.h:8905
#define C1_SPACE
Definition: unicode.h:34
static DWORD LPDWORD reslen
Definition: directory.c:51
_Use_decl_annotations_ NTSTATUS NTAPI RtlMultiByteToUnicodeN(_Out_ PWCH UnicodeString, _In_ ULONG UnicodeSize, _Out_opt_ PULONG ResultSize, _In_ PCCH MbString, _In_ ULONG MbSize)
Definition: nlsboot.c:62
#define CT_CTYPE1
Definition: winnls.h:255

◆ IsCharSpaceW()

WINSHLWAPI BOOL WINAPI IsCharSpaceW ( WCHAR  wc)

Definition at line 6610 of file locale.c.

6611{
6612 return !!(get_char_type( CT_CTYPE1, wc ) & C1_SPACE);
6613}

◆ IsInternetESCEnabled()

WINSHLWAPI BOOL WINAPI IsInternetESCEnabled ( void  )

Definition at line 5303 of file path.c.

5304{
5305 FIXME(": stub\n");
5306 return FALSE;
5307}

◆ IsOS()

WINSHLWAPI BOOL WINAPI IsOS ( DWORD  feature)

Definition at line 4230 of file ordinal.c.

4231{
4232#ifdef __REACTOS__
4234 DWORD platform, majorv, minorv;
4235
4236 osvi.dwOSVersionInfoSize = sizeof(osvi);
4238 {
4241 {
4242 ERR("GetVersionEx failed\n");
4243 return FALSE;
4244 }
4245 osvi.wProductType = VER_NT_WORKSTATION;
4246 osvi.wSuiteMask = 0;
4247 }
4248#else
4250 DWORD platform, majorv, minorv;
4251
4253 if(!GetVersionExA(&osvi)) {
4254 ERR("GetVersionEx failed\n");
4255 return FALSE;
4256 }
4257#endif
4258 majorv = osvi.dwMajorVersion;
4259 minorv = osvi.dwMinorVersion;
4261
4262#define ISOS_RETURN(x) \
4263 TRACE("(0x%x) ret=%d\n",feature,(x)); \
4264 return (x);
4265
4266 switch(feature) {
4267 case OS_WIN32SORGREATER:
4270 case OS_NT:
4272 case OS_WIN95ORGREATER:
4274 case OS_NT4ORGREATER:
4275 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 4)
4278 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
4279 case OS_WIN98ORGREATER:
4281 case OS_WIN98_GOLD:
4283 case OS_WIN2000PRO:
4284 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
4285 case OS_WIN2000SERVER:
4286 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
4288 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
4290 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
4291 case OS_WIN2000TERMINAL:
4292 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
4293 case OS_EMBEDDED:
4294 FIXME("(OS_EMBEDDED) What should we return here?\n");
4295 return FALSE;
4296 case OS_TERMINALCLIENT:
4297 FIXME("(OS_TERMINALCLIENT) What should we return here?\n");
4298 return FALSE;
4300 FIXME("(OS_TERMINALREMOTEADMIN) What should we return here?\n");
4301 return FALSE;
4302 case OS_WIN95_GOLD:
4304 case OS_MEORGREATER:
4306 case OS_XPORGREATER:
4307 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5 && minorv >= 1)
4308 case OS_HOME:
4309 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5 && minorv >= 1)
4310 case OS_PROFESSIONAL:
4312 case OS_DATACENTER:
4314 case OS_ADVSERVER:
4315 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
4316 case OS_SERVER:
4318 case OS_TERMINALSERVER:
4321 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && minorv >= 1 && majorv >= 5)
4323 FIXME("(OS_FASTUSERSWITCHING) What should we return here?\n");
4324 return TRUE;
4325 case OS_WELCOMELOGONUI:
4326 FIXME("(OS_WELCOMELOGONUI) What should we return here?\n");
4327 return FALSE;
4328 case OS_DOMAINMEMBER:
4329 FIXME("(OS_DOMAINMEMBER) What should we return here?\n");
4330 return TRUE;
4331 case OS_ANYSERVER:
4332#ifdef __REACTOS__
4333 ISOS_RETURN(osvi.wProductType > VER_NT_WORKSTATION)
4334#else
4336#endif
4337 case OS_WOW6432:
4338 {
4339 BOOL is_wow64;
4341 return is_wow64;
4342 }
4343 case OS_WEBSERVER:
4347 case OS_TABLETPC:
4348 FIXME("(OS_TABLETPC) What should we return here?\n");
4349 return FALSE;
4350 case OS_SERVERADMINUI:
4351#ifdef __REACTOS__
4352 {
4353 DWORD value = FALSE, size = sizeof(value);
4355 if (hKey)
4356 {
4357 SHQueryValueExW(hKey, L"ServerAdminUI", NULL, NULL, &value, &size);
4359 }
4361 }
4362#else
4363 FIXME("(OS_SERVERADMINUI) What should we return here?\n");
4364 return FALSE;
4365#endif
4366 case OS_MEDIACENTER:
4367 FIXME("(OS_MEDIACENTER) What should we return here?\n");
4368 return FALSE;
4369 case OS_APPLIANCE:
4370 FIXME("(OS_APPLIANCE) What should we return here?\n");
4371 return FALSE;
4372 case 0x25: /*OS_VISTAORGREATER*/
4373 ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 6)
4374 }
4375
4376#undef ISOS_RETURN
4377
4378 WARN("(0x%x) unknown parameter\n",feature);
4379
4380 return FALSE;
4381}
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
return
Definition: dirsup.c:529
#define TRUE
Definition: types.h:120
#define GetCurrentProcess()
Definition: compat.h:759
#define IsWow64Process
Definition: compat.h:760
BOOL WINAPI GetVersionExA(IN LPOSVERSIONINFOA lpVersionInformation)
Definition: version.c:69
HKEY WINAPI SHGetShellKey(DWORD flags, LPCWSTR sub_key, BOOL create)
Definition: ordinal.c:4806
#define ISOS_RETURN(x)
DWORD WINAPI SHQueryValueExW(HKEY hKey, LPCWSTR lpszValue, LPDWORD lpReserved, LPDWORD pwType, LPVOID pvData, LPDWORD pcbData)
Definition: reg.c:1461
unsigned int BOOL
Definition: ntddk_ex.h:94
FxAutoRegKey hKey
GLdouble n
Definition: glext.h:7729
GLsizeiptr size
Definition: glext.h:5919
BOOL is_wow64
Definition: main.c:38
@ SHKEY_Key_Explorer
Definition: ordinal.c:2807
@ SHKEY_Root_HKCU
Definition: ordinal.c:2805
INTERNETFEATURELIST feature
Definition: misc.c:1719
platform
Definition: msipriv.h:364
#define VER_PLATFORM_WIN32_NT
Definition: rtltypes.h:238
#define VER_PLATFORM_WIN32_WINDOWS
Definition: rtltypes.h:237
#define VER_PLATFORM_WIN32s
Definition: rtltypes.h:236
#define OS_WIN2000TERMINAL
Definition: shlwapi.h:238
#define OS_WIN98_GOLD
Definition: shlwapi.h:232
#define OS_APPLIANCE
Definition: shlwapi.h:262
#define OS_WIN95ORGREATER
Definition: shlwapi.h:228
#define OS_MEDIACENTER
Definition: shlwapi.h:261
#define OS_WIN95_GOLD
Definition: shlwapi.h:242
#define OS_SMALLBUSINESSSERVER
Definition: shlwapi.h:258
#define OS_WIN98ORGREATER
Definition: shlwapi.h:231
#define OS_NT
Definition: shlwapi.h:227
#define OS_MEORGREATER
Definition: shlwapi.h:243
#define OS_WIN2000ADVSERVER
Definition: shlwapi.h:236
#define OS_XPORGREATER
Definition: shlwapi.h:244
#define OS_WIN2000ORGREATER
Definition: shlwapi.h:233
#define OS_WIN2000PRO
Definition: shlwapi.h:234
#define OS_WIN2000SERVER
Definition: shlwapi.h:235
#define OS_TERMINALSERVER
Definition: shlwapi.h:250
#define OS_SERVERADMINUI
Definition: shlwapi.h:260
#define OS_PROFESSIONAL
Definition: shlwapi.h:246
#define OS_WOW6432
Definition: shlwapi.h:256
#define OS_TERMINALCLIENT
Definition: shlwapi.h:240
#define OS_DOMAINMEMBER
Definition: shlwapi.h:254
#define OS_WIN2000DATACENTER
Definition: shlwapi.h:237
#define OS_NT4ORGREATER
Definition: shlwapi.h:229
#define OS_TABLETPC
Definition: shlwapi.h:259
#define OS_ADVSERVER
Definition: shlwapi.h:248
#define OS_EMBEDDED
Definition: shlwapi.h:239
#define OS_SERVER
Definition: shlwapi.h:249
#define OS_TERMINALREMOTEADMIN
Definition: shlwapi.h:241
#define OS_FASTUSERSWITCHING
Definition: shlwapi.h:252
#define OS_PERSONALTERMINALSERVER
Definition: shlwapi.h:251
#define OS_WELCOMELOGONUI
Definition: shlwapi.h:253
#define OS_HOME
Definition: shlwapi.h:245
#define OS_ANYSERVER
Definition: shlwapi.h:255
#define OS_DATACENTER
Definition: shlwapi.h:247
#define OS_WEBSERVER
Definition: shlwapi.h:257
ULONG dwPlatformId
Definition: rtltypes.h:241
ULONG dwOSVersionInfoSize
Definition: rtltypes.h:237
ULONG dwMajorVersion
Definition: rtltypes.h:238
ULONG dwMinorVersion
Definition: rtltypes.h:239
Definition: pdh_main.c:96
OSVERSIONINFO osvi
Definition: ver.c:28
#define OS_WIN2000ORGREATER_ALT
Definition: shlwapi.h:1123
#define OS_WIN32SORGREATER
Definition: shlwapi.h:1119
#define VER_NT_WORKSTATION
struct _OSVERSIONINFOA OSVERSIONINFOA

Referenced by CDefView::GetDefaultViewMode(), CShellDispatch::GetSetting(), CShellDispatch::GetSystemInformation(), InitializeServerAdminUI(), IsSystem64Bit(), and CControlPanelFolder::MessageSFVCB().

◆ IStream_Reset()

WINSHLWAPI HRESULT WINAPI IStream_Reset ( IStream lpStream)

Definition at line 640 of file istream.c.

641{
643 TRACE("(%p)\n", lpStream);
644 zero.QuadPart = 0;
645 return IStream_Seek(lpStream, zero, 0, NULL);
646}
int zero
Definition: sehframes.cpp:29

Referenced by Open().

◆ IStream_Size()

WINSHLWAPI HRESULT WINAPI IStream_Size ( IStream lpStream,
ULARGE_INTEGER lpulSize 
)

Definition at line 661 of file istream.c.

662{
663 STATSTG statstg;
664 HRESULT hRet;
665
666 TRACE("(%p,%p)\n", lpStream, lpulSize);
667
668 memset(&statstg, 0, sizeof(statstg));
669
670 hRet = IStream_Stat(lpStream, &statstg, 1);
671
672 if (SUCCEEDED(hRet) && lpulSize)
673 *lpulSize = statstg.cbSize;
674 return hRet;
675}
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define memset(x, y, z)
Definition: compat.h:39

Referenced by CDesktopUpgradePropertyBag::_GetOldDesktopViewStream(), CRegPropertyBag::_GetStreamSize(), and CDesktopUpgradePropertyBag::_NewStreamFromOld().

◆ IUnknown_AtomicRelease()

WINSHLWAPI void WINAPI IUnknown_AtomicRelease ( IUnknown **  punk)

Definition at line 1245 of file ordinal.c.

1246{
1247 TRACE("(%p)\n", lpUnknown);
1248
1249 if(!lpUnknown || !*lpUnknown) return;
1250
1251 TRACE("doing Release\n");
1252
1253 IUnknown_Release(*lpUnknown);
1254 *lpUnknown = NULL;
1255}

Referenced by IUnknown_Set(), and SHWeakReleaseInterface().

◆ IUnknown_GetSite()

WINSHLWAPI HRESULT WINAPI IUnknown_GetSite ( IUnknown punk,
REFIID  riid,
void **  ppv 
)

◆ IUnknown_GetWindow()

WINSHLWAPI HRESULT WINAPI IUnknown_GetWindow ( IUnknown punk,
HWND phwnd 
)

Definition at line 1336 of file ordinal.c.

1337{
1338 IUnknown *lpOle;
1339 HRESULT hRet = E_FAIL;
1340
1341 TRACE("(%p,%p)\n", lpUnknown, lphWnd);
1342
1343 if (!lpUnknown)
1344 return hRet;
1345
1346 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleWindow, (void**)&lpOle);
1347
1348 if (FAILED(hRet))
1349 {
1350 hRet = IUnknown_QueryInterface(lpUnknown,&IID_IShellView, (void**)&lpOle);
1351
1352 if (FAILED(hRet))
1353 {
1354 hRet = IUnknown_QueryInterface(lpUnknown, &IID_IInternetSecurityMgrSite,
1355 (void**)&lpOle);
1356 }
1357 }
1358
1359 if (SUCCEEDED(hRet))
1360 {
1361 /* Laziness here - Since GetWindow() is the first method for the above 3
1362 * interfaces, we use the same call for them all.
1363 */
1364 hRet = IOleWindow_GetWindow((IOleWindow*)lpOle, lphWnd);
1365 IUnknown_Release(lpOle);
1366 if (lphWnd)
1367 TRACE("Returning HWND=%p\n", *lphWnd);
1368 }
1369
1370 return hRet;
1371}
#define FAILED(hr)
Definition: intsafe.h:51
const GUID IID_IOleWindow

Referenced by CMenuDeskBar::_IsSubMenuParent(), CMenuSite::AddBand(), BindCtx_GetUIWindow(), CInternetToolbar::CreateMenuBar(), CFSDropTarget::Drop(), CAddressEditBox::Execute(), CShellBrowser::GetControlWindow(), GetUiOwner(), CDockSite::Initialize(), CInternetToolbar::InitNew(), CTrayNotifyWnd::OnCreate(), CTrayWindow::OnCreate(), CShellMenuCallback::OnInitMenu(), CTrayWindow::OnOpenStartMenu(), CInternetToolbar::OnWinIniChange(), CAddressEditBox::ParseNow(), CShellBrowser::RepositionBars(), CMenuDeskBar::SetClient(), CMenuSite::SetDeskBarSite(), CISFBand::SetSite(), CTaskBand::SetSite(), CAddressBand::SetSite(), CInternetToolbar::SetSite(), CSearchBar::SetSite(), and CToolsBand::SetSite().

◆ IUnknown_QueryService()

WINSHLWAPI HRESULT WINAPI IUnknown_QueryService ( IUnknown punk,
REFGUID  guidService,
REFIID  riid,
void **  ppvOut 
)

◆ IUnknown_Set()

WINSHLWAPI void WINAPI IUnknown_Set ( IUnknown **  ppunk,
IUnknown punk 
)

Definition at line 2190 of file ordinal.c.

2191{
2192 TRACE("(%p,%p)\n", lppDest, lpUnknown);
2193
2194 IUnknown_AtomicRelease(lppDest);
2195
2196 if (lpUnknown)
2197 {
2198 IUnknown_AddRef(lpUnknown);
2199 *lppDest = lpUnknown;
2200 }
2201}
void WINAPI IUnknown_AtomicRelease(IUnknown **lpUnknown)
Definition: ordinal.c:1245

Referenced by Free(), and CFindFolderContextMenu::SetSite().

◆ IUnknown_SetSite()

WINSHLWAPI HRESULT WINAPI IUnknown_SetSite ( IUnknown punk,
IUnknown punkSite 
)

Definition at line 1411 of file ordinal.c.

1414{
1415 HRESULT hr;
1416 IObjectWithSite *iobjwithsite;
1417 IInternetSecurityManager *isecmgr;
1418
1419 if (!obj) return E_FAIL;
1420
1421 hr = IUnknown_QueryInterface(obj, &IID_IObjectWithSite, (LPVOID *)&iobjwithsite);
1422 TRACE("IID_IObjectWithSite QI ret=%08x, %p\n", hr, iobjwithsite);
1423 if (SUCCEEDED(hr))
1424 {
1425 hr = IObjectWithSite_SetSite(iobjwithsite, site);
1426 TRACE("done IObjectWithSite_SetSite ret=%08x\n", hr);
1427 IObjectWithSite_Release(iobjwithsite);
1428 }
1429 else
1430 {
1431 hr = IUnknown_QueryInterface(obj, &IID_IInternetSecurityManager, (LPVOID *)&isecmgr);
1432 TRACE("IID_IInternetSecurityManager QI ret=%08x, %p\n", hr, isecmgr);
1433 if (FAILED(hr)) return hr;
1434
1435 hr = IInternetSecurityManager_SetSecuritySite(isecmgr, (IInternetSecurityMgrSite *)site);
1436 TRACE("done IInternetSecurityManager_SetSecuritySite ret=%08x\n", hr);
1437 IInternetSecurityManager_Release(isecmgr);
1438 }
1439 return hr;
1440}
const IID IID_IObjectWithSite
static IActiveScriptSite * site
Definition: script.c:149
HRESULT hr
Definition: shlfolder.c:183

Referenced by CMenuBand::_OnPopupSubMenu(), CMenuSite::AddBand(), CShellBrowser::BrowseToPath(), CreateStartMenu(), DCMA_DestroyEntry(), DCMA_InsertMenuItems(), CShellBrowser::DoFolderOptions(), CDefView::drag_notify_subitem(), CDefView::FillFileMenu(), CShellBrowser::GetBaseBar(), CDefView::GetItemObject(), CShellBrowser::Initialize(), CDockSite::Initialize(), CDefView::InvokeContextMenuCommand(), CDefaultContextMenu::LoadDynamicContextMenuHandler(), CDefView::OnDestroy(), CMenuBand::SetClient(), CMenuSite::SetDeskBarSite(), CFindFolderContextMenu::SetSite(), CDefViewBckgrndMenu::SetSite(), SHInvokeCommandOnContextMenuInternal(), CDefaultContextMenu::~CDefaultContextMenu(), and MenuCleanup::~MenuCleanup().

◆ ParseURLA()

WINSHLWAPI HRESULT WINAPI ParseURLA ( LPCSTR  pszUrl,
PARSEDURLA ppu 
)

Definition at line 161 of file url.c.

162{
164 const char *ptr = x;
165 int len;
166
167 TRACE("%s %p\n", debugstr_a(x), y);
168
169 if(y->cbSize != sizeof(*y))
170 return E_INVALIDARG;
171
172 while(*ptr && (isalnum(*ptr) || *ptr == '-' || *ptr == '+' || *ptr == '.'))
173 ptr++;
174
175 if (*ptr != ':' || ptr <= x+1) {
176 y->pszProtocol = NULL;
178 }
179
180 y->pszProtocol = x;
181 y->cchProtocol = ptr-x;
182 y->pszSuffix = ptr+1;
183 y->cchSuffix = strlen(y->pszSuffix);
184
186 scheme, sizeof(scheme)/sizeof(WCHAR));
187 y->nScheme = get_scheme_code(scheme, len);
188
189 return S_OK;
190}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define CP_ACP
Definition: compat.h:109
#define MultiByteToWideChar
Definition: compat.h:110
static DWORD get_scheme_code(LPCWSTR scheme, DWORD scheme_len)
Definition: url.c:135
_Check_return_ _CRTIMP int __cdecl isalnum(_In_ int _C)
#define URL_E_INVALID_SYNTAX
Definition: intshcut.h:32
static PVOID ptr
Definition: dispmode.c:27
DWORD scheme
#define INTERNET_MAX_SCHEME_LENGTH
Definition: wininet.h:50

Referenced by PathIsURLA(), test_ParseURL(), UrlGetLocationA(), and UrlIsA().

◆ ParseURLW()

WINSHLWAPI HRESULT WINAPI ParseURLW ( LPCWSTR  pszUrl,
PARSEDURLW ppu 
)

Definition at line 197 of file url.c.

198{
199 const WCHAR *ptr = x;
200
201 TRACE("%s %p\n", debugstr_w(x), y);
202
203 if(y->cbSize != sizeof(*y))
204 return E_INVALIDARG;
205
206 while(*ptr && (isalnumW(*ptr) || *ptr == '-' || *ptr == '+' || *ptr == '.'))
207 ptr++;
208
209 if (*ptr != ':' || ptr <= x+1) {
210 y->pszProtocol = NULL;
212 }
213
214 y->pszProtocol = x;
215 y->cchProtocol = ptr-x;
216 y->pszSuffix = ptr+1;
217 y->cchSuffix = strlenW(y->pszSuffix);
218 y->nScheme = get_scheme_code(x, ptr-x);
219
220 return S_OK;
221}
#define strlenW(s)
Definition: unicode.h:34
#define isalnumW(n)
Definition: unicode.h:55

Referenced by PathIsURLW(), test_ParseURL(), URL_CreateFromPath(), UrlApplySchemeW(), UrlCombineW(), UrlEscapeW(), UrlGetLocationW(), and UrlIsW().

◆ PathAddBackslashA()

WINSHLWAPI LPSTR WINAPI PathAddBackslashA ( LPSTR  lpszPath)

Definition at line 263 of file path.c.

264{
265 size_t iLen;
266 LPSTR prev = lpszPath;
267
268 TRACE("(%s)\n",debugstr_a(lpszPath));
269
270 if (!lpszPath || (iLen = strlen(lpszPath)) >= MAX_PATH)
271 return NULL;
272
273 if (iLen)
274 {
275 do {
276 lpszPath = CharNextA(prev);
277 if (*lpszPath)
278 prev = lpszPath;
279 } while (*lpszPath);
280 if (*prev != '\\')
281 {
282 *lpszPath++ = '\\';
283 *lpszPath = '\0';
284 }
285 }
286 return lpszPath;
287}
#define MAX_PATH
Definition: compat.h:34
LPSTR WINAPI CharNextA(const char *ptr)
Definition: string.c:1107
char * LPSTR
Definition: xmlstorage.h:182

◆ PathAddBackslashW()

WINSHLWAPI LPWSTR WINAPI PathAddBackslashW ( LPWSTR  lpszPath)

Definition at line 294 of file path.c.

295{
296 size_t iLen;
297
298 TRACE("(%s)\n",debugstr_w(lpszPath));
299
300 if (!lpszPath || (iLen = strlenW(lpszPath)) >= MAX_PATH)
301 return NULL;
302
303 if (iLen)
304 {
305 lpszPath += iLen;
306 if (lpszPath[-1] != '\\')
307 {
308 *lpszPath++ = '\\';
309 *lpszPath = '\0';
310 }
311 }
312 return lpszPath;
313}

◆ PathAddExtensionA()

WINSHLWAPI BOOL WINAPI PathAddExtensionA ( LPSTR  lpszPath,
LPCSTR  lpszExtension 
)

Definition at line 2621 of file path.c.

2622{
2623 size_t dwLen;
2624
2625 TRACE("(%s,%s)\n", debugstr_a(lpszPath), debugstr_a(lpszExtension));
2626
2627 if (!lpszPath || !lpszExtension || *(PathFindExtensionA(lpszPath)))
2628 return FALSE;
2629
2630 dwLen = strlen(lpszPath);
2631
2632 if (dwLen + strlen(lpszExtension) >= MAX_PATH)
2633 return FALSE;
2634
2635 strcpy(lpszPath + dwLen, lpszExtension);
2636 return TRUE;
2637}
LPSTR WINAPI PathFindExtensionA(LPCSTR lpszPath)
Definition: path.c:422
strcpy
Definition: string.h:131

◆ PathAddExtensionW()

WINSHLWAPI BOOL WINAPI PathAddExtensionW ( LPWSTR  lpszPath,
LPCWSTR  lpszExtension 
)

Definition at line 2644 of file path.c.

2645{
2646 size_t dwLen;
2647
2648 TRACE("(%s,%s)\n", debugstr_w(lpszPath), debugstr_w(lpszExtension));
2649
2650 if (!lpszPath || !lpszExtension || *(PathFindExtensionW(lpszPath)))
2651 return FALSE;
2652
2653 dwLen = strlenW(lpszPath);
2654
2655 if (dwLen + strlenW(lpszExtension) >= MAX_PATH)
2656 return FALSE;
2657
2658 strcpyW(lpszPath + dwLen, lpszExtension);
2659 return TRUE;
2660}
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:447
#define strcpyW(d, s)
Definition: unicode.h:35

◆ PathAppendA()

WINSHLWAPI BOOL WINAPI PathAppendA ( LPSTR  lpszPath,
LPCSTR  lpszAppend 
)

Definition at line 106 of file path.c.

107{
108 TRACE("(%s,%s)\n",debugstr_a(lpszPath), debugstr_a(lpszAppend));
109
110 if (lpszPath && lpszAppend)
111 {
112 if (!PathIsUNCA(lpszAppend))
113 while (*lpszAppend == '\\')
114 lpszAppend++;
115 if (PathCombineA(lpszPath, lpszPath, lpszAppend))
116 return TRUE;
117 }
118 return FALSE;
119}
BOOL WINAPI PathIsUNCA(LPCSTR lpszPath)
Definition: path.c:2249
#define PathCombineA
Definition: pathcch.h:317

◆ PathAppendW()

WINSHLWAPI BOOL WINAPI PathAppendW ( LPWSTR  lpszPath,
LPCWSTR  lpszAppend 
)

Definition at line 126 of file path.c.

127{
128 TRACE("(%s,%s)\n",debugstr_w(lpszPath), debugstr_w(lpszAppend));
129
130 if (lpszPath && lpszAppend)
131 {
132 if (!PathIsUNCW(lpszAppend))
133 while (*lpszAppend == '\\')
134 lpszAppend++;
135 if (PathCombineW(lpszPath, lpszPath, lpszAppend))
136 return TRUE;
137 }
138 return FALSE;
139}
BOOL WINAPI PathIsUNCW(LPCWSTR lpszPath)
Definition: path.c:2272
#define PathCombineW
Definition: pathcch.h:318

◆ PathBuildRootA()

WINSHLWAPI LPSTR WINAPI PathBuildRootA ( LPSTR  lpszPath,
int  drive 
)

Definition at line 329 of file path.c.

330{
331 TRACE("(%p,%d)\n", lpszPath, drive);
332
333 if (lpszPath && drive >= 0 && drive < 26)
334 {
335 lpszPath[0] = 'A' + drive;
336 lpszPath[1] = ':';
337 lpszPath[2] = '\\';
338 lpszPath[3] = '\0';
339 }
340 return lpszPath;
341}

Referenced by ATL::CPathT< StringType >::PathBuildRootX(), and test_PathBuildRootA().

◆ PathBuildRootW()

WINSHLWAPI LPWSTR WINAPI PathBuildRootW ( LPWSTR  lpszPath,
int  drive 
)

Definition at line 348 of file path.c.

349{
350 TRACE("(%p,%d)\n", lpszPath, drive);
351
352 if (lpszPath && drive >= 0 && drive < 26)
353 {
354 lpszPath[0] = 'A' + drive;
355 lpszPath[1] = ':';
356 lpszPath[2] = '\\';
357 lpszPath[3] = '\0';
358 }
359 return lpszPath;
360}

Referenced by IsLFNDriveW(), CDesktopBrowser::OnDeviceChange(), CDrivesFolder::ParseDisplayName(), ATL::CPathT< StringType >::PathBuildRootX(), and PathQualifyExW().

◆ PathCanonicalizeA()

WINSHLWAPI BOOL WINAPI PathCanonicalizeA ( LPSTR  lpszBuf,
LPCSTR  lpszPath 
)

Definition at line 2419 of file path.c.

2420{
2421 BOOL bRet = FALSE;
2422
2423 TRACE("(%p,%s)\n", lpszBuf, debugstr_a(lpszPath));
2424
2425 if (lpszBuf)
2426 *lpszBuf = '\0';
2427
2428 if (!lpszBuf || !lpszPath)
2430 else
2431 {
2433 WCHAR szBuff[MAX_PATH];
2434 int ret = MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH);
2435
2436 if (!ret) {
2437 WARN("Failed to convert string to widechar (too long?), LE %d.\n", GetLastError());
2438 return FALSE;
2439 }
2440 bRet = PathCanonicalizeW(szBuff, szPath);
2441 WideCharToMultiByte(CP_ACP,0,szBuff,-1,lpszBuf,MAX_PATH,0,0);
2442 }
2443 return bRet;
2444}
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
#define WideCharToMultiByte
Definition: compat.h:111
return ret
Definition: mutex.c:146
LPCWSTR szPath
Definition: env.c:37
#define PathCanonicalizeW
Definition: pathcch.h:314
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

◆ PathCanonicalizeW()

WINSHLWAPI BOOL WINAPI PathCanonicalizeW ( LPWSTR  lpszBuf,
LPCWSTR  lpszPath 
)

Definition at line 2452 of file path.c.

2453{
2454 LPWSTR lpszDst = lpszBuf;
2455 LPCWSTR lpszSrc = lpszPath;
2456
2457 TRACE("(%p,%s)\n", lpszBuf, debugstr_w(lpszPath));
2458
2459 if (lpszBuf)
2460 *lpszDst = '\0';
2461
2462 if (!lpszBuf || !lpszPath)
2463 {
2465 return FALSE;
2466 }
2467
2468 if (!*lpszPath)
2469 {
2470 *lpszBuf++ = '\\';
2471 *lpszBuf = '\0';
2472 return TRUE;
2473 }
2474
2475 /* Copy path root */
2476 if (*lpszSrc == '\\')
2477 {
2478 *lpszDst++ = *lpszSrc++;
2479 }
2480 else if (*lpszSrc && lpszSrc[1] == ':')
2481 {
2482 /* X:\ */
2483 *lpszDst++ = *lpszSrc++;
2484 *lpszDst++ = *lpszSrc++;
2485 if (*lpszSrc == '\\')
2486 *lpszDst++ = *lpszSrc++;
2487 }
2488
2489 /* Canonicalize the rest of the path */
2490 while (*lpszSrc)
2491 {
2492 if (*lpszSrc == '.')
2493 {
2494 if (lpszSrc[1] == '\\' && (lpszSrc == lpszPath || lpszSrc[-1] == '\\' || lpszSrc[-1] == ':'))
2495 {
2496 lpszSrc += 2; /* Skip .\ */
2497 }
2498 else if (lpszSrc[1] == '.' && (lpszDst == lpszBuf || lpszDst[-1] == '\\'))
2499 {
2500 /* \.. backs up a directory, over the root if it has no \ following X:.
2501 * .. is ignored if it would remove a UNC server name or initial \\
2502 */
2503 if (lpszDst != lpszBuf)
2504 {
2505 *lpszDst = '\0'; /* Allow PathIsUNCServerShareA test on lpszBuf */
2506 if (lpszDst > lpszBuf+1 && lpszDst[-1] == '\\' &&
2507 (lpszDst[-2] != '\\' || lpszDst > lpszBuf+2))
2508 {
2509 if (lpszDst[-2] == ':' && (lpszDst > lpszBuf+3 || lpszDst[-3] == ':'))
2510 {
2511 lpszDst -= 2;
2512 while (lpszDst > lpszBuf && *lpszDst != '\\')
2513 lpszDst--;
2514 if (*lpszDst == '\\')
2515 lpszDst++; /* Reset to last '\' */
2516 else
2517 lpszDst = lpszBuf; /* Start path again from new root */
2518 }
2519 else if (lpszDst[-2] != ':' && !PathIsUNCServerShareW(lpszBuf))
2520 lpszDst -= 2;
2521 }
2522 while (lpszDst > lpszBuf && *lpszDst != '\\')
2523 lpszDst--;
2524 if (lpszDst == lpszBuf)
2525 {
2526 *lpszDst++ = '\\';
2527 lpszSrc++;
2528 }
2529 }
2530 lpszSrc += 2; /* Skip .. in src path */
2531 }
2532 else
2533 *lpszDst++ = *lpszSrc++;
2534 }
2535 else
2536 *lpszDst++ = *lpszSrc++;
2537 }
2538 /* Append \ to naked drive specs */
2539 if (lpszDst - lpszBuf == 2 && lpszDst[-1] == ':')
2540 *lpszDst++ = '\\';
2541 *lpszDst++ = '\0';
2542 return TRUE;
2543}
BOOL WINAPI PathIsUNCServerShareW(LPCWSTR lpszPath)
Definition: path.c:2384

◆ PathCombineA()

WINSHLWAPI LPSTR WINAPI PathCombineA ( LPSTR  lpszDest,
LPCSTR  lpszDir,
LPCSTR  lpszFile 
)

Definition at line 159 of file path.c.

160{
161 WCHAR szDest[MAX_PATH];
162 WCHAR szDir[MAX_PATH];
163 WCHAR szFile[MAX_PATH];
164 TRACE("(%p,%s,%s)\n", lpszDest, debugstr_a(lpszDir), debugstr_a(lpszFile));
165
166 /* Invalid parameters */
167 if (!lpszDest)
168 return NULL;
169 if (!lpszDir && !lpszFile)
170 goto fail;
171
172 if (lpszDir)
173 if (!MultiByteToWideChar(CP_ACP,0,lpszDir,-1,szDir,MAX_PATH))
174 goto fail;
175
176 if (lpszFile)
177 if (!MultiByteToWideChar(CP_ACP,0,lpszFile,-1,szFile,MAX_PATH))
178 goto fail;
179
180 if (PathCombineW(szDest, lpszDir ? szDir : NULL, lpszFile ? szFile : NULL))
181 if (WideCharToMultiByte(CP_ACP,0,szDest,-1,lpszDest,MAX_PATH,0,0))
182 return lpszDest;
183
184fail:
185 lpszDest[0] = 0;
186 return NULL;
187}
WCHAR lpszDest[260]

◆ PathCombineW()

WINSHLWAPI LPWSTR WINAPI PathCombineW ( LPWSTR  lpszDest,
LPCWSTR  lpszDir,
LPCWSTR  lpszFile 
)

Definition at line 194 of file path.c.

195{
196 WCHAR szTemp[MAX_PATH];
197 BOOL bUseBoth = FALSE, bStrip = FALSE;
198
199 TRACE("(%p,%s,%s)\n", lpszDest, debugstr_w(lpszDir), debugstr_w(lpszFile));
200
201 /* Invalid parameters */
202 if (!lpszDest)
203 return NULL;
204 if (!lpszDir && !lpszFile)
205 {
206 lpszDest[0] = 0;
207 return NULL;
208 }
209
210 if ((!lpszFile || !*lpszFile) && lpszDir)
211 {
212 /* Use dir only */
213 lstrcpynW(szTemp, lpszDir, MAX_PATH);
214 }
215 else if (!lpszDir || !*lpszDir || !PathIsRelativeW(lpszFile))
216 {
217 if (!lpszDir || !*lpszDir || *lpszFile != '\\' || PathIsUNCW(lpszFile))
218 {
219 /* Use file only */
220 lstrcpynW(szTemp, lpszFile, MAX_PATH);
221 }
222 else
223 {
224 bUseBoth = TRUE;
225 bStrip = TRUE;
226 }
227 }
228 else
229 bUseBoth = TRUE;
230
231 if (bUseBoth)
232 {
233 lstrcpynW(szTemp, lpszDir, MAX_PATH);
234 if (bStrip)
235 {
236 PathStripToRootW(szTemp);
237 lpszFile++; /* Skip '\' */
238 }
239 if (!PathAddBackslashW(szTemp) || strlenW(szTemp) + strlenW(lpszFile) >= MAX_PATH)
240 {
241 lpszDest[0] = 0;
242 return NULL;
243 }
244 strcatW(szTemp, lpszFile);
245 }
246
248 return lpszDest;
249}
#define lstrcpynW
Definition: compat.h:738
BOOL WINAPI PathStripToRootW(LPWSTR lpszPath)
Definition: path.c:733
BOOL WINAPI PathIsRelativeW(LPCWSTR lpszPath)
Definition: path.c:1585
#define PathAddBackslashW
Definition: pathcch.h:302
#define strcatW(d, s)
Definition: unicode.h:36

◆ PathCommonPrefixA()

WINSHLWAPI int WINAPI PathCommonPrefixA ( LPCSTR  lpszFile1,
LPCSTR  lpszFile2,
LPSTR  achPath 
)

Definition at line 2757 of file path.c.

2758{
2759 size_t iLen = 0;
2760 LPCSTR lpszIter1 = lpszFile1;
2761 LPCSTR lpszIter2 = lpszFile2;
2762
2763 TRACE("(%s,%s,%p)\n", debugstr_a(lpszFile1), debugstr_a(lpszFile2), achPath);
2764
2765 if (achPath)
2766 *achPath = '\0';
2767
2768 if (!lpszFile1 || !lpszFile2)
2769 return 0;
2770
2771 /* Handle roots first */
2772 if (PathIsUNCA(lpszFile1))
2773 {
2774 if (!PathIsUNCA(lpszFile2))
2775 return 0;
2776 lpszIter1 += 2;
2777 lpszIter2 += 2;
2778 }
2779 else if (PathIsUNCA(lpszFile2))
2780 return 0; /* Know already lpszFile1 is not UNC */
2781
2782 do
2783 {
2784 /* Update len */
2785 if ((!*lpszIter1 || *lpszIter1 == '\\') &&
2786 (!*lpszIter2 || *lpszIter2 == '\\'))
2787 iLen = lpszIter1 - lpszFile1; /* Common to this point */
2788
2789 if (!*lpszIter1 || (tolower(*lpszIter1) != tolower(*lpszIter2)))
2790 break; /* Strings differ at this point */
2791
2792 lpszIter1++;
2793 lpszIter2++;
2794 } while (1);
2795
2796 if (iLen == 2)
2797 iLen++; /* Feature/Bug compatible with Win32 */
2798
2799 if (iLen && achPath)
2800 {
2801 memcpy(achPath,lpszFile1,iLen);
2802 achPath[iLen] = '\0';
2803 }
2804 return iLen;
2805}
int tolower(int c)
Definition: utclib.c:902
const char * LPCSTR
Definition: xmlstorage.h:183

◆ PathCommonPrefixW()

WINSHLWAPI int WINAPI PathCommonPrefixW ( LPCWSTR  lpszFile1,
LPCWSTR  lpszFile2,
LPWSTR  achPath 
)

Definition at line 2812 of file path.c.

2813{
2814 size_t iLen = 0;
2815 LPCWSTR lpszIter1 = lpszFile1;
2816 LPCWSTR lpszIter2 = lpszFile2;
2817
2818 TRACE("(%s,%s,%p)\n", debugstr_w(lpszFile1), debugstr_w(lpszFile2), achPath);
2819
2820 if (achPath)
2821 *achPath = '\0';
2822
2823 if (!lpszFile1 || !lpszFile2)
2824 return 0;
2825
2826 /* Handle roots first */
2827 if (PathIsUNCW(lpszFile1))
2828 {
2829 if (!PathIsUNCW(lpszFile2))
2830 return 0;
2831 lpszIter1 += 2;
2832 lpszIter2 += 2;
2833 }
2834 else if (PathIsUNCW(lpszFile2))
2835 return 0; /* Know already lpszFile1 is not UNC */
2836
2837 do
2838 {
2839 /* Update len */
2840 if ((!*lpszIter1 || *lpszIter1 == '\\') &&
2841 (!*lpszIter2 || *lpszIter2 == '\\'))
2842 iLen = lpszIter1 - lpszFile1; /* Common to this point */
2843
2844 if (!*lpszIter1 || (tolowerW(*lpszIter1) != tolowerW(*lpszIter2)))
2845 break; /* Strings differ at this point */
2846
2847 lpszIter1++;
2848 lpszIter2++;
2849 } while (1);
2850
2851 if (iLen == 2)
2852 iLen++; /* Feature/Bug compatible with Win32 */
2853
2854 if (iLen && achPath)
2855 {
2856 memcpy(achPath,lpszFile1,iLen * sizeof(WCHAR));
2857 achPath[iLen] = '\0';
2858 }
2859 return iLen;
2860}
#define tolowerW(n)
Definition: unicode.h:50

◆ PathCompactPathA()

WINSHLWAPI BOOL WINAPI PathCompactPathA ( HDC  hDC,
LPSTR  lpszPath,
UINT  dx 
)

Definition at line 2876 of file path.c.

2877{
2878 BOOL bRet = FALSE;
2879
2880 TRACE("(%p,%s,%d)\n", hDC, debugstr_a(lpszPath), dx);
2881
2882 if (lpszPath)
2883 {
2886 bRet = PathCompactPathW(hDC, szPath, dx);
2887 WideCharToMultiByte(CP_ACP,0,szPath,-1,lpszPath,MAX_PATH,0,0);
2888 }
2889 return bRet;
2890}
static HDC hDC
Definition: 3dtext.c:33
BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
Definition: path.c:2897
GLint dx
Definition: linetemp.h:97

Referenced by ATL::CPathT< StringType >::PathCompactPathX().

◆ PathCompactPathExA()

WINSHLWAPI BOOL WINAPI PathCompactPathExA ( LPSTR  lpszDest,
LPCSTR  lpszPath,
UINT  cchMax,
DWORD  dwFlags 
)

Definition at line 1441 of file path.c.

1443{
1444 BOOL bRet = FALSE;
1445
1446 TRACE("(%p,%s,%d,0x%08x)\n", lpszDest, debugstr_a(lpszPath), cchMax, dwFlags);
1447
1448 if (lpszPath && lpszDest)
1449 {
1451 WCHAR szDest[MAX_PATH];
1452
1454 szDest[0] = '\0';
1455 bRet = PathCompactPathExW(szDest, szPath, cchMax, dwFlags);
1457 }
1458 return bRet;
1459}
UINT cchMax
BOOL WINAPI PathCompactPathExW(LPWSTR lpszDest, LPCWSTR lpszPath, UINT cchMax, DWORD dwFlags)
Definition: path.c:1466

Referenced by ATL::CPathT< StringType >::PathCompactPathExX().

◆ PathCompactPathExW()

WINSHLWAPI BOOL WINAPI PathCompactPathExW ( LPWSTR  lpszDest,
LPCWSTR  lpszPath,
UINT  cchMax,
DWORD  dwFlags 
)

Definition at line 1466 of file path.c.

1468{
1469 static const WCHAR szEllipses[] = { '.', '.', '.', '\0' };
1470 LPCWSTR lpszFile;
1471 DWORD dwLen, dwFileLen = 0;
1472
1473 TRACE("(%p,%s,%d,0x%08x)\n", lpszDest, debugstr_w(lpszPath), cchMax, dwFlags);
1474
1475 if (!lpszPath)
1476 return FALSE;
1477
1478 if (!lpszDest)
1479 {
1480 WARN("Invalid lpszDest would crash under Win32!\n");
1481 return FALSE;
1482 }
1483
1484 *lpszDest = '\0';
1485
1486 if (cchMax < 2)
1487 return TRUE;
1488
1489 dwLen = strlenW(lpszPath) + 1;
1490
1491 if (dwLen < cchMax)
1492 {
1493 /* Don't need to compact */
1494 memcpy(lpszDest, lpszPath, dwLen * sizeof(WCHAR));
1495 return TRUE;
1496 }
1497
1498 /* Path must be compacted to fit into lpszDest */
1499 lpszFile = PathFindFileNameW(lpszPath);
1500 dwFileLen = lpszPath + dwLen - lpszFile;
1501
1502 if (dwFileLen == dwLen)
1503 {
1504 /* No root in psth */
1505 if (cchMax <= 4)
1506 {
1507 while (--cchMax > 0) /* No room left for anything but ellipses */
1508 *lpszDest++ = '.';
1509 *lpszDest = '\0';
1510 return TRUE;
1511 }
1512 /* Compact the file name with ellipses at the end */
1513 cchMax -= 4;
1514 memcpy(lpszDest, lpszFile, cchMax * sizeof(WCHAR));
1515 strcpyW(lpszDest + cchMax, szEllipses);
1516 return TRUE;
1517 }
1518 /* We have a root in the path */
1519 lpszFile--; /* Start compacted filename with the path separator */
1520 dwFileLen++;
1521
1522 if (dwFileLen + 3 > cchMax)
1523 {
1524 /* Compact the file name */
1525 if (cchMax <= 4)
1526 {
1527 while (--cchMax > 0) /* No room left for anything but ellipses */
1528 *lpszDest++ = '.';
1529 *lpszDest = '\0';
1530 return TRUE;
1531 }
1532 strcpyW(lpszDest, szEllipses);
1533 lpszDest += 3;
1534 cchMax -= 4;
1535 *lpszDest++ = *lpszFile++;
1536 if (cchMax <= 4)
1537 {
1538 while (--cchMax > 0) /* No room left for anything but ellipses */
1539 *lpszDest++ = '.';
1540 *lpszDest = '\0';
1541 return TRUE;
1542 }
1543 cchMax -= 4;
1544 memcpy(lpszDest, lpszFile, cchMax * sizeof(WCHAR));
1545 strcpyW(lpszDest + cchMax, szEllipses);
1546 return TRUE;
1547 }
1548
1549 /* Only the root needs to be Compacted */
1550 dwLen = cchMax - dwFileLen - 3;
1551 memcpy(lpszDest, lpszPath, dwLen * sizeof(WCHAR));
1552 strcpyW(lpszDest + dwLen, szEllipses);
1553 strcpyW(lpszDest + dwLen + 3, lpszFile);
1554 return TRUE;
1555}
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
Definition: path.c:394

Referenced by PathCompactPathExA(), and ATL::CPathT< StringType >::PathCompactPathExX().

◆ PathCompactPathW()

WINSHLWAPI BOOL WINAPI PathCompactPathW ( HDC  hDC,
LPWSTR  lpszPath,
UINT  dx 
)

Definition at line 2897 of file path.c.

2898{
2899 static const WCHAR szEllipses[] = { '.', '.', '.', '\0' };
2900 BOOL bRet = TRUE;
2901 HDC hdc = 0;
2903 SIZE size;
2904 DWORD dwLen;
2905
2906 TRACE("(%p,%s,%d)\n", hDC, debugstr_w(lpszPath), dx);
2907
2908 if (!lpszPath)
2909 return FALSE;
2910
2911 if (!hDC)
2912 hdc = hDC = GetDC(0);
2913
2914 /* Get the length of the whole path */
2915 dwLen = strlenW(lpszPath);
2916 GetTextExtentPointW(hDC, lpszPath, dwLen, &size);
2917
2918 if ((UINT)size.cx > dx)
2919 {
2920 /* Path too big, must reduce it */
2921 LPWSTR sFile;
2922 DWORD dwEllipsesLen = 0, dwPathLen = 0;
2923
2924 sFile = PathFindFileNameW(lpszPath);
2925 if (sFile != lpszPath) sFile--;
2926
2927 /* Get the size of ellipses */
2928 GetTextExtentPointW(hDC, szEllipses, 3, &size);
2929 dwEllipsesLen = size.cx;
2930 /* Get the size of the file name */
2931 GetTextExtentPointW(hDC, sFile, strlenW(sFile), &size);
2932 dwPathLen = size.cx;
2933
2934 if (sFile != lpszPath)
2935 {
2936 LPWSTR sPath = sFile;
2937 BOOL bEllipses = FALSE;
2938
2939 /* The path includes a file name. Include as much of the path prior to
2940 * the file name as possible, allowing for the ellipses, e.g:
2941 * c:\some very long path\filename ==> c:\some v...\filename
2942 */
2943 lstrcpynW(buff, sFile, MAX_PATH);
2944
2945 do
2946 {
2947 DWORD dwTotalLen = bEllipses? dwPathLen + dwEllipsesLen : dwPathLen;
2948
2949 GetTextExtentPointW(hDC, lpszPath, sPath - lpszPath, &size);
2950 dwTotalLen += size.cx;
2951 if (dwTotalLen <= dx)
2952 break;
2953 sPath--;
2954 if (!bEllipses)
2955 {
2956 bEllipses = TRUE;
2957 sPath -= 2;
2958 }
2959 } while (sPath > lpszPath);
2960
2961 if (sPath > lpszPath)
2962 {
2963 if (bEllipses)
2964 {
2965 strcpyW(sPath, szEllipses);
2966 strcpyW(sPath+3, buff);
2967 }
2968 bRet = TRUE;
2969 goto end;
2970 }
2971 strcpyW(lpszPath, szEllipses);
2972 strcpyW(lpszPath+3, buff);
2973 bRet = FALSE;
2974 goto end;
2975 }
2976
2977 /* Trim the path by adding ellipses to the end, e.g:
2978 * A very long file name.txt ==> A very...
2979 */
2980 dwLen = strlenW(lpszPath);
2981
2982 if (dwLen > MAX_PATH - 3)
2983 dwLen = MAX_PATH - 3;
2984 lstrcpynW(buff, sFile, dwLen);
2985
2986 do {
2987 dwLen--;
2988 GetTextExtentPointW(hDC, buff, dwLen, &size);
2989 } while (dwLen && size.cx + dwEllipsesLen > dx);
2990
2991 if (!dwLen)
2992 {
2993 DWORD dwWritten = 0;
2994
2995 dwEllipsesLen /= 3; /* Size of a single '.' */
2996
2997 /* Write as much of the Ellipses string as possible */
2998 while (dwWritten + dwEllipsesLen < dx && dwLen < 3)
2999 {
3000 *lpszPath++ = '.';
3001 dwWritten += dwEllipsesLen;
3002 dwLen++;
3003 }
3004 *lpszPath = '\0';
3005 bRet = FALSE;
3006 }
3007 else
3008 {
3009 strcpyW(buff + dwLen, szEllipses);
3010 strcpyW(lpszPath, buff);
3011 }
3012 }
3013
3014end:
3015 if (hdc)
3016 ReleaseDC(0, hdc);
3017
3018 return bRet;
3019}
static unsigned char buff[32768]
Definition: fatten.c:17
GLuint GLuint end
Definition: gl.h:1545
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:88
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI GetTextExtentPointW(_In_ HDC hdc, _In_reads_(c) LPCWSTR lpString, _In_ int c, _Out_ LPSIZE lpsz)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)

Referenced by CZipExtract::CCompleteSettingsPage::OnSetActive(), PathCompactPathA(), ATL::CPathT< StringType >::PathCompactPathX(), and PathSetDlgItemPathW().

◆ PathCreateFromUrlA()

WINSHLWAPI HRESULT WINAPI PathCreateFromUrlA ( LPCSTR  pszUrl,
LPSTR  pszPath,
LPDWORD  pcchPath,
DWORD  dwReserved 
)

Definition at line 3312 of file path.c.

3314{
3315 WCHAR bufW[MAX_PATH];
3316 WCHAR *pathW = bufW;
3317 UNICODE_STRING urlW;
3318 HRESULT ret;
3319 DWORD lenW = sizeof(bufW)/sizeof(WCHAR), lenA;
3320
3321 if (!pszUrl || !pszPath || !pcchPath || !*pcchPath)
3322 return E_INVALIDARG;
3323
3324 if(!RtlCreateUnicodeStringFromAsciiz(&urlW, pszUrl))
3325 return E_INVALIDARG;
3326 if((ret = PathCreateFromUrlW(urlW.Buffer, pathW, &lenW, dwReserved)) == E_POINTER) {
3327 pathW = HeapAlloc(GetProcessHeap(), 0, lenW * sizeof(WCHAR));
3328 ret = PathCreateFromUrlW(urlW.Buffer, pathW, &lenW, dwReserved);
3329 }
3330 if(ret == S_OK) {
3331 RtlUnicodeToMultiByteSize(&lenA, pathW, lenW * sizeof(WCHAR));
3332 if(*pcchPath > lenA) {
3333 RtlUnicodeToMultiByteN(pszPath, *pcchPath - 1, &lenA, pathW, lenW * sizeof(WCHAR));
3334 pszPath[lenA] = 0;
3335 *pcchPath = lenA;
3336 } else {
3337 *pcchPath = lenA + 1;
3338 ret = E_POINTER;
3339 }
3340 }
3341 if(pathW != bufW) HeapFree(GetProcessHeap(), 0, pathW);
3342 RtlFreeUnicodeString(&urlW);
3343 return ret;
3344}
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
HRESULT WINAPI PathCreateFromUrlW(LPCWSTR pszUrl, LPWSTR pszPath, LPDWORD pcchPath, DWORD dwReserved)
Definition: path.c:3361
static LPWSTR PDWORD pcchPath
Definition: asmcache.c:747
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteN(_Out_ PCHAR MbString, _In_ ULONG MbSize, _Out_opt_ PULONG ResultSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
Definition: nlsboot.c:107
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteSize(_Out_ PULONG MbSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
Definition: nlsboot.c:145
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define E_POINTER
Definition: winerror.h:3480

◆ PathCreateFromUrlAlloc()

WINSHLWAPI HRESULT WINAPI PathCreateFromUrlAlloc ( LPCWSTR  pszUrl,
LPWSTR pszPath,
DWORD  dwReserved 
)

Definition at line 3503 of file path.c.

3505{
3506 WCHAR pathW[MAX_PATH];
3507 DWORD size;
3508 HRESULT hr;
3509
3510 size = MAX_PATH;
3511 hr = PathCreateFromUrlW(pszUrl, pathW, &size, dwReserved);
3512 if (SUCCEEDED(hr))
3513 {
3514 /* Yes, this is supposed to crash if pszPath is NULL */
3515 *pszPath = StrDupW(pathW);
3516 }
3517 return hr;
3518}
WCHAR *WINAPI StrDupW(const WCHAR *str)
Definition: string.c:313

◆ PathCreateFromUrlW()

WINSHLWAPI HRESULT WINAPI PathCreateFromUrlW ( LPCWSTR  pszUrl,
LPWSTR  pszPath,
LPDWORD  pcchPath,
DWORD  dwReserved 
)

Definition at line 3361 of file path.c.

3363{
3364 static const WCHAR file_colon[] = { 'f','i','l','e',':',0 };
3365 static const WCHAR localhost[] = { 'l','o','c','a','l','h','o','s','t',0 };
3366 DWORD nslashes, unescape, len;
3367 const WCHAR *src;
3368 WCHAR *tpath, *dst;
3369 HRESULT ret;
3370
3371 TRACE("(%s,%p,%p,0x%08x)\n", debugstr_w(pszUrl), pszPath, pcchPath, dwReserved);
3372
3373 if (!pszUrl || !pszPath || !pcchPath || !*pcchPath)
3374 return E_INVALIDARG;
3375
3376 if (lstrlenW(pszUrl) < 5)
3377 return E_INVALIDARG;
3378
3380 file_colon, 5) != CSTR_EQUAL)
3381 return E_INVALIDARG;
3382 pszUrl += 5;
3383 ret = S_OK;
3384
3385 src = pszUrl;
3386 nslashes = 0;
3387 while (*src == '/' || *src == '\\') {
3388 nslashes++;
3389 src++;
3390 }
3391
3392 /* We need a temporary buffer so we can compute what size to ask for.
3393 * We know that the final string won't be longer than the current pszUrl
3394 * plus at most two backslashes. All the other transformations make it
3395 * shorter.
3396 */
3397 len = 2 + lstrlenW(pszUrl) + 1;
3398 if (*pcchPath < len)
3399 tpath = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
3400 else
3401 tpath = pszPath;
3402
3403 len = 0;
3404 dst = tpath;
3405 unescape = 1;
3406 switch (nslashes)
3407 {
3408 case 0:
3409 /* 'file:' + escaped DOS path */
3410 break;
3411 case 1:
3412 /* 'file:/' + escaped DOS path */
3413 /* fall through */
3414 case 3:
3415 /* 'file:///' (implied localhost) + escaped DOS path */
3416 if (!isalphaW(*src) || (src[1] != ':' && src[1] != '|'))
3417 src -= 1;
3418 break;
3419 case 2:
3421 src, 9, localhost, 9) == CSTR_EQUAL && (src[9] == '/' || src[9] == '\\'))
3422 {
3423 /* 'file://localhost/' + escaped DOS path */
3424 src += 10;
3425 }
3426 else if (isalphaW(*src) && (src[1] == ':' || src[1] == '|'))
3427 {
3428 /* 'file://' + unescaped DOS path */
3429 unescape = 0;
3430 }
3431 else
3432 {
3433 /* 'file://hostname:port/path' (where path is escaped)
3434 * or 'file:' + escaped UNC path (\\server\share\path)
3435 * The second form is clearly specific to Windows and it might
3436 * even be doing a network lookup to try to figure it out.
3437 */
3438 while (*src && *src != '/' && *src != '\\')
3439 src++;
3440 len = src - pszUrl;
3441 StrCpyNW(dst, pszUrl, len + 1);
3442 dst += len;
3443 if (*src && isalphaW(src[1]) && (src[2] == ':' || src[2] == '|'))
3444 {
3445 /* 'Forget' to add a trailing '/', just like Windows */
3446 src++;
3447 }
3448 }
3449 break;
3450 case 4:
3451 /* 'file://' + unescaped UNC path (\\server\share\path) */
3452 unescape = 0;
3453 if (isalphaW(*src) && (src[1] == ':' || src[1] == '|'))
3454 break;
3455 /* fall through */
3456 default:
3457 /* 'file:/...' + escaped UNC path (\\server\share\path) */
3458 src -= 2;
3459 }
3460
3461 /* Copy the remainder of the path */
3462 len += lstrlenW(src);
3463 StrCpyW(dst, src);
3464
3465 /* First do the Windows-specific path conversions */
3466 for (dst = tpath; *dst; dst++)
3467 if (*dst == '/') *dst = '\\';
3468 if (isalphaW(*tpath) && tpath[1] == '|')
3469 tpath[1] = ':'; /* c| -> c: */
3470
3471 /* And only then unescape the path (i.e. escaped slashes are left as is) */
3472 if (unescape)
3473 {
3475 if (ret == S_OK)
3476 {
3477 /* When working in-place UrlUnescapeW() does not set len */
3478 len = lstrlenW(tpath);
3479 }
3480 }
3481
3482 if (*pcchPath < len + 1)
3483 {
3484 ret = E_POINTER;
3485 *pcchPath = len + 1;
3486 }
3487 else
3488 {
3489 *pcchPath = len;
3490 if (tpath != pszPath)
3491 StrCpyW(pszPath, tpath);
3492 }
3493 if (tpath != pszPath)
3494 HeapFree(GetProcessHeap(), 0, tpath);
3495
3496 TRACE("Returning (%u) %s\n", *pcchPath, debugstr_w(pszPath));
3497 return ret;
3498}
HRESULT WINAPI UrlUnescapeW(WCHAR *url, WCHAR *unescaped, DWORD *unescaped_len, DWORD flags)
Definition: path.c:2936
WCHAR *WINAPI StrCpyNW(WCHAR *dst, const WCHAR *src, int count)
Definition: string.c:462
LPWSTR WINAPI StrCpyW(LPWSTR lpszStr, LPCWSTR lpszSrc)
Definition: string.c:514
GLenum GLenum dst
Definition: glext.h:6340
BOOL unescape(WCHAR *str, size_t *len)
Definition: lex.c:227
static const BYTE localhost[]
Definition: encode.c:1391
#define LOCALE_INVARIANT
#define URL_UNESCAPE_INPLACE
Definition: shlwapi.h:525
#define isalphaW(n)
Definition: unicode.h:54

◆ PathFileExistsA()

WINSHLWAPI BOOL WINAPI PathFileExistsA ( LPCSTR  lpszPath)

Definition at line 1761 of file path.c.

1762{
1763 UINT iPrevErrMode;
1764 DWORD dwAttr;
1765
1766 TRACE("(%s)\n",debugstr_a(lpszPath));
1767
1768 if (!lpszPath)
1769 return FALSE;
1770
1771 /* Prevent a dialog box if path is on a disk that has been ejected. */
1772 iPrevErrMode = SetErrorMode(SEM_FAILCRITICALERRORS);
1773 dwAttr = GetFileAttributesA(lpszPath);
1774 SetErrorMode(iPrevErrMode);
1775 return dwAttr != INVALID_FILE_ATTRIBUTES;
1776}
UINT WINAPI SetErrorMode(IN UINT uMode)
Definition: except.c:751
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
Definition: fileinfo.c:636
#define SEM_FAILCRITICALERRORS
Definition: rtltypes.h:69
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23

◆ PathFileExistsAndAttributesA()

WINSHLWAPI BOOL WINAPI PathFileExistsAndAttributesA ( LPCSTR  lpszPath,
DWORD dwAttr 
)

Definition at line 1812 of file path.c.

1813{
1814 UINT iPrevErrMode;
1815 DWORD dwVal = 0;
1816
1817 TRACE("(%s %p)\n", debugstr_a(lpszPath), dwAttr);
1818
1819 if (dwAttr)
1820 *dwAttr = INVALID_FILE_ATTRIBUTES;
1821
1822 if (!lpszPath)
1823 return FALSE;
1824
1825 iPrevErrMode = SetErrorMode(SEM_FAILCRITICALERRORS);
1826 dwVal = GetFileAttributesA(lpszPath);
1827 SetErrorMode(iPrevErrMode);
1828 if (dwAttr)
1829 *dwAttr = dwVal;
1830 return (dwVal != INVALID_FILE_ATTRIBUTES);
1831}

◆ PathFileExistsAndAttributesW()

WINSHLWAPI BOOL WINAPI PathFileExistsAndAttributesW ( LPCWSTR  lpszPath,
DWORD dwAttr 
)

Definition at line 1838 of file path.c.

1839{
1840 UINT iPrevErrMode;
1841 DWORD dwVal;
1842
1843 TRACE("(%s %p)\n", debugstr_w(lpszPath), dwAttr);
1844
1845 if (!lpszPath)
1846 return FALSE;
1847
1848 iPrevErrMode = SetErrorMode(SEM_FAILCRITICALERRORS);
1849 dwVal = GetFileAttributesW(lpszPath);
1850 SetErrorMode(iPrevErrMode);
1851 if (dwAttr)
1852 *dwAttr = dwVal;
1853 return (dwVal != INVALID_FILE_ATTRIBUTES);
1854}
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:652

Referenced by GetTypeDescriptionByPath(), PathFileExistsDefExtAndAttributesW(), and PathResolveW().

◆ PathFileExistsW()

WINSHLWAPI BOOL WINAPI PathFileExistsW ( LPCWSTR  lpszPath)

Definition at line 1783 of file path.c.

1784{
1785 UINT iPrevErrMode;
1786 DWORD dwAttr;
1787
1788 TRACE("(%s)\n",debugstr_w(lpszPath));
1789
1790 if (!lpszPath)
1791 return FALSE;
1792
1793 iPrevErrMode = SetErrorMode(SEM_FAILCRITICALERRORS);
1794 dwAttr = GetFileAttributesW(lpszPath);
1795 SetErrorMode(iPrevErrMode);
1796 return dwAttr != INVALID_FILE_ATTRIBUTES;
1797}

◆ PathFindExtensionA()

WINSHLWAPI LPSTR WINAPI PathFindExtensionA ( LPCSTR  lpszPath)

Definition at line 422 of file path.c.

423{
424 LPCSTR lastpoint = NULL;
425
426 TRACE("(%s)\n", debugstr_a(lpszPath));
427
428 if (lpszPath)
429 {
430 while (*lpszPath)
431 {
432 if (*lpszPath == '\\' || *lpszPath==' ')
433 lastpoint = NULL;
434 else if (*lpszPath == '.')
435 lastpoint = lpszPath;
436 lpszPath = CharNextA(lpszPath);
437 }
438 }
439 return (LPSTR)(lastpoint ? lastpoint : lpszPath);
440}

◆ PathFindExtensionW()

WINSHLWAPI LPWSTR WINAPI PathFindExtensionW ( LPCWSTR  lpszPath)

Definition at line 447 of file path.c.

448{
449 LPCWSTR lastpoint = NULL;
450
451 TRACE("(%s)\n", debugstr_w(lpszPath));
452
453 if (lpszPath)
454 {
455 while (*lpszPath)
456 {
457 if (*lpszPath == '\\' || *lpszPath==' ')
458 lastpoint = NULL;
459 else if (*lpszPath == '.')
460 lastpoint = lpszPath;
461 lpszPath++;
462 }
463 }
464 return (LPWSTR)(lastpoint ? lastpoint : lpszPath);
465}

◆ PathFindFileNameA()

WINSHLWAPI LPSTR WINAPI PathFindFileNameA ( LPCSTR  lpszPath)

Definition at line 373 of file path.c.

374{
375 LPCSTR lastSlash = lpszPath;
376
377 TRACE("(%s)\n",debugstr_a(lpszPath));
378
379 while (lpszPath && *lpszPath)
380 {
381 if ((*lpszPath == '\\' || *lpszPath == '/' || *lpszPath == ':') &&
382 lpszPath[1] && lpszPath[1] != '\\' && lpszPath[1] != '/')
383 lastSlash = lpszPath + 1;
384 lpszPath = CharNextA(lpszPath);
385 }
386 return (LPSTR)lastSlash;
387}

◆ PathFindFileNameW()

WINSHLWAPI LPWSTR WINAPI PathFindFileNameW ( LPCWSTR  lpszPath)

Definition at line 394 of file path.c.

395{
396 LPCWSTR lastSlash = lpszPath;
397
398 TRACE("(%s)\n",debugstr_w(lpszPath));
399
400 while (lpszPath && *lpszPath)
401 {
402 if ((*lpszPath == '\\' || *lpszPath == '/' || *lpszPath == ':') &&
403 lpszPath[1] && lpszPath[1] != '\\' && lpszPath[1] != '/')
404 lastSlash = lpszPath + 1;
405 lpszPath++;
406 }
407 return (LPWSTR)lastSlash;
408}

◆ PathFindNextComponentA()

WINSHLWAPI LPSTR WINAPI PathFindNextComponentA ( LPCSTR  lpszPath)

Definition at line 2562 of file path.c.

2563{
2564 LPSTR lpszSlash;
2565
2566 TRACE("(%s)\n", debugstr_a(lpszPath));
2567
2568 if(!lpszPath || !*lpszPath)
2569 return NULL;
2570
2571 if ((lpszSlash = StrChrA(lpszPath, '\\')))
2572 {
2573 if (lpszSlash[1] == '\\')
2574 lpszSlash++;
2575 return lpszSlash + 1;
2576 }
2577 return (LPSTR)lpszPath + strlen(lpszPath);
2578}
LPSTR WINAPI StrChrA(LPCSTR lpszStr, WORD ch)
Definition: string.c:266

◆ PathFindNextComponentW()

WINSHLWAPI LPWSTR WINAPI PathFindNextComponentW ( LPCWSTR  lpszPath)

Definition at line 2585 of file path.c.

2586{
2587 LPWSTR lpszSlash;
2588
2589 TRACE("(%s)\n", debugstr_w(lpszPath));
2590
2591 if(!lpszPath || !*lpszPath)
2592 return NULL;
2593
2594 if ((lpszSlash = StrChrW(lpszPath, '\\')))
2595 {
2596 if (lpszSlash[1] == '\\')
2597 lpszSlash++;
2598 return lpszSlash + 1;
2599 }
2600 return (LPWSTR)lpszPath + strlenW(lpszPath);
2601}
LPWSTR WINAPI StrChrW(LPCWSTR lpszStr, WCHAR ch)
Definition: string.c:464

◆ PathFindOnPathA()

WINSHLWAPI BOOL WINAPI PathFindOnPathA ( LPSTR  lpszFile,
LPCSTR lppszOtherDirs 
)

Definition at line 1398 of file path.c.

1399{
1400 TRACE("(%s,%p)\n", debugstr_a(lpszFile), lppszOtherDirs);
1401 return PathFindOnPathExA(lpszFile, lppszOtherDirs, 0);
1402 }
BOOL WINAPI PathFindOnPathExA(LPSTR lpszFile, LPCSTR *lppszOtherDirs, DWORD dwWhich)
Definition: path.c:1313

◆ PathFindOnPathW()

WINSHLWAPI BOOL WINAPI PathFindOnPathW ( LPWSTR  lpszFile,
LPCWSTR lppszOtherDirs 
)

Definition at line 1409 of file path.c.

1410{
1411 TRACE("(%s,%p)\n", debugstr_w(lpszFile), lppszOtherDirs);
1412 return PathFindOnPathExW(lpszFile,lppszOtherDirs, 0);
1413}
BOOL WINAPI PathFindOnPathExW(LPWSTR lpszFile, LPCWSTR *lppszOtherDirs, DWORD dwWhich)
Definition: path.c:1357

Referenced by DoEntry(), PathResolveW(), and SHELL_FindExecutable().

◆ PathFindSuffixArrayA()

WINSHLWAPI LPCSTR WINAPI PathFindSuffixArrayA ( LPCSTR  lpszSuffix,
LPCSTR lppszArray,
int  dwCount 
)

Definition at line 3999 of file path.c.

4000{
4001 size_t dwLen;
4002 int dwRet = 0;
4003
4004 TRACE("(%s,%p,%d)\n",debugstr_a(lpszSuffix), lppszArray, dwCount);
4005
4006 if (lpszSuffix && lppszArray && dwCount > 0)
4007 {
4008 dwLen = strlen(lpszSuffix);
4009
4010 while (dwRet < dwCount)
4011 {
4012 size_t dwCompareLen = strlen(*lppszArray);
4013 if (dwCompareLen < dwLen)
4014 {
4015 if (!strcmp(lpszSuffix + dwLen - dwCompareLen, *lppszArray))
4016 return *lppszArray; /* Found */
4017 }
4018 dwRet++;
4019 lppszArray++;
4020 }
4021 }
4022 return NULL;
4023}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469

◆ PathFindSuffixArrayW()

WINSHLWAPI LPCWSTR WINAPI PathFindSuffixArrayW ( LPCWSTR  lpszSuffix,
LPCWSTR lppszArray,
int  dwCount 
)

Definition at line 4030 of file path.c.

4031{
4032 size_t dwLen;
4033 int dwRet = 0;
4034
4035 TRACE("(%s,%p,%d)\n",debugstr_w(lpszSuffix), lppszArray, dwCount);
4036
4037 if (lpszSuffix && lppszArray && dwCount > 0)
4038 {
4039 dwLen = strlenW(lpszSuffix);
4040
4041 while (dwRet < dwCount)
4042 {
4043 size_t dwCompareLen = strlenW(*lppszArray);
4044 if (dwCompareLen < dwLen)
4045 {
4046 if (!strcmpW(lpszSuffix + dwLen - dwCompareLen, *lppszArray))
4047 return *lppszArray; /* Found */
4048 }
4049 dwRet++;
4050 lppszArray++;
4051 }
4052 }
4053 return NULL;
4054}
#define strcmpW(s1, s2)
Definition: unicode.h:44

◆ PathGetArgsA()

WINSHLWAPI LPSTR WINAPI PathGetArgsA ( LPCSTR  lpszPath)

Definition at line 481 of file path.c.

482{
483 BOOL bSeenQuote = FALSE;
484
485 TRACE("(%s)\n",debugstr_a(lpszPath));
486
487 if (lpszPath)
488 {
489 while (*lpszPath)
490 {
491 if ((*lpszPath==' ') && !bSeenQuote)
492 return (LPSTR)lpszPath + 1;
493 if (*lpszPath == '"')
494 bSeenQuote = !bSeenQuote;
495 lpszPath = CharNextA(lpszPath);
496 }
497 }
498 return (LPSTR)lpszPath;
499}

◆ PathGetArgsW()

WINSHLWAPI LPWSTR WINAPI PathGetArgsW ( LPCWSTR  lpszPath)

Definition at line 506 of file path.c.

507{
508 BOOL bSeenQuote = FALSE;
509
510 TRACE("(%s)\n",debugstr_w(lpszPath));
511
512 if (lpszPath)
513 {
514 while (*lpszPath)
515 {
516 if ((*lpszPath==' ') && !bSeenQuote)
517 return (LPWSTR)lpszPath + 1;
518 if (*lpszPath == '"')
519 bSeenQuote = !bSeenQuote;
520 lpszPath++;
521 }
522 }
523 return (LPWSTR)lpszPath;
524}

◆ PathGetCharTypeA()

WINSHLWAPI UINT WINAPI PathGetCharTypeA ( UCHAR  ch)

Definition at line 1793 of file path.c.

1794{
1795 return PathGetCharTypeW(ch);
1796}
UINT WINAPI PathGetCharTypeW(WCHAR ch)
Definition: path.c:1762

Referenced by PathCleanupSpec().

◆ PathGetCharTypeW()

WINSHLWAPI UINT WINAPI PathGetCharTypeW ( WCHAR  ch)

Definition at line 1762 of file path.c.

1763{
1764 UINT flags = 0;
1765
1766 TRACE("%#x\n", ch);
1767
1768 if (!ch || ch < ' ' || ch == '<' || ch == '>' || ch == '"' || ch == '|' || ch == '/')
1769 flags = GCT_INVALID; /* Invalid */
1770 else if (ch == '*' || ch == '?')
1771 flags = GCT_WILD; /* Wildchars */
1772 else if (ch == '\\' || ch == ':')
1773 return GCT_SEPARATOR; /* Path separators */
1774 else
1775 {
1776 if (ch < 126)
1777 {
1778 if (((ch & 0x1) && ch != ';') || !ch || iswalnum(ch) || ch == '$' || ch == '&' || ch == '(' ||
1779 ch == '.' || ch == '@' || ch == '^' || ch == '\'' || ch == '`')
1780 {
1781 flags |= GCT_SHORTCHAR; /* All these are valid for DOS */
1782 }
1783 }
1784 else
1785 flags |= GCT_SHORTCHAR; /* Bug compatible with win32 */
1786
1787 flags |= GCT_LFNCHAR; /* Valid for long file names */
1788 }
1789
1790 return flags;
1791}
GLbitfield flags
Definition: glext.h:7161
#define iswalnum(_c)
Definition: ctype.h:671
#define GCT_SHORTCHAR
Definition: shlwapi.h:273
#define GCT_LFNCHAR
Definition: shlwapi.h:272
#define GCT_SEPARATOR
Definition: shlwapi.h:275
#define GCT_INVALID
Definition: shlwapi.h:271
#define GCT_WILD
Definition: shlwapi.h:274

Referenced by PathCleanupSpec(), and PathGetCharTypeA().

◆ PathGetDriveNumberA()

WINSHLWAPI int WINAPI PathGetDriveNumberA ( LPCSTR  lpszPath)

Definition at line 538 of file path.c.

539{
540 TRACE ("(%s)\n",debugstr_a(lpszPath));
541
542 if (lpszPath && !IsDBCSLeadByte(*lpszPath) && lpszPath[1] == ':' &&
543 tolower(*lpszPath) >= 'a' && tolower(*lpszPath) <= 'z')
544 return tolower(*lpszPath) - 'a';
545 return -1;
546}
BOOL WINAPI IsDBCSLeadByte(BYTE testchar)
Definition: locale.c:2126

◆ PathGetDriveNumberW()

WINSHLWAPI int WINAPI PathGetDriveNumberW ( LPCWSTR  )

◆ PathIsContentTypeA()

WINSHLWAPI BOOL WINAPI PathIsContentTypeA ( LPCSTR  lpszPath,
LPCSTR  lpszContentType 
)

Definition at line 2064 of file path.c.

2065{
2066 LPCSTR szExt;
2067 DWORD dwDummy;
2068 char szBuff[MAX_PATH];
2069
2070 TRACE("(%s,%s)\n", debugstr_a(lpszPath), debugstr_a(lpszContentType));
2071
2072 if (lpszPath && (szExt = PathFindExtensionA(lpszPath)) && *szExt &&
2073 !SHGetValueA(HKEY_CLASSES_ROOT, szExt, "Content Type",
2074 REG_NONE, szBuff, &dwDummy) &&
2075 !strcasecmp(lpszContentType, szBuff))
2076 {
2077 return TRUE;
2078 }
2079 return FALSE;
2080}
DWORD WINAPI SHGetValueA(HKEY hKey, LPCSTR lpszSubKey, LPCSTR lpszValue, LPDWORD pwType, LPVOID pvData, LPDWORD pcbData)
Definition: reg.c:1207
#define strcasecmp
Definition: fake.h:9
#define REG_NONE
Definition: nt_native.h:1495
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10

◆ PathIsContentTypeW()

WINSHLWAPI BOOL WINAPI PathIsContentTypeW ( LPCWSTR  lpszPath,
LPCWSTR  lpszContentType 
)

Definition at line 2087 of file path.c.

2088{
2089 static const WCHAR szContentType[] = { 'C','o','n','t','e','n','t',' ','T','y','p','e','\0' };
2090 LPCWSTR szExt;
2091 DWORD dwDummy;
2092 WCHAR szBuff[MAX_PATH];
2093
2094 TRACE("(%s,%s)\n", debugstr_w(lpszPath), debugstr_w(lpszContentType));
2095
2096 if (lpszPath && (szExt = PathFindExtensionW(lpszPath)) && *szExt &&
2097 !SHGetValueW(HKEY_CLASSES_ROOT, szExt, szContentType,
2098 REG_NONE, szBuff, &dwDummy) &&
2099 !strcmpiW(lpszContentType, szBuff))
2100 {
2101 return TRUE;
2102 }
2103 return FALSE;
2104}
DWORD WINAPI SHGetValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue, LPDWORD pwType, LPVOID pvData, LPDWORD pcbData)
Definition: reg.c:1236
#define strcmpiW(s1, s2)
Definition: unicode.h:45

◆ PathIsDirectoryA()

WINSHLWAPI BOOL WINAPI PathIsDirectoryA ( LPCSTR  lpszPath)

Definition at line 1704 of file path.c.

1705{
1706 DWORD dwAttr;
1707
1708 TRACE("(%s)\n", debugstr_a(lpszPath));
1709
1710 if (!lpszPath || PathIsUNCServerA(lpszPath))
1711 return FALSE;
1712
1713 if (PathIsUNCServerShareA(lpszPath))
1714 {
1715 FIXME("UNC Server Share not yet supported - FAILING\n");
1716 return FALSE;
1717 }
1718
1719 if ((dwAttr = GetFileAttributesA(lpszPath)) == INVALID_FILE_ATTRIBUTES)
1720 return FALSE;
1721 return dwAttr & FILE_ATTRIBUTE_DIRECTORY;
1722}
BOOL WINAPI PathIsUNCServerA(LPCSTR lpszPath)
Definition: path.c:2307
BOOL WINAPI PathIsUNCServerShareA(LPCSTR lpszPath)
Definition: path.c:2357
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705

Referenced by ATL::CPathT< StringType >::PathIsDirectoryX().

◆ PathIsDirectoryEmptyA()

WINSHLWAPI BOOL WINAPI PathIsDirectoryEmptyA ( LPCSTR  lpszPath)

Definition at line 3917 of file path.c.

3918{
3919 BOOL bRet = FALSE;
3920
3921 TRACE("(%s)\n",debugstr_a(lpszPath));
3922
3923 if (lpszPath)
3924 {
3928 }
3929 return bRet;
3930}
BOOL WINAPI PathIsDirectoryEmptyW(LPCWSTR lpszPath)
Definition: path.c:3937

◆ PathIsDirectoryEmptyW()

WINSHLWAPI BOOL WINAPI PathIsDirectoryEmptyW ( LPCWSTR  lpszPath)

Definition at line 3937 of file path.c.

3938{
3939 static const WCHAR szAllFiles[] = { '*', '.', '*', '\0' };
3940 WCHAR szSearch[MAX_PATH];
3941 DWORD dwLen;
3942 HANDLE hfind;
3943 BOOL retVal = TRUE;
3945
3946 TRACE("(%s)\n",debugstr_w(lpszPath));
3947
3948 if (!lpszPath || !PathIsDirectoryW(lpszPath))
3949 return FALSE;
3950
3951 lstrcpynW(szSearch, lpszPath, MAX_PATH);
3952 PathAddBackslashW(szSearch);
3953 dwLen = strlenW(szSearch);
3954 if (dwLen > MAX_PATH - 4)
3955 return FALSE;
3956
3957 strcpyW(szSearch + dwLen, szAllFiles);
3958 hfind = FindFirstFileW(szSearch, &find_data);
3959 if (hfind == INVALID_HANDLE_VALUE)
3960 return FALSE;
3961
3962 do
3963 {
3964 if (find_data.cFileName[0] == '.')
3965 {
3966 if (find_data.cFileName[1] == '\0') continue;
3967 if (find_data.cFileName[1] == '.' && find_data.cFileName[2] == '\0') continue;
3968 }
3969
3970 retVal = FALSE;
3971 break;
3972 }
3973 while (FindNextFileW(hfind, &find_data));
3974
3975 FindClose(hfind);
3976 return retVal;
3977}
static int find_data(const struct Vector *v, const BYTE *pData, int size)
Definition: filtermapper.c:162
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
Definition: path.c:1729

Referenced by move_dir_to_dir(), and PathIsDirectoryEmptyA().

◆ PathIsDirectoryW()

◆ PathIsFileSpecA()

WINSHLWAPI BOOL WINAPI PathIsFileSpecA ( LPCSTR  lpszPath)

Definition at line 2118 of file path.c.

2119{
2120 TRACE("(%s)\n", debugstr_a(lpszPath));
2121
2122 if (!lpszPath)
2123 return FALSE;
2124
2125 while (*lpszPath)
2126 {
2127 if (*lpszPath == '\\' || *lpszPath == ':')
2128 return FALSE;
2129 lpszPath = CharNextA(lpszPath);
2130 }
2131 return TRUE;
2132}

◆ PathIsFileSpecW()

WINSHLWAPI BOOL WINAPI PathIsFileSpecW ( LPCWSTR  lpszPath)

Definition at line 2139 of file path.c.

2140{
2141 TRACE("(%s)\n", debugstr_w(lpszPath));
2142
2143 if (!lpszPath)
2144 return FALSE;
2145
2146 while (*lpszPath)
2147 {
2148 if (*lpszPath == '\\' || *lpszPath == ':')
2149 return FALSE;
2150 lpszPath++;
2151 }
2152 return TRUE;
2153}

◆ PathIsLFNFileSpecA()

WINSHLWAPI BOOL WINAPI PathIsLFNFileSpecA ( LPCSTR  lpszPath)

Definition at line 3828 of file path.c.

3829{
3830 DWORD dwNameLen = 0, dwExtLen = 0;
3831
3832 TRACE("(%s)\n",debugstr_a(lpszPath));
3833
3834 if (!lpszPath)
3835 return FALSE;
3836
3837 while (*lpszPath)
3838 {
3839 if (*lpszPath == ' ')
3840 return TRUE; /* DOS names cannot have spaces */
3841 if (*lpszPath == '.')
3842 {
3843 if (dwExtLen)
3844 return TRUE; /* DOS names have only one dot */
3845 dwExtLen = 1;
3846 }
3847 else if (dwExtLen)
3848 {
3849 dwExtLen++;
3850 if (dwExtLen > 4)
3851 return TRUE; /* DOS extensions are <= 3 chars*/
3852 }
3853 else
3854 {
3855 dwNameLen++;
3856 if (dwNameLen > 8)
3857 return TRUE; /* DOS names are <= 8 chars */
3858 }
3859 lpszPath += IsDBCSLeadByte(*lpszPath) ? 2 : 1;
3860 }
3861 return FALSE; /* Valid DOS path */
3862}

◆ PathIsLFNFileSpecW()

WINSHLWAPI BOOL WINAPI PathIsLFNFileSpecW ( LPCWSTR  lpszPath)

Definition at line 3869 of file path.c.

3870{
3871 DWORD dwNameLen = 0, dwExtLen = 0;
3872
3873 TRACE("(%s)\n",debugstr_w(lpszPath));
3874
3875 if (!lpszPath)
3876 return FALSE;
3877
3878 while (*lpszPath)
3879 {
3880 if (*lpszPath == ' ')
3881 return TRUE; /* DOS names cannot have spaces */
3882 if (*lpszPath == '.')
3883 {
3884 if (dwExtLen)
3885 return TRUE; /* DOS names have only one dot */
3886 dwExtLen = 1;
3887 }
3888 else if (dwExtLen)
3889 {
3890 dwExtLen++;
3891 if (dwExtLen > 4)
3892 return TRUE; /* DOS extensions are <= 3 chars*/
3893 }
3894 else
3895 {
3896 dwNameLen++;
3897 if (dwNameLen > 8)
3898 return TRUE; /* DOS names are <= 8 chars */
3899 }
3900 lpszPath++;
3901 }
3902 return FALSE; /* Valid DOS path */
3903}

◆ PathIsNetworkPathA()

WINSHLWAPI BOOL WINAPI PathIsNetworkPathA ( LPCSTR  lpszPath)

Definition at line 3769 of file path.c.

3770{
3771 int dwDriveNum;
3772
3773 TRACE("(%s)\n",debugstr_a(lpszPath));
3774
3775 if (!lpszPath)
3776 return FALSE;
3777 if (*lpszPath == '\\' && lpszPath[1] == '\\')
3778 return TRUE;
3779 dwDriveNum = PathGetDriveNumberA(lpszPath);
3780 if (dwDriveNum == -1)
3781 return FALSE;
3782#ifdef __REACTOS__
3783 return IsNetDrive(dwDriveNum);
3784#else
3785 GET_FUNC(pIsNetDrive, shell32, (LPCSTR)66, FALSE); /* ord 66 = shell32.IsNetDrive */
3786 return pIsNetDrive(dwDriveNum);
3787#endif
3788}
@ shell32
Definition: LocaleTests.cpp:20
#define GET_FUNC(func, module, name, fail)
Definition: path.c:52
int WINAPI PathGetDriveNumberA(LPCSTR lpszPath)
Definition: path.c:538
static fnpIsNetDrive pIsNetDrive
Definition: path.c:66
EXTERN_C int WINAPI IsNetDrive(int drive)
Definition: shlfileop.cpp:2342

◆ PathIsNetworkPathW()

WINSHLWAPI BOOL WINAPI PathIsNetworkPathW ( LPCWSTR  lpszPath)

Definition at line 3795 of file path.c.

3796{
3797 int dwDriveNum;
3798
3799 TRACE("(%s)\n", debugstr_w(lpszPath));
3800
3801 if (!lpszPath)
3802 return FALSE;
3803 if (*lpszPath == '\\' && lpszPath[1] == '\\')
3804 return TRUE;
3805 dwDriveNum = PathGetDriveNumberW(lpszPath);
3806 if (dwDriveNum == -1)
3807 return FALSE;
3808#ifdef __REACTOS__
3809 return IsNetDrive(dwDriveNum);
3810#else
3811 GET_FUNC(pIsNetDrive, shell32, (LPCSTR)66, FALSE); /* ord 66 = shell32.IsNetDrive */
3812 return pIsNetDrive(dwDriveNum);
3813#endif
3814}
int WINAPI PathGetDriveNumberW(const WCHAR *path)
Definition: path.c:553

◆ PathIsPrefixA()

WINSHLWAPI BOOL WINAPI PathIsPrefixA ( LPCSTR  lpszPrefix,
LPCSTR  lpszPath 
)

Definition at line 2168 of file path.c.

2169{
2170 TRACE("(%s,%s)\n", debugstr_a(lpszPrefix), debugstr_a(lpszPath));
2171
2172 if (lpszPrefix && lpszPath &&
2173 PathCommonPrefixA(lpszPath, lpszPrefix, NULL) == (int)strlen(lpszPrefix))
2174 return TRUE;
2175 return FALSE;
2176}
int WINAPI PathCommonPrefixA(LPCSTR lpszFile1, LPCSTR lpszFile2, LPSTR achPath)
Definition: path.c:2757

◆ PathIsPrefixW()

WINSHLWAPI BOOL WINAPI PathIsPrefixW ( LPCWSTR  lpszPrefix,
LPCWSTR  lpszPath 
)

Definition at line 2183 of file path.c.

2184{
2185 TRACE("(%s,%s)\n", debugstr_w(lpszPrefix), debugstr_w(lpszPath));
2186
2187 if (lpszPrefix && lpszPath &&
2188 PathCommonPrefixW(lpszPath, lpszPrefix, NULL) == (int)strlenW(lpszPrefix))
2189 return TRUE;
2190 return FALSE;
2191}
int WINAPI PathCommonPrefixW(LPCWSTR lpszFile1, LPCWSTR lpszFile2, LPWSTR achPath)
Definition: path.c:2812

◆ PathIsRelativeA()

WINSHLWAPI BOOL WINAPI PathIsRelativeA ( LPCSTR  lpszPath)

Definition at line 1569 of file path.c.

1570{
1571 TRACE("(%s)\n",debugstr_a(lpszPath));
1572
1573 if (!lpszPath || !*lpszPath || IsDBCSLeadByte(*lpszPath))
1574 return TRUE;
1575 if (*lpszPath == '\\' || (*lpszPath && lpszPath[1] == ':'))
1576 return FALSE;
1577 return TRUE;
1578}

◆ PathIsRelativeW()

WINSHLWAPI BOOL WINAPI PathIsRelativeW ( LPCWSTR  lpszPath)

Definition at line 1585 of file path.c.

1586{
1587 TRACE("(%s)\n",debugstr_w(lpszPath));
1588
1589 if (!lpszPath || !*lpszPath)
1590 return TRUE;
1591 if (*lpszPath == '\\' || (*lpszPath && lpszPath[1] == ':'))
1592 return FALSE;
1593 return TRUE;
1594}

Referenced by IntLoadFontsInRegistry().

◆ PathIsRootA()

WINSHLWAPI BOOL WINAPI PathIsRootA ( LPCSTR  lpszPath)

Definition at line 1608 of file path.c.

1609{
1610 TRACE("(%s)\n", debugstr_a(lpszPath));
1611
1612 if (lpszPath && *lpszPath)
1613 {
1614 if (*lpszPath == '\\')
1615 {
1616 if (!lpszPath[1])
1617 return TRUE; /* \ */
1618 else if (lpszPath[1]=='\\')
1619 {
1620 BOOL bSeenSlash = FALSE;
1621 lpszPath += 2;
1622
1623 /* Check for UNC root path */
1624 while (*lpszPath)
1625 {
1626 if (*lpszPath == '\\')
1627 {
1628 if (bSeenSlash)
1629 return FALSE;
1630 bSeenSlash = TRUE;
1631 }
1632 lpszPath = CharNextA(lpszPath);
1633 }
1634 return TRUE;
1635 }
1636 }
1637 else if (lpszPath[1] == ':' && lpszPath[2] == '\\' && lpszPath[3] == '\0')
1638 return TRUE; /* X:\ */
1639 }
1640 return FALSE;
1641}

◆ PathIsRootW()

WINSHLWAPI BOOL WINAPI PathIsRootW ( LPCWSTR  lpszPath)

Definition at line 1648 of file path.c.

1649{
1650 TRACE("(%s)\n", debugstr_w(lpszPath));
1651
1652 if (lpszPath && *lpszPath)
1653 {
1654 if (*lpszPath == '\\')
1655 {
1656 if (!lpszPath[1])
1657 return TRUE; /* \ */
1658 else if (lpszPath[1]=='\\')
1659 {
1660 BOOL bSeenSlash = FALSE;
1661 lpszPath += 2;
1662
1663 /* Check for UNC root path */
1664 while (*lpszPath)
1665 {
1666 if (*lpszPath == '\\')
1667 {
1668 if (bSeenSlash)
1669 return FALSE;
1670 bSeenSlash = TRUE;
1671 }
1672 lpszPath++;
1673 }
1674 return TRUE;
1675 }
1676 }
1677 else if (lpszPath[1] == ':' && lpszPath[2] == '\\' && lpszPath[3] == '\0')
1678 return TRUE; /* X:\ */
1679 }
1680 return FALSE;
1681}

◆ PathIsSameRootA()

WINSHLWAPI BOOL WINAPI PathIsSameRootA ( LPCSTR  lpszPath1,
LPCSTR  lpszPath2 
)

Definition at line 2009 of file path.c.

2010{
2011 LPCSTR lpszStart;
2012 int dwLen;
2013
2014 TRACE("(%s,%s)\n", debugstr_a(lpszPath1), debugstr_a(lpszPath2));
2015
2016 if (!lpszPath1 || !lpszPath2 || !(lpszStart = PathSkipRootA(lpszPath1)))
2017 return FALSE;
2018
2019 dwLen = PathCommonPrefixA(lpszPath1, lpszPath2, NULL) + 1;
2020 if (lpszStart - lpszPath1 > dwLen)
2021 return FALSE; /* Paths not common up to length of the root */
2022 return TRUE;
2023}
LPSTR WINAPI PathSkipRootA(LPCSTR lpszPath)
Definition: path.c:3253

◆ PathIsSameRootW()

WINSHLWAPI BOOL WINAPI PathIsSameRootW ( LPCWSTR  lpszPath1,
LPCWSTR  lpszPath2 
)

Definition at line 2030 of file path.c.

2031{
2032 LPCWSTR lpszStart;
2033 int dwLen;
2034
2035 TRACE("(%s,%s)\n", debugstr_w(lpszPath1), debugstr_w(lpszPath2));
2036
2037 if (!lpszPath1 || !lpszPath2 || !(lpszStart = PathSkipRootW(lpszPath1)))
2038 return FALSE;
2039
2040 dwLen = PathCommonPrefixW(lpszPath1, lpszPath2, NULL) + 1;
2041 if (lpszStart - lpszPath1 > dwLen)
2042 return FALSE; /* Paths not common up to length of the root */
2043 return TRUE;
2044}
LPWSTR WINAPI PathSkipRootW(LPCWSTR lpszPath)
Definition: path.c:3284

◆ PathIsSystemFolderA()

WINSHLWAPI BOOL WINAPI PathIsSystemFolderA ( LPCSTR  lpszPath,
DWORD  dwAttrib 
)

Definition at line 2206 of file path.c.

2207{
2208 TRACE("(%s,0x%08x)\n", debugstr_a(lpszPath), dwAttrib);
2209
2210 if (lpszPath && *lpszPath)
2211 dwAttrib = GetFileAttributesA(lpszPath);
2212
2213 if (dwAttrib == INVALID_FILE_ATTRIBUTES || !(dwAttrib & FILE_ATTRIBUTE_DIRECTORY) ||
2215 return FALSE;
2216 return TRUE;
2217}
#define FILE_ATTRIBUTE_READONLY
Definition: nt_native.h:702
#define FILE_ATTRIBUTE_SYSTEM
Definition: nt_native.h:704

◆ PathIsSystemFolderW()

WINSHLWAPI BOOL WINAPI PathIsSystemFolderW ( LPCWSTR  lpszPath,
DWORD  dwAttrib 
)

Definition at line 2224 of file path.c.

2225{
2226 TRACE("(%s,0x%08x)\n", debugstr_w(lpszPath), dwAttrib);
2227
2228 if (lpszPath && *lpszPath)
2229 dwAttrib = GetFileAttributesW(lpszPath);
2230
2231 if (dwAttrib == INVALID_FILE_ATTRIBUTES || !(dwAttrib & FILE_ATTRIBUTE_DIRECTORY) ||
2233 return FALSE;
2234 return TRUE;
2235}

Referenced by CViewStatePropertyBag::_IsSystemFolder().

◆ PathIsUNCA()

WINSHLWAPI BOOL WINAPI PathIsUNCA ( LPCSTR  lpszPath)

Definition at line 2249 of file path.c.

2250{
2251 TRACE("(%s)\n",debugstr_a(lpszPath));
2252
2253/*
2254 * On Windows 2003, tests show that strings starting with "\\?" are
2255 * considered UNC, while on Windows Vista+ this is not the case anymore.
2256 */
2257// #ifdef __REACTOS__
2258#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
2259 if (lpszPath && (lpszPath[0]=='\\') && (lpszPath[1]=='\\') && (lpszPath[2]!='?'))
2260#else
2261 if (lpszPath && (lpszPath[0]=='\\') && (lpszPath[1]=='\\'))
2262#endif
2263 return TRUE;
2264 return FALSE;
2265}

◆ PathIsUNCServerA()

WINSHLWAPI BOOL WINAPI PathIsUNCServerA ( LPCSTR  lpszPath)

Definition at line 2307 of file path.c.

2308{
2309 TRACE("(%s)\n", debugstr_a(lpszPath));
2310
2311 if (lpszPath && *lpszPath++ == '\\' && *lpszPath++ == '\\')
2312 {
2313 while (*lpszPath)
2314 {
2315 if (*lpszPath == '\\')
2316 return FALSE;
2317 lpszPath = CharNextA(lpszPath);
2318 }
2319 return TRUE;
2320 }
2321 return FALSE;
2322}

◆ PathIsUNCServerShareA()

WINSHLWAPI BOOL WINAPI PathIsUNCServerShareA ( LPCSTR  lpszPath)

Definition at line 2357 of file path.c.

2358{
2359 TRACE("(%s)\n", debugstr_a(lpszPath));
2360
2361 if (lpszPath && *lpszPath++ == '\\' && *lpszPath++ == '\\')
2362 {
2363 BOOL bSeenSlash = FALSE;
2364 while (*lpszPath)
2365 {
2366 if (*lpszPath == '\\')
2367 {
2368 if (bSeenSlash)
2369 return FALSE;
2370 bSeenSlash = TRUE;
2371 }
2372 lpszPath = CharNextA(lpszPath);
2373 }
2374 return bSeenSlash;
2375 }
2376 return FALSE;
2377}

◆ PathIsUNCServerShareW()

WINSHLWAPI BOOL WINAPI PathIsUNCServerShareW ( LPCWSTR  lpszPath)

Definition at line 2384 of file path.c.

2385{
2386 TRACE("(%s)\n", debugstr_w(lpszPath));
2387
2388 if (lpszPath && *lpszPath++ == '\\' && *lpszPath++ == '\\')
2389 {
2390 BOOL bSeenSlash = FALSE;
2391 while (*lpszPath)
2392 {
2393 if (*lpszPath == '\\')
2394 {
2395 if (bSeenSlash)
2396 return FALSE;
2397 bSeenSlash = TRUE;
2398 }
2399 lpszPath++;
2400 }
2401 return bSeenSlash;
2402 }
2403 return FALSE;
2404}

◆ PathIsUNCServerW()

WINSHLWAPI BOOL WINAPI PathIsUNCServerW ( LPCWSTR  lpszPath)

Definition at line 2329 of file path.c.

2330{
2331 TRACE("(%s)\n", debugstr_w(lpszPath));
2332
2333 if (lpszPath && lpszPath[0] == '\\' && lpszPath[1] == '\\')
2334 {
2335 return !strchrW( lpszPath + 2, '\\' );
2336 }
2337 return FALSE;
2338}
#define strchrW(s, c)
Definition: unicode.h:40

◆ PathIsUNCW()

WINSHLWAPI BOOL WINAPI PathIsUNCW ( LPCWSTR  lpszPath)

Definition at line 2272 of file path.c.

2273{
2274 TRACE("(%s)\n",debugstr_w(lpszPath));
2275
2276/*
2277 * On Windows 2003, tests show that strings starting with "\\?" are
2278 * considered UNC, while on Windows Vista+ this is not the case anymore.
2279 */
2280// #ifdef __REACTOS__
2281#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
2282 if (lpszPath && (lpszPath[0]=='\\') && (lpszPath[1]=='\\') && (lpszPath[2]!='?'))
2283#else
2284 if (lpszPath && (lpszPath[0]=='\\') && (lpszPath[1]=='\\'))
2285#endif
2286 return TRUE;
2287 return FALSE;
2288}

◆ PathIsURLA()

WINSHLWAPI BOOL WINAPI PathIsURLA ( LPCSTR  lpstrPath)

Definition at line 2412 of file url.c.

2413{
2415 HRESULT hres;
2416
2417 TRACE("%s\n", debugstr_a(lpstrPath));
2418
2419 if (!lpstrPath || !*lpstrPath) return FALSE;
2420
2421 /* get protocol */
2422 base.cbSize = sizeof(base);
2423 hres = ParseURLA(lpstrPath, &base);
2424 return hres == S_OK && (base.nScheme != URL_SCHEME_INVALID);
2425}
HRESULT WINAPI ParseURLA(LPCSTR x, PARSEDURLA *y)
Definition: url.c:161
HRESULT hres
Definition: protocol.c:465

Referenced by UrlIsA().

◆ PathIsURLW()

WINSHLWAPI BOOL WINAPI PathIsURLW ( LPCWSTR  lpstrPath)

Definition at line 2432 of file url.c.

2433{
2435 HRESULT hres;
2436
2437 TRACE("%s\n", debugstr_w(lpstrPath));
2438
2439 if (!lpstrPath || !*lpstrPath) return FALSE;
2440
2441 /* get protocol */
2442 base.cbSize = sizeof(base);
2443 hres = ParseURLW(lpstrPath, &base);
2444 return hres == S_OK && (base.nScheme != URL_SCHEME_INVALID);
2445}
HRESULT WINAPI ParseURLW(LPCWSTR x, PARSEDURLW *y)
Definition: url.c:197

Referenced by UrlIsW().

◆ PathMakePrettyA()

WINSHLWAPI BOOL WINAPI PathMakePrettyA ( LPSTR  lpszPath)

Definition at line 2674 of file path.c.

2675{
2676 LPSTR pszIter = lpszPath;
2677
2678 TRACE("(%s)\n", debugstr_a(lpszPath));
2679
2680 if (!pszIter)
2681 return FALSE;
2682
2683 if (*pszIter)
2684 {
2685 do
2686 {
2687 if (islower(*pszIter) || IsDBCSLeadByte(*pszIter))
2688 return FALSE; /* Not DOS path */
2689 pszIter++;
2690 } while (*pszIter);
2691 pszIter = lpszPath + 1;
2692 while (*pszIter)
2693 {
2694 *pszIter = tolower(*pszIter);
2695 pszIter++;
2696 }
2697 }
2698 return TRUE;
2699}
#define islower(c)
Definition: acclib.h:72

Referenced by ATL::CPathT< StringType >::PathMakePrettyX(), and test_PathMakePretty().

◆ PathMakePrettyW()

WINSHLWAPI BOOL WINAPI PathMakePrettyW ( LPWSTR  lpszPath)

Definition at line 2706 of file path.c.

2707{
2708 LPWSTR pszIter = lpszPath;
2709
2710 TRACE("(%s)\n", debugstr_w(lpszPath));
2711
2712 if (!pszIter)
2713 return FALSE;
2714
2715 if (*pszIter)
2716 {
2717 do
2718 {
2719 if (islowerW(*pszIter))
2720 return FALSE; /* Not DOS path */
2721 pszIter++;
2722 } while (*pszIter);
2723 pszIter = lpszPath + 1;
2724 while (*pszIter)
2725 {
2726 *pszIter = tolowerW(*pszIter);
2727 pszIter++;
2728 }
2729 }
2730 return TRUE;
2731}
#define islowerW(n)
Definition: unicode.h:52

Referenced by ATL::CPathT< StringType >::PathMakePrettyX().

◆ PathMakeSystemFolderA()

WINSHLWAPI BOOL WINAPI PathMakeSystemFolderA ( LPCSTR  lpszPath)

Definition at line 3106 of file path.c.

3107{
3108 BOOL bRet = FALSE;
3109
3110 TRACE("(%s)\n", debugstr_a(lpszPath));
3111
3112 if (lpszPath && *lpszPath)
3113 {
3117 }
3118 return bRet;
3119}
BOOL WINAPI PathMakeSystemFolderW(LPCWSTR lpszPath)
Definition: path.c:3126

◆ PathMakeSystemFolderW()

WINSHLWAPI BOOL WINAPI PathMakeSystemFolderW ( LPCWSTR  lpszPath)

Definition at line 3126 of file path.c.

3127{
3128 DWORD dwDefaultAttr = FILE_ATTRIBUTE_READONLY, dwAttr;
3130
3131 TRACE("(%s)\n", debugstr_w(lpszPath));
3132
3133 if (!lpszPath || !*lpszPath)
3134 return FALSE;
3135
3136 /* If the directory is already a system directory, don't do anything */
3138 if (!strcmpW(buff, lpszPath))
3139 return TRUE;
3140
3142 if (!strcmpW(buff, lpszPath))
3143 return TRUE;
3144
3145 /* "UseSystemForSystemFolders" Tells Win what attributes to use */
3147 dwDefaultAttr = FILE_ATTRIBUTE_SYSTEM;
3148
3149 if ((dwAttr = GetFileAttributesW(lpszPath)) == INVALID_FILE_ATTRIBUTES)
3150 return FALSE;
3151
3152 /* Change file attributes to system attributes */
3154 return SetFileAttributesW(lpszPath, dwAttr | dwDefaultAttr);
3155}
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
Definition: fileinfo.c:794
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2313
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2352
static BOOL SHLWAPI_UseSystemForSystemFolders(void)
Definition: path.c:3076
#define FILE_ATTRIBUTE_HIDDEN
Definition: nt_native.h:703

Referenced by PathMakeSystemFolderA(), and SHCreatePropertyBagOnProfileSection().

◆ PathMatchSpecA()

WINSHLWAPI BOOL WINAPI PathMatchSpecA ( LPCSTR  lpszPath,
LPCSTR  lpszMask 
)

Definition at line 1941 of file path.c.

1942{
1943 TRACE("(%s,%s)\n", lpszPath, lpszMask);
1944
1945 if (!lstrcmpA(lpszMask, "*.*"))
1946 return TRUE; /* Matches every path */
1947
1948 while (*lpszMask)
1949 {
1950 while (*lpszMask == ' ')
1951 lpszMask++; /* Eat leading spaces */
1952
1953 if (PathMatchSingleMaskA(lpszPath, lpszMask))
1954 return TRUE; /* Matches the current mask */
1955
1956 while (*lpszMask && *lpszMask != ';')
1957 lpszMask = CharNextA(lpszMask); /* masks separated by ';' */
1958
1959 if (*lpszMask == ';')
1960 lpszMask++;
1961 }
1962 return FALSE;
1963}
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
Definition: locale.c:4198
static BOOL PathMatchSingleMaskA(LPCSTR name, LPCSTR mask)
Definition: path.c:1859

◆ PathMatchSpecExA()

WINSHLWAPI HRESULT WINAPI PathMatchSpecExA ( LPCSTR  ,
LPCSTR  ,
DWORD   
)

◆ PathMatchSpecExW()

WINSHLWAPI HRESULT WINAPI PathMatchSpecExW ( LPCWSTR  ,
LPCWSTR  ,
DWORD   
)

◆ PathMatchSpecW()

WINSHLWAPI BOOL WINAPI PathMatchSpecW ( LPCWSTR  lpszPath,
LPCWSTR  lpszMask 
)

Definition at line 1970 of file path.c.

1971{
1972 static const WCHAR szStarDotStar[] = { '*', '.', '*', '\0' };
1973
1974 TRACE("(%s,%s)\n", debugstr_w(lpszPath), debugstr_w(lpszMask));
1975
1976 if (!lstrcmpW(lpszMask, szStarDotStar))
1977 return TRUE; /* Matches every path */
1978
1979 while (*lpszMask)
1980 {
1981 while (*lpszMask == ' ')
1982 lpszMask++; /* Eat leading spaces */
1983
1984 if (PathMatchSingleMaskW(lpszPath, lpszMask))
1985 return TRUE; /* Matches the current path */
1986
1987 while (*lpszMask && *lpszMask != ';')
1988 lpszMask++; /* masks separated by ';' */
1989
1990 if (*lpszMask == ';')
1991 lpszMask++;
1992 }
1993 return FALSE;
1994}
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4246
static BOOL PathMatchSingleMaskW(LPCWSTR name, LPCWSTR mask)
Definition: path.c:1893

◆ PathParseIconLocationA()

WINSHLWAPI int WINAPI PathParseIconLocationA ( LPSTR  lpszPath)

Definition at line 1073 of file path.c.

1074{
1075 int iRet = 0;
1076 LPSTR lpszComma;
1077
1078 TRACE("(%s)\n", debugstr_a(lpszPath));
1079
1080 if (lpszPath)
1081 {
1082 if ((lpszComma = strchr(lpszPath, ',')))
1083 {
1084 *lpszComma++ = '\0';
1085 iRet = StrToIntA(lpszComma);
1086 }
1087 PathUnquoteSpacesA(lpszPath);
1088 PathRemoveBlanksA(lpszPath);
1089 }
1090 return iRet;
1091}
char * strchr(const char *String, int ch)
Definition: utclib.c:501
INT WINAPI StrToIntA(LPCSTR lpszStr)
Definition: string.c:370
VOID WINAPI PathUnquoteSpacesA(LPSTR lpszPath)
Definition: path.c:1018
void WINAPI PathRemoveBlanksA(LPSTR pszPath)
Definition: path.c:894

◆ PathParseIconLocationW()

WINSHLWAPI int WINAPI PathParseIconLocationW ( LPWSTR  lpszPath)

Definition at line 1098 of file path.c.

1099{
1100 int iRet = 0;
1101 LPWSTR lpszComma;
1102
1103 TRACE("(%s)\n", debugstr_w(lpszPath));
1104
1105 if (lpszPath)
1106 {
1107 if ((lpszComma = StrChrW(lpszPath, ',')))
1108 {
1109 *lpszComma++ = '\0';
1110 iRet = StrToIntW(lpszComma);
1111 }
1112 PathUnquoteSpacesW(lpszPath);
1113 PathRemoveBlanksW(lpszPath);
1114 }
1115 return iRet;
1116}
INT WINAPI StrToIntW(LPCWSTR lpString)
Definition: string.c:407
void WINAPI PathRemoveBlanksW(LPWSTR pszPath)
Definition: path.c:923
VOID WINAPI PathUnquoteSpacesW(LPWSTR lpszPath)
Definition: path.c:1040

◆ PathQuoteSpacesA()

WINSHLWAPI VOID WINAPI PathQuoteSpacesA ( LPSTR  lpszPath)

Definition at line 961 of file path.c.

962{
963 TRACE("(%s)\n", debugstr_a(lpszPath));
964
965 if(lpszPath && StrChrA(lpszPath,' '))
966 {
967 size_t iLen = strlen(lpszPath) + 1;
968
969 if (iLen + 2 < MAX_PATH)
970 {
971 memmove(lpszPath + 1, lpszPath, iLen);
972 lpszPath[0] = '"';
973 lpszPath[iLen] = '"';
974 lpszPath[iLen + 1] = '\0';
975 }
976 }
977}
#define memmove(s1, s2, n)
Definition: mkisofs.h:881

◆ PathQuoteSpacesW()

WINSHLWAPI VOID WINAPI PathQuoteSpacesW ( LPWSTR  lpszPath)

Definition at line 984 of file path.c.

985{
986 TRACE("(%s)\n", debugstr_w(lpszPath));
987
988 if(lpszPath && StrChrW(lpszPath,' '))
989 {
990 int iLen = strlenW(lpszPath) + 1;
991
992 if (iLen + 2 < MAX_PATH)
993 {
994 memmove(lpszPath + 1, lpszPath, iLen * sizeof(WCHAR));
995 lpszPath[0] = '"';
996 lpszPath[iLen] = '"';
997 lpszPath[iLen + 1] = '\0';
998 }
999 }
1000}

◆ PathRelativePathToA()

WINSHLWAPI BOOL WINAPI PathRelativePathToA ( LPSTR  lpszPath,
LPCSTR  lpszFrom,
DWORD  dwAttrFrom,
LPCSTR  lpszTo,
DWORD  dwAttrTo 
)

Definition at line 3552 of file path.c.

3554{
3555 BOOL bRet = FALSE;
3556
3557 TRACE("(%p,%s,0x%08x,%s,0x%08x)\n", lpszPath, debugstr_a(lpszFrom),
3558 dwAttrFrom, debugstr_a(lpszTo), dwAttrTo);
3559
3560 if(lpszPath && lpszFrom && lpszTo)
3561 {
3563 WCHAR szFrom[MAX_PATH];
3564 WCHAR szTo[MAX_PATH];
3565 MultiByteToWideChar(CP_ACP,0,lpszFrom,-1,szFrom,MAX_PATH);
3566 MultiByteToWideChar(CP_ACP,0,lpszTo,-1,szTo,MAX_PATH);
3567 bRet = PathRelativePathToW(szPath,szFrom,dwAttrFrom,szTo,dwAttrTo);
3568 WideCharToMultiByte(CP_ACP,0,szPath,-1,lpszPath,MAX_PATH,0,0);
3569 }
3570 return bRet;
3571}
BOOL WINAPI PathRelativePathToW(LPWSTR lpszPath, LPCWSTR lpszFrom, DWORD dwAttrFrom, LPCWSTR lpszTo, DWORD dwAttrTo)
Definition: path.c:3578

◆ PathRelativePathToW()

WINSHLWAPI BOOL WINAPI PathRelativePathToW ( LPWSTR  lpszPath,
LPCWSTR  lpszFrom,
DWORD  dwAttrFrom,
LPCWSTR  lpszTo,
DWORD  dwAttrTo 
)

Definition at line 3578 of file path.c.

3580{
3581 static const WCHAR szPrevDirSlash[] = { '.', '.', '\\', '\0' };
3582 static const WCHAR szPrevDir[] = { '.', '.', '\0' };
3583 WCHAR szFrom[MAX_PATH];
3584 WCHAR szTo[MAX_PATH];
3585 DWORD dwLen;
3586
3587 TRACE("(%p,%s,0x%08x,%s,0x%08x)\n", lpszPath, debugstr_w(lpszFrom),
3588 dwAttrFrom, debugstr_w(lpszTo), dwAttrTo);
3589
3590 if(!lpszPath || !lpszFrom || !lpszTo)
3591 return FALSE;
3592
3593 *lpszPath = '\0';
3594 lstrcpynW(szFrom, lpszFrom, MAX_PATH);
3595 lstrcpynW(szTo, lpszTo, MAX_PATH);
3596
3597 if(!(dwAttrFrom & FILE_ATTRIBUTE_DIRECTORY))
3598 PathRemoveFileSpecW(szFrom);
3599 if(!(dwAttrTo & FILE_ATTRIBUTE_DIRECTORY))
3600 PathRemoveFileSpecW(szTo);
3601
3602 /* Paths can only be relative if they have a common root */
3603 if(!(dwLen = PathCommonPrefixW(szFrom, szTo, 0)))
3604 return FALSE;
3605
3606 /* Strip off lpszFrom components to the root, by adding "..\" */
3607 lpszFrom = szFrom + dwLen;
3608 if (!*lpszFrom)
3609 {
3610 lpszPath[0] = '.';
3611 lpszPath[1] = '\0';
3612 }
3613 if (*lpszFrom == '\\')
3614 lpszFrom++;
3615
3616 while (*lpszFrom)
3617 {
3618 lpszFrom = PathFindNextComponentW(lpszFrom);
3619 strcatW(lpszPath, *lpszFrom ? szPrevDirSlash : szPrevDir);
3620 }
3621
3622 /* From the root add the components of lpszTo */
3623 lpszTo += dwLen;
3624 /* We check lpszTo[-1] to avoid skipping end of string. See the notes for
3625 * this function.
3626 */
3627 if (*lpszTo && lpszTo[-1])
3628 {
3629 if (*lpszTo != '\\')
3630 lpszTo--;
3631 dwLen = strlenW(lpszPath);
3632 if (dwLen + strlenW(lpszTo) >= MAX_PATH)
3633 {
3634 *lpszPath = '\0';
3635 return FALSE;
3636 }
3637 strcpyW(lpszPath + dwLen, lpszTo);
3638 }
3639 return TRUE;
3640}
BOOL WINAPI PathRemoveFileSpecW(LPWSTR lpszPath)
Definition: path.c:629
LPWSTR WINAPI PathFindNextComponentW(LPCWSTR lpszPath)
Definition: path.c:2585

◆ PathRemoveArgsA()

WINSHLWAPI VOID WINAPI PathRemoveArgsA ( LPSTR  lpszPath)

Definition at line 756 of file path.c.

757{
758 TRACE("(%s)\n",debugstr_a(lpszPath));
759
760 if(lpszPath)
761 {
762 LPSTR lpszArgs = PathGetArgsA(lpszPath);
763 if (*lpszArgs)
764 lpszArgs[-1] = '\0';
765 else
766 {
767 LPSTR lpszLastChar = CharPrevA(lpszPath, lpszArgs);
768 if(*lpszLastChar == ' ')
769 *lpszLastChar = '\0';
770 }
771 }
772}
LPSTR WINAPI CharPrevA(const char *start, const char *ptr)
Definition: string.c:1128
LPSTR WINAPI PathGetArgsA(LPCSTR lpszPath)
Definition: path.c:481

Referenced by ATL::CPathT< StringType >::PathRemoveArgsX().

◆ PathRemoveArgsW()

WINSHLWAPI VOID WINAPI PathRemoveArgsW ( LPWSTR  lpszPath)

Definition at line 779 of file path.c.

780{
781 TRACE("(%s)\n",debugstr_w(lpszPath));
782
783 if(lpszPath)
784 {
785 LPWSTR lpszArgs = PathGetArgsW(lpszPath);
786 if (*lpszArgs || (lpszArgs > lpszPath && lpszArgs[-1] == ' '))
787 lpszArgs[-1] = '\0';
788 }
789}
LPWSTR WINAPI PathGetArgsW(LPCWSTR lpszPath)
Definition: path.c:506

Referenced by RunOnceExEntry::Exec(), CAddressEditBox::ExecuteCommandLine(), CShellLink::OnNotify(), OpensWithExplorer(), ATL::CPathT< StringType >::PathRemoveArgsX(), SHELL_execute(), SHELL_translate_idlist(), ShellExecuteCommand(), and WelcomeDlgProc().

◆ PathRemoveBackslashA()

WINSHLWAPI LPSTR WINAPI PathRemoveBackslashA ( LPSTR  lpszPath)

Definition at line 847 of file path.c.

848{
849 LPSTR szTemp = NULL;
850
851 TRACE("(%s)\n", debugstr_a(lpszPath));
852
853 if(lpszPath)
854 {
855 szTemp = CharPrevA(lpszPath, lpszPath + strlen(lpszPath));
856 if (!PathIsRootA(lpszPath) && *szTemp == '\\')
857 *szTemp = '\0';
858 }
859 return szTemp;
860}
BOOL WINAPI PathIsRootA(LPCSTR lpszPath)
Definition: path.c:1608

◆ PathRemoveBackslashW()

WINSHLWAPI LPWSTR WINAPI PathRemoveBackslashW ( LPWSTR  lpszPath)

Definition at line 867 of file path.c.

868{
869 LPWSTR szTemp = NULL;
870
871 TRACE("(%s)\n", debugstr_w(lpszPath));
872
873 if(lpszPath)
874 {
875 szTemp = lpszPath + strlenW(lpszPath);
876 if (szTemp > lpszPath) szTemp--;
877 if (!PathIsRootW(lpszPath) && *szTemp == '\\')
878 *szTemp = '\0';
879 }
880 return szTemp;
881}
BOOL WINAPI PathIsRootW(LPCWSTR lpszPath)
Definition: path.c:1648

◆ PathRemoveBlanksA()

WINSHLWAPI VOID WINAPI PathRemoveBlanksA ( LPSTR  pszPath)

Definition at line 894 of file path.c.

895{
897
898 TRACE("(%s)\n", debugstr_a(pszPath));
899
900 if (!pszPath || !*pszPath)
901 return;
902
903 start = first = pszPath;
904
905 while (*pszPath == ' ')
906 pszPath = CharNextA(pszPath);
907
908 while (*pszPath)
909 *start++ = *pszPath++;
910
911 if (start != first)
912 while (start[-1] == ' ')
913 start--;
914
915 *start = '\0';
916}
GLuint start
Definition: gl.h:1545
const GLint * first
Definition: glext.h:5794

◆ PathRemoveBlanksW()

WINSHLWAPI VOID WINAPI PathRemoveBlanksW ( LPWSTR  pszPath)

Definition at line 923 of file path.c.

924{
926
927 TRACE("(%s)\n", debugstr_w(pszPath));
928
929 if (!pszPath || !*pszPath)
930 return;
931
932 start = first = pszPath;
933
934 while (*pszPath == ' ')
935 pszPath++;
936
937 while (*pszPath)
938 *start++ = *pszPath++;
939
940 if (start != first)
941 while (start[-1] == ' ')
942 start--;
943
944 *start = '\0';
945}

◆ PathRemoveExtensionA()

WINSHLWAPI VOID WINAPI PathRemoveExtensionA ( LPSTR  lpszPath)

Definition at line 806 of file path.c.

807{
808 TRACE("(%s)\n", debugstr_a(lpszPath));
809
810 if (lpszPath)
811 {
812 lpszPath = PathFindExtensionA(lpszPath);
813 if (lpszPath && *lpszPath != '\0')
814 *lpszPath = '\0';
815 }
816}

◆ PathRemoveExtensionW()

WINSHLWAPI VOID WINAPI PathRemoveExtensionW ( LPWSTR  lpszPath)

Definition at line 823 of file path.c.

824{
825 TRACE("(%s)\n", debugstr_w(lpszPath));
826
827 if (lpszPath)
828 {
829 lpszPath = PathFindExtensionW(lpszPath);
830 if (lpszPath && *lpszPath != '\0')
831 *lpszPath = '\0';
832 }
833}

◆ PathRemoveFileSpecA()

WINSHLWAPI BOOL WINAPI PathRemoveFileSpecA ( LPSTR  lpszPath)

Definition at line 586 of file path.c.

587{
588 LPSTR lpszFileSpec = lpszPath;
589 BOOL bModified = FALSE;
590
591 TRACE("(%s)\n",debugstr_a(lpszPath));
592
593 if(lpszPath)
594 {
595 /* Skip directory or UNC path */
596 if (*lpszPath == '\\')
597 lpszFileSpec = ++lpszPath;
598 if (*lpszPath == '\\')
599 lpszFileSpec = ++lpszPath;
600
601 while (*lpszPath)
602 {
603 if(*lpszPath == '\\')
604 lpszFileSpec = lpszPath; /* Skip dir */
605 else if(*lpszPath == ':')
606 {
607 lpszFileSpec = ++lpszPath; /* Skip drive */
608 if (*lpszPath == '\\')
609 lpszFileSpec++;
610 }
611 if (!(lpszPath = CharNextA(lpszPath)))
612 break;
613 }
614
615 if (*lpszFileSpec)
616 {
617 *lpszFileSpec = '\0';
618 bModified = TRUE;
619 }
620 }
621 return bModified;
622}

◆ PathRemoveFileSpecW()

WINSHLWAPI BOOL WINAPI PathRemoveFileSpecW ( LPWSTR  lpszPath)

Definition at line 629 of file path.c.

630{
631 LPWSTR lpszFileSpec = lpszPath;
632 BOOL bModified = FALSE;
633
634 TRACE("(%s)\n",debugstr_w(lpszPath));
635
636 if(lpszPath)
637 {
638 /* Skip directory or UNC path */
639 if (*lpszPath == '\\')
640 lpszFileSpec = ++lpszPath;
641 if (*lpszPath == '\\')
642 lpszFileSpec = ++lpszPath;
643
644 while (*lpszPath)
645 {
646 if(*lpszPath == '\\')
647 lpszFileSpec = lpszPath; /* Skip dir */
648 else if(*lpszPath == ':')
649 {
650 lpszFileSpec = ++lpszPath; /* Skip drive */
651 if (*lpszPath == '\\')
652 lpszFileSpec++;
653 }
654 lpszPath++;
655 }
656
657 if (*lpszFileSpec)
658 {
659 *lpszFileSpec = '\0';
660 bModified = TRUE;
661 }
662 }
663 return bModified;
664}

◆ PathRenameExtensionA()

WINSHLWAPI BOOL WINAPI PathRenameExtensionA ( LPSTR  lpszPath,
LPCSTR  lpszExt 
)

Definition at line 3170 of file path.c.

3171{
3172 LPSTR lpszExtension;
3173
3174 TRACE("(%s,%s)\n", debugstr_a(lpszPath), debugstr_a(lpszExt));
3175
3176 lpszExtension = PathFindExtensionA(lpszPath);
3177
3178 if (!lpszExtension || (lpszExtension - lpszPath + strlen(lpszExt) >= MAX_PATH))
3179 return FALSE;
3180
3181 strcpy(lpszExtension, lpszExt);
3182 return TRUE;
3183}

◆ PathRenameExtensionW()

WINSHLWAPI BOOL WINAPI PathRenameExtensionW ( LPWSTR  lpszPath,
LPCWSTR  lpszExt 
)

Definition at line 3190 of file path.c.

3191{
3192 LPWSTR lpszExtension;
3193
3194 TRACE("(%s,%s)\n", debugstr_w(lpszPath), debugstr_w(lpszExt));
3195
3196 lpszExtension = PathFindExtensionW(lpszPath);
3197
3198 if (!lpszExtension || (lpszExtension - lpszPath + strlenW(lpszExt) >= MAX_PATH))
3199 return FALSE;
3200
3201 strcpyW(lpszExtension, lpszExt);
3202 return TRUE;
3203}

◆ PathSearchAndQualifyA()

WINSHLWAPI BOOL WINAPI PathSearchAndQualifyA ( LPCSTR  lpszPath,
LPSTR  lpszBuf,
UINT  cchBuf 
)

Definition at line 3218 of file path.c.

3219{
3220 TRACE("(%s,%p,0x%08x)\n", debugstr_a(lpszPath), lpszBuf, cchBuf);
3221
3222 if(SearchPathA(NULL, lpszPath, NULL, cchBuf, lpszBuf, NULL))
3223 return TRUE;
3224 return !!GetFullPathNameA(lpszPath, cchBuf, lpszBuf, NULL);
3225}
DWORD WINAPI SearchPathA(IN LPCSTR lpPath OPTIONAL, IN LPCSTR lpFileName, IN LPCSTR lpExtension OPTIONAL, IN DWORD nBufferLength, OUT LPSTR lpBuffer, OUT LPSTR *lpFilePart OPTIONAL)
Definition: path.c:1123
DWORD WINAPI GetFullPathNameA(IN LPCSTR lpFileName, IN DWORD nBufferLength, OUT LPSTR lpBuffer, OUT LPSTR *lpFilePart)
Definition: path.c:993
_In_ UINT cchBuf
Definition: shlwapi.h:378

◆ PathSearchAndQualifyW()

WINSHLWAPI BOOL WINAPI PathSearchAndQualifyW ( LPCWSTR  lpszPath,
LPWSTR  lpszBuf,
UINT  cchBuf 
)

Definition at line 3232 of file path.c.

3233{
3234 TRACE("(%s,%p,0x%08x)\n", debugstr_w(lpszPath), lpszBuf, cchBuf);
3235
3236 if(SearchPathW(NULL, lpszPath, NULL, cchBuf, lpszBuf, NULL))
3237 return TRUE;
3238 return !!GetFullPathNameW(lpszPath, cchBuf, lpszBuf, NULL);
3239}
DWORD WINAPI SearchPathW(IN LPCWSTR lpPath OPTIONAL, IN LPCWSTR lpFileName, IN LPCWSTR lpExtension OPTIONAL, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart OPTIONAL)
Definition: path.c:1298
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
Definition: path.c:1106

◆ PathSetDlgItemPathA()

WINSHLWAPI VOID WINAPI PathSetDlgItemPathA ( HWND  hDlg,
int  id,
LPCSTR  lpszPath 
)

Definition at line 3707 of file path.c.

3708{
3710
3711 TRACE("(%p,%8x,%s)\n",hDlg, id, debugstr_a(lpszPath));
3712
3713 if (lpszPath)
3715 else
3716 szPath[0] = '\0';
3717 PathSetDlgItemPathW(hDlg, id, szPath);
3718}
VOID WINAPI PathSetDlgItemPathW(HWND hDlg, int id, LPCWSTR lpszPath)
Definition: path.c:3725

◆ PathSetDlgItemPathW()

WINSHLWAPI VOID WINAPI PathSetDlgItemPathW ( HWND  hDlg,
int  id,
LPCWSTR  lpszPath 
)

Definition at line 3725 of file path.c.

3726{
3727 WCHAR path[MAX_PATH + 1];
3728 HWND hwItem;
3729 RECT rect;
3730 HDC hdc;
3731 HGDIOBJ hPrevObj;
3732
3733 TRACE("(%p,%8x,%s)\n",hDlg, id, debugstr_w(lpszPath));
3734
3735 if (!(hwItem = GetDlgItem(hDlg, id)))
3736 return;
3737
3738 if (lpszPath)
3739 lstrcpynW(path, lpszPath, sizeof(path) / sizeof(WCHAR));
3740 else
3741 path[0] = '\0';
3742
3743 GetClientRect(hwItem, &rect);
3744 hdc = GetDC(hDlg);
3745 hPrevObj = SelectObject(hdc, (HGDIOBJ)SendMessageW(hwItem,WM_GETFONT,0,0));
3746
3747 if (hPrevObj)
3748 {
3749 PathCompactPathW(hdc, path, rect.right);
3750 SelectObject(hdc, hPrevObj);
3751 }
3752
3753 ReleaseDC(hDlg, hdc);
3754 SetWindowTextW(hwItem, path);
3755}
& rect
Definition: startmenu.cpp:1413
Definition: windef.h:99
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
#define WM_GETFONT
Definition: winuser.h:1679
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by PathSetDlgItemPathA().

◆ PathSkipRootA()

WINSHLWAPI LPSTR WINAPI PathSkipRootA ( LPCSTR  lpszPath)

Definition at line 3253 of file path.c.

3254{
3255 TRACE("(%s)\n", debugstr_a(lpszPath));
3256
3257 if (!lpszPath || !*lpszPath)
3258 return NULL;
3259
3260 if (*lpszPath == '\\' && lpszPath[1] == '\\')
3261 {
3262 /* Network share: skip share server and mount point */
3263 lpszPath += 2;
3264 if ((lpszPath = StrChrA(lpszPath, '\\')) &&
3265 (lpszPath = StrChrA(lpszPath + 1, '\\')))
3266 lpszPath++;
3267 return (LPSTR)lpszPath;
3268 }
3269
3270 if (IsDBCSLeadByte(*lpszPath))
3271 return NULL;
3272
3273 /* Check x:\ */
3274 if (lpszPath[0] && lpszPath[1] == ':' && lpszPath[2] == '\\')
3275 return (LPSTR)lpszPath + 3;
3276 return NULL;
3277}

◆ PathSkipRootW()

WINSHLWAPI LPWSTR WINAPI PathSkipRootW ( LPCWSTR  lpszPath)

Definition at line 3284 of file path.c.

3285{
3286 TRACE("(%s)\n", debugstr_w(lpszPath));
3287
3288 if (!lpszPath || !*lpszPath)
3289 return NULL;
3290
3291 if (*lpszPath == '\\' && lpszPath[1] == '\\')
3292 {
3293 /* Network share: skip share server and mount point */
3294 lpszPath += 2;
3295 if ((lpszPath = StrChrW(lpszPath, '\\')) &&
3296 (lpszPath = StrChrW(lpszPath + 1, '\\')))
3297 lpszPath++;
3298 return (LPWSTR)lpszPath;
3299 }
3300
3301 /* Check x:\ */
3302 if (lpszPath[0] && lpszPath[1] == ':' && lpszPath[2] == '\\')
3303 return (LPWSTR)lpszPath + 3;
3304 return NULL;
3305}

◆ PathStripPathA()

WINSHLWAPI VOID WINAPI PathStripPathA ( LPSTR  lpszPath)

Definition at line 677 of file path.c.

678{
679 TRACE("(%s)\n", debugstr_a(lpszPath));
680
681 if (lpszPath)
682 {
683 LPSTR lpszFileName = PathFindFileNameA(lpszPath);
684 if(lpszFileName != lpszPath)
685 RtlMoveMemory(lpszPath, lpszFileName, strlen(lpszFileName)+1);
686 }
687}
LPSTR WINAPI PathFindFileNameA(LPCSTR lpszPath)
Definition: path.c:373
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:264

◆ PathStripPathW()

WINSHLWAPI VOID WINAPI PathStripPathW ( LPWSTR  lpszPath)

Definition at line 694 of file path.c.

695{
696 LPWSTR lpszFileName;
697
698 TRACE("(%s)\n", debugstr_w(lpszPath));
699 lpszFileName = PathFindFileNameW(lpszPath);
700 if(lpszFileName != lpszPath)
701 RtlMoveMemory(lpszPath, lpszFileName, (strlenW(lpszFileName)+1)*sizeof(WCHAR));
702}

◆ PathStripToRootA()

WINSHLWAPI BOOL WINAPI PathStripToRootA ( LPSTR  lpszPath)

Definition at line 716 of file path.c.

717{
718 TRACE("(%s)\n", debugstr_a(lpszPath));
719
720 if (!lpszPath)
721 return FALSE;
722 while(!PathIsRootA(lpszPath))
723 if (!PathRemoveFileSpecA(lpszPath))
724 return FALSE;
725 return TRUE;
726}
BOOL WINAPI PathRemoveFileSpecA(LPSTR lpszPath)
Definition: path.c:586

◆ PathStripToRootW()

WINSHLWAPI BOOL WINAPI PathStripToRootW ( LPWSTR  lpszPath)

Definition at line 733 of file path.c.

734{
735 TRACE("(%s)\n", debugstr_w(lpszPath));
736
737 if (!lpszPath)
738 return FALSE;
739 while(!PathIsRootW(lpszPath))
740 if (!PathRemoveFileSpecW(lpszPath))
741 return FALSE;
742 return TRUE;
743}

◆ PathUndecorateA()

WINSHLWAPI VOID WINAPI PathUndecorateA ( LPSTR  pszPath)

Definition at line 4070 of file path.c.

4071{
4072 char *ext, *skip;
4073
4074 TRACE("(%s)\n", debugstr_a(pszPath));
4075
4076 if (!pszPath) return;
4077
4078 ext = PathFindExtensionA(pszPath);
4079 if (ext == pszPath || ext[-1] != ']') return;
4080
4081 skip = ext - 2;
4082 while (skip > pszPath && '0' <= *skip && *skip <= '9')
4083 skip--;
4084
4085 if (skip > pszPath && *skip == '[' && skip[-1] != '\\')
4086 memmove(skip, ext, strlen(ext) + 1);
4087}
#define skip(...)
Definition: atltest.h:64
static const WCHAR *const ext[]
Definition: module.c:53

Referenced by test_PathUndecorate().

◆ PathUndecorateW()

WINSHLWAPI VOID WINAPI PathUndecorateW ( LPWSTR  pszPath)

Definition at line 4094 of file path.c.

4095{
4096 WCHAR *ext, *skip;
4097
4098 TRACE("(%s)\n", debugstr_w(pszPath));
4099
4100 if (!pszPath) return;
4101
4102 ext = PathFindExtensionW(pszPath);
4103 if (ext == pszPath || ext[-1] != ']') return;
4104
4105 skip = ext - 2;
4106 while (skip > pszPath && '0' <= *skip && *skip <= '9')
4107 skip--;
4108
4109 if (skip > pszPath && *skip == '[' && skip[-1] != '\\')
4110 memmove(skip, ext, (wcslen(ext) + 1) * sizeof(WCHAR));
4111}
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)

Referenced by test_PathUndecorate().

◆ PathUnExpandEnvStringsA()

WINSHLWAPI BOOL WINAPI PathUnExpandEnvStringsA ( LPCSTR  path,
LPSTR  buffer,
UINT  buf_len 
)

Definition at line 4128 of file path.c.

4129{
4130 WCHAR bufferW[MAX_PATH], *pathW;
4131 DWORD len;
4132 BOOL ret;
4133
4134 TRACE("(%s, %p, %d)\n", debugstr_a(path), buffer, buf_len);
4135
4136 pathW = heap_strdupAtoW(path);
4137 if (!pathW) return FALSE;
4138
4139 ret = PathUnExpandEnvStringsW(pathW, bufferW, MAX_PATH);
4140 HeapFree(GetProcessHeap(), 0, pathW);
4141 if (!ret) return FALSE;
4142
4143 len = WideCharToMultiByte(CP_ACP, 0, bufferW, -1, NULL, 0, NULL, NULL);
4144 if (buf_len < len + 1) return FALSE;
4145
4146 WideCharToMultiByte(CP_ACP, 0, bufferW, -1, buffer, buf_len, NULL, NULL);
4147 return TRUE;
4148}
BOOL WINAPI PathUnExpandEnvStringsW(LPCWSTR path, LPWSTR buffer, UINT buf_len)
Definition: path.c:4181
static WCHAR * heap_strdupAtoW(LPCSTR str)
Definition: path.c:73
GLuint buffer
Definition: glext.h:5915

◆ PathUnExpandEnvStringsW()

WINSHLWAPI BOOL WINAPI PathUnExpandEnvStringsW ( LPCWSTR  path,
LPWSTR  buffer,
UINT  buf_len 
)

Definition at line 4181 of file path.c.

4182{
4183 static struct envvars_map null_var = {NULL, 0, {0}, 0};
4184 struct envvars_map *match = &null_var, *cur;
4185 struct envvars_map envvars[] = {
4186 { allusersprofileW, sizeof(allusersprofileW)/sizeof(WCHAR) },
4187 { appdataW, sizeof(appdataW)/sizeof(WCHAR) },
4188 { programfilesW, sizeof(programfilesW)/sizeof(WCHAR) },
4189 { systemrootW, sizeof(systemrootW)/sizeof(WCHAR) },
4190 { systemdriveW, sizeof(systemdriveW)/sizeof(WCHAR) },
4191 { userprofileW, sizeof(userprofileW)/sizeof(WCHAR) },
4192 { NULL }
4193 };
4194 DWORD pathlen;
4195 UINT needed;
4196
4197 TRACE("(%s, %p, %d)\n", debugstr_w(path), buffer, buf_len);
4198
4199 pathlen = strlenW(path);
4200 init_envvars_map(envvars);
4201 cur = envvars;
4202 while (cur->var)
4203 {
4204 /* path can't contain expanded value or value wasn't retrieved */
4205 if (cur->len == 0 || cur->len > pathlen || strncmpiW(cur->path, path, cur->len))
4206 {
4207 cur++;
4208 continue;
4209 }
4210
4211 if (cur->len > match->len)
4212 match = cur;
4213 cur++;
4214 }
4215
4216 /* 'varlen' includes NULL termination char */
4217 needed = match->varlen + pathlen - match->len;
4218 if (match->len == 0 || needed > buf_len) return FALSE;
4219
4220 strcpyW(buffer, match->var);
4221 strcatW(buffer, &path[match->len]);
4222 TRACE("ret %s\n", debugstr_w(buffer));
4223
4224 return TRUE;
4225}
static const WCHAR userprofileW[]
Definition: path.c:4155
static const WCHAR systemdriveW[]
Definition: path.c:4154
static const WCHAR programfilesW[]
Definition: path.c:4152
static const WCHAR allusersprofileW[]
Definition: path.c:4150
static const WCHAR appdataW[]
Definition: path.c:4151
static void init_envvars_map(struct envvars_map *map)
Definition: path.c:4165
static const WCHAR systemrootW[]
Definition: path.c:4153
FxCollectionEntry * cur
Definition: match.c:28
#define strncmpiW(s1, s2, n)
Definition: unicode.h:46

◆ PathUnmakeSystemFolderA()

WINSHLWAPI BOOL WINAPI PathUnmakeSystemFolderA ( LPCSTR  lpszPath)

Definition at line 3655 of file path.c.

3656{
3657 DWORD dwAttr;
3658
3659 TRACE("(%s)\n", debugstr_a(lpszPath));
3660
3661 if (!lpszPath || !*lpszPath || (dwAttr = GetFileAttributesA(lpszPath)) == INVALID_FILE_ATTRIBUTES ||
3662 !(dwAttr & FILE_ATTRIBUTE_DIRECTORY))
3663 return FALSE;
3664
3666 return SetFileAttributesA(lpszPath, dwAttr);
3667}
BOOL WINAPI SetFileAttributesA(LPCSTR lpFileName, DWORD dwFileAttributes)
Definition: fileinfo.c:776

◆ PathUnmakeSystemFolderW()

WINSHLWAPI BOOL WINAPI PathUnmakeSystemFolderW ( LPCWSTR  lpszPath)

Definition at line 3674 of file path.c.

3675{
3676 DWORD dwAttr;
3677
3678 TRACE("(%s)\n", debugstr_w(lpszPath));
3679
3680 if (!lpszPath || !*lpszPath || (dwAttr = GetFileAttributesW(lpszPath)) == INVALID_FILE_ATTRIBUTES ||
3681 !(dwAttr & FILE_ATTRIBUTE_DIRECTORY))
3682 return FALSE;
3683
3685 return SetFileAttributesW(lpszPath, dwAttr);
3686}

◆ PathUnquoteSpacesA()

WINSHLWAPI VOID WINAPI PathUnquoteSpacesA ( LPSTR  lpszPath)

Definition at line 1018 of file path.c.

1019{
1020 TRACE("(%s)\n", debugstr_a(lpszPath));
1021
1022 if (lpszPath && *lpszPath == '"')
1023 {
1024 DWORD dwLen = strlen(lpszPath) - 1;
1025
1026 if (lpszPath[dwLen] == '"')
1027 {
1028 lpszPath[dwLen] = '\0';
1029 for (; *lpszPath; lpszPath++)
1030 *lpszPath = lpszPath[1];
1031 }
1032 }
1033}

◆ PathUnquoteSpacesW()

WINSHLWAPI VOID WINAPI PathUnquoteSpacesW ( LPWSTR  lpszPath)

Definition at line 1040 of file path.c.

1041{
1042 TRACE("(%s)\n", debugstr_w(lpszPath));
1043
1044 if (lpszPath && *lpszPath == '"')
1045 {
1046 DWORD dwLen = strlenW(lpszPath) - 1;
1047
1048 if (lpszPath[dwLen] == '"')
1049 {
1050 lpszPath[dwLen] = '\0';
1051 for (; *lpszPath; lpszPath++)
1052 *lpszPath = lpszPath[1];
1053 }
1054 }
1055}

◆ QISearch()

WINSHLWAPI HRESULT WINAPI QISearch ( void base,
const QITAB pqit,
REFIID  riid,
void **  ppv 
)

Definition at line 426 of file main.c.

427{
428 const QITAB *ptr;
429 IUnknown *unk;
430
431 TRACE("%p, %p, %s, %p\n", base, table, debugstr_guid(riid), obj);
432
433 if (!obj)
434 return E_POINTER;
435
436 for (ptr = table; ptr->piid; ++ptr)
437 {
438 TRACE("trying (offset %ld) %s\n", ptr->dwOffset, debugstr_guid(ptr->piid));
439 if (IsEqualIID(riid, ptr->piid))
440 {
441 unk = (IUnknown *)((BYTE *)base + ptr->dwOffset);
442 TRACE("matched, returning (%p)\n", unk);
443 *obj = unk;
444 IUnknown_AddRef(unk);
445 return S_OK;
446 }
447 }
448
450 {
451 unk = (IUnknown *)((BYTE *)base + table->dwOffset);
452 TRACE("returning first for IUnknown (%p)\n", unk);
453 *obj = unk;
454 IUnknown_AddRef(unk);
455 return S_OK;
456 }
457
458 WARN("Not found %s.\n", debugstr_guid(riid));
459 *obj = NULL;
460 return E_NOINTERFACE;
461}
const GUID IID_IUnknown
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
Definition: shlwapi.h:139
#define E_NOINTERFACE
Definition: winerror.h:3479
unsigned char BYTE
Definition: xxhash.c:193

Referenced by ExplorerInstance::QueryInterface(), and CUnknownBase< Interface >::QueryInterface().

◆ SHAllocShared()

WINSHLWAPI HANDLE WINAPI SHAllocShared ( const void data,
DWORD  size,
DWORD  pid 
)

◆ SHAutoComplete()

WINSHLWAPI HRESULT WINAPI SHAutoComplete ( HWND  hwndEdit,
DWORD  dwFlags 
)

Definition at line 191 of file autocomp.cpp.

192{
193 TRACE("SHAutoComplete(%p, 0x%lX)\n", hwndEdit, dwFlags);
194
195 DWORD dwSHACF = dwFlags, dwACO = 0, dwACLO = 0;
196 AutoComplete_AdaptFlags(hwndEdit, &dwSHACF, &dwACO, &dwACLO);
197
198 // Load the list (with IEnumString interface)
199 CComPtr<IUnknown> pList = AutoComplete_LoadList(dwSHACF, dwACLO);
200 if (!pList)
201 {
202 ERR("Out of memory\n");
203 return E_OUTOFMEMORY;
204 }
205
206 // Create an auto-completion (IAutoComplete2)
207 CComPtr<IAutoComplete2> pAC2;
208 HRESULT hr = CoCreateInstance(CLSID_AutoComplete, NULL, CLSCTX_INPROC_SERVER,
209 IID_IAutoComplete2, (LPVOID *)&pAC2);
210 if (FAILED(hr))
211 {
212 ERR("CoCreateInstance(CLSID_AutoComplete) failed: 0x%lX\n", hr);
213 return hr;
214 }
215
216 // Keep the DLLs of CLSID_ACListISF and CLSID_AutoComplete loaded
217 hr = E_FAIL;
218 if (SHPinDllOfCLSID(CLSID_ACListISF) && SHPinDllOfCLSID(CLSID_AutoComplete))
219 {
220 // Initialize IAutoComplete2 for auto-completion
221 hr = pAC2->Init(hwndEdit, pList, NULL, NULL);
222 if (SUCCEEDED(hr))
223 pAC2->SetOptions(dwACO); // Set ACO_* flags
224 else
225 ERR("IAutoComplete2::Init failed: 0x%lX\n", hr);
226 }
227
228 return hr;
229}
HWND hwndEdit
Definition: combotst.c:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
HMODULE WINAPI SHPinDllOfCLSID(REFIID refiid)
Definition: ordinal.c:2656
FxChildList * pList
static VOID AutoComplete_AdaptFlags(IN HWND hwndEdit, IN OUT LPDWORD pdwSHACF, OUT LPDWORD pdwACO, OUT LPDWORD pdwACLO)
Definition: autocomp.cpp:134
static CComPtr< IUnknown > AutoComplete_LoadList(DWORD dwSHACF, DWORD dwACLO)
Definition: autocomp.cpp:65

Referenced by BrFolder_OnInitDialog(), CHSourceDlgProc(), CAddressEditBox::Init(), CShellLink::OnInitDialog(), PickIconProc(), RunDlgProc(), and WelcomeDlgProc().

◆ SHCopyKeyA()

WINSHLWAPI DWORD WINAPI SHCopyKeyA ( HKEY  hKeySrc,
LPCSTR  lpszSrcSubKey,
HKEY  hKeyDst,
DWORD  dwReserved 
)

Definition at line 2244 of file reg.c.

2245{
2246 WCHAR szSubKeyW[MAX_PATH];
2247
2248 TRACE("(hkey=%p,%s,%p08x,%d)\n", hKeySrc, debugstr_a(lpszSrcSubKey), hKeyDst, dwReserved);
2249
2250 if (lpszSrcSubKey)
2251 MultiByteToWideChar(CP_ACP, 0, lpszSrcSubKey, -1, szSubKeyW, MAX_PATH);
2252
2253 return SHCopyKeyW(hKeySrc, lpszSrcSubKey ? szSubKeyW : NULL, hKeyDst, dwReserved);
2254}
DWORD WINAPI SHCopyKeyW(HKEY hKeySrc, LPCWSTR lpszSrcSubKey, HKEY hKeyDst, DWORD dwReserved)
Definition: reg.c:2261

◆ SHCopyKeyW()

WINSHLWAPI DWORD WINAPI SHCopyKeyW ( HKEY  hKeySrc,
LPCWSTR  lpszSrcSubKey,
HKEY  hKeyDst,
DWORD  dwReserved 
)

Definition at line 2261 of file reg.c.

2262{
2263 DWORD dwKeyCount = 0, dwValueCount = 0, dwMaxKeyLen = 0;
2264 DWORD dwMaxValueLen = 0, dwMaxDataLen = 0, i;
2265 BYTE buff[1024];
2266 LPVOID lpBuff = buff;
2267 WCHAR szName[MAX_PATH], *lpszName = szName;
2268 DWORD dwRet = S_OK;
2269
2270 TRACE("hkey=%p,%s,%p08x,%d)\n", hKeySrc, debugstr_w(lpszSrcSubKey), hKeyDst, dwReserved);
2271
2272 if(!hKeyDst || !hKeySrc)
2274 else
2275 {
2276 /* Open source key */
2277 if(lpszSrcSubKey)
2278 dwRet = RegOpenKeyExW(hKeySrc, lpszSrcSubKey, 0, KEY_ALL_ACCESS, &hKeySrc);
2279
2280 if(dwRet)
2281 hKeyDst = NULL; /* Don't close this key since we didn't open it */
2282 else
2283 {
2284 /* Get details about sub keys and values */
2285 dwRet = RegQueryInfoKeyW(hKeySrc, NULL, NULL, NULL, &dwKeyCount, &dwMaxKeyLen,
2286 NULL, &dwValueCount, &dwMaxValueLen, &dwMaxDataLen,
2287 NULL, NULL);
2288 if(!dwRet)
2289 {
2290 if (dwMaxValueLen > dwMaxKeyLen)
2291 dwMaxKeyLen = dwMaxValueLen; /* Get max size for key/value names */
2292
2293 if (dwMaxKeyLen++ > MAX_PATH - 1)
2294 lpszName = HeapAlloc(GetProcessHeap(), 0, dwMaxKeyLen * sizeof(WCHAR));
2295
2296 if (dwMaxDataLen > sizeof(buff))
2297 lpBuff = HeapAlloc(GetProcessHeap(), 0, dwMaxDataLen);
2298
2299 if (!lpszName || !lpBuff)
2301 }
2302 }
2303 }
2304
2305 /* Copy all the sub keys */
2306 for(i = 0; i < dwKeyCount && !dwRet; i++)
2307 {
2308 HKEY hSubKeySrc, hSubKeyDst;
2309 DWORD dwSize = dwMaxKeyLen;
2310
2311 dwRet = RegEnumKeyExW(hKeySrc, i, lpszName, &dwSize, NULL, NULL, NULL, NULL);
2312
2313 if(!dwRet)
2314 {
2315 /* Open source sub key */
2316 dwRet = RegOpenKeyExW(hKeySrc, lpszName, 0, KEY_READ, &hSubKeySrc);
2317
2318 if(!dwRet)
2319 {
2320 /* Create destination sub key */
2321 dwRet = RegCreateKeyW(hKeyDst, lpszName, &hSubKeyDst);
2322
2323 if(!dwRet)
2324 {
2325 /* Recursively copy keys and values from the sub key */
2326 dwRet = SHCopyKeyW(hSubKeySrc, NULL, hSubKeyDst, 0);
2327 RegCloseKey(hSubKeyDst);
2328 }
2329 }
2330 RegCloseKey(hSubKeySrc);
2331 }
2332 }
2333
2334 /* Copy all the values in this key */
2335 for (i = 0; i < dwValueCount && !dwRet; i++)
2336 {
2337 DWORD dwNameSize = dwMaxKeyLen, dwType, dwLen = dwMaxDataLen;
2338
2339 dwRet = RegEnumValueW(hKeySrc, i, lpszName, &dwNameSize, NULL, &dwType, lpBuff, &dwLen);
2340
2341 if (!dwRet)
2342 dwRet = SHSetValueW(hKeyDst, NULL, lpszName, dwType, lpBuff, dwLen);
2343 }
2344
2345 /* Free buffers if allocated */
2346 if (lpszName != szName)
2347 HeapFree(GetProcessHeap(), 0, lpszName);
2348 if (lpBuff != buff)
2349 HeapFree(GetProcessHeap(), 0, lpBuff);
2350
2351 if (lpszSrcSubKey && hKeyDst)
2352 RegCloseKey(hKeyDst);
2353 return dwRet;
2354}
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
Definition: reg.c:2504
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
Definition: reg.c:2830
LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
Definition: reg.c:3662
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1201
DWORD WINAPI SHSetValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue, DWORD dwType, LPCVOID pvData, DWORD cbData)
Definition: reg.c:1306
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
#define KEY_ALL_ACCESS
Definition: nt_native.h:1044
#define KEY_READ
Definition: nt_native.h:1026
static const WCHAR szName[]
Definition: powrprof.c:45

Referenced by COpenWithList::SetDefaultHandler(), SHCopyKeyA(), and SHCopyKeyW().

◆ SHCreateMemStream()

WINSHLWAPI struct IStream *WINAPI SHCreateMemStream ( const BYTE lpbData,
UINT  dwDataLen 
)

Definition at line 652 of file regstream.c.

653{
654 ISHRegStream *strm = NULL;
655 LPBYTE lpbDup;
656
657 TRACE("(%p,%d)\n", lpbData, dwDataLen);
658
659 if (!lpbData)
660 dwDataLen = 0;
661
662 lpbDup = HeapAlloc(GetProcessHeap(), 0, dwDataLen);
663
664 if (lpbDup)
665 {
666 memcpy(lpbDup, lpbData, dwDataLen);
667 strm = IStream_Create(NULL, lpbDup, dwDataLen);
668
669 if (!strm)
670 HeapFree(GetProcessHeap(), 0, lpbDup);
671 }
672#ifdef __REACTOS__
673 if (!strm)
674 return NULL;
675#endif
676 return &strm->IStream_iface;
677}
static ISHRegStream * IStream_Create(HKEY hKey, LPBYTE pbBuffer, DWORD dwLength)
Definition: regstream.c:441
IStream IStream_iface
Definition: regstream.c:40
unsigned char * LPBYTE
Definition: typedefs.h:53

Referenced by CDesktopUpgradePropertyBag::_NewStreamFromOld(), CRegPropertyBag::_ReadStream(), create_decoder(), MSSTYLES_TryLoadPng(), CDefView::SaveViewState(), SHPropertyBag_OnRegKey(), test_load(), test_persiststream(), test_SHCreateMemStream(), and test_transformNodeToObject().

◆ SHCreateShellPalette()

WINSHLWAPI HPALETTE WINAPI SHCreateShellPalette ( HDC  hdc)

Definition at line 4615 of file ordinal.c.

4616{
4617 FIXME("stub\n");
4618 return CreateHalftonePalette(hdc);
4619}
HPALETTE WINAPI CreateHalftonePalette(_In_opt_ HDC)

◆ SHCreateStreamOnFileA()

WINSHLWAPI HRESULT WINAPI SHCreateStreamOnFileA ( LPCSTR  lpszPath,
DWORD  dwMode,
struct IStream **  lppStream 
)

Definition at line 512 of file istream.c.

514{
516
517 TRACE("(%s,%d,%p)\n", debugstr_a(lpszPath), dwMode, lppStream);
518
519 if (!lpszPath)
521
522 MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, szPath, MAX_PATH);
523 return SHCreateStreamOnFileW(szPath, dwMode, lppStream);
524}
HRESULT WINAPI SHCreateStreamOnFileW(LPCWSTR lpszPath, DWORD dwMode, IStream **lppStream)
Definition: istream.c:484
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
Definition: winerror.h:210
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:228

Referenced by test_SHCreateStreamOnFileA().

◆ SHCreateStreamOnFileEx()

WINSHLWAPI HRESULT WINAPI SHCreateStreamOnFileEx ( LPCWSTR  lpszPath,
DWORD  dwMode,
DWORD  dwAttributes,
BOOL  bCreate,
struct IStream lpTemplate,
struct IStream **  lppStream 
)

Definition at line 401 of file istream.c.

404{
405 DWORD dwAccess, dwShare, dwCreate;
407
408 TRACE("(%s,%d,0x%08X,%d,%p,%p)\n", debugstr_w(lpszPath), dwMode,
409 dwAttributes, bCreate, lpTemplate, lppStream);
410
411 if (!lpszPath || !lppStream || lpTemplate)
412 return E_INVALIDARG;
413
414 *lppStream = NULL;
415
416 /* Access */
417 switch (STGM_ACCESS_MODE(dwMode))
418 {
419 case STGM_WRITE:
420 case STGM_READWRITE:
421 dwAccess = GENERIC_READ|GENERIC_WRITE;
422 break;
423 case STGM_READ:
424 dwAccess = GENERIC_READ;
425 break;
426 default:
427 return E_INVALIDARG;
428 }
429
430 /* Sharing */
431 switch (STGM_SHARE_MODE(dwMode))
432 {
433 case 0:
436 break;
438 dwShare = FILE_SHARE_WRITE;
439 break;
441 dwShare = FILE_SHARE_READ;
442 break;
444 dwShare = 0;
445 break;
446 default:
447 return E_INVALIDARG;
448 }
449
450 switch(STGM_CREATE_MODE(dwMode))
451 {
452 case STGM_FAILIFTHERE:
453 dwCreate = bCreate ? CREATE_NEW : OPEN_EXISTING;
454 break;
455 case STGM_CREATE:
456 dwCreate = CREATE_ALWAYS;
457 break;
458 default:
459 return E_INVALIDARG;
460 }
461
462 /* Open HANDLE to file */
463 hFile = CreateFileW(lpszPath, dwAccess, dwShare, NULL, dwCreate,
464 dwAttributes, 0);
465
468
469 *lppStream = IStream_Create(lpszPath, hFile, dwMode);
470
471 if(!*lppStream)
472 {
474 return E_OUTOFMEMORY;
475 }
476 return S_OK;
477}
#define CloseHandle
Definition: compat.h:739
#define OPEN_EXISTING
Definition: compat.h:775
#define GENERIC_READ
Definition: compat.h:135
#define CreateFileW
Definition: compat.h:741
#define FILE_SHARE_READ
Definition: compat.h:136
static IStream * IStream_Create(LPCWSTR lpszPath, HANDLE hFile, DWORD dwMode)
Definition: istream.c:362
#define STGM_CREATE_MODE(stgm)
Definition: istream.c:39
#define STGM_SHARE_MODE(stgm)
Definition: istream.c:38
#define STGM_ACCESS_MODE(stgm)
Definition: istream.c:37
#define CREATE_ALWAYS
Definition: disk.h:72
#define CREATE_NEW
Definition: disk.h:69
_In_ HANDLE hFile
Definition: mswsock.h:90
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define GENERIC_WRITE
Definition: nt_native.h:90
#define STGM_CREATE
Definition: objbase.h:926
#define STGM_SHARE_DENY_NONE
Definition: objbase.h:920
#define STGM_READWRITE
Definition: objbase.h:919
#define STGM_SHARE_EXCLUSIVE
Definition: objbase.h:923
#define STGM_FAILIFTHERE
Definition: objbase.h:928
#define STGM_SHARE_DENY_WRITE
Definition: objbase.h:922
#define STGM_WRITE
Definition: objbase.h:918
#define STGM_READ
Definition: objbase.h:917
#define STGM_SHARE_DENY_READ
Definition: objbase.h:921
_In_ int _In_ BOOL bCreate
Definition: shlobj.h:1525
DWORD dwAttributes
Definition: vdmdbg.h:34

Referenced by DoLoadPicture(), OpenStreamOnFile(), SHCreateStreamOnFileW(), test_SHCreateStreamOnFileEx(), and test_SHCreateStreamOnFileEx_CopyTo().

◆ SHCreateStreamOnFileW()

WINSHLWAPI HRESULT WINAPI SHCreateStreamOnFileW ( LPCWSTR  lpszPath,
DWORD  dwMode,
struct IStream **  lppStream 
)

Definition at line 484 of file istream.c.

486{
487 TRACE("(%s,%d,%p)\n", debugstr_w(lpszPath), dwMode, lppStream);
488
489 if (!lpszPath || !lppStream)
490 return E_INVALIDARG;
491
493 return E_INVALIDARG;
494
495 return SHCreateStreamOnFileEx(lpszPath, dwMode, 0, FALSE, NULL, lppStream);
496}
HRESULT WINAPI SHCreateStreamOnFileEx(LPCWSTR lpszPath, DWORD dwMode, DWORD dwAttributes, BOOL bCreate, IStream *lpTemplate, IStream **lppStream)
Definition: istream.c:401
#define STGM_CONVERT
Definition: objbase.h:927
#define STGM_TRANSACTED
Definition: objbase.h:915
#define STGM_DELETEONRELEASE
Definition: objbase.h:925

Referenced by dump_stream_to_file(), GdipCreateStreamOnFile(), IWICStreamImpl_InitializeFromFilename(), CShellLink::Load(), Open(), parse_config_file(), CShellLink::Save(), SHCreateStreamOnFileA(), and test_SHCreateStreamOnFileW().

◆ SHCreateStreamWrapper()

WINSHLWAPI HRESULT WINAPI SHCreateStreamWrapper ( LPBYTE  lpbData,
DWORD  dwDataLen,
DWORD  dwReserved,
struct IStream **  lppStream 
)

Definition at line 698 of file regstream.c.

700{
701 ISHRegStream *strm;
702
703 if (lppStream)
704 *lppStream = NULL;
705
706 if(dwReserved || !lppStream)
707 return E_INVALIDARG;
708
709 strm = IStream_Create(NULL, lpbData, dwDataLen);
710
711 if(!strm)
712 return E_OUTOFMEMORY;
713
714 IStream_QueryInterface(&strm->IStream_iface, &IID_IStream, (void**)lppStream);
715 IStream_Release(&strm->IStream_iface);
716 return S_OK;
717}

◆ SHCreateThread()

WINSHLWAPI BOOL WINAPI SHCreateThread ( LPTHREAD_START_ROUTINE  pfnThreadProc,
void pData,
DWORD  dwFlags,
LPTHREAD_START_ROUTINE  pfnCallback 
)

Definition at line 356 of file thread.c.

358{
360 BOOL bCalled = FALSE;
361
362 TRACE("(%p,%p,0x%X,%p)\n", pfnThreadProc, pData, dwFlags, pfnCallback);
363
364 /* Set up data to pass to the new thread (On our stack) */
365 ti.pfnThreadProc = pfnThreadProc;
367 ti.pData = pData;
368 ti.bInitCom = (dwFlags & CTF_COINIT) != 0;
370
371 /* Hold references to the current thread and IE process, if desired */
374 else
375 ti.refThread = NULL;
376
379 else
380 ti.refIE = NULL;
381
382 /* Create the thread */
383 if(ti.hEvent)
384 {
385 DWORD dwRetVal;
387
388 hThread = CreateThread(NULL, 0, SHLWAPI_ThreadWrapper, &ti, 0, &dwRetVal);
389
390 if(hThread)
391 {
392 /* Wait for the thread to signal us to continue */
395 bCalled = TRUE;
396 }
398 }
399
400 if (!bCalled)
401 {
402 if (!ti.pfnCallback && dwFlags & CTF_INSIST)
403 {
404 /* Couldn't call, call synchronously */
405 pfnThreadProc(pData);
406 bCalled = TRUE;
407 }
408 else
409 {
410 /* Free references, since thread hasn't run to do so */
411 if(ti.refThread)
412 IUnknown_Release(ti.refThread);
413
414 if(ti.refIE)
415 IUnknown_Release(ti.refIE);
416 }
417 }
418 return bCalled;
419}
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
static DWORD WINAPI SHLWAPI_ThreadWrapper(PVOID pTi)
Definition: thread.c:290
HRESULT WINAPI _SHGetInstanceExplorer(IUnknown **lppUnknown)
Definition: thread.c:104
HRESULT WINAPI SHGetThreadRef(IUnknown **lppUnknown)
Definition: thread.c:228
#define INFINITE
Definition: serial.h:102
HANDLE hThread
Definition: wizard.c:28
_In_opt_ void _In_ DWORD _In_opt_ LPTHREAD_START_ROUTINE pfnCallback
Definition: shlwapi.h:66
IUnknown * refThread
Definition: thread.c:119
LPTHREAD_START_ROUTINE pfnThreadProc
Definition: thread.c:114
LPTHREAD_START_ROUTINE pfnCallback
Definition: thread.c:115
IUnknown * refIE
Definition: thread.c:120
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830

Referenced by CRecyclerDropTarget::_DoDeleteAsync(), DoFormatDriveAsync(), CFSDropTarget::Drop(), EnableCommandIfVerbExists(), CCabFolder::ExtractFilesUI(), FormatDriveDlg(), CFileDefExt::InitFileAttr(), CFileDefExt::InitMultifilePage(), ShellPropSheetDialog::ShowAsync(), ShowFolderOptionsDialog(), CFindFolder::StartSearch(), and UIDlgProc().

◆ SHCreateThreadRef()

WINSHLWAPI HRESULT WINAPI SHCreateThreadRef ( LONG lprefcount,
IUnknown **  lppUnknown 
)

Definition at line 198 of file thread.c.

199{
200 threadref * This;
201 TRACE("(%p, %p)\n", lprefcount, lppUnknown);
202
203 if (!lprefcount || !lppUnknown)
204 return E_INVALIDARG;
205
206 This = HeapAlloc(GetProcessHeap(), 0, sizeof(threadref));
207 This->IUnknown_iface.lpVtbl = &threadref_vt;
208 This->ref = lprefcount;
209
210 *lprefcount = 1;
211 *lppUnknown = &This->IUnknown_iface;
212 TRACE("=> returning S_OK with %p\n", This);
213 return S_OK;
214}
static const IUnknownVtbl threadref_vt
Definition: thread.c:178

Referenced by SHCreateFromDesktop().

◆ SHDeleteEmptyKeyA()

WINSHLWAPI DWORD WINAPI SHDeleteEmptyKeyA ( HKEY  hKey,
LPCSTR  lpszSubKey 
)

Definition at line 1608 of file reg.c.

1609{
1610 DWORD dwRet, dwKeyCount = 0;
1611 HKEY hSubKey = 0;
1612
1613 TRACE("(hkey=%p,%s)\n", hKey, debugstr_a(lpszSubKey));
1614
1615 dwRet = RegOpenKeyExA(hKey, lpszSubKey, 0, KEY_READ, &hSubKey);
1616 if(!dwRet)
1617 {
1618 dwRet = RegQueryInfoKeyA(hSubKey, NULL, NULL, NULL, &dwKeyCount,
1619 NULL, NULL, NULL, NULL, NULL, NULL, NULL);
1620 RegCloseKey(hSubKey);
1621 if(!dwRet)
1622 {
1623 if (!dwKeyCount)
1624 dwRet = RegDeleteKeyA(hKey, lpszSubKey);
1625 else
1626 dwRet = ERROR_KEY_HAS_CHILDREN;
1627 }
1628 }
1629 return dwRet;
1630}
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
Definition: reg.c:3298
LONG WINAPI RegQueryInfoKeyA(HKEY hKey, LPSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
Definition: reg.c:3583
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
Definition: reg.c:1224
#define ERROR_KEY_HAS_CHILDREN
Definition: winerror.h:923

◆ SHDeleteEmptyKeyW()

WINSHLWAPI DWORD WINAPI SHDeleteEmptyKeyW ( HKEY  hKey,
LPCWSTR  lpszSubKey 
)

Definition at line 1637 of file reg.c.

1638{
1639 DWORD dwRet, dwKeyCount = 0;
1640 HKEY hSubKey = 0;
1641
1642 TRACE("(hkey=%p, %s)\n", hKey, debugstr_w(lpszSubKey));
1643
1644 dwRet = RegOpenKeyExW(hKey, lpszSubKey, 0, KEY_READ, &hSubKey);
1645 if(!dwRet)
1646 {
1647 dwRet = RegQueryInfoKeyW(hSubKey, NULL, NULL, NULL, &dwKeyCount,
1648 NULL, NULL, NULL, NULL, NULL, NULL, NULL);
1649 RegCloseKey(hSubKey);
1650 if(!dwRet)
1651 {
1652 if (!dwKeyCount)
1653 dwRet = RegDeleteKeyW(hKey, lpszSubKey);
1654 else
1655 dwRet = ERROR_KEY_HAS_CHILDREN;
1656 }
1657 }
1658 return dwRet;
1659}
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
Definition: reg.c:1239

◆ SHDeleteKeyA()

WINSHLWAPI DWORD WINAPI SHDeleteKeyA ( HKEY  hKey,
LPCSTR  lpszSubKey 
)

Definition at line 1533 of file reg.c.

1534{
1535 WCHAR subkeyW[MAX_PATH];
1536
1537 MultiByteToWideChar (CP_ACP, 0, lpszSubKey, -1, subkeyW, sizeof(subkeyW)/sizeof(WCHAR));
1538 return SHDeleteKeyW(hKey, subkeyW);
1539}
DWORD WINAPI SHDeleteKeyW(HKEY hKey, LPCWSTR lpszSubKey)
Definition: reg.c:1546

Referenced by delete_key(), test_getstring_no_extra(), test_SHCopyKey(), test_SHDeleteKey(), and testRegStore().

◆ SHDeleteKeyW()

WINSHLWAPI DWORD WINAPI SHDeleteKeyW ( HKEY  hKey,
LPCWSTR  lpszSubKey 
)

Definition at line 1546 of file reg.c.

1547{
1548 DWORD dwRet, dwMaxSubkeyLen = 0, dwSize;
1549 WCHAR szNameBuf[MAX_PATH], *lpszName = szNameBuf;
1550 HKEY hSubKey = 0;
1551
1552 TRACE("(hkey=%p,%s)\n", hKey, debugstr_w(lpszSubKey));
1553
1554 dwRet = RegOpenKeyExW(hKey, lpszSubKey, 0, KEY_READ, &hSubKey);
1555 if(!dwRet)
1556 {
1557 /* Find the maximum subkey length so that we can allocate a buffer */
1558 dwRet = RegQueryInfoKeyW(hSubKey, NULL, NULL, NULL, NULL,
1559 &dwMaxSubkeyLen, NULL, NULL, NULL, NULL, NULL, NULL);
1560 if(!dwRet)
1561 {
1562 dwMaxSubkeyLen++;
1563 if (dwMaxSubkeyLen > sizeof(szNameBuf)/sizeof(WCHAR))
1564 /* Name too big: alloc a buffer for it */
1565 lpszName = HeapAlloc(GetProcessHeap(), 0, dwMaxSubkeyLen*sizeof(WCHAR));
1566
1567 if(!lpszName)
1569 else
1570 {
1571 while (dwRet == ERROR_SUCCESS)
1572 {
1573 dwSize = dwMaxSubkeyLen;
1574 dwRet = RegEnumKeyExW(hSubKey, 0, lpszName, &dwSize, NULL, NULL, NULL, NULL);
1575 if (dwRet == ERROR_SUCCESS || dwRet == ERROR_MORE_DATA)
1576 dwRet = SHDeleteKeyW(hSubKey, lpszName);
1577 }
1578 if (dwRet == ERROR_NO_MORE_ITEMS)
1579 dwRet = ERROR_SUCCESS;
1580
1581 if (lpszName != szNameBuf)
1582 HeapFree(GetProcessHeap(), 0, lpszName); /* Free buffer if allocated */
1583 }
1584 }
1585
1586 RegCloseKey(hSubKey);
1587 if(!dwRet)
1588 dwRet = RegDeleteKeyW(hKey, lpszSubKey);
1589 }
1590 return dwRet;
1591}
#define ERROR_MORE_DATA
Definition: dderror.h:13
#define ERROR_SUCCESS
Definition: deptool.c:10
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:105

Referenced by CMruNode::_DeleteValue(), DeleteExt(), EditTypeDlg_WriteClass(), HandleMruData(), MRUList_DataList(), MRUList_PidlList(), PNP_DeleteClassKey(), SHAddToRecentDocs(), SHDeleteKeyA(), and SHDeleteKeyW().

◆ SHDeleteOrphanKeyA()

WINSHLWAPI DWORD WINAPI SHDeleteOrphanKeyA ( HKEY  hKey,
LPCSTR  lpszSubKey 
)

Definition at line 1674 of file reg.c.

1675{
1676 HKEY hSubKey;
1677 DWORD dwKeyCount = 0, dwValueCount = 0, dwRet;
1678
1679 TRACE("(hkey=%p,%s)\n", hKey, debugstr_a(lpszSubKey));
1680
1681 dwRet = RegOpenKeyExA(hKey, lpszSubKey, 0, KEY_READ, &hSubKey);
1682
1683 if(!dwRet)
1684 {
1685 /* Get subkey and value count */
1686 dwRet = RegQueryInfoKeyA(hSubKey, NULL, NULL, NULL, &dwKeyCount,
1687 NULL, NULL, &dwValueCount, NULL, NULL, NULL, NULL);
1688
1689 if(!dwRet && !dwKeyCount && !dwValueCount)
1690 {
1691 dwRet = RegDeleteKeyA(hKey, lpszSubKey);
1692 }
1693 RegCloseKey(hSubKey);
1694 }
1695 return dwRet;
1696}

Referenced by UnregisterExtensionForMIMETypeA().

◆ SHDeleteOrphanKeyW()

WINSHLWAPI DWORD WINAPI SHDeleteOrphanKeyW ( HKEY  hKey,
LPCWSTR  lpszSubKey 
)

Definition at line 1703 of file reg.c.

1704{
1705 HKEY hSubKey;
1706 DWORD dwKeyCount = 0, dwValueCount = 0, dwRet;
1707
1708 TRACE("(hkey=%p,%s)\n", hKey, debugstr_w(lpszSubKey));
1709
1710 dwRet = RegOpenKeyExW(hKey, lpszSubKey, 0, KEY_READ, &hSubKey);
1711
1712 if(!dwRet)
1713 {
1714 /* Get subkey and value count */
1715 dwRet = RegQueryInfoKeyW(hSubKey, NULL, NULL, NULL, &dwKeyCount,
1716 NULL, NULL, &dwValueCount, NULL, NULL, NULL, NULL);
1717
1718 if(!dwRet && !dwKeyCount && !dwValueCount)
1719 {
1720 dwRet = RegDeleteKeyW(hKey, lpszSubKey);
1721 }
1722 RegCloseKey(hSubKey);
1723 }
1724 return dwRet;
1725}

Referenced by UnregisterExtensionForMIMETypeW().

◆ SHDeleteValueA()

WINSHLWAPI DWORD WINAPI SHDeleteValueA ( HKEY  hKey,
LPCSTR  lpszSubKey,
LPCSTR  lpszValue 
)

Definition at line 1741 of file reg.c.

1742{
1743 DWORD dwRet;
1744 HKEY hSubKey;
1745
1746 TRACE("(hkey=%p,%s,%s)\n", hKey, debugstr_a(lpszSubKey), debugstr_a(lpszValue));
1747
1748 dwRet = RegOpenKeyExA(hKey, lpszSubKey, 0, KEY_SET_VALUE, &hSubKey);
1749 if (!dwRet)
1750 {
1751 dwRet = RegDeleteValueA(hSubKey, lpszValue);
1752 RegCloseKey(hSubKey);
1753 }
1754 return dwRet;
1755}
LONG WINAPI RegDeleteValueA(HKEY hKey, LPCSTR lpValueName)
Definition: reg.c:2287
#define KEY_SET_VALUE
Definition: nt_native.h:1020

Referenced by test_objecttag(), UnregisterExtensionForMIMETypeA(), and UnregisterMIMETypeForExtensionA().

◆ SHDeleteValueW()

WINSHLWAPI DWORD WINAPI SHDeleteValueW ( HKEY  hKey,
LPCWSTR  lpszSubKey,
LPCWSTR  lpszValue 
)

Definition at line 1762 of file reg.c.

1763{
1764 DWORD dwRet;
1765 HKEY hSubKey;
1766
1767 TRACE("(hkey=%p,%s,%s)\n", hKey, debugstr_w(lpszSubKey), debugstr_w(lpszValue));
1768
1769 dwRet = RegOpenKeyExW(hKey, lpszSubKey, 0, KEY_SET_VALUE, &hSubKey);
1770 if (!dwRet)
1771 {
1772 dwRet = RegDeleteValueW(hSubKey, lpszValue);
1773 RegCloseKey(hSubKey);
1774 }
1775 return dwRet;
1776}
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
Definition: reg.c:2330

Referenced by CMruBase::_DeleteValue(), CMruLongList::_ImportShortList(), MRUList_DataList(), CGlobalFolderSettings::Save(), CRegFolder::SetNameOf(), UnregisterExtensionForMIMETypeW(), UnregisterMIMETypeForExtensionW(), and CRegPropertyBag::Write().

◆ SHEnumKeyExA()

WINSHLWAPI LONG WINAPI SHEnumKeyExA ( HKEY  hKey,
DWORD  dwIndex,
LPSTR  lpszSubKey,
LPDWORD  pwLen 
)

Definition at line 1793 of file reg.c.

1795{
1796 TRACE("(hkey=%p,%d,%s,%p)\n", hKey, dwIndex, debugstr_a(lpszSubKey), pwLen);
1797
1798 return RegEnumKeyExA(hKey, dwIndex, lpszSubKey, pwLen, NULL, NULL, NULL, NULL);
1799}
LONG WINAPI RegEnumKeyExA(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
Definition: reg.c:2419

◆ SHEnumKeyExW()

WINSHLWAPI LONG WINAPI SHEnumKeyExW ( HKEY  hKey,
DWORD  dwIndex,
LPWSTR  lpszSubKey,
LPDWORD  pwLen 
)

Definition at line 1806 of file reg.c.

1808{
1809 TRACE("(hkey=%p,%d,%s,%p)\n", hKey, dwIndex, debugstr_w(lpszSubKey), pwLen);
1810
1811 return RegEnumKeyExW(hKey, dwIndex, lpszSubKey, pwLen, NULL, NULL, NULL, NULL);
1812}

◆ SHEnumValueA()

WINSHLWAPI LONG WINAPI SHEnumValueA ( HKEY  hKey,
DWORD  dwIndex,
LPSTR  lpszValue,
LPDWORD  pwLen,
LPDWORD  pwType,
LPVOID  pvData,
LPDWORD  pcbData 
)

Definition at line 1832 of file reg.c.

1835{
1836 TRACE("(hkey=%p,%d,%s,%p,%p,%p,%p)\n", hKey, dwIndex,
1837 debugstr_a(lpszValue), pwLen, pwType, pvData, pcbData);
1838
1839 return RegEnumValueA(hKey, dwIndex, lpszValue, pwLen, NULL,
1840 pwType, pvData, pcbData);
1841}
LONG WINAPI RegEnumValueA(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpdwReserved, _Out_opt_ LPDWORD lpdwType, _Out_opt_ LPBYTE lpData, _Inout_opt_ LPDWORD lpcbData)
Definition: reg.c:2668
_In_ LPWSTR _In_ DWORD _In_ LPCVOID pvData
Definition: netsh.h:116
_In_ _Out_writes_opt_ pcchValueName _Inout_opt_ LPDWORD _Out_opt_ _Out_writes_bytes_to_opt_ pcbData _Inout_opt_ LPDWORD pcbData
Definition: shlwapi.h:757

◆ SHEnumValueW()

WINSHLWAPI LONG WINAPI SHEnumValueW ( HKEY  hKey,
DWORD  dwIndex,
LPWSTR  lpszValue,
LPDWORD  pwLen,
LPDWORD  pwType,
LPVOID  pvData,
LPDWORD  pcbData 
)

Definition at line 1848 of file reg.c.

1851{
1852 TRACE("(hkey=%p,%d,%s,%p,%p,%p,%p)\n", hKey, dwIndex,
1853 debugstr_w(lpszValue), pwLen, pwType, pvData, pcbData);
1854
1855 return RegEnumValueW(hKey, dwIndex, lpszValue, pwLen, NULL,
1856 pwType, pvData, pcbData);
1857}

◆ SHFormatDateTimeA()

WINSHLWAPI int WINAPI SHFormatDateTimeA ( const FILETIME filetime,
DWORD flags,
LPSTR  buffer,
UINT  size 
)

◆ SHFormatDateTimeW()

WINSHLWAPI int WINAPI SHFormatDateTimeW ( const FILETIME filetime,
DWORD flags,
LPWSTR  buffer,
UINT  size 
)

◆ SHFreeShared()

WINSHLWAPI BOOL WINAPI SHFreeShared ( HANDLE  handle,
DWORD  pid 
)

Definition at line 315 of file ordinal.c.

316{
317 HANDLE hClose;
318
319 TRACE("(%p %d)\n", hShared, dwProcId);
320
321 if (!hShared)
322 return TRUE;
323
324 /* Get a copy of the handle for our process, closing the source handle */
325 hClose = SHMapHandle(hShared, dwProcId, GetCurrentProcessId(),
327 /* Close local copy */
328 return CloseHandle(hClose);
329}
HANDLE WINAPI SHMapHandle(HANDLE hShared, DWORD dwSrcProcId, DWORD dwDstProcId, DWORD dwAccess, DWORD dwOptions)
Definition: ordinal.c:98
#define FILE_MAP_ALL_ACCESS
Definition: winbase.h:158
DWORD WINAPI GetCurrentProcessId(void)
Definition: proc.c:1158
#define DUPLICATE_CLOSE_SOURCE

Referenced by _ILReadFromSharedMemory(), AppBar_CopyIn(), AppBar_CopyOut(), CreateNotificationParam(), CreateRegistrationParam(), init_pointers(), MakeSharedPacket(), CChangeNotifyServer::OnDeliverNotification(), ParseSharedPacket(), and SHChangeNotifyRegister().

◆ SHGetThreadRef()

WINSHLWAPI HRESULT WINAPI SHGetThreadRef ( IUnknown **  lppUnknown)

Definition at line 228 of file thread.c.

229{
230 TRACE("(%p)\n", lppUnknown);
231
233 return E_NOINTERFACE;
234
236 if (!*lppUnknown)
237 return E_NOINTERFACE;
238
239 /* Add a reference. Caller will Release() us when finished */
240 IUnknown_AddRef(*lppUnknown);
241 return S_OK;
242}
LPVOID WINAPI TlsGetValue(IN DWORD Index)
Definition: thread.c:1240
DWORD SHLWAPI_ThreadRef_index
Definition: shlwapi_main.c:34
#define TLS_OUT_OF_INDEXES
Definition: winbase.h:529

Referenced by SHCreateThread().

◆ SHGetValueA()

WINSHLWAPI DWORD WINAPI SHGetValueA ( HKEY  hKey,
LPCSTR  lpszSubKey,
LPCSTR  lpszValue,
LPDWORD  pwType,
LPVOID  pvData,
LPDWORD  pcbData 
)

Definition at line 1207 of file reg.c.

1209{
1210 DWORD dwRet = 0;
1211 HKEY hSubKey = 0;
1212
1213 TRACE("(hkey=%p,%s,%s,%p,%p,%p)\n", hKey, debugstr_a(lpszSubKey),
1214 debugstr_a(lpszValue), pwType, pvData, pcbData);
1215
1216 /* lpszSubKey can be 0. In this case the value is taken from the
1217 * current key.
1218 */
1219 if(lpszSubKey)
1220 dwRet = RegOpenKeyExA(hKey, lpszSubKey, 0, KEY_QUERY_VALUE, &hSubKey);
1221
1222 if (! dwRet)
1223 {
1224 /* SHQueryValueEx expands Environment strings */
1225 dwRet = SHQueryValueExA(hSubKey ? hSubKey : hKey, lpszValue, 0, pwType, pvData, pcbData);
1226 if (hSubKey) RegCloseKey(hSubKey);
1227 }
1228 return dwRet;
1229}
DWORD WINAPI SHQueryValueExA(HKEY hKey, LPCSTR lpszValue, LPDWORD lpReserved, LPDWORD pwType, LPVOID pvData, LPDWORD pcbData)
Definition: reg.c:1402

Referenced by getregdw(), MIME_GetExtensionA(), PathIsContentTypeA(), SHGetValueGoodBootA(), SHLWAPI_GetMappedFlags(), SHLWAPI_GetRegistryCompatFlags(), SHLWAPI_UseSystemForSystemFolders(), SHRegGetPathA(), and test_SHGetValue().

◆ SHGetValueW()

WINSHLWAPI DWORD WINAPI SHGetValueW ( HKEY  hKey,
LPCWSTR  lpszSubKey,
LPCWSTR  lpszValue,
LPDWORD  pwType,
LPVOID  pvData,
LPDWORD  pcbData 
)

◆ SHGetViewStatePropertyBag()

WINSHLWAPI HRESULT WINAPI SHGetViewStatePropertyBag ( PCIDLIST_ABSOLUTE  pidl,
PCWSTR  bagname,
DWORD  flags,
REFIID  riid,
void **  ppv 
)

◆ SHIsLowMemoryMachine()

WINSHLWAPI BOOL WINAPI SHIsLowMemoryMachine ( DWORD  type)

Definition at line 4667 of file ordinal.c.

4668{
4669#ifdef __REACTOS__
4671 static int is_low = -1;
4672 TRACE("(0x%08x)\n", dwType);
4673 if (dwType == 0 && is_low == -1)
4674 {
4676 is_low = (status.dwTotalPhys <= 0x1000000);
4677 }
4678 return is_low;
4679#else
4680 FIXME("(0x%08x) stub\n", dwType);
4681 return FALSE;
4682#endif
4683}
VOID NTAPI GlobalMemoryStatus(LPMEMORYSTATUS lpBuffer)
Definition: heapmem.c:1365
Definition: ps.c:97

◆ SHLoadIndirectString()

WINSHLWAPI HRESULT WINAPI SHLoadIndirectString ( LPCWSTR  ,
LPWSTR  ,
UINT  ,
PVOID  
)

◆ SHLockShared()

WINSHLWAPI void *WINAPI SHLockShared ( HANDLE  handle,
DWORD  pid 
)

Definition at line 259 of file ordinal.c.

260{
261#ifdef __REACTOS__
262 return SHLockSharedEx(hShared, dwProcId, TRUE);
263#else
264 HANDLE hDup;
265 LPVOID pMapped;
266
267 TRACE("(%p %d)\n", hShared, dwProcId);
268
269 /* Get handle to shared memory for current process */
270 hDup = SHMapHandle(hShared, dwProcId, GetCurrentProcessId(), FILE_MAP_ALL_ACCESS, 0);
271
272 /* Get View */
273 pMapped = MapViewOfFile(hDup, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
274 CloseHandle(hDup);
275
276 if (pMapped)
277 return (char *) pMapped + sizeof(DWORD); /* Hide size */
278 return NULL;
279#endif
280}
#define FILE_MAP_READ
Definition: compat.h:776
#define MapViewOfFile
Definition: compat.h:745
#define DWORD
Definition: nt_native.h:44
PVOID WINAPI SHLockSharedEx(HANDLE hData, DWORD dwProcessId, BOOL bWriteAccess)
#define FILE_MAP_WRITE
Definition: winbase.h:156

Referenced by _ILReadFromSharedMemory(), AppBar_CopyIn(), AppBar_CopyOut(), AppBar_LockOutput(), init_pointers(), MakeSharedPacket(), ParseSharedPacket(), and SHELL_ArgifyW().

◆ SHOpenRegStream2A()

WINSHLWAPI struct IStream *WINAPI SHOpenRegStream2A ( HKEY  hKey,
LPCSTR  pszSubkey,
LPCSTR  pszValue,
DWORD  dwMode 
)

Definition at line 478 of file regstream.c.

480{
481 ISHRegStream *tmp;
482 HKEY hStrKey = NULL;
483 LPBYTE lpBuff = NULL;
484 DWORD dwLength = 0;
485 LONG ret;
486
487 TRACE("(%p,%s,%s,0x%08x)\n", hKey, pszSubkey, pszValue, dwMode);
488
489 if (dwMode == STGM_READ)
490 ret = RegOpenKeyExA(hKey, pszSubkey, 0, KEY_READ, &hStrKey);
491 else /* in write mode we make sure the subkey exits */
492 ret = RegCreateKeyExA(hKey, pszSubkey, 0, NULL, 0, KEY_READ | KEY_WRITE, NULL, &hStrKey, NULL);
493
494 if (ret == ERROR_SUCCESS)
495 {
496 if (dwMode == STGM_READ || dwMode == STGM_READWRITE)
497 {
498 /* read initial data */
499 ret = RegQueryValueExA(hStrKey, pszValue, 0, 0, 0, &dwLength);
500 if (ret == ERROR_SUCCESS && dwLength)
501 {
502 lpBuff = HeapAlloc(GetProcessHeap(), 0, dwLength);
503 RegQueryValueExA(hStrKey, pszValue, 0, 0, lpBuff, &dwLength);
504 }
505 }
506
507 if (!dwLength)
508 lpBuff = HeapAlloc(GetProcessHeap(), 0, dwLength);
509
510 tmp = IStream_Create(hStrKey, lpBuff, dwLength);
511 if(tmp)
512 {
513 if(pszValue)
514 {
515 int len = lstrlenA(pszValue) + 1;
516 tmp->u.keyNameA = HeapAlloc(GetProcessHeap(), 0, len);
517 memcpy(tmp->u.keyNameA, pszValue, len);
518 }
519
520 tmp->dwMode = dwMode;
521 tmp->bUnicode = FALSE;
522 return &tmp->IStream_iface;
523 }
524 }
525
526 HeapFree(GetProcessHeap(), 0, lpBuff);
527 if (hStrKey)
528 RegCloseKey(hStrKey);
529 return NULL;
530}
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
Definition: reg.c:4009
LONG WINAPI RegCreateKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD Reserved, _In_ LPSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_ LPDWORD lpdwDisposition)
Definition: reg.c:1034
static DWORD DWORD * dwLength
Definition: fusion.c:86
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
#define KEY_WRITE
Definition: nt_native.h:1034
_In_opt_ LPCSTR _In_opt_ LPCSTR pszValue
Definition: shlwapi.h:783
LPSTR keyNameA
Definition: regstream.c:48
BOOL bUnicode
Definition: regstream.c:51
union ISHRegStream::@622 u
DWORD dwMode
Definition: regstream.c:46

Referenced by SHOpenRegStreamA().

◆ SHOpenRegStream2W()

WINSHLWAPI struct IStream *WINAPI SHOpenRegStream2W ( HKEY  hKey,
LPCWSTR  pszSubkey,
LPCWSTR  pszValue,
DWORD  dwMode 
)

Definition at line 537 of file regstream.c.

539{
540 ISHRegStream *tmp;
541 HKEY hStrKey = NULL;
542 LPBYTE lpBuff = NULL;
543 DWORD dwLength = 0;
544 LONG ret;
545
546 TRACE("(%p,%s,%s,0x%08x)\n", hKey, debugstr_w(pszSubkey),
547 debugstr_w(pszValue), dwMode);
548
549 if (dwMode == STGM_READ)
550 ret = RegOpenKeyExW(hKey, pszSubkey, 0, KEY_READ, &hStrKey);
551 else /* in write mode we make sure the subkey exits */
552 ret = RegCreateKeyExW(hKey, pszSubkey, 0, NULL, 0, KEY_READ | KEY_WRITE, NULL, &hStrKey, NULL);
553
554 if (ret == ERROR_SUCCESS)
555 {
556 if (dwMode == STGM_READ || dwMode == STGM_READWRITE)
557 {
558 /* read initial data */
559 ret = RegQueryValueExW(hStrKey, pszValue, 0, 0, 0, &dwLength);
560 if (ret == ERROR_SUCCESS && dwLength)
561 {
562 lpBuff = HeapAlloc(GetProcessHeap(), 0, dwLength);
563 RegQueryValueExW(hStrKey, pszValue, 0, 0, lpBuff, &dwLength);
564 }
565 }
566
567 if (!dwLength)
568 lpBuff = HeapAlloc(GetProcessHeap(), 0, dwLength);
569
570 tmp = IStream_Create(hStrKey, lpBuff, dwLength);
571 if(tmp)
572 {
573 if(pszValue)
574 {
575 int len = lstrlenW(pszValue) + 1;
576 tmp->u.keyNameW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
577 memcpy(tmp->u.keyNameW, pszValue, len * sizeof(WCHAR));
578 }
579
580 tmp->dwMode = dwMode;
581 tmp->bUnicode = TRUE;
582 return &tmp->IStream_iface;
583 }
584 }
585
586 HeapFree(GetProcessHeap(), 0, lpBuff);
587 if (hStrKey)
588 RegCloseKey(hStrKey);
589 return NULL;
590}
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1096
LPWSTR keyNameW
Definition: regstream.c:49

Referenced by CDesktopUpgradePropertyBag::_GetOldDesktopViewStream(), CDefView::GetDefaultViewStream(), CInternetToolbar::GetStream(), and SHOpenRegStreamW().

◆ SHOpenRegStreamA()

WINSHLWAPI struct IStream *WINAPI SHOpenRegStreamA ( HKEY  hkey,
LPCSTR  pszSubkey,
LPCSTR  pszValue,
DWORD  dwMode 
)

Definition at line 608 of file regstream.c.

610{
611 IStream *iStream;
612
613 TRACE("(%p,%s,%s,0x%08x)\n", hkey, pszSubkey, pszValue, dwMode);
614
615 iStream = SHOpenRegStream2A(hkey, pszSubkey, pszValue, dwMode);
616 return iStream ? iStream : &rsDummyRegStream.IStream_iface;
617}
IStream *WINAPI SHOpenRegStream2A(HKEY hKey, LPCSTR pszSubkey, LPCSTR pszValue, DWORD dwMode)
Definition: regstream.c:478
static ISHRegStream rsDummyRegStream
Definition: regstream.c:423

◆ SHOpenRegStreamW()

WINSHLWAPI struct IStream *WINAPI SHOpenRegStreamW ( HKEY  hkey,
LPCWSTR  pszSubkey,
LPCWSTR  pszValue,
DWORD  dwMode 
)

Definition at line 624 of file regstream.c.

626{
627 IStream *iStream;
628
629 TRACE("(%p,%s,%s,0x%08x)\n", hkey, debugstr_w(pszSubkey),
630 debugstr_w(pszValue), dwMode);
631 iStream = SHOpenRegStream2W(hkey, pszSubkey, pszValue, dwMode);
632 return iStream ? iStream : &rsDummyRegStream.IStream_iface;
633}
IStream *WINAPI SHOpenRegStream2W(HKEY hKey, LPCWSTR pszSubkey, LPCWSTR pszValue, DWORD dwMode)
Definition: regstream.c:537

Referenced by CTrayBandSite::GetDefaultBandsStream(), and CTrayBandSite::GetUserBandsStream().

◆ SHQueryInfoKeyA()

WINSHLWAPI LONG WINAPI SHQueryInfoKeyA ( HKEY  hKey,
LPDWORD  pwSubKeys,
LPDWORD  pwSubKeyMax,
LPDWORD  pwValues,
LPDWORD  pwValueMax 
)

Definition at line 1337 of file reg.c.

1339{
1340 TRACE("(hkey=%p,%p,%p,%p,%p)\n", hKey, pwSubKeys, pwSubKeyMax,
1341 pwValues, pwValueMax);
1342 return RegQueryInfoKeyA(hKey, NULL, NULL, NULL, pwSubKeys, pwSubKeyMax,
1343 NULL, pwValues, pwValueMax, NULL, NULL, NULL);
1344}

◆ SHQueryInfoKeyW()

WINSHLWAPI LONG WINAPI SHQueryInfoKeyW ( HKEY  hKey,
LPDWORD  pwSubKeys,
LPDWORD  pwSubKeyMax,
LPDWORD  pwValues,
LPDWORD  pwValueMax 
)

Definition at line 1351 of file reg.c.

1353{
1354 TRACE("(hkey=%p,%p,%p,%p,%p)\n", hKey, pwSubKeys, pwSubKeyMax,
1355 pwValues, pwValueMax);
1356 return RegQueryInfoKeyW(hKey, NULL, NULL, NULL, pwSubKeys, pwSubKeyMax,
1357 NULL, pwValues, pwValueMax, NULL, NULL, NULL);
1358}

◆ SHQueryValueExA()

WINSHLWAPI DWORD WINAPI SHQueryValueExA ( HKEY  hKey,
LPCSTR  lpszValue,
LPDWORD  lpReserved,
LPDWORD  pwType,
LPVOID  pvData,
LPDWORD  pcbData 
)

Definition at line 1402 of file reg.c.

1405{
1406 DWORD dwRet, dwType, dwUnExpDataLen = 0, dwExpDataLen;
1407
1408 TRACE("(hkey=%p,%s,%p,%p,%p,%p=%d)\n", hKey, debugstr_a(lpszValue),
1409 lpReserved, pwType, pvData, pcbData, pcbData ? *pcbData : 0);
1410
1411 if (pcbData) dwUnExpDataLen = *pcbData;
1412
1413 dwRet = RegQueryValueExA(hKey, lpszValue, lpReserved, &dwType, pvData, &dwUnExpDataLen);
1414
1415 if (pcbData && (dwType == REG_EXPAND_SZ))
1416 {
1417 DWORD nBytesToAlloc;
1418
1419 /* Expand type REG_EXPAND_SZ into REG_SZ */
1420 LPSTR szData;
1421
1422 /* If the caller didn't supply a buffer or the buffer is too small we have
1423 * to allocate our own
1424 */
1425 if ((!pvData) || (dwRet == ERROR_MORE_DATA) )
1426 {
1427 char cNull = '\0';
1428 nBytesToAlloc = dwUnExpDataLen;
1429
1430 szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc);
1431 RegQueryValueExA (hKey, lpszValue, lpReserved, NULL, (LPBYTE)szData, &nBytesToAlloc);
1432 dwExpDataLen = ExpandEnvironmentStringsA(szData, &cNull, 1);
1433 dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen);
1434 LocalFree(szData);
1435 }
1436 else
1437 {
1438 nBytesToAlloc = (lstrlenA(pvData)+1) * sizeof (CHAR);
1439 szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc);
1440 lstrcpyA(szData, pvData);
1441 dwExpDataLen = ExpandEnvironmentStringsA(szData, pvData, *pcbData / sizeof(CHAR));
1442 if (dwExpDataLen > *pcbData) dwRet = ERROR_MORE_DATA;
1443 dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen);
1444 LocalFree(szData);
1445 }
1446 }
1447
1448 /* Update the type and data size if the caller wanted them */
1449 if ( dwType == REG_EXPAND_SZ ) dwType = REG_SZ;
1450 if ( pwType ) *pwType = dwType;
1451 if ( pcbData ) *pcbData = dwUnExpDataLen;
1452 return dwRet;
1453}
DWORD WINAPI ExpandEnvironmentStringsA(IN LPCSTR lpSrc, IN LPSTR lpDst, IN DWORD nSize)
Definition: environ.c:399
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1390
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
#define REG_SZ
Definition: layer.c:22
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
#define LMEM_ZEROINIT
Definition: minwinbase.h:85
#define REG_EXPAND_SZ
Definition: nt_native.h:1497
_In_ DWORD _In_ int _In_ int _In_opt_ LPNLSVERSIONINFO _In_opt_ LPVOID lpReserved
Definition: winnls.h:1268
char CHAR
Definition: xmlstorage.h:175

Referenced by SHADD_get_policy(), SHGetValueA(), SHRegQueryValueExA(), test_SHCopyKey(), and test_SHQueryValueEx().

◆ SHQueryValueExW()

WINSHLWAPI DWORD WINAPI SHQueryValueExW ( HKEY  hKey,
LPCWSTR  lpszValue,
LPDWORD  lpReserved,
LPDWORD  pwType,
LPVOID  pvData,
LPDWORD  pcbData 
)

Definition at line 1461 of file reg.c.

1464{
1465 DWORD dwRet, dwType, dwUnExpDataLen = 0, dwExpDataLen;
1466
1467 TRACE("(hkey=%p,%s,%p,%p,%p,%p=%d)\n", hKey, debugstr_w(lpszValue),
1468 lpReserved, pwType, pvData, pcbData, pcbData ? *pcbData : 0);
1469
1470 if (pcbData) dwUnExpDataLen = *pcbData;
1471
1472 dwRet = RegQueryValueExW(hKey, lpszValue, lpReserved, &dwType, pvData, &dwUnExpDataLen);
1473 if (dwRet!=ERROR_SUCCESS && dwRet!=ERROR_MORE_DATA)
1474 return dwRet;
1475
1476 if (pcbData && (dwType == REG_EXPAND_SZ))
1477 {
1478 DWORD nBytesToAlloc;
1479
1480 /* Expand type REG_EXPAND_SZ into REG_SZ */
1481 LPWSTR szData;
1482
1483 /* If the caller didn't supply a buffer or the buffer is too small we have
1484 * to allocate our own
1485 */
1486 if ((!pvData) || (dwRet == ERROR_MORE_DATA) )
1487 {
1488 WCHAR cNull = '\0';
1489 nBytesToAlloc = dwUnExpDataLen;
1490
1491 szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc);
1492 RegQueryValueExW (hKey, lpszValue, lpReserved, NULL, (LPBYTE)szData, &nBytesToAlloc);
1493 dwExpDataLen = ExpandEnvironmentStringsW(szData, &cNull, 1);
1494 dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen);
1495 LocalFree(szData);
1496 }
1497 else
1498 {
1499 nBytesToAlloc = (lstrlenW(pvData) + 1) * sizeof(WCHAR);
1500 szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc);
1501 lstrcpyW(szData, pvData);
1502 dwExpDataLen = ExpandEnvironmentStringsW(szData, pvData, *pcbData/sizeof(WCHAR) );
1503 if (dwExpDataLen > *pcbData) dwRet = ERROR_MORE_DATA;
1504 dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen);
1505 LocalFree(szData);
1506 }
1507 }
1508
1509 /* Update the type and data size if the caller wanted them */
1510 if ( dwType == REG_EXPAND_SZ ) dwType = REG_SZ;
1511 if ( pwType ) *pwType = dwType;
1512 if ( pcbData ) *pcbData = dwUnExpDataLen;
1513 return dwRet;
1514}
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
Definition: environ.c:519

Referenced by CFSExtractIcon_CreateInstance(), CQueryAssociations::GetValue(), IsOS(), read_advanced_key(), SH32_CoCreateInstance(), SHELL_ReadSingleUnreadMailCount(), SHGetValueW(), SHRegGetIntW(), SHRegQueryValueExW(), SKAllocValueW(), and SKGetValueW().

◆ SHRegCloseUSKey()

WINSHLWAPI LONG WINAPI SHRegCloseUSKey ( HUSKEY  hUSKey)

Definition at line 3626 of file registry.c.

3627{
3628 struct USKEY *key = hUSKey;
3630
3631 if (!key)
3633
3634 if (key->HKCUkey)
3635 ret = RegCloseKey(key->HKCUkey);
3636 if (key->HKCUstart && key->HKCUstart != HKEY_CURRENT_USER)
3637 ret = RegCloseKey(key->HKCUstart);
3638 if (key->HKLMkey)
3639 ret = RegCloseKey(key->HKLMkey);
3640 if (key->HKLMstart && key->HKLMstart != HKEY_LOCAL_MACHINE)
3641 ret = RegCloseKey(key->HKLMstart);
3642
3643 heap_free(key);
3644 return ret;
3645}
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by add_tbs_to_menu(), CTaskSwitchWnd::InvokeRegistryAppKeyCommand(), SHRegGetUSValueA(), SHRegGetUSValueW(), SHRegOpenUSKeyW(), SHRegSetUSValueA(), and SHRegSetUSValueW().

◆ SHRegCreateUSKeyA()

WINSHLWAPI LONG WINAPI SHRegCreateUSKeyA ( LPCSTR  path,
REGSAM  samDesired,
HUSKEY  relative_key,
PHUSKEY  new_uskey,
DWORD  flags 
)

Definition at line 3528 of file registry.c.

3529{
3530 WCHAR *pathW;
3531 LONG ret;
3532
3533 TRACE("%s, %#lx, %p, %p, %#lx\n", debugstr_a(path), samDesired, relative_key, new_uskey, flags);
3534
3535 if (path)
3536 {
3537 INT len = MultiByteToWideChar(CP_ACP, 0, path, -1, NULL, 0);
3538 pathW = heap_alloc(len * sizeof(WCHAR));
3539 if (!pathW)
3541 MultiByteToWideChar(CP_ACP, 0, path, -1, pathW, len);
3542 }
3543 else
3544 pathW = NULL;
3545
3546 ret = SHRegCreateUSKeyW(pathW, samDesired, relative_key, new_uskey, flags);
3547 HeapFree(GetProcessHeap(), 0, pathW);
3548 return ret;
3549}
LONG WINAPI SHRegCreateUSKeyW(const WCHAR *path, REGSAM samDesired, HUSKEY relative_key, PHUSKEY new_uskey, DWORD flags)
Definition: registry.c:3582

◆ SHRegCreateUSKeyW()

WINSHLWAPI LONG WINAPI SHRegCreateUSKeyW ( LPCWSTR  path,
REGSAM  samDesired,
HUSKEY  relative_key,
PHUSKEY  new_uskey,
DWORD  flags 
)

Definition at line 258 of file reg.c.

260{
262 SHUSKEY *ret_key;
263
264 TRACE("(%s, 0x%08x, %p, %p, 0x%08x)\n", debugstr_w(path), samDesired,
265 relative_key, new_uskey, flags);
266
267 if (!new_uskey) return ERROR_INVALID_PARAMETER;
268
269 *new_uskey = NULL;
270
272 {
273 FIXME("unsupported flags 0x%08x\n", flags);
274 return ERROR_SUCCESS;
275 }
276
277 ret_key = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ret_key));
278 lstrcpynW(ret_key->lpszPath, path, sizeof(ret_key->lpszPath)/sizeof(WCHAR));
279
280 if (relative_key)
281 {
284 }
285 else
286 {
287 ret_key->HKCUstart = HKEY_CURRENT_USER;
288 ret_key->HKLMstart = HKEY_LOCAL_MACHINE;
289 }
290
292 {
293 ret = RegCreateKeyExW(ret_key->HKCUstart, path, 0, NULL, 0, samDesired, NULL, &ret_key->HKCUkey, NULL);
294 if (ret == ERROR_SUCCESS)
295 *new_uskey = ret_key;
296 else
297 HeapFree(GetProcessHeap(), 0, ret_key);
298 }
299
300 return ret;
301}
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
static HKEY REG_GetHKEYFromHUSKEY(HUSKEY hUSKey, BOOL which)
Definition: reg.c:69
#define REG_HKCU
Definition: reg.c:61
#define REG_HKLM
Definition: reg.c:62
HKEY WINAPI SHRegDuplicateHKey(HKEY hKey)
Definition: reg.c:2214
#define SHREGSET_FORCE_HKCU
Definition: shlwapi.h:720
Definition: reg.c:49
HKEY HKCUkey
Definition: reg.c:51
WCHAR lpszPath[MAX_PATH]
Definition: reg.c:54
HKEY HKLMstart
Definition: reg.c:52
HKEY HKCUstart
Definition: reg.c:50

Referenced by SHRegCreateUSKeyA().

◆ SHRegDeleteEmptyUSKeyA()

WINSHLWAPI LONG WINAPI SHRegDeleteEmptyUSKeyA ( HUSKEY  hUSKey,
LPCSTR  pszValue,
SHREGDEL_FLAGS  delRegFlags 
)

Definition at line 318 of file reg.c.

319{
320 FIXME("(%p, %s, 0x%08x) stub\n", hUSKey, debugstr_a(pszValue), delRegFlags);
321 return ERROR_SUCCESS;
322}

◆ SHRegDeleteEmptyUSKeyW()

WINSHLWAPI LONG WINAPI SHRegDeleteEmptyUSKeyW ( HUSKEY  hUSKey,
LPCWSTR  pszValue,
SHREGDEL_FLAGS  delRegFlags 
)

Definition at line 329 of file reg.c.

330{
331 FIXME("(%p, %s, 0x%08x) stub\n", hUSKey, debugstr_w(pszValue), delRegFlags);
332 return ERROR_SUCCESS;
333}

◆ SHRegDeleteUSValueA()

WINSHLWAPI LONG WINAPI SHRegDeleteUSValueA ( HUSKEY  hUSKey,
LPCSTR  pszValue,
SHREGDEL_FLAGS  delRegFlags 
)

Definition at line 350 of file reg.c.

351{
352 FIXME("(%p, %s, 0x%08x) stub\n", hUSKey, debugstr_a(pszValue), delRegFlags);
353 return ERROR_SUCCESS;
354}

◆ SHRegDeleteUSValueW()

WINSHLWAPI LONG WINAPI SHRegDeleteUSValueW ( HUSKEY  hUSKey,
LPCWSTR  pszValue,
SHREGDEL_FLAGS  delRegFlags 
)

Definition at line 361 of file reg.c.

362{
363 FIXME("(%p, %s, 0x%08x) stub\n", hUSKey, debugstr_w(pszValue), delRegFlags);
364 return ERROR_SUCCESS;
365}

◆ SHRegDuplicateHKey()

WINSHLWAPI HKEY WINAPI SHRegDuplicateHKey ( HKEY  hKey)

Definition at line 2214 of file reg.c.

2215{
2216 HKEY newKey = 0;
2217
2218 RegOpenKeyExA(hKey, 0, 0, MAXIMUM_ALLOWED, &newKey);
2219 TRACE("new key is %p\n", newKey);
2220 return newKey;
2221}
#define MAXIMUM_ALLOWED
Definition: nt_native.h:83

Referenced by CMruBase::InitData(), CDefaultContextMenu::Initialize(), SHRegCreateUSKeyW(), and SHRegOpenUSKeyW().

◆ SHRegEnumUSKeyA()

WINSHLWAPI LONG WINAPI SHRegEnumUSKeyA ( HUSKEY  hUSKey,
DWORD  dwIndex,
LPSTR  pszName,
LPDWORD  pcchValueNameLen,
SHREGENUM_FLAGS  enumRegFlags 
)

Definition at line 920 of file reg.c.

926{
927 HKEY dokey;
928
929 TRACE("(%p,%d,%p,%p(%d),%d)\n",
930 hUSKey, dwIndex, pszName, pcchValueNameLen,
931 *pcchValueNameLen, enumRegFlags);
932
933 if (((enumRegFlags == SHREGENUM_HKCU) ||
934 (enumRegFlags == SHREGENUM_DEFAULT)) &&
935 (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKCU))) {
936 return RegEnumKeyExA(dokey, dwIndex, pszName, pcchValueNameLen,
937 0, 0, 0, 0);
938 }
939
940 if (((enumRegFlags == SHREGENUM_HKLM) ||
941 (enumRegFlags == SHREGENUM_DEFAULT)) &&
942 (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKLM))) {
943 return RegEnumKeyExA(dokey, dwIndex, pszName, pcchValueNameLen,
944 0, 0, 0, 0);
945 }
946 FIXME("no support for SHREGENUM_BOTH\n");
948}
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6

◆ SHRegEnumUSKeyW()

WINSHLWAPI LONG WINAPI SHRegEnumUSKeyW ( HUSKEY  hUSKey,
DWORD  dwIndex,
LPWSTR  pszName,
LPDWORD  pcchValueNameLen,
SHREGENUM_FLAGS  enumRegFlags 
)

Definition at line 955 of file reg.c.

961{
962 HKEY dokey;
963
964 TRACE("(%p,%d,%p,%p(%d),%d)\n",
965 hUSKey, dwIndex, pszName, pcchValueNameLen,
966 *pcchValueNameLen, enumRegFlags);
967
968 if (((enumRegFlags == SHREGENUM_HKCU) ||
969 (enumRegFlags == SHREGENUM_DEFAULT)) &&
970 (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKCU))) {
971 return RegEnumKeyExW(dokey, dwIndex, pszName, pcchValueNameLen,
972 0, 0, 0, 0);
973 }
974
975 if (((enumRegFlags == SHREGENUM_HKLM) ||
976 (enumRegFlags == SHREGENUM_DEFAULT)) &&
977 (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKLM))) {
978 return RegEnumKeyExW(dokey, dwIndex, pszName, pcchValueNameLen,
979 0, 0, 0, 0);
980 }
981 FIXME("no support for SHREGENUM_BOTH\n");
983}

◆ SHRegEnumUSValueA()

WINSHLWAPI LONG WINAPI SHRegEnumUSValueA ( HUSKEY  hUSKey,
DWORD  dwIndex,
LPSTR  pszValueName,
LPDWORD  pcchValueNameLen,
LPDWORD  pdwType,
LPVOID  pvData,
LPDWORD  pcbData,
SHREGENUM_FLAGS  enumRegFlags 
)

Definition at line 387 of file reg.c.

390{
391 HKEY dokey;
392
393 TRACE("(%p, 0x%08x, %p, %p, %p, %p, %p, 0x%08x)\n", hUSKey, dwIndex,
394 pszValueName, pcchValueNameLen, pdwType, pvData, pcbData, enumRegFlags);
395
396 if (((enumRegFlags == SHREGENUM_HKCU) ||
397 (enumRegFlags == SHREGENUM_DEFAULT)) &&
398 (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKCU))) {
399 return RegEnumValueA(dokey, dwIndex, pszValueName, pcchValueNameLen,
401 }
402
403 if (((enumRegFlags == SHREGENUM_HKLM) ||
404 (enumRegFlags == SHREGENUM_DEFAULT)) &&
405 (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKLM))) {
406 return RegEnumValueA(dokey, dwIndex, pszValueName, pcchValueNameLen,
408 }
409 FIXME("no support for SHREGENUM_BOTH\n");
411}
_In_opt_ LPCSTR _In_opt_ LPCSTR _In_ SRRF _Out_opt_ LPDWORD pdwType
Definition: shlwapi.h:783

◆ SHRegEnumUSValueW()

WINSHLWAPI LONG WINAPI SHRegEnumUSValueW ( HUSKEY  hUSKey,
DWORD  dwIndex,
LPWSTR  pszValueName,
LPDWORD  pcchValueNameLen,
LPDWORD  pdwType,
LPVOID  pvData,
LPDWORD  pcbData,
SHREGENUM_FLAGS  enumRegFlags 
)

Definition at line 418 of file reg.c.

421{
422 HKEY dokey;
423
424 TRACE("(%p, 0x%08x, %p, %p, %p, %p, %p, 0x%08x)\n", hUSKey, dwIndex,
425 pszValueName, pcchValueNameLen, pdwType, pvData, pcbData, enumRegFlags);
426
427 if (((enumRegFlags == SHREGENUM_HKCU) ||
428 (enumRegFlags == SHREGENUM_DEFAULT)) &&
429 (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKCU))) {
430 return RegEnumValueW(dokey, dwIndex, pszValueName, pcchValueNameLen,
432 }
433
434 if (((enumRegFlags == SHREGENUM_HKLM) ||
435 (enumRegFlags == SHREGENUM_DEFAULT)) &&
436 (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKLM))) {
437 return RegEnumValueW(dokey, dwIndex, pszValueName, pcchValueNameLen,
439 }
440 FIXME("no support for SHREGENUM_BOTH\n");
442}

◆ SHRegGetBoolUSValueA()

WINSHLWAPI BOOL WINAPI SHRegGetBoolUSValueA ( LPCSTR  pszSubKey,
LPCSTR  pszValue,
BOOL  fIgnoreHKCU,
BOOL  fDefault 
)

Definition at line 714 of file reg.c.

719{
720 DWORD type, datalen, work;
721 BOOL ret = fDefault;
722 CHAR data[10];
723
724 TRACE("key '%s', value '%s', %s\n",
726 (fIgnoreHKCU) ? "Ignoring HKCU" : "Tries HKCU then HKLM");
727
728 datalen = sizeof(data)-1;
730 data, &datalen,
731 fIgnoreHKCU, 0, 0)) {
732 /* process returned data via type into bool */
733 switch (type) {
734 case REG_SZ:
735 data[9] = '\0'; /* set end of string */
736 if (lstrcmpiA(data, "YES") == 0) ret = TRUE;
737 if (lstrcmpiA(data, "TRUE") == 0) ret = TRUE;
738 if (lstrcmpiA(data, "NO") == 0) ret = FALSE;
739 if (lstrcmpiA(data, "FALSE") == 0) ret = FALSE;
740 break;
741 case REG_DWORD:
742 work = *(LPDWORD)data;
743 ret = (work != 0);
744 break;
745 case REG_BINARY:
746 if (datalen == 1) {
747 ret = (data[0] != '\0');
748 break;
749 }
750 default:
751 FIXME("Unsupported registry data type %d\n", type);
752 ret = FALSE;
753 }
754 TRACE("got value (type=%d), returning <%s>\n", type,
755 (ret) ? "TRUE" : "FALSE");
756 }
757 else {
758 ret = fDefault;
759 TRACE("returning default data <%s>\n",
760 (ret) ? "TRUE" : "FALSE");
761 }
762 return ret;
763}
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
Definition: locale.c:4227
LONG WINAPI SHRegGetUSValueA(LPCSTR pSubKey, LPCSTR pValue, LPDWORD pwType, LPVOID pvData, LPDWORD pcbData, BOOL flagIgnoreHKCU, LPVOID pDefaultData, DWORD wDefaultDataSize)
Definition: reg.c:561
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
int const JOCTET unsigned int datalen
Definition: jpeglib.h:1031
#define REG_BINARY
Definition: nt_native.h:1499
#define LPDWORD
Definition: nt_native.h:46
_In_opt_ LPCSTR pszSubKey
Definition: shlwapi.h:783
#define REG_DWORD
Definition: sdbapi.c:615

◆ SHRegGetBoolUSValueW()

WINSHLWAPI BOOL WINAPI SHRegGetBoolUSValueW ( LPCWSTR  pszSubKey,
LPCWSTR  pszValue,
BOOL  fIgnoreHKCU,
BOOL  fDefault 
)

Definition at line 770 of file reg.c.

775{
776 static const WCHAR wYES[]= {'Y','E','S','\0'};
777 static const WCHAR wTRUE[]= {'T','R','U','E','\0'};
778 static const WCHAR wNO[]= {'N','O','\0'};
779 static const WCHAR wFALSE[]={'F','A','L','S','E','\0'};
780 DWORD type, datalen, work;
781 BOOL ret = fDefault;
782 WCHAR data[10];
783
784 TRACE("key '%s', value '%s', %s\n",
786 (fIgnoreHKCU) ? "Ignoring HKCU" : "Tries HKCU then HKLM");
787
788 datalen = (sizeof(data)-1) * sizeof(WCHAR);
790 data, &datalen,
791 fIgnoreHKCU, 0, 0)) {
792 /* process returned data via type into bool */
793 switch (type) {
794 case REG_SZ:
795 data[9] = '\0'; /* set end of string */
796 if (lstrcmpiW(data, wYES)==0 || lstrcmpiW(data, wTRUE)==0)
797 ret = TRUE;
798 else if (lstrcmpiW(data, wNO)==0 || lstrcmpiW(data, wFALSE)==0)
799 ret = FALSE;
800 break;
801 case REG_DWORD:
802 work = *(LPDWORD)data;
803 ret = (work != 0);
804 break;
805 case REG_BINARY:
806 if (datalen == 1) {
807 ret = (data[0] != '\0');
808 break;
809 }
810 default:
811 FIXME("Unsupported registry data type %d\n", type);
812 ret = FALSE;
813 }
814 TRACE("got value (type=%d), returning <%s>\n", type,
815 (ret) ? "TRUE" : "FALSE");
816 }
817 else {
818 ret = fDefault;
819 TRACE("returning default data <%s>\n",
820 (ret) ? "TRUE" : "FALSE");
821 }
822 return ret;
823}
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4265
LONG WINAPI SHRegGetUSValueW(LPCWSTR pSubKey, LPCWSTR pValue, LPDWORD pwType, LPVOID pvData, LPDWORD pcbData, BOOL flagIgnoreHKCU, LPVOID pDefaultData, DWORD wDefaultDataSize)
Definition: reg.c:594

◆ SHRegGetIntW()

WINSHLWAPI int WINAPI SHRegGetIntW ( HKEY  hKey,
LPCWSTR  lpszValue,
int  iDefault 
)

Definition at line 2374 of file reg.c.

2375{
2376 TRACE("(%p,%s,%d)\n", hKey, debugstr_w(lpszValue), iDefault);
2377
2378 if (hKey)
2379 {
2380 WCHAR szBuff[32];
2381 DWORD dwSize = sizeof(szBuff);
2382 szBuff[0] = '\0';
2383 SHQueryValueExW(hKey, lpszValue, 0, 0, szBuff, &dwSize);
2384
2385 if(*szBuff >= '0' && *szBuff <= '9')
2386 return StrToIntW(szBuff);
2387 }
2388 return iDefault;
2389}

Referenced by LoadCurrentScheme(), and LoadSchemeFromReg().

◆ SHRegGetPathA()

WINSHLWAPI DWORD WINAPI SHRegGetPathA ( HKEY  hKey,
LPCSTR  lpszSubKey,
LPCSTR  lpszValue,
LPSTR  lpszPath,
DWORD  dwFlags 
)

Definition at line 1109 of file reg.c.

1111{
1113
1114 TRACE("(hkey=%p,%s,%s,%p,%d)\n", hKey, debugstr_a(lpszSubKey),
1115 debugstr_a(lpszValue), lpszPath, dwFlags);
1116
1117 return SHGetValueA(hKey, lpszSubKey, lpszValue, 0, lpszPath, &dwSize);
1118}

◆ SHRegGetPathW()

WINSHLWAPI DWORD WINAPI SHRegGetPathW ( HKEY  hKey,
LPCWSTR  lpszSubKey,
LPCWSTR  lpszValue,
LPWSTR  lpszPath,
DWORD  dwFlags 
)

Definition at line 1125 of file reg.c.

1127{
1129
1130 TRACE("(hkey=%p,%s,%s,%p,%d)\n", hKey, debugstr_w(lpszSubKey),
1131 debugstr_w(lpszValue), lpszPath, dwFlags);
1132
1133 return SHGetValueW(hKey, lpszSubKey, lpszValue, 0, lpszPath, &dwSize);
1134}

◆ SHRegGetUSValueA()

WINSHLWAPI LONG WINAPI SHRegGetUSValueA ( LPCSTR  pSubKey,
LPCSTR  pValue,
LPDWORD  pwType,
LPVOID  pvData,
LPDWORD  pcbData,
BOOL  flagIgnoreHKCU,
LPVOID  pDefaultData,
DWORD  wDefaultDataSize 
)

Definition at line 561 of file reg.c.

570{
571 HUSKEY myhuskey;
572 LONG ret;
573
574 if (!pvData || !pcbData) return ERROR_INVALID_FUNCTION; /* FIXME:wrong*/
575 TRACE("key '%s', value '%s', datalen %d, %s\n",
576 debugstr_a(pSubKey), debugstr_a(pValue), *pcbData,
577 (flagIgnoreHKCU) ? "Ignoring HKCU" : "Tries HKCU then HKLM");
578
579 ret = SHRegOpenUSKeyA(pSubKey, 0x1, 0, &myhuskey, flagIgnoreHKCU);
580 if (ret == ERROR_SUCCESS) {
581 ret = SHRegQueryUSValueA(myhuskey, pValue, pwType, pvData,
582 pcbData, flagIgnoreHKCU, pDefaultData,
583 wDefaultDataSize);
584 SHRegCloseUSKey(myhuskey);
585 }
586 return ret;
587}
LONG WINAPI SHRegQueryUSValueA(HUSKEY hUSKey, LPCSTR pszValue, LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData, BOOL fIgnoreHKCU, LPVOID pvDefaultData, DWORD dwDefaultDataSize)
Definition: reg.c:453
LONG WINAPI SHRegOpenUSKeyA(LPCSTR Path, REGSAM AccessType, HUSKEY hRelativeUSKey, PHUSKEY phNewUSKey, BOOL fIgnoreHKCU)
Definition: reg.c:106
LONG WINAPI SHRegCloseUSKey(HUSKEY hUSKey)
Definition: reg.c:190
PWCHAR pValue

Referenced by SHRegGetBoolUSValueA().

◆ SHRegGetUSValueW()

WINSHLWAPI LONG WINAPI SHRegGetUSValueW ( LPCWSTR  pSubKey,
LPCWSTR  pValue,
LPDWORD  pwType,
LPVOID  pvData,
LPDWORD  pcbData,
BOOL  flagIgnoreHKCU,
LPVOID  pDefaultData,
DWORD  wDefaultDataSize 
)

Definition at line 594 of file reg.c.

603{
604 HUSKEY myhuskey;
605 LONG ret;
606
607 if (!pvData || !pcbData) return ERROR_INVALID_FUNCTION; /* FIXME:wrong*/
608 TRACE("key '%s', value '%s', datalen %d, %s\n",
609 debugstr_w(pSubKey), debugstr_w(pValue), *pcbData,
610 (flagIgnoreHKCU) ? "Ignoring HKCU" : "Tries HKCU then HKLM");
611
612 ret = SHRegOpenUSKeyW(pSubKey, 0x1, 0, &myhuskey, flagIgnoreHKCU);
613 if (ret == ERROR_SUCCESS) {
614 ret = SHRegQueryUSValueW(myhuskey, pValue, pwType, pvData,
615 pcbData, flagIgnoreHKCU, pDefaultData,
616 wDefaultDataSize);
617 SHRegCloseUSKey(myhuskey);
618 }
619 return ret;
620}
LONG WINAPI SHRegOpenUSKeyW(LPCWSTR Path, REGSAM AccessType, HUSKEY hRelativeUSKey, PHUSKEY phNewUSKey, BOOL fIgnoreHKCU)
Definition: reg.c:123
LONG WINAPI SHRegQueryUSValueW(HUSKEY hUSKey, LPCWSTR pszValue, LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData, BOOL fIgnoreHKCU, LPVOID pvDefaultData, DWORD dwDefaultDataSize)
Definition: reg.c:504

Referenced by SHRegGetBoolUSValueW().

◆ SHRegGetValueA()

WINSHLWAPI LSTATUS WINAPI SHRegGetValueA ( HKEY  ,
LPCSTR  ,
LPCSTR  ,
SRRF  ,
LPDWORD  ,
LPVOID  ,
LPDWORD   
)

◆ SHRegGetValueW()

◆ SHRegOpenUSKeyA()

WINSHLWAPI LONG WINAPI SHRegOpenUSKeyA ( LPCSTR  Path,
REGSAM  AccessType,
HUSKEY  hRelativeUSKey,
PHUSKEY  phNewUSKey,
BOOL  fIgnoreHKCU 
)

Definition at line 106 of file reg.c.

108{
110
111 if (Path)
113
114 return SHRegOpenUSKeyW(Path ? szPath : NULL, AccessType, hRelativeUSKey,
115 phNewUSKey, fIgnoreHKCU);
116}
PRTL_UNICODE_STRING_BUFFER Path

Referenced by SHRegGetUSValueA(), and SHRegSetUSValueA().

◆ SHRegOpenUSKeyW()

WINSHLWAPI LONG WINAPI SHRegOpenUSKeyW ( LPCWSTR  Path,
REGSAM  AccessType,
HUSKEY  hRelativeUSKey,
PHUSKEY  phNewUSKey,
BOOL  fIgnoreHKCU 
)

Definition at line 123 of file reg.c.

125{
126 LONG ret2, ret1 = ~ERROR_SUCCESS;
128
129 TRACE("(%s,0x%x,%p,%p,%d)\n", debugstr_w(Path),(LONG)AccessType,
130 hRelativeUSKey, phNewUSKey, fIgnoreHKCU);
131
132 if (phNewUSKey)
133 *phNewUSKey = NULL;
134
135 /* Create internal HUSKEY */
137 lstrcpynW(hKey->lpszPath, Path, sizeof(hKey->lpszPath)/sizeof(WCHAR));
138
139 if (hRelativeUSKey)
140 {
141 hKey->HKCUstart = SHRegDuplicateHKey(REG_GetHKEYFromHUSKEY(hRelativeUSKey, REG_HKCU));
142 hKey->HKLMstart = SHRegDuplicateHKey(REG_GetHKEYFromHUSKEY(hRelativeUSKey, REG_HKLM));
143
144 /* FIXME: if either of these keys is NULL, create the start key from
145 * the relative keys start+path
146 */
147 }
148 else
149 {
150 hKey->HKCUstart = HKEY_CURRENT_USER;
151 hKey->HKLMstart = HKEY_LOCAL_MACHINE;
152 }
153
154 if (!fIgnoreHKCU)
155 {
156 ret1 = RegOpenKeyExW(hKey->HKCUstart, hKey->lpszPath, 0, AccessType, &hKey->HKCUkey);
157 if (ret1)
158 hKey->HKCUkey = 0;
159 }
160
161 ret2 = RegOpenKeyExW(hKey->HKLMstart, hKey->lpszPath, 0, AccessType, &hKey->HKLMkey);
162 if (ret2)
163 hKey->HKLMkey = 0;
164
165 if (ret1 || ret2)
166 TRACE("one or more opens failed: HKCU=%d HKLM=%d\n", ret1, ret2);
167
168 if (ret1 && ret2)
169 {
170 /* Neither open succeeded: fail */
172 return ret2;
173 }
174
175 TRACE("HUSKEY=%p\n", hKey);
176 if (phNewUSKey)
177 *phNewUSKey = hKey;
178 return ERROR_SUCCESS;
179}

Referenced by SHRegGetUSValueW(), SHRegOpenUSKeyA(), and SHRegSetUSValueW().

◆ SHRegQueryInfoUSKeyA()

WINSHLWAPI LONG WINAPI SHRegQueryInfoUSKeyA ( HUSKEY  hUSKey,
LPDWORD  pcSubKeys,
LPDWORD  pcchMaxSubKeyLen,
LPDWORD  pcValues,
LPDWORD  pcchMaxValueNameLen,
SHREGENUM_FLAGS  enumRegFlags 
)

Definition at line 834 of file reg.c.

841{
842 HKEY dokey;
843 LONG ret;
844
845 TRACE("(%p,%p,%p,%p,%p,%d)\n",
846 hUSKey,pcSubKeys,pcchMaxSubKeyLen,pcValues,
847 pcchMaxValueNameLen,enumRegFlags);
848
849 /* if user wants HKCU, and it exists, then try it */
850 if (((enumRegFlags == SHREGENUM_HKCU) ||
851 (enumRegFlags == SHREGENUM_DEFAULT)) &&
852 (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKCU))) {
853 ret = RegQueryInfoKeyA(dokey, 0, 0, 0,
854 pcSubKeys, pcchMaxSubKeyLen, 0,
855 pcValues, pcchMaxValueNameLen, 0, 0, 0);
856 if ((ret == ERROR_SUCCESS) ||
857 (enumRegFlags == SHREGENUM_HKCU))
858 return ret;
859 }
860 if (((enumRegFlags == SHREGENUM_HKLM) ||
861 (enumRegFlags == SHREGENUM_DEFAULT)) &&
862 (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKLM))) {
863 return RegQueryInfoKeyA(dokey, 0, 0, 0,
864 pcSubKeys, pcchMaxSubKeyLen, 0,
865 pcValues, pcchMaxValueNameLen, 0, 0, 0);
866 }
868}

◆ SHRegQueryInfoUSKeyW()

WINSHLWAPI LONG WINAPI SHRegQueryInfoUSKeyW ( HUSKEY  hUSKey,
LPDWORD  pcSubKeys,
LPDWORD  pcchMaxSubKeyLen,
LPDWORD  pcValues,
LPDWORD  pcchMaxValueNameLen,
SHREGENUM_FLAGS  enumRegFlags 
)

Definition at line 875 of file reg.c.

882{
883 HKEY dokey;
884 LONG ret;
885
886 TRACE("(%p,%p,%p,%p,%p,%d)\n",
887 hUSKey,pcSubKeys,pcchMaxSubKeyLen,pcValues,
888 pcchMaxValueNameLen,enumRegFlags);
889
890 /* if user wants HKCU, and it exists, then try it */
891 if (((enumRegFlags == SHREGENUM_HKCU) ||
892 (enumRegFlags == SHREGENUM_DEFAULT)) &&
893 (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKCU))) {
894 ret = RegQueryInfoKeyW(dokey, 0, 0, 0,
895 pcSubKeys, pcchMaxSubKeyLen, 0,
896 pcValues, pcchMaxValueNameLen, 0, 0, 0);
897 if ((ret == ERROR_SUCCESS) ||
898 (enumRegFlags == SHREGENUM_HKCU))
899 return ret;
900 }
901 if (((enumRegFlags == SHREGENUM_HKLM) ||
902 (enumRegFlags == SHREGENUM_DEFAULT)) &&
903 (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKLM))) {
904 return RegQueryInfoKeyW(dokey, 0, 0, 0,
905 pcSubKeys, pcchMaxSubKeyLen, 0,
906 pcValues, pcchMaxValueNameLen, 0, 0, 0);
907 }
909}

◆ SHRegQueryUSValueA()

WINSHLWAPI LONG WINAPI SHRegQueryUSValueA ( HUSKEY  hUSKey,
LPCSTR  pszValue,
LPDWORD  pdwType,
LPVOID  pvData,
LPDWORD  pcbData,
BOOL  fIgnoreHKCU,
LPVOID  pvDefaultData,
DWORD  dwDefaultDataSize 
)

Definition at line 453 of file reg.c.

462{
463 LONG ret = ~ERROR_SUCCESS;
464 LONG i, maxmove;
465 HKEY dokey;
466 CHAR *src, *dst;
467
468 /* if user wants HKCU, and it exists, then try it */
469 if (!fIgnoreHKCU && (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKCU))) {
470 ret = RegQueryValueExA(dokey,
472 TRACE("HKCU RegQueryValue returned %08x\n", ret);
473 }
474
475 /* if HKCU did not work and HKLM exists, then try it */
476 if ((ret != ERROR_SUCCESS) &&
477 (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKLM))) {
478 ret = RegQueryValueExA(dokey,
480 TRACE("HKLM RegQueryValue returned %08x\n", ret);
481 }
482
483 /* if neither worked, and default data exists, then use it */
484 if (ret != ERROR_SUCCESS) {
485 if (pvDefaultData && (dwDefaultDataSize != 0)) {
487 src = pvDefaultData;
488 dst = pvData;
489 for(i=0; i<maxmove; i++) *dst++ = *src++;
490 *pcbData = maxmove;
491 TRACE("setting default data\n");
493 }
494 }
495 return ret;
496}
_In_opt_ _Inout_opt_ _Out_writes_bytes_to_opt_ pcbData _Inout_opt_ LPDWORD _In_ _In_ DWORD dwDefaultDataSize
Definition: shlwapi.h:781

Referenced by SHRegGetUSValueA().

◆ SHRegQueryUSValueW()

WINSHLWAPI LONG WINAPI SHRegQueryUSValueW ( HUSKEY  hUSKey,
LPCWSTR  pszValue,
LPDWORD  pdwType,
LPVOID  pvData,
LPDWORD  pcbData,
BOOL  fIgnoreHKCU,
LPVOID  pvDefaultData,
DWORD  dwDefaultDataSize 
)

Definition at line 504 of file reg.c.

513{
514 LONG ret = ~ERROR_SUCCESS;
515 LONG i, maxmove;
516 HKEY dokey;
517 CHAR *src, *dst;
518
519 /* if user wants HKCU, and it exists, then try it */
520 if (!fIgnoreHKCU && (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKCU))) {
521 ret = RegQueryValueExW(dokey,
523 TRACE("HKCU RegQueryValue returned %08x\n", ret);
524 }
525
526 /* if HKCU did not work and HKLM exists, then try it */
527 if ((ret != ERROR_SUCCESS) &&
528 (dokey = REG_GetHKEYFromHUSKEY(hUSKey,REG_HKLM))) {
529 ret = RegQueryValueExW(dokey,
531 TRACE("HKLM RegQueryValue returned %08x\n", ret);
532 }
533
534 /* if neither worked, and default data exists, then use it */
535 if (ret != ERROR_SUCCESS) {
536 if (pvDefaultData && (dwDefaultDataSize != 0)) {
538 src = pvDefaultData;
539 dst = pvData;
540 for(i=0; i<maxmove; i++) *dst++ = *src++;
541 *pcbData = maxmove;
542 TRACE("setting default data\n");
544 }
545 }
546 return ret;
547}

Referenced by SHRegGetUSValueW().

◆ SHRegSetPathA()

WINSHLWAPI DWORD WINAPI SHRegSetPathA ( HKEY  hKey,
LPCSTR  lpszSubKey,
LPCSTR  lpszValue,
LPCSTR  lpszPath,
DWORD  dwFlags 
)

Definition at line 1153 of file reg.c.

1155{
1156 char szBuff[MAX_PATH];
1157
1158 FIXME("(hkey=%p,%s,%s,%p,%d) - semi-stub\n",hKey, debugstr_a(lpszSubKey),
1159 debugstr_a(lpszValue), lpszPath, dwFlags);
1160
1161 lstrcpyA(szBuff, lpszPath);
1162
1163 /* FIXME: PathUnExpandEnvStringsA(szBuff); */
1164
1165 return SHSetValueA(hKey,lpszSubKey, lpszValue, REG_SZ, szBuff,
1166 lstrlenA(szBuff));
1167}
DWORD WINAPI SHSetValueA(HKEY hKey, LPCSTR lpszSubKey, LPCSTR lpszValue, DWORD dwType, LPCVOID pvData, DWORD cbData)
Definition: reg.c:1278

◆ SHRegSetPathW()

WINSHLWAPI DWORD WINAPI SHRegSetPathW ( HKEY  hKey,
LPCWSTR  lpszSubKey,
LPCWSTR  lpszValue,
LPCWSTR  lpszPath,
DWORD  dwFlags 
)

Definition at line 1174 of file reg.c.

1176{
1177 WCHAR szBuff[MAX_PATH];
1178
1179 FIXME("(hkey=%p,%s,%s,%p,%d) - semi-stub\n",hKey, debugstr_w(lpszSubKey),
1180 debugstr_w(lpszValue), lpszPath, dwFlags);
1181
1182 lstrcpyW(szBuff, lpszPath);
1183
1184 /* FIXME: PathUnExpandEnvStringsW(szBuff); */
1185
1186 return SHSetValueW(hKey,lpszSubKey, lpszValue, REG_SZ, szBuff,
1187 lstrlenW(szBuff));
1188}

◆ SHRegSetUSValueA()

WINSHLWAPI LONG WINAPI SHRegSetUSValueA ( LPCSTR  pszSubKey,
LPCSTR  pszValue,
DWORD  dwType,
LPVOID  pvData,
DWORD  cbData,
DWORD  dwFlags 
)

Definition at line 643 of file reg.c.

645{
646 BOOL ignoreHKCU = TRUE;
647 HUSKEY hkey;
648 LONG ret;
649
650 TRACE("(%s,%s,%d,%p,%d,0x%08x\n", debugstr_a(pszSubKey), debugstr_a(pszValue),
651 dwType, pvData, cbData, dwFlags);
652
653 if (!pvData)
655
657 ignoreHKCU = FALSE;
658
659 ret = SHRegOpenUSKeyA(pszSubKey, KEY_ALL_ACCESS, 0, &hkey, ignoreHKCU);
660 if (ret == ERROR_SUCCESS)
661 {
663 SHRegCloseUSKey(hkey);
664 }
665 return ret;
666}
LONG WINAPI SHRegWriteUSValueA(HUSKEY hUSKey, LPCSTR pszValue, DWORD dwType, LPVOID pvData, DWORD cbData, DWORD dwFlags)
Definition: reg.c:1007
#define SHREGSET_HKCU
Definition: shlwapi.h:719
_In_opt_ _In_opt_ _In_ _In_ DWORD cbData
Definition: shlwapi.h:761

◆ SHRegSetUSValueW()

WINSHLWAPI LONG WINAPI SHRegSetUSValueW ( LPCWSTR  pszSubKey,
LPCWSTR  pszValue,
DWORD  dwType,
LPVOID  pvData,
DWORD  cbData,
DWORD  dwFlags 
)

Definition at line 673 of file reg.c.

675{
676 BOOL ignoreHKCU = TRUE;
677 HUSKEY hkey;
678 LONG ret;
679
680 TRACE("(%s,%s,%d,%p,%d,0x%08x\n", debugstr_w(pszSubKey), debugstr_w(pszValue),
681 dwType, pvData, cbData, dwFlags);
682
683 if (!pvData)
685
687 ignoreHKCU = FALSE;
688
689 ret = SHRegOpenUSKeyW(pszSubKey, KEY_ALL_ACCESS, 0, &hkey, ignoreHKCU);
690 if (ret == ERROR_SUCCESS)
691 {
693 SHRegCloseUSKey(hkey);
694 }
695 return ret;
696}
LONG WINAPI SHRegWriteUSValueW(HUSKEY hUSKey, LPCWSTR pszValue, DWORD dwType, LPVOID pvData, DWORD cbData, DWORD dwFlags)
Definition: reg.c:1024

◆ SHRegWriteUSValueA()

WINSHLWAPI LONG WINAPI SHRegWriteUSValueA ( HUSKEY  hUSKey,
LPCSTR  pszValue,
DWORD  dwType,
LPVOID  pvData,
DWORD  cbData,
DWORD  dwFlags 
)

Definition at line 1007 of file reg.c.

1009{
1010 WCHAR szValue[MAX_PATH];
1011
1012 if (pszValue)
1013 MultiByteToWideChar(CP_ACP, 0, pszValue, -1, szValue, MAX_PATH);
1014
1015 return SHRegWriteUSValueW(hUSKey, pszValue ? szValue : NULL, dwType,
1017}

Referenced by SHRegSetUSValueA().

◆ SHRegWriteUSValueW()

WINSHLWAPI LONG WINAPI SHRegWriteUSValueW ( HUSKEY  hUSKey,
LPCWSTR  pszValue,
DWORD  dwType,
LPVOID  pvData,
DWORD  cbData,
DWORD  dwFlags 
)

Definition at line 1024 of file reg.c.

1026{
1027 DWORD dummy;
1028 LPSHUSKEY hKey = hUSKey;
1030
1031 TRACE("(%p,%s,%d,%p,%d,%d)\n", hUSKey, debugstr_w(pszValue),
1032 dwType, pvData, cbData, dwFlags);
1033
1034 if (!hUSKey || IsBadWritePtr(hUSKey, sizeof(SHUSKEY)) ||
1037
1039 {
1040 if (!hKey->HKCUkey)
1041 {
1042 /* Create the key */
1043 ret = RegCreateKeyW(hKey->HKCUstart, hKey->lpszPath, &hKey->HKCUkey);
1044 TRACE("Creating HKCU key, ret = %d\n", ret);
1045 if (ret && (dwFlags & (SHREGSET_FORCE_HKCU)))
1046 {
1047 hKey->HKCUkey = 0;
1048 return ret;
1049 }
1050 }
1051
1052 if (!ret)
1053 {
1054 if ((dwFlags & SHREGSET_FORCE_HKCU) ||
1056 {
1057 /* Doesn't exist or we are forcing: Write value */
1058 ret = RegSetValueExW(hKey->HKCUkey, pszValue, 0, dwType, pvData, cbData);
1059 TRACE("Writing HKCU value, ret = %d\n", ret);
1060 }
1061 }
1062 }
1063
1065 {
1066 if (!hKey->HKLMkey)
1067 {
1068 /* Create the key */
1069 ret = RegCreateKeyW(hKey->HKLMstart, hKey->lpszPath, &hKey->HKLMkey);
1070 TRACE("Creating HKLM key, ret = %d\n", ret);
1071 if (ret && (dwFlags & (SHREGSET_FORCE_HKLM)))
1072 {
1073 hKey->HKLMkey = 0;
1074 return ret;
1075 }
1076 }
1077
1078 if (!ret)
1079 {
1080 if ((dwFlags & SHREGSET_FORCE_HKLM) ||
1082 {
1083 /* Doesn't exist or we are forcing: Write value */
1084 ret = RegSetValueExW(hKey->HKLMkey, pszValue, 0, dwType, pvData, cbData);
1085 TRACE("Writing HKLM value, ret = %d\n", ret);
1086 }
1087 }
1088 }
1089
1090 return ret;
1091}
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
BOOL NTAPI IsBadWritePtr(IN LPVOID lp, IN UINT_PTR ucb)
Definition: except.c:883
#define SHREGSET_HKLM
Definition: shlwapi.h:721
#define SHREGSET_FORCE_HKLM
Definition: shlwapi.h:722

Referenced by SHRegSetUSValueW(), and SHRegWriteUSValueA().

◆ SHReleaseThreadRef()

WINSHLWAPI HRESULT WINAPI SHReleaseThreadRef ( void  )

Definition at line 279 of file thread.c.

280{
281 FIXME("() - stub!\n");
282 return S_OK;
283}

◆ SHSetThreadRef()

WINSHLWAPI HRESULT WINAPI SHSetThreadRef ( IUnknown lpUnknown)

Definition at line 256 of file thread.c.

257{
258 TRACE("(%p)\n", lpUnknown);
259
261 return E_NOINTERFACE;
262
264 return S_OK;
265}
BOOL WINAPI TlsSetValue(IN DWORD Index, IN LPVOID Value)
Definition: thread.c:1276

◆ SHSetValueA()

WINSHLWAPI DWORD WINAPI SHSetValueA ( HKEY  hKey,
LPCSTR  lpszSubKey,
LPCSTR  lpszValue,
DWORD  dwType,
LPCVOID  pvData,
DWORD  cbData 
)

Definition at line 1278 of file reg.c.

1280{
1281 DWORD dwRet = ERROR_SUCCESS, dwDummy;
1282 HKEY hSubKey;
1283
1284 TRACE("(hkey=%p,%s,%s,%d,%p,%d)\n", hKey, debugstr_a(lpszSubKey),
1285 debugstr_a(lpszValue), dwType, pvData, cbData);
1286
1287 if (lpszSubKey && *lpszSubKey)
1288 dwRet = RegCreateKeyExA(hKey, lpszSubKey, 0, NULL,
1289 0, KEY_SET_VALUE, NULL, &hSubKey, &dwDummy);
1290 else
1291 hSubKey = hKey;
1292 if (!dwRet)
1293 {
1294 dwRet = RegSetValueExA(hSubKey, lpszValue, 0, dwType, pvData, cbData);
1295 if (hSubKey != hKey)
1296 RegCloseKey(hSubKey);
1297 }
1298 return dwRet;
1299}
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
Definition: reg.c:4799

Referenced by RegisterExtensionForMIMETypeA(), RegisterMIMETypeForExtensionA(), and SHRegSetPathA().

◆ SHSetValueW()

WINSHLWAPI DWORD WINAPI SHSetValueW ( HKEY  hKey,
LPCWSTR  lpszSubKey,
LPCWSTR  lpszValue,
DWORD  dwType,
LPCVOID  pvData,
DWORD  cbData 
)

Definition at line 1306 of file reg.c.

1308{
1309 DWORD dwRet = ERROR_SUCCESS, dwDummy;
1310 HKEY hSubKey;
1311
1312 TRACE("(hkey=%p,%s,%s,%d,%p,%d)\n", hKey, debugstr_w(lpszSubKey),
1313 debugstr_w(lpszValue), dwType, pvData, cbData);
1314
1315 if (lpszSubKey && *lpszSubKey)
1316 dwRet = RegCreateKeyExW(hKey, lpszSubKey, 0, NULL,
1317 0, KEY_SET_VALUE, NULL, &hSubKey, &dwDummy);
1318 else
1319 hSubKey = hKey;
1320 if (!dwRet)
1321 {
1322 dwRet = RegSetValueExW(hSubKey, lpszValue, 0, dwType, pvData, cbData);
1323 if (hSubKey != hKey)
1324 RegCloseKey(hSubKey);
1325 }
1326 return dwRet;
1327}

Referenced by CMruBase::_AddItem(), CDesktopUpgradePropertyBag::_MarkAsUpgraded(), CMruPidlList::_SaveNodeSlots(), CMruShortList::_SaveSlots(), CMruLongList::_SaveSlots(), CRegPropertyBag::_WriteStream(), ApplyScheme(), CRegTreeOptions::GetSetState(), InitializeServerAdminUI(), MRUList_DataList(), RegisterExtensionForMIMETypeW(), RegisterMIMETypeForExtensionW(), TaskbarSettings::Save(), CGlobalFolderSettings::Save(), CRegFolder::SetNameOf(), CMruNode::SetNodeSlot(), SetUnreadMailInfo(), SHCopyKeyW(), SHELL32_WriteRegShellState(), SHELL_CacheComputerDescription(), SHGetSetSettings(), SHRegSetPathW(), and CRegPropertyBag::Write().

◆ SHSkipJunction()

WINSHLWAPI BOOL WINAPI SHSkipJunction ( struct IBindCtx pbc,
const CLSID pclsid 
)

Definition at line 4779 of file ordinal.c.

4780{
4781 static WCHAR szSkipBinding[] = { 'S','k','i','p',' ',
4782 'B','i','n','d','i','n','g',' ','C','L','S','I','D','\0' };
4783 BOOL bRet = FALSE;
4784
4785 if (pbc)
4786 {
4787 IUnknown* lpUnk;
4788
4789 if (SUCCEEDED(IBindCtx_GetObjectParam(pbc, szSkipBinding, &lpUnk)))
4790 {
4791 CLSID clsid;
4792
4793 if (SUCCEEDED(IUnknown_GetClassID(lpUnk, &clsid)) &&
4794 IsEqualGUID(pclsid, &clsid))
4795 bRet = TRUE;
4796
4797 IUnknown_Release(lpUnk);
4798 }
4799 }
4800 return bRet;
4801}
HRESULT WINAPI IUnknown_GetClassID(IUnknown *lpUnknown, CLSID *clsid)
Definition: ordinal.c:1457
const CLSID * clsid
Definition: msctf.cpp:50
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147

Referenced by SHSkipJunctionBinding().

◆ SHStrDupA()

WINSHLWAPI HRESULT WINAPI SHStrDupA ( LPCSTR  ,
WCHAR **   
)

◆ SHStrDupW()

WINSHLWAPI HRESULT WINAPI SHStrDupW ( LPCWSTR  ,
WCHAR **   
)

◆ SHUnlockShared()

WINSHLWAPI BOOL WINAPI SHUnlockShared ( void data)

◆ StrCatBuffA()

WINSHLWAPI LPSTR WINAPI StrCatBuffA ( LPSTR  lpszStr,
LPCSTR  lpszCat,
INT  cchMax 
)

Definition at line 1419 of file string.c.

1420{
1421 INT iLen;
1422
1423 TRACE("(%p,%s,%d)\n", lpszStr, debugstr_a(lpszCat), cchMax);
1424
1425 if (!lpszStr)
1426 {
1427 WARN("Invalid lpszStr would crash under Win32!\n");
1428 return NULL;
1429 }
1430
1431 iLen = strlen(lpszStr);
1432 cchMax -= iLen;
1433
1434 if (cchMax > 0)
1435 StrCpyNA(lpszStr + iLen, lpszCat, cchMax);
1436 return lpszStr;
1437}
#define StrCpyNA
Definition: shlwapi.h:1104

◆ StrCatBuffW()

WINSHLWAPI LPWSTR WINAPI StrCatBuffW ( LPWSTR  lpszStr,
LPCWSTR  lpszCat,
INT  cchMax 
)

Definition at line 1444 of file string.c.

1445{
1446 INT iLen;
1447
1448 TRACE("(%p,%s,%d)\n", lpszStr, debugstr_w(lpszCat), cchMax);
1449
1450 if (!lpszStr)
1451 {
1452 WARN("Invalid lpszStr would crash under Win32!\n");
1453 return NULL;
1454 }
1455
1456 iLen = strlenW(lpszStr);
1457 cchMax -= iLen;
1458
1459 if (cchMax > 0)
1460 StrCpyNW(lpszStr + iLen, lpszCat, cchMax);
1461 return lpszStr;
1462}
LPWSTR WINAPI StrCpyNW(LPWSTR dst, LPCWSTR src, int count)
Definition: string.c:536

◆ StrCatChainW()

WINSHLWAPI DWORD WINAPI StrCatChainW ( LPWSTR  lpszStr,
DWORD  cchMax,
DWORD  ichAt,
LPCWSTR  lpszCat 
)

Definition at line 475 of file string.c.

476{
477 TRACE("(%s,%u,%d,%s)\n", debugstr_w(lpszStr), cchMax, ichAt, debugstr_w(lpszCat));
478
479 if (ichAt == -1)
480 ichAt = strlenW(lpszStr);
481
482 if (!cchMax)
483 return ichAt;
484
485 if (ichAt == cchMax)
486 ichAt--;
487
488 if (lpszCat && ichAt < cchMax)
489 {
490 lpszStr += ichAt;
491 while (ichAt < cchMax - 1 && *lpszCat)
492 {
493 *lpszStr++ = *lpszCat++;
494 ichAt++;
495 }
496 *lpszStr = 0;
497 }
498
499 return ichAt;
500}

◆ StrCatW()

WINSHLWAPI LPWSTR WINAPI StrCatW ( LPWSTR  lpszStr,
LPCWSTR  lpszSrc 
)

Definition at line 452 of file string.c.

453{
454 TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSrc));
455
456 if (lpszStr && lpszSrc)
457 strcatW(lpszStr, lpszSrc);
458 return lpszStr;
459}

Referenced by CRegistryFolder::FormatValueData().

◆ StrChrA()

WINSHLWAPI LPSTR WINAPI StrChrA ( LPCSTR  lpszStr,
WORD  ch 
)

Definition at line 266 of file string.c.

267{
268 TRACE("(%s,%i)\n", debugstr_a(lpszStr), ch);
269
270 if (lpszStr)
271 {
272 while (*lpszStr)
273 {
274 if (!COMCTL32_ChrCmpA(*lpszStr, ch))
275 return (LPSTR)lpszStr;
276 lpszStr = CharNextA(lpszStr);
277 }
278 }
279 return NULL;
280}
static BOOL COMCTL32_ChrCmpA(WORD ch1, WORD ch2)
Definition: string.c:84

Referenced by FPropContainsProp(), PathFindNextComponentA(), PathQuoteSpacesA(), PathSkipRootA(), SHLWAPI_DoesModuleVersionMatch(), SHStripMneumonicA(), StrCSpnA(), StrPBrkA(), StrSpnA(), StrTrimA(), and test_StrChrA().

◆ StrChrIA()

WINSHLWAPI LPSTR WINAPI StrChrIA ( LPCSTR  lpszStr,
WORD  ch 
)

Definition at line 610 of file string.c.

611{
612 TRACE("(%s,%i)\n", debugstr_a(lpszStr), ch);
613
614 if (lpszStr)
615 {
616 while (*lpszStr)
617 {
618 if (!COMCTL32_ChrCmpIA(*lpszStr, ch))
619 return (LPSTR)lpszStr;
620 lpszStr = CharNextA(lpszStr);
621 }
622 }
623 return NULL;
624}
static BOOL COMCTL32_ChrCmpIA(WORD ch1, WORD ch2)
Definition: string.c:102

Referenced by FPropContainsProp(), StrCSpnIA(), and test_StrChrIA().

◆ StrChrIW()

WINSHLWAPI LPWSTR WINAPI StrChrIW ( LPCWSTR  lpszStr,
WCHAR  ch 
)

Definition at line 631 of file string.c.

632{
633 TRACE("(%s,%i)\n", debugstr_w(lpszStr), ch);
634
635 if (lpszStr)
636 {
637 ch = towupper(ch);
638 while (*lpszStr)
639 {
640 if (towupper(*lpszStr) == ch)
641 return (LPWSTR)lpszStr;
642 lpszStr++;
643 }
644 lpszStr = NULL;
645 }
646 return (LPWSTR)lpszStr;
647}
#define towupper(c)
Definition: wctype.h:99

Referenced by StrCSpnIW(), and test_StrChrIW().

◆ StrChrW()

◆ StrCmpIW()

WINSHLWAPI int WINAPI StrCmpIW ( LPCWSTR  lpszStr,
LPCWSTR  lpszComp 
)

Definition at line 353 of file string.c.

354{
355 TRACE("(%s,%s)\n", debugstr_w(lpszStr),debugstr_w(lpszComp));
356 return CompareStringW(GetThreadLocale(), NORM_IGNORECASE, lpszStr, -1, lpszComp, -1) - CSTR_EQUAL;
357}

◆ StrCmpLogicalW()

WINSHLWAPI INT WINAPI StrCmpLogicalW ( LPCWSTR  lpszStr,
LPCWSTR  lpszComp 
)

Definition at line 2310 of file string.c.

2311{
2312 INT iDiff;
2313
2314 TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszComp));
2315
2316 if (lpszStr && lpszComp)
2317 {
2318 while (*lpszStr)
2319 {
2320 if (!*lpszComp)
2321 return 1;
2322 else if (isdigitW(*lpszStr))
2323 {
2324 int iStr, iComp;
2325
2326 if (!isdigitW(*lpszComp))
2327 return -1;
2328
2329 /* Compare the numbers */
2330 StrToIntExW(lpszStr, 0, &iStr);
2331 StrToIntExW(lpszComp, 0, &iComp);
2332
2333 if (iStr < iComp)
2334 return -1;
2335 else if (iStr > iComp)
2336 return 1;
2337
2338 /* Skip */
2339 while (isdigitW(*lpszStr))
2340 lpszStr++;
2341 while (isdigitW(*lpszComp))
2342 lpszComp++;
2343 }
2344 else if (isdigitW(*lpszComp))
2345 return 1;
2346 else
2347 {
2348 iDiff = ChrCmpIW(*lpszStr,*lpszComp);
2349 if (iDiff > 0)
2350 return 1;
2351 else if (iDiff < 0)
2352 return -1;
2353
2354 lpszStr++;
2355 lpszComp++;
2356 }
2357 }
2358 if (*lpszComp)
2359 return -1;
2360 }
2361 return 0;
2362}
BOOL WINAPI ChrCmpIW(WCHAR ch1, WCHAR ch2)
Definition: string.c:217
BOOL WINAPI StrToIntExW(LPCWSTR lpszStr, DWORD dwFlags, int *lpiRet)
Definition: string.c:970
#define isdigitW(n)
Definition: unicode.h:56

◆ StrCmpNA()

WINSHLWAPI INT WINAPI StrCmpNA ( LPCSTR  lpszStr,
LPCSTR  lpszComp,
INT  iLen 
)

Definition at line 489 of file string.c.

490{
491 TRACE("(%s,%s,%i)\n", debugstr_a(lpszStr), debugstr_a(lpszComp), iLen);
492 return CompareStringA(GetThreadLocale(), 0, lpszStr, iLen, lpszComp, iLen) - CSTR_EQUAL;
493}

Referenced by SHLWAPI_WndCompatEnumProc(), StrCmpNCA(), StrRStrA(), StrStrA(), and test_StrCmpA().

◆ StrCmpNIA()

WINSHLWAPI INT WINAPI StrCmpNIA ( LPCSTR  lpszStr,
LPCSTR  lpszComp,
INT  iLen 
)

Definition at line 296 of file string.c.

297{
298 TRACE("(%s,%s,%i)\n", debugstr_a(lpszStr), debugstr_a(lpszComp), iLen);
299 return CompareStringA(GetThreadLocale(), NORM_IGNORECASE, lpszStr, iLen, lpszComp, iLen) - CSTR_EQUAL;
300}

Referenced by DoTestEntry(), SHLWAPI_DoesModuleVersionMatch(), StrCmpNICA(), StrRStrIA(), StrStrIA(), and test_StrCmpA().

◆ StrCmpNIW()

WINSHLWAPI INT WINAPI StrCmpNIW ( LPCWSTR  lpszStr,
LPCWSTR  lpszComp,
INT  iLen 
)

◆ StrCmpNW()

◆ StrCmpW()

WINSHLWAPI int WINAPI StrCmpW ( LPCWSTR  lpszStr,
LPCWSTR  lpszComp 
)

Definition at line 434 of file string.c.

435{
436 TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszComp));
437 return CompareStringW(GetThreadLocale(), 0, lpszStr, -1, lpszComp, -1) - CSTR_EQUAL;
438}

◆ StrCpyNW()

WINSHLWAPI LPWSTR WINAPI StrCpyNW ( LPWSTR  dst,
LPCWSTR  src,
int  count 
)

Definition at line 536 of file string.c.

537{
538 LPWSTR d = dst;
539 LPCWSTR s = src;
540
541 TRACE("(%p,%s,%i)\n", dst, debugstr_w(src), count);
542
543 if (s)
544 {
545 while ((count > 1) && *s)
546 {
547 count--;
548 *d++ = *s++;
549 }
550 }
551 if (count) *d = 0;
552
553 return dst;
554}
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLdouble s
Definition: gl.h:2039
#define d
Definition: ke_i.h:81

◆ StrCpyW()

WINSHLWAPI LPWSTR WINAPI StrCpyW ( LPWSTR  lpszStr,
LPCWSTR  lpszSrc 
)

Definition at line 514 of file string.c.

515{
516 TRACE("(%p,%s)\n", lpszStr, debugstr_w(lpszSrc));
517
518 if (lpszStr && lpszSrc)
519 strcpyW(lpszStr, lpszSrc);
520 return lpszStr;
521}

Referenced by _ShowContextMenu(), PathCreateFromUrlW(), and test_StrCpyW().

◆ StrCSpnA()

WINSHLWAPI INT WINAPI StrCSpnA ( LPCSTR  lpszStr,
LPCSTR  lpszMatch 
)

Definition at line 452 of file string.c.

453{
454 TRACE("(%s,%s)\n",debugstr_a(lpszStr), debugstr_a(lpszMatch));
455
456 return COMCTL32_StrSpnHelperA(lpszStr, lpszMatch, StrChrA, TRUE);
457}
static int COMCTL32_StrSpnHelperA(LPCSTR lpszStr, LPCSTR lpszMatch, LPSTR(WINAPI *pStrChrFn)(LPCSTR, WORD), BOOL bInvert)
Definition: string.c:417

◆ StrCSpnIA()

WINSHLWAPI INT WINAPI StrCSpnIA ( LPCSTR  lpszStr,
LPCSTR  lpszMatch 
)

Definition at line 746 of file string.c.

747{
748 TRACE("(%s,%s)\n",debugstr_a(lpszStr), debugstr_a(lpszMatch));
749
750 return COMCTL32_StrSpnHelperA(lpszStr, lpszMatch, StrChrIA, TRUE);
751}
LPSTR WINAPI StrChrIA(LPCSTR lpszStr, WORD ch)
Definition: string.c:610

◆ StrCSpnIW()

WINSHLWAPI INT WINAPI StrCSpnIW ( LPCWSTR  lpszStr,
LPCWSTR  lpszMatch 
)

Definition at line 758 of file string.c.

759{
760 LPCWSTR lpszRead = lpszStr;
761
762 TRACE("(%s,%s)\n",debugstr_w(lpszStr), debugstr_w(lpszMatch));
763
764 if (lpszStr && *lpszStr && lpszMatch)
765 {
766 while (*lpszRead)
767 {
768 if (StrChrIW(lpszMatch, *lpszRead)) break;
769 lpszRead++;
770 }
771 }
772 return lpszRead - lpszStr;
773}
LPWSTR WINAPI StrChrIW(LPCWSTR lpszStr, WCHAR ch)
Definition: string.c:631

◆ StrCSpnW()

WINSHLWAPI INT WINAPI StrCSpnW ( LPCWSTR  lpszStr,
LPCWSTR  lpszMatch 
)

Definition at line 839 of file string.c.

840{
841 if (!lpszStr || !lpszMatch) return 0;
842 return wcscspn( lpszStr, lpszMatch );
843}
_Check_return_ _CRTIMP size_t __cdecl wcscspn(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_Control)

◆ StrDupA()

WINSHLWAPI char *WINAPI StrDupA ( const char str)

Definition at line 292 of file string.c.

293{
294 unsigned int len;
295 char *ret;
296
297 TRACE("%s\n", wine_dbgstr_a(str));
298
299 len = str ? strlen(str) + 1 : 1;
301
302 if (ret)
303 {
304 if (str)
305 memcpy(ret, str, len);
306 else
307 *ret = '\0';
308 }
309
310 return ret;
311}
#define LMEM_FIXED
Definition: minwinbase.h:81
const char int int int static __inline const char * wine_dbgstr_a(const char *s)
Definition: debug.h:187

Referenced by SHLWAPI_GetModuleVersion(), TEST_StrDupA(), and test_StrDupA().

◆ StrDupW()

◆ StrFormatByteSize64A()

WINSHLWAPI LPSTR WINAPI StrFormatByteSize64A ( LONGLONG  llBytes,
LPSTR  lpszDest,
UINT  cchMax 
)

Definition at line 2502 of file string.c.

2503{
2504 WCHAR wszBuff[32];
2505
2506 StrFormatByteSizeW(llBytes, wszBuff, sizeof(wszBuff)/sizeof(WCHAR));
2507
2508 if (lpszDest)
2509 WideCharToMultiByte(CP_ACP, 0, wszBuff, -1, lpszDest, cchMax, 0, 0);
2510 return lpszDest;
2511}
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
Definition: string.c:2394

Referenced by CDrivesFolder::GetDetailsOf(), and StrFormatByteSizeA().

◆ StrFormatByteSizeA()

WINSHLWAPI LPSTR WINAPI StrFormatByteSizeA ( DWORD  dwBytes,
LPSTR  lpszDest,
UINT  cchMax 
)

Definition at line 2530 of file string.c.

2531{
2532 TRACE("(%d,%p,%d)\n", dwBytes, lpszDest, cchMax);
2533
2534 return StrFormatByteSize64A(dwBytes, lpszDest, cchMax);
2535}
LPSTR WINAPI StrFormatByteSize64A(LONGLONG llBytes, LPSTR lpszDest, UINT cchMax)
Definition: string.c:2502

Referenced by CCabFolder::GetItemDetails().

◆ StrFormatByteSizeEx()

WINSHLWAPI HRESULT WINAPI StrFormatByteSizeEx ( LONGLONG  ,
SFBS_FLAGS  ,
LPWSTR  ,
UINT   
)

◆ StrFormatByteSizeW()

WINSHLWAPI LPWSTR WINAPI StrFormatByteSizeW ( LONGLONG  llBytes,
LPWSTR  lpszDest,
UINT  cchMax 
)

Definition at line 2394 of file string.c.

2395{
2396#define KB ((ULONGLONG)1024)
2397#define MB (KB*KB)
2398#define GB (KB*KB*KB)
2399#define TB (KB*KB*KB*KB)
2400#define PB (KB*KB*KB*KB*KB)
2401
2402 static const SHLWAPI_BYTEFORMATS bfFormats[] =
2403 {
2404#ifdef __REACTOS__
2405 { 10*KB, 10.24, 100.0, 2, IDS_KB_FORMAT }, /* 10 KB */
2406 { 100*KB, 102.4, 10.0, 1, IDS_KB_FORMAT }, /* 100 KB */
2407 { 1000*KB, 1024.0, 1.0, 0, IDS_KB_FORMAT }, /* 1000 KB */
2408 { 10*MB, 10485.76, 100.0, 2, IDS_MB_FORMAT }, /* 10 MB */
2409 { 100*MB, 104857.6, 10.0, 1, IDS_MB_FORMAT }, /* 100 MB */
2410 { 1000*MB, 1048576.0, 1.0, 0, IDS_MB_FORMAT }, /* 1000 MB */
2411 { 10*GB, 10737418.24, 100.0, 2, IDS_GB_FORMAT }, /* 10 GB */
2412 { 100*GB, 107374182.4, 10.0, 1, IDS_GB_FORMAT }, /* 100 GB */
2413 { 1000*GB, 1073741824.0, 1.0, 0, IDS_GB_FORMAT }, /* 1000 GB */
2414 { 10*TB, 10485.76, 100.0, 2, IDS_TB_FORMAT }, /* 10 TB */
2415 { 100*TB, 104857.6, 10.0, 1, IDS_TB_FORMAT }, /* 100 TB */
2416 { 1000*TB, 1048576.0, 1.0, 0, IDS_TB_FORMAT }, /* 1000 TB */
2417 { 10*PB, 10737418.24, 100.00, 2, IDS_PB_FORMAT }, /* 10 PB */
2418 { 100*PB, 107374182.4, 10.00, 1, IDS_PB_FORMAT }, /* 100 PB */
2419 { 1000*PB, 1073741824.0, 1.00, 0, IDS_PB_FORMAT }, /* 1000 PB */
2420 { 0, 10995116277.76, 100.00, 2, IDS_EB_FORMAT } /* EB's, catch all */
2421#else
2422 { 10*KB, 10.24, 100.0, 2, 'K' }, /* 10 KB */
2423 { 100*KB, 102.4, 10.0, 1, 'K' }, /* 100 KB */
2424 { 1000*KB, 1024.0, 1.0, 0, 'K' }, /* 1000 KB */
2425 { 10*MB, 10485.76, 100.0, 2, 'M' }, /* 10 MB */
2426 { 100*MB, 104857.6, 10.0, 1, 'M' }, /* 100 MB */
2427 { 1000*MB, 1048576.0, 1.0, 0, 'M' }, /* 1000 MB */
2428 { 10*GB, 10737418.24, 100.0, 2, 'G' }, /* 10 GB */
2429 { 100*GB, 107374182.4, 10.0, 1, 'G' }, /* 100 GB */
2430 { 1000*GB, 1073741824.0, 1.0, 0, 'G' }, /* 1000 GB */
2431 { 10*TB, 10485.76, 100.0, 2, 'T' }, /* 10 TB */
2432 { 100*TB, 104857.6, 10.0, 1, 'T' }, /* 100 TB */
2433 { 1000*TB, 1048576.0, 1.0, 0, 'T' }, /* 1000 TB */
2434 { 10*PB, 10737418.24, 100.00, 2, 'P' }, /* 10 PB */
2435 { 100*PB, 107374182.4, 10.00, 1, 'P' }, /* 100 PB */
2436 { 1000*PB, 1073741824.0, 1.00, 0, 'P' }, /* 1000 PB */
2437 { 0, 10995116277.76, 100.00, 2, 'E' } /* EB's, catch all */
2438#endif
2439 };
2440#ifdef __REACTOS__
2441 WCHAR szBuff[40], wszFormat[40];
2442#else
2443 WCHAR wszAdd[] = {' ','?','B',0};
2444#endif
2445 double dBytes;
2446 UINT i = 0;
2447
2448 TRACE("(0x%s,%p,%d)\n", wine_dbgstr_longlong(llBytes), lpszDest, cchMax);
2449
2450 if (!lpszDest || !cchMax)
2451 return lpszDest;
2452
2453 if (llBytes < 1024) /* 1K */
2454 {
2455 WCHAR wszBytesFormat[64];
2456 LoadStringW(shlwapi_hInstance, IDS_BYTES_FORMAT, wszBytesFormat, 64);
2457 snprintfW(lpszDest, cchMax, wszBytesFormat, (int)llBytes);
2458 return lpszDest;
2459 }
2460
2461 /* Note that if this loop completes without finding a match, i will be
2462 * pointing at the last entry, which is a catch all for > 1000 PB
2463 */
2464 while (i < sizeof(bfFormats) / sizeof(SHLWAPI_BYTEFORMATS) - 1)
2465 {
2466 if (llBytes < bfFormats[i].dLimit)
2467 break;
2468 i++;
2469 }
2470 /* Above 1 TB we encounter problems with FP accuracy. So for amounts above
2471 * this number we integer shift down by 1 MB first. The table above has
2472 * the divisors scaled down from the '< 10 TB' entry onwards, to account
2473 * for this. We also add a small fudge factor to get the correct result for
2474 * counts that lie exactly on a 1024 byte boundary.
2475 */
2476 if (i > 8)
2477 dBytes = (double)(llBytes >> 20) + 0.001; /* Scale down by 1 MB */
2478 else
2479 dBytes = (double)llBytes + 0.00001;
2480
2481 dBytes = floor(dBytes / bfFormats[i].dDivisor) / bfFormats[i].dNormaliser;
2482
2483#ifdef __REACTOS__
2484 if (!FormatDouble(dBytes, bfFormats[i].nDecimals, szBuff, ARRAYSIZE(szBuff)))
2485 return NULL;
2486 LoadStringW(shlwapi_hInstance, bfFormats[i].nFormatID, wszFormat, ARRAYSIZE(wszFormat));
2487 snprintfW(lpszDest, cchMax, wszFormat, szBuff);
2488#else
2489 if (!FormatDouble(dBytes, bfFormats[i].nDecimals, lpszDest, cchMax))
2490 return NULL;
2491 wszAdd[1] = bfFormats[i].wPrefix;
2492 StrCatBuffW(lpszDest, wszAdd, cchMax);
2493#endif
2494 return lpszDest;
2495}
#define IDS_BYTES_FORMAT
Definition: resource.h:122
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49
INT WINAPI DECLSPEC_HOTPATCH LoadStringW(HINSTANCE instance, UINT resource_id, LPWSTR buffer, INT buflen)
Definition: string.c:1220
#define KB
#define PB
LPWSTR WINAPI StrCatBuffW(LPWSTR lpszStr, LPCWSTR lpszCat, INT cchMax)
Definition: string.c:1444
#define TB
#define GB
#define MB
HINSTANCE shlwapi_hInstance
Definition: shlwapi_main.c:33
static int FormatDouble(double value, int decimals, LPWSTR pszBuf, int cchBuf)
Definition: string.c:129
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
Definition: string.c:91
#define snprintfW
Definition: unicode.h:66

Referenced by AddUserProfile(), CAvailableApplicationInfo::CAvailableApplicationInfo(), dialog_vcl_add_drives(), FormatFileSizeWithBytes(), CZipFolder::GetDetailsOf(), CDrvDefExt::InitGeneralPage(), InitializeFormatDriveDlg(), InitializeRecycleBinDlg(), InsertDefaultClusterSizeForFs(), CCleanMgrProperties::OnInitDialog(), PerformancePageRefreshThread(), PrintDiskData(), PrintPartitionData(), CDownloaderProgress::SetProgress(), SH_FormatFileSizeWithBytes(), ShortSizeFormatW(), StrFormatByteSize64A(), UpdateLanStatusUiDlg(), CCleanMgrProperties::UpdateSpaceUsed(), and CDefView::UpdateStatusbar().

◆ StrFormatKBSizeA()

WINSHLWAPI LPSTR WINAPI StrFormatKBSizeA ( LONGLONG  llBytes,
LPSTR  lpszDest,
UINT  cchMax 
)

Definition at line 1741 of file string.c.

1742{
1743 WCHAR wszBuf[256];
1744
1745 if (!StrFormatKBSizeW(llBytes, wszBuf, 256))
1746 return NULL;
1747 if (!WideCharToMultiByte(CP_ACP, 0, wszBuf, -1, lpszDest, cchMax, NULL, NULL))
1748 return NULL;
1749 return lpszDest;
1750}
LPWSTR WINAPI StrFormatKBSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
Definition: string.c:1757

Referenced by CFontExt::GetDetailsOf().

◆ StrFormatKBSizeW()

WINSHLWAPI LPWSTR WINAPI StrFormatKBSizeW ( LONGLONG  llBytes,
LPWSTR  lpszDest,
UINT  cchMax 
)

Definition at line 1757 of file string.c.

1758{
1759 static const WCHAR kb[] = {' ','K','B',0};
1760 LONGLONG llKB = (llBytes + 1023) >> 10;
1761 int len;
1762
1763 TRACE("(0x%s,%p,%d)\n", wine_dbgstr_longlong(llBytes), lpszDest, cchMax);
1764
1765 if (!FormatInt(llKB, lpszDest, cchMax))
1766 return NULL;
1767
1769 if (cchMax - len < 4)
1770 return NULL;
1771 lstrcatW(lpszDest, kb);
1772 return lpszDest;
1773}
static int FormatInt(LONGLONG qdwValue, LPWSTR pszBuf, int cchBuf)
Definition: string.c:96
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
int64_t LONGLONG
Definition: typedefs.h:68

Referenced by _ILGetFileSize(), CFSFolder::FormatSize(), and StrFormatKBSizeA().

◆ StrFromTimeIntervalA()

WINSHLWAPI int WINAPI StrFromTimeIntervalA ( LPSTR  lpszStr,
UINT  cchMax,
DWORD  dwMS,
int  iDigits 
)

Definition at line 2131 of file string.c.

2133{
2134 INT iRet = 0;
2135
2136 TRACE("(%p,%d,%d,%d)\n", lpszStr, cchMax, dwMS, iDigits);
2137
2138 if (lpszStr && cchMax)
2139 {
2140 WCHAR szBuff[128];
2141 StrFromTimeIntervalW(szBuff, sizeof(szBuff)/sizeof(WCHAR), dwMS, iDigits);
2142 WideCharToMultiByte(CP_ACP,0,szBuff,-1,lpszStr,cchMax,0,0);
2143 }
2144 return iRet;
2145}
INT WINAPI StrFromTimeIntervalW(LPWSTR lpszStr, UINT cchMax, DWORD dwMS, int iDigits)
Definition: string.c:2153

Referenced by test_StrFromTimeIntervalA().

◆ StrFromTimeIntervalW()

WINSHLWAPI int WINAPI StrFromTimeIntervalW ( LPWSTR  lpszStr,
UINT  cchMax,
DWORD  dwMS,
int  iDigits 
)

Definition at line 2153 of file string.c.

2155{
2156 INT iRet = 0;
2157
2158 TRACE("(%p,%d,%d,%d)\n", lpszStr, cchMax, dwMS, iDigits);
2159
2160 if (lpszStr && cchMax)
2161 {
2162 WCHAR szCopy[128];
2163 DWORD dwHours, dwMinutes;
2164
2165 if (!iDigits || cchMax == 1)
2166 {
2167 *lpszStr = '\0';
2168 return 0;
2169 }
2170
2171 /* Calculate the time classes */
2172 dwMS = (dwMS + 500) / 1000;
2173 dwHours = dwMS / 3600;
2174 dwMS -= dwHours * 3600;
2175 dwMinutes = dwMS / 60;
2176 dwMS -= dwMinutes * 60;
2177
2178 szCopy[0] = '\0';
2179
2180 if (dwHours)
2181 iDigits = SHLWAPI_WriteTimeClass(szCopy, dwHours, IDS_TIME_INTERVAL_HOURS, iDigits);
2182
2183 if (dwMinutes && iDigits)
2184 iDigits = SHLWAPI_WriteTimeClass(szCopy, dwMinutes, IDS_TIME_INTERVAL_MINUTES, iDigits);
2185
2186 if (iDigits) /* Always write seconds if we have significant digits */
2187 SHLWAPI_WriteTimeClass(szCopy, dwMS, IDS_TIME_INTERVAL_SECONDS, iDigits);
2188
2189 lstrcpynW(lpszStr, szCopy, cchMax);
2190 iRet = strlenW(lpszStr);
2191 }
2192 return iRet;
2193}
#define IDS_TIME_INTERVAL_MINUTES
Definition: resource.h:28
#define IDS_TIME_INTERVAL_HOURS
Definition: resource.h:27
#define IDS_TIME_INTERVAL_SECONDS
Definition: resource.h:29
static int SHLWAPI_WriteTimeClass(LPWSTR lpszOut, DWORD dwValue, UINT uClassStringId, int iDigits)
Definition: string.c:2087

Referenced by dialog_proc(), and StrFromTimeIntervalA().

◆ StrIsIntlEqualA()

WINSHLWAPI BOOL WINAPI StrIsIntlEqualA ( BOOL  bCase,
LPCSTR  lpszStr,
LPCSTR  lpszComp,
int  iLen 
)

Definition at line 2210 of file string.c.

2212{
2213 DWORD dwFlags;
2214
2215 TRACE("(%d,%s,%s,%d)\n", bCase,
2216 debugstr_a(lpszStr), debugstr_a(lpszComp), iLen);
2217
2218 /* FIXME: This flag is undocumented and unknown by our CompareString.
2219 * We need a define for it.
2220 */
2221 dwFlags = 0x10000000;
2222 if (!bCase) dwFlags |= NORM_IGNORECASE;
2223
2224 return (CompareStringA(GetThreadLocale(), dwFlags, lpszStr, iLen, lpszComp, iLen) == CSTR_EQUAL);
2225}

◆ StrIsIntlEqualW()

WINSHLWAPI BOOL WINAPI StrIsIntlEqualW ( BOOL  bCase,
LPCWSTR  lpszStr,
LPCWSTR  lpszComp,
int  iLen 
)

Definition at line 2232 of file string.c.

2234{
2235 DWORD dwFlags;
2236
2237 TRACE("(%d,%s,%s,%d)\n", bCase,
2238 debugstr_w(lpszStr),debugstr_w(lpszComp), iLen);
2239
2240 /* FIXME: This flag is undocumented and unknown by our CompareString.
2241 * We need a define for it.
2242 */
2243 dwFlags = 0x10000000;
2244 if (!bCase) dwFlags |= NORM_IGNORECASE;
2245
2246 return (CompareStringW(GetThreadLocale(), dwFlags, lpszStr, iLen, lpszComp, iLen) == CSTR_EQUAL);
2247}

◆ StrNCatA()

WINSHLWAPI LPSTR WINAPI StrNCatA ( LPSTR  ,
LPCSTR  ,
int   
)

◆ StrNCatW()

WINSHLWAPI LPWSTR WINAPI StrNCatW ( LPWSTR  ,
LPCWSTR  ,
int   
)

◆ StrPBrkA()

WINSHLWAPI LPSTR WINAPI StrPBrkA ( LPCSTR  lpszStr,
LPCSTR  lpszMatch 
)

Definition at line 1263 of file string.c.

1264{
1265 TRACE("(%s,%s)\n",debugstr_a(lpszStr), debugstr_a(lpszMatch));
1266
1267 if (lpszStr && lpszMatch && *lpszMatch)
1268 {
1269 while (*lpszStr)
1270 {
1271 if (StrChrA(lpszMatch, *lpszStr))
1272 return (LPSTR)lpszStr;
1273 lpszStr = CharNextA(lpszStr);
1274 }
1275 }
1276 return NULL;
1277}

◆ StrPBrkW()

WINSHLWAPI LPWSTR WINAPI StrPBrkW ( LPCWSTR  lpszStr,
LPCWSTR  lpszMatch 
)

Definition at line 1284 of file string.c.

1285{
1286 if (!lpszStr || !lpszMatch) return NULL;
1287 return strpbrkW( lpszStr, lpszMatch );
1288}
#define strpbrkW(str, accept)
Definition: unicode.h:49

◆ StrRChrA()

WINSHLWAPI LPSTR WINAPI StrRChrA ( LPCSTR  lpszStr,
LPCSTR  lpszEnd,
WORD  ch 
)

Definition at line 521 of file string.c.

522{
523 LPCSTR lpszRet = NULL;
524
525 TRACE("(%s,%s,%x)\n", debugstr_a(lpszStr), debugstr_a(lpszEnd), ch);
526
527 if (lpszStr)
528 {
529 WORD ch2;
530
531 if (!lpszEnd)
532 lpszEnd = lpszStr + lstrlenA(lpszStr);
533
534 while (*lpszStr && lpszStr <= lpszEnd)
535 {
536 ch2 = IsDBCSLeadByte(*lpszStr)? *lpszStr << 8 | lpszStr[1] : *lpszStr;
537
538 if (!COMCTL32_ChrCmpA(ch, ch2))
539 lpszRet = lpszStr;
540 lpszStr = CharNextA(lpszStr);
541 }
542 }
543 return (LPSTR)lpszRet;
544}

Referenced by PathRemoveFileSpecA(), and test_StrRChrA().

◆ StrRChrIA()

WINSHLWAPI LPSTR WINAPI StrRChrIA ( LPCSTR  lpszStr,
LPCSTR  lpszEnd,
WORD  ch 
)

Definition at line 790 of file string.c.

791{
792 LPCSTR lpszRet = NULL;
793
794 TRACE("(%s,%s,%x)\n", debugstr_a(lpszStr), debugstr_a(lpszEnd), ch);
795
796 if (lpszStr)
797 {
798 WORD ch2;
799
800 if (!lpszEnd)
801 lpszEnd = lpszStr + lstrlenA(lpszStr);
802
803 while (*lpszStr && lpszStr <= lpszEnd)
804 {
805 ch2 = IsDBCSLeadByte(*lpszStr)? *lpszStr << 8 | lpszStr[1] : *lpszStr;
806
807 if (ch == ch2)
808 lpszRet = lpszStr;
809 lpszStr = CharNextA(lpszStr);
810 }
811 }
812 return (LPSTR)lpszRet;
813}

◆ StrRChrIW()

WINSHLWAPI LPWSTR WINAPI StrRChrIW ( LPCWSTR  str,
LPCWSTR  end,
WORD  ch 
)

Definition at line 820 of file string.c.

821{
822 WCHAR *ret = NULL;
823
824 if (!str) return NULL;
825 if (!end) end = str + lstrlenW(str);
826 while (str < end)
827 {
828 if (!COMCTL32_ChrCmpIW(*str, ch)) ret = (WCHAR *)str;
829 str++;
830 }
831 return ret;
832}
static BOOL COMCTL32_ChrCmpIW(WCHAR ch1, WCHAR ch2)
Definition: string.c:114

◆ StrRChrW()

WINSHLWAPI LPWSTR WINAPI StrRChrW ( LPCWSTR  str,
LPCWSTR  end,
WORD  ch 
)

Definition at line 552 of file string.c.

553{
554 WCHAR *ret = NULL;
555
556 if (!str) return NULL;
557 if (!end) end = str + lstrlenW(str);
558 while (str < end)
559 {
560 if (*str == ch) ret = (WCHAR *)str;
561 str++;
562 }
563 return ret;
564}

Referenced by add_file_to_entry(), CopySdbToAppPatch(), CIniPropertyBag::LooksLikeAnAlternateStream(), PathCchRemoveFileSpec(), PathRemoveFileSpecW(), SdbUninstall(), SHPathPrepareForWriteW(), test_StrRChrW(), and wildcard_to_file().

◆ StrRetToBSTR()

WINSHLWAPI HRESULT WINAPI StrRetToBSTR ( STRRET lpStrRet,
LPCITEMIDLIST  pidl,
BSTR pBstrOut 
)

Definition at line 1700 of file string.c.

1701{
1702 HRESULT hRet = E_FAIL;
1703
1704 switch (lpStrRet->uType)
1705 {
1706 case STRRET_WSTR:
1707 *pBstrOut = SysAllocString(lpStrRet->u.pOleStr);
1708 if (*pBstrOut)
1709 hRet = S_OK;
1710 CoTaskMemFree(lpStrRet->u.pOleStr);
1711 break;
1712
1713 case STRRET_CSTR:
1714 hRet = _SHStrDupAToBSTR(lpStrRet->u.cStr, pBstrOut);
1715 break;
1716
1717 case STRRET_OFFSET:
1718 hRet = _SHStrDupAToBSTR(((LPCSTR)&pidl->mkid) + lpStrRet->u.uOffset, pBstrOut);
1719 break;
1720
1721 default:
1722 *pBstrOut = NULL;
1723 }
1724
1725 return hRet;
1726}
static HRESULT _SHStrDupAToBSTR(LPCSTR src, BSTR *pBstrOut)
Definition: string.c:1664
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
@ STRRET_CSTR
Definition: shtypes.idl:87
@ STRRET_OFFSET
Definition: shtypes.idl:86
@ STRRET_WSTR
Definition: shtypes.idl:85
char cStr[MAX_PATH]
Definition: shtypes.idl:98
UINT uType
Definition: shtypes.idl:93
LPWSTR pOleStr
Definition: shtypes.idl:96
UINT uOffset
Definition: shtypes.idl:97

Referenced by CFolderItem::get_Name(), CFolderItem::get_Path(), SHELL_GetDetailsOfAsStringVariant(), and StrRetToVariantBSTR().

◆ StrRetToBufA()

WINSHLWAPI HRESULT WINAPI StrRetToBufA ( STRRET ,
LPCITEMIDLIST  ,
LPSTR  ,
UINT   
)

◆ StrRetToBufW()

WINSHLWAPI HRESULT WINAPI StrRetToBufW ( STRRET ,
LPCITEMIDLIST  ,
LPWSTR  ,
UINT   
)

◆ StrRetToStrA()

WINSHLWAPI HRESULT WINAPI StrRetToStrA ( STRRET ,
LPCITEMIDLIST  ,
LPSTR  
)

◆ StrRetToStrW()

WINSHLWAPI HRESULT WINAPI StrRetToStrW ( STRRET ,
LPCITEMIDLIST  ,
LPWSTR  
)

◆ StrRStrIA()

WINSHLWAPI LPSTR WINAPI StrRStrIA ( LPCSTR  lpszStr,
LPCSTR  lpszEnd,
LPCSTR  lpszSearch 
)

Definition at line 662 of file string.c.

663{
664 LPSTR lpszRet = NULL;
665 WORD ch1, ch2;
666 INT iLen;
667
668 TRACE("(%s,%s)\n", debugstr_a(lpszStr), debugstr_a(lpszSearch));
669
670 if (!lpszStr || !lpszSearch || !*lpszSearch)
671 return NULL;
672
673 if (IsDBCSLeadByte(*lpszSearch))
674 ch1 = *lpszSearch << 8 | (UCHAR)lpszSearch[1];
675 else
676 ch1 = *lpszSearch;
677 iLen = lstrlenA(lpszSearch);
678
679 if (!lpszEnd)
680 lpszEnd = lpszStr + lstrlenA(lpszStr);
681 else /* reproduce the broken behaviour on Windows */
682 lpszEnd += min(iLen - 1, lstrlenA(lpszEnd));
683
684 while (lpszStr + iLen <= lpszEnd && *lpszStr)
685 {
686 ch2 = IsDBCSLeadByte(*lpszStr)? *lpszStr << 8 | (UCHAR)lpszStr[1] : *lpszStr;
687 if (!COMCTL32_ChrCmpIA(ch1, ch2))
688 {
689 if (!StrCmpNIA(lpszStr, lpszSearch, iLen))
690 lpszRet = (LPSTR)lpszStr;
691 }
692 lpszStr = CharNextA(lpszStr);
693 }
694 return lpszRet;
695}
INT WINAPI StrCmpNIA(LPCSTR lpszStr, LPCSTR lpszComp, INT iLen)
Definition: string.c:296
unsigned char UCHAR
Definition: xmlstorage.h:181

◆ StrRStrIW()

WINSHLWAPI LPWSTR WINAPI StrRStrIW ( LPCWSTR  lpszStr,
LPCWSTR  lpszEnd,
LPCWSTR  lpszSearch 
)

Definition at line 702 of file string.c.

703{
704 LPWSTR lpszRet = NULL;
705 INT iLen;
706
707 TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
708
709 if (!lpszStr || !lpszSearch || !*lpszSearch)
710 return NULL;
711
712 iLen = lstrlenW(lpszSearch);
713
714 if (!lpszEnd)
715 lpszEnd = lpszStr + lstrlenW(lpszStr);
716 else /* reproduce the broken behaviour on Windows */
717 lpszEnd += min(iLen - 1, lstrlenW(lpszEnd));
718
719
720 while (lpszStr + iLen <= lpszEnd && *lpszStr)
721 {
722 if (!COMCTL32_ChrCmpIW(*lpszSearch, *lpszStr))
723 {
724 if (!StrCmpNIW(lpszStr, lpszSearch, iLen))
725 lpszRet = (LPWSTR)lpszStr;
726 }
727 lpszStr++;
728 }
729 return lpszRet;
730}
INT WINAPI StrCmpNIW(LPCWSTR lpszStr, LPCWSTR lpszComp, INT iLen)
Definition: string.c:307

◆ StrSpnA()

WINSHLWAPI int WINAPI StrSpnA ( LPCSTR  lpszStr,
LPCSTR  lpszMatch 
)

Definition at line 1157 of file string.c.

1158{
1159 TRACE("(%s,%s)\n",debugstr_a(lpszStr), debugstr_a(lpszMatch));
1160
1161 return SHLWAPI_StrSpnHelperA(lpszStr, lpszMatch, StrChrA, FALSE);
1162}
static int SHLWAPI_StrSpnHelperA(LPCSTR lpszStr, LPCSTR lpszMatch, LPSTR(WINAPI *pStrChrFn)(LPCSTR, WORD), BOOL bInvert)
Definition: string.c:1122

◆ StrSpnW()

WINSHLWAPI int WINAPI StrSpnW ( LPCWSTR  lpszStr,
LPCWSTR  lpszMatch 
)

Definition at line 1169 of file string.c.

1170{
1171 if (!lpszStr || !lpszMatch) return 0;
1172 return strspnW( lpszStr, lpszMatch );
1173}
#define strspnW(str, accept)
Definition: unicode.h:48

◆ StrStrA()

WINSHLWAPI LPSTR WINAPI StrStrA ( LPCSTR  lpszStr,
LPCSTR  lpszSearch 
)

Definition at line 578 of file string.c.

579{
580 TRACE("(%s,%s)\n", debugstr_a(lpszStr), debugstr_a(lpszSearch));
581
582 return COMCTL32_StrStrHelperA(lpszStr, lpszSearch, StrCmpNA);
583}
static LPSTR COMCTL32_StrStrHelperA(LPCSTR lpszStr, LPCSTR lpszSearch, INT(WINAPI *pStrCmpFn)(LPCSTR, LPCSTR, INT))
Definition: string.c:318
INT WINAPI StrCmpNA(LPCSTR lpszStr, LPCSTR lpszComp, INT iLen)
Definition: string.c:489

Referenced by test_StrStrA().

◆ StrStrIA()

WINSHLWAPI LPSTR WINAPI StrStrIA ( LPCSTR  lpszStr,
LPCSTR  lpszSearch 
)

Definition at line 351 of file string.c.

352{
353 TRACE("(%s,%s)\n", debugstr_a(lpszStr), debugstr_a(lpszSearch));
354
355 return COMCTL32_StrStrHelperA(lpszStr, lpszSearch, StrCmpNIA);
356}

Referenced by FTP_ParseNextFile(), test_loadlibraryshim(), and test_StrStrIA().

◆ StrStrIW()

WINSHLWAPI LPWSTR WINAPI StrStrIW ( LPCWSTR  lpszStr,
LPCWSTR  lpszSearch 
)

Definition at line 380 of file string.c.

381{
382 int iLen;
383 LPCWSTR end;
384
385 TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
386
387 if (!lpszStr || !lpszSearch || !*lpszSearch)
388 return NULL;
389
390 iLen = lstrlenW(lpszSearch);
391 end = lpszStr + lstrlenW(lpszStr);
392
393 while (lpszStr + iLen <= end)
394 {
395 if (!StrCmpNIW(lpszStr, lpszSearch, iLen))
396 return (LPWSTR)lpszStr;
397 lpszStr++;
398 }
399 return NULL;
400}

Referenced by EditTypeDlg_OnChangeIcon(), IsExplorerSystemShell(), OpensWithExplorer(), SearchPatternMatch(), SHELL_InRunDllProcess(), START_TEST(), and test_StrStrIW().

◆ StrStrNIW()

WINSHLWAPI LPWSTR WINAPI StrStrNIW ( LPCWSTR  lpFirst,
LPCWSTR  lpSrch,
UINT  cchMax 
)

Definition at line 790 of file string.c.

791{
792 UINT i;
793 int len;
794
795 TRACE("(%s, %s, %u)\n", debugstr_w(lpFirst), debugstr_w(lpSrch), cchMax);
796
797 if (!lpFirst || !lpSrch || !*lpSrch || !cchMax)
798 return NULL;
799
800 len = strlenW(lpSrch);
801
802 for (i = cchMax; *lpFirst && (i > 0); i--, lpFirst++)
803 {
804 if (!strncmpiW(lpFirst, lpSrch, len))
805 return (LPWSTR)lpFirst;
806 }
807
808 return NULL;
809}

◆ StrStrNW()

WINSHLWAPI LPWSTR WINAPI StrStrNW ( LPCWSTR  lpFirst,
LPCWSTR  lpSrch,
UINT  cchMax 
)

Definition at line 755 of file string.c.

756{
757 UINT i;
758 int len;
759
760 TRACE("(%s, %s, %u)\n", debugstr_w(lpFirst), debugstr_w(lpSrch), cchMax);
761
762 if (!lpFirst || !lpSrch || !*lpSrch || !cchMax)
763 return NULL;
764
765 len = strlenW(lpSrch);
766
767 for (i = cchMax; *lpFirst && (i > 0); i--, lpFirst++)
768 {
769 if (!strncmpW(lpFirst, lpSrch, len))
770 return (LPWSTR)lpFirst;
771 }
772
773 return NULL;
774}
#define strncmpW(s1, s2, n)
Definition: unicode.h:42

◆ StrStrW()

WINSHLWAPI LPWSTR WINAPI StrStrW ( LPCWSTR  lpszStr,
LPCWSTR  lpszSearch 
)

Definition at line 590 of file string.c.

591{
592 if (!lpszStr || !lpszSearch) return NULL;
593 return wcsstr( lpszStr, lpszSearch );
594}
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)

Referenced by IsSelfShellVerb(), IsUnnamed(), TEST_LocaleTests(), and test_StrStrW().

◆ StrToInt64ExA()

WINSHLWAPI BOOL WINAPI StrToInt64ExA ( LPCSTR  lpszStr,
DWORD  dwFlags,
LONGLONG lpiRet 
)

Definition at line 903 of file string.c.

904{
905 BOOL bNegative = FALSE;
906 LONGLONG iRet = 0;
907
908 TRACE("(%s,%08X,%p)\n", debugstr_a(lpszStr), dwFlags, lpiRet);
909
910 if (!lpszStr || !lpiRet)
911 {
912 WARN("Invalid parameter would crash under Win32!\n");
913 return FALSE;
914 }
915 if (dwFlags > STIF_SUPPORT_HEX) WARN("Unknown flags %08x\n", dwFlags);
916
917 /* Skip leading space, '+', '-' */
918 while (isspace(*lpszStr))
919 lpszStr = CharNextA(lpszStr);
920
921 if (*lpszStr == '-')
922 {
923 bNegative = TRUE;
924 lpszStr++;
925 }
926 else if (*lpszStr == '+')
927 lpszStr++;
928
930 *lpszStr == '0' && tolower(lpszStr[1]) == 'x')
931 {
932 /* Read hex number */
933 lpszStr += 2;
934
935 if (!isxdigit(*lpszStr))
936 return FALSE;
937
938 while (isxdigit(*lpszStr))
939 {
940 iRet = iRet * 16;
941 if (isdigit(*lpszStr))
942 iRet += (*lpszStr - '0');
943 else
944 iRet += 10 + (tolower(*lpszStr) - 'a');
945 lpszStr++;
946 }
947 *lpiRet = iRet;
948 return TRUE;
949 }
950
951 /* Read decimal number */
952 if (!isdigit(*lpszStr))
953 return FALSE;
954
955 while (isdigit(*lpszStr))
956 {
957 iRet = iRet * 10;
958 iRet += (*lpszStr - '0');
959 lpszStr++;
960 }
961 *lpiRet = bNegative ? -iRet : iRet;
962 return TRUE;
963}
#define isspace(c)
Definition: acclib.h:69
#define isdigit(c)
Definition: acclib.h:68
#define isxdigit(c)
Definition: acclib.h:70
#define STIF_SUPPORT_HEX
Definition: shlwapi.h:1059

◆ StrToInt64ExW()

WINSHLWAPI BOOL WINAPI StrToInt64ExW ( LPCWSTR  lpszStr,
DWORD  dwFlags,
LONGLONG lpiRet 
)

Definition at line 987 of file string.c.

988{
989 BOOL bNegative = FALSE;
990 LONGLONG iRet = 0;
991
992 TRACE("(%s,%08X,%p)\n", debugstr_w(lpszStr), dwFlags, lpiRet);
993
994 if (!lpszStr || !lpiRet)
995 {
996 WARN("Invalid parameter would crash under Win32!\n");
997 return FALSE;
998 }
999 if (dwFlags > STIF_SUPPORT_HEX) WARN("Unknown flags %08x\n", dwFlags);
1000
1001 /* Skip leading space, '+', '-' */
1002 while (isspaceW(*lpszStr)) lpszStr++;
1003
1004 if (*lpszStr == '-')
1005 {
1006 bNegative = TRUE;
1007 lpszStr++;
1008 }
1009 else if (*lpszStr == '+')
1010 lpszStr++;
1011
1012 if (dwFlags & STIF_SUPPORT_HEX &&
1013 *lpszStr == '0' && tolowerW(lpszStr[1]) == 'x')
1014 {
1015 /* Read hex number */
1016 lpszStr += 2;
1017
1018 if (!isxdigitW(*lpszStr))
1019 return FALSE;
1020
1021 while (isxdigitW(*lpszStr))
1022 {
1023 iRet = iRet * 16;
1024 if (isdigitW(*lpszStr))
1025 iRet += (*lpszStr - '0');
1026 else
1027 iRet += 10 + (tolowerW(*lpszStr) - 'a');
1028 lpszStr++;
1029 }
1030 *lpiRet = iRet;
1031 return TRUE;
1032 }
1033
1034 /* Read decimal number */
1035 if (!isdigitW(*lpszStr))
1036 return FALSE;
1037
1038 while (isdigitW(*lpszStr))
1039 {
1040 iRet = iRet * 10;
1041 iRet += (*lpszStr - '0');
1042 lpszStr++;
1043 }
1044 *lpiRet = bNegative ? -iRet : iRet;
1045 return TRUE;
1046}
#define isxdigitW(n)
Definition: unicode.h:57
#define isspaceW(n)
Definition: unicode.h:58

◆ StrToIntA()

WINSHLWAPI int WINAPI StrToIntA ( LPCSTR  lpszStr)

Definition at line 370 of file string.c.

371{
372 return atoi(lpszStr);
373}
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)

Referenced by Options_RunDLL(), Options_RunDLLA(), PathParseIconLocationA(), and test_StrToIntA().

◆ StrToIntExA()

WINSHLWAPI BOOL WINAPI StrToIntExA ( LPCSTR  lpszStr,
DWORD  dwFlags,
int lpiRet 
)

Definition at line 886 of file string.c.

887{
888 LONGLONG li;
889 BOOL bRes;
890
891 TRACE("(%s,%08X,%p)\n", debugstr_a(lpszStr), dwFlags, lpiRet);
892
893 bRes = StrToInt64ExA(lpszStr, dwFlags, &li);
894 if (bRes) *lpiRet = li;
895 return bRes;
896}
BOOL WINAPI StrToInt64ExA(LPCSTR lpszStr, DWORD dwFlags, LONGLONG *lpiRet)
Definition: string.c:903
LARGE_INTEGER li
Definition: fxtimerapi.cpp:235

◆ StrToIntExW()

WINSHLWAPI BOOL WINAPI StrToIntExW ( LPCWSTR  lpszStr,
DWORD  dwFlags,
int lpiRet 
)

Definition at line 970 of file string.c.

971{
972 LONGLONG li;
973 BOOL bRes;
974
975 TRACE("(%s,%08X,%p)\n", debugstr_w(lpszStr), dwFlags, lpiRet);
976
977 bRes = StrToInt64ExW(lpszStr, dwFlags, &li);
978 if (bRes) *lpiRet = li;
979 return bRes;
980}
BOOL WINAPI StrToInt64ExW(LPCWSTR lpszStr, DWORD dwFlags, LONGLONG *lpiRet)
Definition: string.c:987

◆ StrToIntW()

WINSHLWAPI int WINAPI StrToIntW ( LPCWSTR  lpString)

Definition at line 407 of file string.c.

408{
409 return wcstol(lpString, NULL, 10);
410}
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)

Referenced by _ILReadFromSharedMemory(), add_zone_to_listview(), Dde_OnExecute(), CConfigParser::GetInt(), Int64GetNumFormat(), Options_RunDLLW(), PathParseIconLocationW(), SHRegGetIntW(), and test_StrToIntW().

◆ StrTrimA()

WINSHLWAPI BOOL WINAPI StrTrimA ( LPSTR  lpszStr,
LPCSTR  lpszTrim 
)

Definition at line 1842 of file string.c.

1843{
1844 DWORD dwLen;
1845 LPSTR lpszRead = lpszStr;
1846 BOOL bRet = FALSE;
1847
1848 TRACE("(%s,%s)\n", debugstr_a(lpszStr), debugstr_a(lpszTrim));
1849
1850 if (lpszRead && *lpszRead)
1851 {
1852 while (*lpszRead && StrChrA(lpszTrim, *lpszRead))
1853 lpszRead = CharNextA(lpszRead); /* Skip leading matches */
1854
1855 dwLen = strlen(lpszRead);
1856
1857 if (lpszRead != lpszStr)
1858 {
1859 memmove(lpszStr, lpszRead, dwLen + 1);
1860 bRet = TRUE;
1861 }
1862 if (dwLen > 0)
1863 {
1864 lpszRead = lpszStr + dwLen;
1865 while (StrChrA(lpszTrim, lpszRead[-1]))
1866 lpszRead = CharPrevA(lpszStr, lpszRead); /* Skip trailing matches */
1867
1868 if (lpszRead != lpszStr + dwLen)
1869 {
1870 *lpszRead = '\0';
1871 bRet = TRUE;
1872 }
1873 }
1874 }
1875 return bRet;
1876}

◆ StrTrimW()

WINSHLWAPI BOOL WINAPI StrTrimW ( LPWSTR  lpszStr,
LPCWSTR  lpszTrim 
)

Definition at line 1883 of file string.c.

1884{
1885 DWORD dwLen;
1886 LPWSTR lpszRead = lpszStr;
1887 BOOL bRet = FALSE;
1888
1889 TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszTrim));
1890
1891 if (lpszRead && *lpszRead)
1892 {
1893 while (*lpszRead && StrChrW(lpszTrim, *lpszRead)) lpszRead++;
1894
1895 dwLen = strlenW(lpszRead);
1896
1897 if (lpszRead != lpszStr)
1898 {
1899 memmove(lpszStr, lpszRead, (dwLen + 1) * sizeof(WCHAR));
1900 bRet = TRUE;
1901 }
1902 if (dwLen > 0)
1903 {
1904 lpszRead = lpszStr + dwLen;
1905 while (StrChrW(lpszTrim, lpszRead[-1]))
1906 lpszRead--; /* Skip trailing matches */
1907
1908 if (lpszRead != lpszStr + dwLen)
1909 {
1910 *lpszRead = '\0';
1911 bRet = TRUE;
1912 }
1913 }
1914 }
1915 return bRet;
1916}
LPWSTR WINAPI StrChrW(LPCWSTR lpszStr, WCHAR ch)
Definition: string.c:257

◆ UrlApplySchemeA()

WINSHLWAPI HRESULT WINAPI UrlApplySchemeA ( LPCSTR  pszIn,
LPSTR  pszOut,
LPDWORD  pcchOut,
DWORD  dwFlags 
)

Definition at line 1662 of file url.c.

1663{
1664 LPWSTR in, out;
1665 HRESULT ret;
1666 DWORD len;
1667
1668 TRACE("(%s, %p, %p:out size %d, 0x%08x)\n", debugstr_a(pszIn),
1669 pszOut, pcchOut, pcchOut ? *pcchOut : 0, dwFlags);
1670
1671 if (!pszIn || !pszOut || !pcchOut) return E_INVALIDARG;
1672
1674 (2*INTERNET_MAX_URL_LENGTH) * sizeof(WCHAR));
1676
1679
1681 if (ret != S_OK) {
1682 HeapFree(GetProcessHeap(), 0, in);
1683 return ret;
1684 }
1685
1686 len = WideCharToMultiByte(CP_ACP, 0, out, -1, NULL, 0, NULL, NULL);
1687 if (len > *pcchOut) {
1688 ret = E_POINTER;
1689 goto cleanup;
1690 }
1691
1692 WideCharToMultiByte(CP_ACP, 0, out, -1, pszOut, *pcchOut, NULL, NULL);
1693 len--;
1694
1695cleanup:
1696 *pcchOut = len;
1697 HeapFree(GetProcessHeap(), 0, in);
1698 return ret;
1699}
static void cleanup(void)
Definition: main.c:1335
HRESULT WINAPI UrlApplySchemeW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut, DWORD dwFlags)
Definition: url.c:1817
#define INTERNET_MAX_URL_LENGTH
Definition: session.c:1418
GLuint in
Definition: glext.h:9616
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383

Referenced by test_UrlApplyScheme().

◆ UrlApplySchemeW()

WINSHLWAPI HRESULT WINAPI UrlApplySchemeW ( LPCWSTR  pszIn,
LPWSTR  pszOut,
LPDWORD  pcchOut,
DWORD  dwFlags 
)

Definition at line 1817 of file url.c.

1818{
1819 PARSEDURLW in_scheme;
1820 DWORD res1;
1821 HRESULT ret;
1822
1823 TRACE("(%s, %p, %p:out size %d, 0x%08x)\n", debugstr_w(pszIn),
1824 pszOut, pcchOut, pcchOut ? *pcchOut : 0, dwFlags);
1825
1826 if (!pszIn || !pszOut || !pcchOut) return E_INVALIDARG;
1827
1829 if (*pcchOut > 1 && ':' == pszIn[1]) {
1830 res1 = *pcchOut;
1831 ret = URL_CreateFromPath(pszIn, pszOut, &res1);
1832 if (ret == S_OK || ret == E_POINTER){
1833 *pcchOut = res1;
1834 return ret;
1835 }
1836 else if (ret == S_FALSE)
1837 {
1838 return ret;
1839 }
1840 }
1841 }
1842
1843 in_scheme.cbSize = sizeof(in_scheme);
1844 /* See if the base has a scheme */
1845 res1 = ParseURLW(pszIn, &in_scheme);
1846 if (res1) {
1847 /* no scheme in input, need to see if we need to guess */
1849 if ((ret = URL_GuessScheme(pszIn, pszOut, pcchOut)) != E_FAIL)
1850 return ret;
1851 }
1852 }
1853
1854 /* If we are here, then either invalid scheme,
1855 * or no scheme and can't/failed guess.
1856 */
1857 if ( ( ((res1 == 0) && (dwFlags & URL_APPLY_FORCEAPPLY)) ||
1858 ((res1 != 0)) ) &&
1860 /* find and apply default scheme */
1861 return URL_ApplyDefault(pszIn, pszOut, pcchOut);
1862 }
1863
1864 return S_FALSE;
1865}
static HRESULT URL_ApplyDefault(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut)
Definition: url.c:1782
static HRESULT URL_GuessScheme(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut)
Definition: url.c:1701
static HRESULT URL_CreateFromPath(LPCWSTR pszPath, LPWSTR pszUrl, LPDWORD pcchUrl)
Definition: url.c:1749
#define URL_APPLY_FORCEAPPLY
Definition: shlwapi.h:520
#define URL_APPLY_GUESSSCHEME
Definition: shlwapi.h:518
#define URL_APPLY_DEFAULT
Definition: shlwapi.h:517
#define URL_APPLY_GUESSFILE
Definition: shlwapi.h:519
DWORD cbSize
Definition: shlwapi.h:616
#define S_FALSE
Definition: winerror.h:3451

Referenced by test_UrlApplyScheme(), and UrlApplySchemeA().

◆ UrlCanonicalizeA()

WINSHLWAPI HRESULT WINAPI UrlCanonicalizeA ( LPCSTR  pszUrl,
LPSTR  pszCanonicalized,
LPDWORD  pcchCanonicalized,
DWORD  dwFlags 
)

Definition at line 247 of file url.c.

249{
250 LPWSTR url, canonical;
251 HRESULT ret;
252
253 TRACE("(%s, %p, %p, 0x%08x) *pcchCanonicalized: %d\n", debugstr_a(pszUrl), pszCanonicalized,
254 pcchCanonicalized, dwFlags, pcchCanonicalized ? *pcchCanonicalized : -1);
255
256 if(!pszUrl || !pszCanonicalized || !pcchCanonicalized || !*pcchCanonicalized)
257 return E_INVALIDARG;
258
259 url = heap_strdupAtoW(pszUrl);
260 canonical = HeapAlloc(GetProcessHeap(), 0, *pcchCanonicalized*sizeof(WCHAR));
261 if(!url || !canonical) {
263 HeapFree(GetProcessHeap(), 0, canonical);
264 return E_OUTOFMEMORY;
265 }
266
267 ret = UrlCanonicalizeW(url, canonical, pcchCanonicalized, dwFlags);
268 if(ret == S_OK)
269 WideCharToMultiByte(CP_ACP, 0, canonical, -1, pszCanonicalized,
270 *pcchCanonicalized+1, NULL, NULL);
271
273 HeapFree(GetProcessHeap(), 0, canonical);
274 return ret;
275}
static WCHAR * heap_strdupAtoW(const char *str)
Definition: url.c:45
HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized, LPDWORD pcchCanonicalized, DWORD dwFlags)
Definition: url.c:282
static const WCHAR url[]
Definition: encode.c:1384

Referenced by check_url_canonicalize(), and test_UrlCanonicalizeA().

◆ UrlCanonicalizeW()

WINSHLWAPI HRESULT WINAPI UrlCanonicalizeW ( LPCWSTR  pszUrl,
LPWSTR  pszCanonicalized,
LPDWORD  pcchCanonicalized,
DWORD  dwFlags 
)

Definition at line 282 of file url.c.

284{
285 HRESULT hr = S_OK;
286 DWORD EscapeFlags;
287 LPCWSTR wk1, root;
288 LPWSTR lpszUrlCpy, url, wk2, mp, mp2;
289 INT state;
290 DWORD nByteLen, nLen, nWkLen;
291 BOOL is_file_url;
292 WCHAR slash = '\0';
293
294 static const WCHAR wszFile[] = {'f','i','l','e',':'};
295 static const WCHAR wszRes[] = {'r','e','s',':'};
296 static const WCHAR wszHttp[] = {'h','t','t','p',':'};
297 static const WCHAR wszLocalhost[] = {'l','o','c','a','l','h','o','s','t'};
298 static const WCHAR wszFilePrefix[] = {'f','i','l','e',':','/','/','/'};
299
300 TRACE("(%s, %p, %p, 0x%08x) *pcchCanonicalized: %d\n", debugstr_w(pszUrl), pszCanonicalized,
301 pcchCanonicalized, dwFlags, pcchCanonicalized ? *pcchCanonicalized : -1);
302
303 if(!pszUrl || !pszCanonicalized || !pcchCanonicalized || !*pcchCanonicalized)
304 return E_INVALIDARG;
305
306 if(!*pszUrl) {
307 *pszCanonicalized = 0;
308 return S_OK;
309 }
310
311 /* Remove '\t' characters from URL */
312 nByteLen = (strlenW(pszUrl) + 1) * sizeof(WCHAR); /* length in bytes */
313 url = HeapAlloc(GetProcessHeap(), 0, nByteLen);
314 if(!url)
315 return E_OUTOFMEMORY;
316
317 wk1 = pszUrl;
318 wk2 = url;
319 do {
320 while(*wk1 == '\t')
321 wk1++;
322 *wk2++ = *wk1;
323 } while(*wk1++);
324
325 /* Allocate memory for simplified URL (before escaping) */
326 nByteLen = (wk2-url)*sizeof(WCHAR);
327 lpszUrlCpy = HeapAlloc(GetProcessHeap(), 0,
328 nByteLen+sizeof(wszFilePrefix)+sizeof(WCHAR));
329 if(!lpszUrlCpy) {
331 return E_OUTOFMEMORY;
332 }
333
334 is_file_url = !strncmpW(wszFile, url, sizeof(wszFile)/sizeof(WCHAR));
335
336 if ((nByteLen >= sizeof(wszHttp) &&
337 !memcmp(wszHttp, url, sizeof(wszHttp))) || is_file_url)
338 slash = '/';
339
341 slash = '\\';
342
343 if(nByteLen >= sizeof(wszRes) && !memcmp(wszRes, url, sizeof(wszRes))) {
344 dwFlags &= ~URL_FILE_USE_PATHURL;
345 slash = '\0';
346 }
347
348 /*
349 * state =
350 * 0 initial 1,3
351 * 1 have 2[+] alnum 2,3
352 * 2 have scheme (found :) 4,6,3
353 * 3 failed (no location)
354 * 4 have // 5,3
355 * 5 have 1[+] alnum 6,3
356 * 6 have location (found /) save root location
357 */
358
359 wk1 = url;
360 wk2 = lpszUrlCpy;
361 state = 0;
362
363 if(url[1] == ':') { /* Assume path */
364 memcpy(wk2, wszFilePrefix, sizeof(wszFilePrefix));
365 wk2 += sizeof(wszFilePrefix)/sizeof(WCHAR);
367 {
368 slash = '\\';
369 --wk2;
370 }
371 else
373 state = 5;
374 is_file_url = TRUE;
375 } else if(url[0] == '/') {
376 state = 5;
377 is_file_url = TRUE;
378 }
379
380 while (*wk1) {
381 switch (state) {
382 case 0:
383 if (!isalnumW(*wk1)) {state = 3; break;}
384 *wk2++ = *wk1++;
385 if (!isalnumW(*wk1)) {state = 3; break;}
386 *wk2++ = *wk1++;
387 state = 1;
388 break;
389 case 1:
390 *wk2++ = *wk1;
391 if (*wk1++ == ':') state = 2;
392 break;
393 case 2:
394 *wk2++ = *wk1++;
395 if (*wk1 != '/') {state = 6; break;}
396 *wk2++ = *wk1++;
397 if((dwFlags & URL_FILE_USE_PATHURL) && nByteLen >= sizeof(wszLocalhost)
398 && is_file_url
399 && !memcmp(wszLocalhost, wk1, sizeof(wszLocalhost))){
400 wk1 += sizeof(wszLocalhost)/sizeof(WCHAR);
401 while(*wk1 == '\\' && (dwFlags & URL_FILE_USE_PATHURL))
402 wk1++;
403 }
404
405 if(*wk1 == '/' && (dwFlags & URL_FILE_USE_PATHURL)){
406 wk1++;
407 }else if(is_file_url){
408 const WCHAR *body = wk1;
409
410 while(*body == '/')
411 ++body;
412
413 if(isalnumW(*body) && *(body+1) == ':'){
415 if(slash)
416 *wk2++ = slash;
417 else
418 *wk2++ = '/';
419 }
420 }else{
422 if(*wk1 == '/' && *(wk1+1) != '/'){
423 *wk2++ = '\\';
424 }else{
425 *wk2++ = '\\';
426 *wk2++ = '\\';
427 }
428 }else{
429 if(*wk1 == '/' && *(wk1+1) != '/'){
430 if(slash)
431 *wk2++ = slash;
432 else
433 *wk2++ = '/';
434 }
435 }
436 }
437 wk1 = body;
438 }
439 state = 4;
440 break;
441 case 3:
442 nWkLen = strlenW(wk1);
443 memcpy(wk2, wk1, (nWkLen + 1) * sizeof(WCHAR));
444 mp = wk2;
445 wk1 += nWkLen;
446 wk2 += nWkLen;
447
448 if(slash) {
449 while(mp < wk2) {
450 if(*mp == '/' || *mp == '\\')
451 *mp = slash;
452 mp++;
453 }
454 }
455 break;
456 case 4:
457 if (!isalnumW(*wk1) && (*wk1 != '-') && (*wk1 != '.') && (*wk1 != ':'))
458 {state = 3; break;}
459 while(isalnumW(*wk1) || (*wk1 == '-') || (*wk1 == '.') || (*wk1 == ':'))
460 *wk2++ = *wk1++;
461 state = 5;
462 if (!*wk1) {
463 if(slash)
464 *wk2++ = slash;
465 else
466 *wk2++ = '/';
467 }
468 break;
469 case 5:
470 if (*wk1 != '/' && *wk1 != '\\') {state = 3; break;}
471 while(*wk1 == '/' || *wk1 == '\\') {
472 if(slash)
473 *wk2++ = slash;
474 else
475 *wk2++ = *wk1;
476 wk1++;
477 }
478 state = 6;
479 break;
480 case 6:
482 state = 3;
483 break;
484 }
485
486 /* Now at root location, cannot back up any more. */
487 /* "root" will point at the '/' */
488
489 root = wk2-1;
490 while (*wk1) {
491 mp = strchrW(wk1, '/');
492 mp2 = strchrW(wk1, '\\');
493 if(mp2 && (!mp || mp2 < mp))
494 mp = mp2;
495 if (!mp) {
496 nWkLen = strlenW(wk1);
497 memcpy(wk2, wk1, (nWkLen + 1) * sizeof(WCHAR));
498 wk1 += nWkLen;
499 wk2 += nWkLen;
500 continue;
501 }
502 nLen = mp - wk1;
503 if(nLen) {
504 memcpy(wk2, wk1, nLen * sizeof(WCHAR));
505 wk2 += nLen;
506 wk1 += nLen;
507 }
508 if(slash)
509 *wk2++ = slash;
510 else
511 *wk2++ = *wk1;
512 wk1++;
513
514 while (*wk1 == '.') {
515 TRACE("found '/.'\n");
516 if (wk1[1] == '/' || wk1[1] == '\\') {
517 /* case of /./ -> skip the ./ */
518 wk1 += 2;
519 }
520 else if (wk1[1] == '.' && (wk1[2] == '/'
521 || wk1[2] == '\\' || wk1[2] == '?'
522 || wk1[2] == '#' || !wk1[2])) {
523 /* case /../ -> need to backup wk2 */
524 TRACE("found '/../'\n");
525 *(wk2-1) = '\0'; /* set end of string */
526 mp = strrchrW(root, '/');
527 mp2 = strrchrW(root, '\\');
528 if(mp2 && (!mp || mp2 < mp))
529 mp = mp2;
530 if (mp && (mp >= root)) {
531 /* found valid backup point */
532 wk2 = mp + 1;
533 if(wk1[2] != '/' && wk1[2] != '\\')
534 wk1 += 2;
535 else
536 wk1 += 3;
537 }
538 else {
539 /* did not find point, restore '/' */
540 *(wk2-1) = slash;
541 break;
542 }
543 }
544 else
545 break;
546 }
547 }
548 *wk2 = '\0';
549 break;
550 default:
551 FIXME("how did we get here - state=%d\n", state);
552 HeapFree(GetProcessHeap(), 0, lpszUrlCpy);
554 return E_INVALIDARG;
555 }
556 *wk2 = '\0';
557 TRACE("Simplified, orig <%s>, simple <%s>\n",
558 debugstr_w(pszUrl), debugstr_w(lpszUrlCpy));
559 }
560 nLen = lstrlenW(lpszUrlCpy);
561 while ((nLen > 0) && ((lpszUrlCpy[nLen-1] <= ' ')))
562 lpszUrlCpy[--nLen]=0;
563
564 if((dwFlags & URL_UNESCAPE) ||
565 ((dwFlags & URL_FILE_USE_PATHURL) && nByteLen >= sizeof(wszFile)
566 && !memcmp(wszFile, url, sizeof(wszFile))))
567 UrlUnescapeW(lpszUrlCpy, NULL, &nLen, URL_UNESCAPE_INPLACE);
568
569 if((EscapeFlags = dwFlags & (URL_ESCAPE_UNSAFE |
574 EscapeFlags &= ~URL_ESCAPE_UNSAFE;
575 hr = UrlEscapeW(lpszUrlCpy, pszCanonicalized, pcchCanonicalized,
576 EscapeFlags);
577 } else { /* No escaping needed, just copy the string */
578 nLen = lstrlenW(lpszUrlCpy);
579 if(nLen < *pcchCanonicalized)
580 memcpy(pszCanonicalized, lpszUrlCpy, (nLen + 1)*sizeof(WCHAR));
581 else {
582 hr = E_POINTER;
583 nLen++;
584 }
585 *pcchCanonicalized = nLen;
586 }
587
588 HeapFree(GetProcessHeap(), 0, lpszUrlCpy);
590
591 if (hr == S_OK)
592 TRACE("result %s\n", debugstr_w(pszCanonicalized));
593
594 return hr;
595}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
static int state
Definition: maze.c:121
struct _root root
HRESULT WINAPI UrlUnescapeW(LPWSTR pszUrl, LPWSTR pszUnescaped, LPDWORD pcchUnescaped, DWORD dwFlags)
Definition: url.c:1367
HRESULT WINAPI UrlEscapeW(LPCWSTR pszUrl, LPWSTR pszEscaped, LPDWORD pcchEscaped, DWORD dwFlags)
Definition: url.c:1076
static const WCHAR wszRes[]
Definition: misc.c:323
#define URL_ESCAPE_UNSAFE
Definition: shlwapi.h:533
#define URL_WININET_COMPATIBILITY
Definition: shlwapi.h:535
#define URL_DONT_ESCAPE_EXTRA_INFO
Definition: shlwapi.h:529
#define URL_UNESCAPE
Definition: shlwapi.h:532
#define URL_ESCAPE_SPACES_ONLY
Definition: shlwapi.h:530
#define URL_ESCAPE_SEGMENT_ONLY
Definition: shlwapi.h:522
#define URL_DONT_SIMPLIFY
Definition: shlwapi.h:531
#define URL_FILE_USE_PATHURL
Definition: shlwapi.h:523
#define URL_ESCAPE_PERCENT
Definition: shlwapi.h:521
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100
static const WCHAR wszFile[]
Definition: urlmon_main.c:386
static const WCHAR wszHttp[]
Definition: urlmon_main.c:389
#define strrchrW(s, c)
Definition: unicode.h:41

Referenced by check_url_canonicalize(), test_UrlCanonicalizeW(), UrlCanonicalizeA(), and UrlCombineW().

◆ UrlCombineA()

WINSHLWAPI HRESULT WINAPI UrlCombineA ( LPCSTR  pszBase,
LPCSTR  pszRelative,
LPSTR  pszCombined,
LPDWORD  pcchCombined,
DWORD  dwFlags 
)

Definition at line 614 of file url.c.

617{
618 LPWSTR base, relative, combined;
619 DWORD ret, len, len2;
620
621 TRACE("(base %s, Relative %s, Combine size %d, flags %08x) using W version\n",
622 debugstr_a(pszBase),debugstr_a(pszRelative),
623 pcchCombined?*pcchCombined:0,dwFlags);
624
625 if(!pszBase || !pszRelative || !pcchCombined)
626 return E_INVALIDARG;
627
629 (3*INTERNET_MAX_URL_LENGTH) * sizeof(WCHAR));
630 relative = base + INTERNET_MAX_URL_LENGTH;
631 combined = relative + INTERNET_MAX_URL_LENGTH;
632
634 MultiByteToWideChar(CP_ACP, 0, pszRelative, -1, relative, INTERNET_MAX_URL_LENGTH);
635 len = *pcchCombined;
636
637 ret = UrlCombineW(base, relative, pszCombined?combined:NULL, &len, dwFlags);
638 if (ret != S_OK) {
639 *pcchCombined = len;
641 return ret;
642 }
643
644 len2 = WideCharToMultiByte(CP_ACP, 0, combined, len, NULL, 0, NULL, NULL);
645 if (len2 > *pcchCombined) {
646 *pcchCombined = len2;
648 return E_POINTER;
649 }
650 WideCharToMultiByte(CP_ACP, 0, combined, len+1, pszCombined, (*pcchCombined)+1,
651 NULL, NULL);
652 *pcchCombined = len2;
654 return S_OK;
655}
HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative, LPWSTR pszCombined, LPDWORD pcchCombined, DWORD dwFlags)
Definition: url.c:662

Referenced by check_url_combine(), and test_UrlCombine().

◆ UrlCombineW()

WINSHLWAPI HRESULT WINAPI UrlCombineW ( LPCWSTR  pszBase,
LPCWSTR  pszRelative,
LPWSTR  pszCombined,
LPDWORD  pcchCombined,
DWORD  dwFlags 
)

Definition at line 662 of file url.c.

665{
666 PARSEDURLW base, relative;
667 DWORD myflags, sizeloc = 0;
668 DWORD i, len, res1, res2, process_case = 0;
669 LPWSTR work, preliminary, mbase, mrelative;
670 static const WCHAR myfilestr[] = {'f','i','l','e',':','/','/','/','\0'};
671 static const WCHAR fragquerystr[] = {'#','?',0};
672 HRESULT ret;
673
674 TRACE("(base %s, Relative %s, Combine size %d, flags %08x)\n",
675 debugstr_w(pszBase),debugstr_w(pszRelative),
676 pcchCombined?*pcchCombined:0,dwFlags);
677
678 if(!pszBase || !pszRelative || !pcchCombined)
679 return E_INVALIDARG;
680
681 base.cbSize = sizeof(base);
682 relative.cbSize = sizeof(relative);
683
684 /* Get space for duplicates of the input and the output */
685 preliminary = HeapAlloc(GetProcessHeap(), 0, (3*INTERNET_MAX_URL_LENGTH) *
686 sizeof(WCHAR));
687 mbase = preliminary + INTERNET_MAX_URL_LENGTH;
688 mrelative = mbase + INTERNET_MAX_URL_LENGTH;
689 *preliminary = '\0';
690
691 /* Canonicalize the base input prior to looking for the scheme */
692 myflags = dwFlags & (URL_DONT_SIMPLIFY | URL_UNESCAPE);
694 UrlCanonicalizeW(pszBase, mbase, &len, myflags);
695
696 /* Canonicalize the relative input prior to looking for the scheme */
698 UrlCanonicalizeW(pszRelative, mrelative, &len, myflags);
699
700 /* See if the base has a scheme */
701 res1 = ParseURLW(mbase, &base);
702 if (res1) {
703 /* if pszBase has no scheme, then return pszRelative */
704 TRACE("no scheme detected in Base\n");
705 process_case = 1;
706 }
707 else do {
708 BOOL manual_search = FALSE;
709
710 work = (LPWSTR)base.pszProtocol;
711 for(i=0; i<base.cchProtocol; i++)
712 work[i] = tolowerW(work[i]);
713
714 /* mk is a special case */
715 if(base.nScheme == URL_SCHEME_MK) {
716 static const WCHAR wsz[] = {':',':',0};
717
718 WCHAR *ptr = strstrW(base.pszSuffix, wsz);
719 if(ptr) {
720 int delta;
721
722 ptr += 2;
723 delta = ptr-base.pszSuffix;
724 base.cchProtocol += delta;
725 base.pszSuffix += delta;
726 base.cchSuffix -= delta;
727 }
728 }else {
729 /* get size of location field (if it exists) */
730 work = (LPWSTR)base.pszSuffix;
731 sizeloc = 0;
732 if (*work++ == '/') {
733 if (*work++ == '/') {
734 /* At this point have start of location and
735 * it ends at next '/' or end of string.
736 */
737 while(*work && (*work != '/')) work++;
738 sizeloc = (DWORD)(work - base.pszSuffix);
739 }
740 }
741 }
742
743 /* If there is a '?', then the remaining part can only contain a
744 * query string or fragment, so start looking for the last leaf
745 * from the '?'. Otherwise, if there is a '#' and the characters
746 * immediately preceding it are ".htm[l]", then begin looking for
747 * the last leaf starting from the '#'. Otherwise the '#' is not
748 * meaningful and just start looking from the end. */
749 if ((work = strpbrkW(base.pszSuffix + sizeloc, fragquerystr))) {
750 const WCHAR htmlW[] = {'.','h','t','m','l',0};
751 const int len_htmlW = 5;
752 const WCHAR htmW[] = {'.','h','t','m',0};
753 const int len_htmW = 4;
754
755 if (*work == '?' || base.nScheme == URL_SCHEME_HTTP || base.nScheme == URL_SCHEME_HTTPS)
756 manual_search = TRUE;
757 else if (work - base.pszSuffix > len_htmW) {
758 work -= len_htmW;
759 if (strncmpiW(work, htmW, len_htmW) == 0)
760 manual_search = TRUE;
761 work += len_htmW;
762 }
763
764 if (!manual_search &&
765 work - base.pszSuffix > len_htmlW) {
766 work -= len_htmlW;
767 if (strncmpiW(work, htmlW, len_htmlW) == 0)
768 manual_search = TRUE;
769 work += len_htmlW;
770 }
771 }
772
773 if (manual_search) {
774 /* search backwards starting from the current position */
775 while (*work != '/' && work > base.pszSuffix + sizeloc)
776 --work;
777 base.cchSuffix = work - base.pszSuffix + 1;
778 }else {
779 /* search backwards starting from the end of the string */
780 work = strrchrW((base.pszSuffix+sizeloc), '/');
781 if (work) {
782 len = (DWORD)(work - base.pszSuffix + 1);
783 base.cchSuffix = len;
784 }else
785 base.cchSuffix = sizeloc;
786 }
787
788 /*
789 * At this point:
790 * .pszSuffix points to location (starting with '//')
791 * .cchSuffix length of location (above) and rest less the last
792 * leaf (if any)
793 * sizeloc length of location (above) up to but not including
794 * the last '/'
795 */
796
797 res2 = ParseURLW(mrelative, &relative);
798 if (res2) {
799 /* no scheme in pszRelative */
800 TRACE("no scheme detected in Relative\n");
801 relative.pszSuffix = mrelative; /* case 3,4,5 depends on this */
802 relative.cchSuffix = strlenW(mrelative);
803 if (*pszRelative == ':') {
804 /* case that is either left alone or uses pszBase */
806 process_case = 5;
807 break;
808 }
809 process_case = 1;
810 break;
811 }
812 if (isalnumW(*mrelative) && (*(mrelative + 1) == ':')) {
813 /* case that becomes "file:///" */
814 strcpyW(preliminary, myfilestr);
815 process_case = 1;
816 break;
817 }
818 if ((*mrelative == '/') && (*(mrelative+1) == '/')) {
819 /* pszRelative has location and rest */
820 process_case = 3;
821 break;
822 }
823 if (*mrelative == '/') {
824 /* case where pszRelative is root to location */
825 process_case = 4;
826 break;
827 }
828 if (*mrelative == '#') {
829 if(!(work = strchrW(base.pszSuffix+base.cchSuffix, '#')))
830 work = (LPWSTR)base.pszSuffix + strlenW(base.pszSuffix);
831
832 memcpy(preliminary, base.pszProtocol, (work-base.pszProtocol)*sizeof(WCHAR));
833 preliminary[work-base.pszProtocol] = '\0';
834 process_case = 1;
835 break;
836 }
837 process_case = (*base.pszSuffix == '/' || base.nScheme == URL_SCHEME_MK) ? 5 : 3;
838 break;
839 }else {
840 work = (LPWSTR)relative.pszProtocol;
841 for(i=0; i<relative.cchProtocol; i++)
842 work[i] = tolowerW(work[i]);
843 }
844
845 /* handle cases where pszRelative has scheme */
846 if ((base.cchProtocol == relative.cchProtocol) &&
847 (strncmpW(base.pszProtocol, relative.pszProtocol, base.cchProtocol) == 0)) {
848
849 /* since the schemes are the same */
850 if ((*relative.pszSuffix == '/') && (*(relative.pszSuffix+1) == '/')) {
851 /* case where pszRelative replaces location and following */
852 process_case = 3;
853 break;
854 }
855 if (*relative.pszSuffix == '/') {
856 /* case where pszRelative is root to location */
857 process_case = 4;
858 break;
859 }
860 /* replace either just location if base's location starts with a
861 * slash or otherwise everything */
862 process_case = (*base.pszSuffix == '/') ? 5 : 1;
863 break;
864 }
865 if ((*relative.pszSuffix == '/') && (*(relative.pszSuffix+1) == '/')) {
866 /* case where pszRelative replaces scheme, location,
867 * and following and handles PLUGGABLE
868 */
869 process_case = 2;
870 break;
871 }
872 process_case = 1;
873 break;
874 } while(FALSE); /* a little trick to allow easy exit from nested if's */
875
876 ret = S_OK;
877 switch (process_case) {
878
879 case 1: /*
880 * Return pszRelative appended to what ever is in pszCombined,
881 * (which may the string "file:///"
882 */
883 strcatW(preliminary, mrelative);
884 break;
885
886 case 2: /* case where pszRelative replaces scheme, and location */
887 strcpyW(preliminary, mrelative);
888 break;
889
890 case 3: /*
891 * Return the pszBase scheme with pszRelative. Basically
892 * keeps the scheme and replaces the domain and following.
893 */
894 memcpy(preliminary, base.pszProtocol, (base.cchProtocol + 1)*sizeof(WCHAR));
895 work = preliminary + base.cchProtocol + 1;
896 strcpyW(work, relative.pszSuffix);
897 break;
898
899 case 4: /*
900 * Return the pszBase scheme and location but everything
901 * after the location is pszRelative. (Replace document
902 * from root on.)
903 */
904 memcpy(preliminary, base.pszProtocol, (base.cchProtocol+1+sizeloc)*sizeof(WCHAR));
905 work = preliminary + base.cchProtocol + 1 + sizeloc;
907 *(work++) = '/';
908 strcpyW(work, relative.pszSuffix);
909 break;
910
911 case 5: /*
912 * Return the pszBase without its document (if any) and
913 * append pszRelative after its scheme.
914 */
915 memcpy(preliminary, base.pszProtocol,
916 (base.cchProtocol+1+base.cchSuffix)*sizeof(WCHAR));
917 work = preliminary + base.cchProtocol+1+base.cchSuffix - 1;
918 if (*work++ != '/')
919 *(work++) = '/';
920 if (relative.pszSuffix[0] == '.' && relative.pszSuffix[1] == 0)
921 *work = 0;
922 else
923 strcpyW(work, relative.pszSuffix);
924 break;
925
926 default:
927 FIXME("How did we get here????? process_case=%d\n", process_case);
929 }
930
931 if (ret == S_OK) {
932 /* Reuse mrelative as temp storage as it's already allocated and not needed anymore */
933 if(*pcchCombined == 0)
934 *pcchCombined = 1;
935 ret = UrlCanonicalizeW(preliminary, mrelative, pcchCombined, (dwFlags & ~URL_FILE_USE_PATHURL));
936 if(SUCCEEDED(ret) && pszCombined) {
937 lstrcpyW(pszCombined, mrelative);
938 }
939 TRACE("return-%d len=%d, %s\n",
940 process_case, *pcchCombined, debugstr_w(pszCombined));
941 }
942 HeapFree(GetProcessHeap(), 0, preliminary);
943 return ret;
944}
if(dx< 0)
Definition: linetemp.h:194
#define URL_PLUGGABLE_PROTOCOL
Definition: shlwapi.h:534
UINT cchProtocol
Definition: shlwapi.h:618
LPCWSTR pszSuffix
Definition: shlwapi.h:619
UINT cchSuffix
Definition: shlwapi.h:620
LPCWSTR pszProtocol
Definition: shlwapi.h:617
#define strstrW(d, s)
Definition: unicode.h:38

Referenced by check_url_combine(), test_UrlCombine(), and UrlCombineA().

◆ UrlCompareA()

WINSHLWAPI INT WINAPI UrlCompareA ( LPCSTR  pszUrl1,
LPCSTR  pszUrl2,
BOOL  fIgnoreSlash 
)

Definition at line 1510 of file url.c.

1514{
1515 INT ret, len, len1, len2;
1516
1517 if (!fIgnoreSlash)
1518 return strcmp(pszUrl1, pszUrl2);
1519 len1 = strlen(pszUrl1);
1520 if (pszUrl1[len1-1] == '/') len1--;
1521 len2 = strlen(pszUrl2);
1522 if (pszUrl2[len2-1] == '/') len2--;
1523 if (len1 == len2)
1524 return strncmp(pszUrl1, pszUrl2, len1);
1525 len = min(len1, len2);
1526 ret = strncmp(pszUrl1, pszUrl2, len);
1527 if (ret) return ret;
1528 if (len1 > len2) return 1;
1529 return -1;
1530}
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
Definition: utclib.c:534

◆ UrlCompareW()

WINSHLWAPI INT WINAPI UrlCompareW ( LPCWSTR  pszUrl1,
LPCWSTR  pszUrl2,
BOOL  fIgnoreSlash 
)

Definition at line 1537 of file url.c.

1541{
1542 INT ret;
1543 size_t len, len1, len2;
1544
1545 if (!fIgnoreSlash)
1546 return strcmpW(pszUrl1, pszUrl2);
1547 len1 = strlenW(pszUrl1);
1548 if (pszUrl1[len1-1] == '/') len1--;
1549 len2 = strlenW(pszUrl2);
1550 if (pszUrl2[len2-1] == '/') len2--;
1551 if (len1 == len2)
1552 return strncmpW(pszUrl1, pszUrl2, len1);
1553 len = min(len1, len2);
1554 ret = strncmpW(pszUrl1, pszUrl2, len);
1555 if (ret) return ret;
1556 if (len1 > len2) return 1;
1557 return -1;
1558}

◆ UrlCreateFromPathA()

WINSHLWAPI HRESULT WINAPI UrlCreateFromPathA ( LPCSTR  pszPath,
LPSTR  pszUrl,
LPDWORD  pcchUrl,
DWORD  dwReserved 
)

Definition at line 2452 of file url.c.

2453{
2455 WCHAR *urlW = bufW;
2456 UNICODE_STRING pathW;
2457 HRESULT ret;
2458 DWORD lenW = sizeof(bufW)/sizeof(WCHAR), lenA;
2459
2460 if(!RtlCreateUnicodeStringFromAsciiz(&pathW, pszPath))
2461 return E_INVALIDARG;
2462 if((ret = UrlCreateFromPathW(pathW.Buffer, urlW, &lenW, dwReserved)) == E_POINTER) {
2463 urlW = HeapAlloc(GetProcessHeap(), 0, lenW * sizeof(WCHAR));
2464 ret = UrlCreateFromPathW(pathW.Buffer, urlW, &lenW, dwReserved);
2465 }
2466 if(ret == S_OK || ret == S_FALSE) {
2467 RtlUnicodeToMultiByteSize(&lenA, urlW, lenW * sizeof(WCHAR));
2468 if(*pcchUrl > lenA) {
2469 RtlUnicodeToMultiByteN(pszUrl, *pcchUrl - 1, &lenA, urlW, lenW * sizeof(WCHAR));
2470 pszUrl[lenA] = 0;
2471 *pcchUrl = lenA;
2472 } else {
2473 *pcchUrl = lenA + 1;
2474 ret = E_POINTER;
2475 }
2476 }
2477 if(urlW != bufW) HeapFree(GetProcessHeap(), 0, urlW);
2478 RtlFreeUnicodeString(&pathW);
2479 return ret;
2480}
HRESULT WINAPI UrlCreateFromPathW(LPCWSTR pszPath, LPWSTR pszUrl, LPDWORD pcchUrl, DWORD dwReserved)
Definition: url.c:2497

Referenced by test_UrlCreateFromPath().

◆ UrlCreateFromPathW()

WINSHLWAPI HRESULT WINAPI UrlCreateFromPathW ( LPCWSTR  pszPath,
LPWSTR  pszUrl,
LPDWORD  pcchUrl,
DWORD  dwReserved 
)

Definition at line 2497 of file url.c.

2498{
2499 HRESULT ret;
2500
2501 TRACE("(%s, %p, %p, 0x%08x)\n", debugstr_w(pszPath), pszUrl, pcchUrl, dwReserved);
2502
2503 /* Validate arguments */
2504 if (dwReserved != 0)
2505 return E_INVALIDARG;
2506 if (!pszUrl || !pcchUrl)
2507 return E_INVALIDARG;
2508
2509 ret = URL_CreateFromPath(pszPath, pszUrl, pcchUrl);
2510
2511 if (S_FALSE == ret)
2512 strcpyW(pszUrl, pszPath);
2513
2514 return ret;
2515}

Referenced by test_UrlCreateFromPath(), and UrlCreateFromPathA().

◆ UrlEscapeA()

WINSHLWAPI HRESULT WINAPI UrlEscapeA ( LPCSTR  pszUrl,
LPSTR  pszEscaped,
LPDWORD  pcchEscaped,
DWORD  dwFlags 
)

Definition at line 950 of file url.c.

955{
957 WCHAR *escapedW = bufW;
958 UNICODE_STRING urlW;
959 HRESULT ret;
960 DWORD lenW = sizeof(bufW)/sizeof(WCHAR), lenA;
961
962 if (!pszEscaped || !pcchEscaped || !*pcchEscaped)
963 return E_INVALIDARG;
964
965 if(!RtlCreateUnicodeStringFromAsciiz(&urlW, pszUrl))
966 return E_INVALIDARG;
969 return E_NOTIMPL;
970 }
971 if((ret = UrlEscapeW(urlW.Buffer, escapedW, &lenW, dwFlags)) == E_POINTER) {
972 escapedW = HeapAlloc(GetProcessHeap(), 0, lenW * sizeof(WCHAR));
973 ret = UrlEscapeW(urlW.Buffer, escapedW, &lenW, dwFlags);
974 }
975 if(ret == S_OK) {
976 RtlUnicodeToMultiByteSize(&lenA, escapedW, lenW * sizeof(WCHAR));
977 if(*pcchEscaped > lenA) {
978 RtlUnicodeToMultiByteN(pszEscaped, *pcchEscaped - 1, &lenA, escapedW, lenW * sizeof(WCHAR));
979 pszEscaped[lenA] = 0;
980 *pcchEscaped = lenA;
981 } else {
982 *pcchEscaped = lenA + 1;
983 ret = E_POINTER;
984 }
985 }
986 if(escapedW != bufW) HeapFree(GetProcessHeap(), 0, escapedW);
988 return ret;
989}
#define E_NOTIMPL
Definition: ddrawi.h:99
#define URL_ESCAPE_AS_UTF8
Definition: shlwapi.h:524

Referenced by test_UrlEscapeA().

◆ UrlEscapeW()

WINSHLWAPI HRESULT WINAPI UrlEscapeW ( LPCWSTR  pszUrl,
LPWSTR  pszEscaped,
LPDWORD  pcchEscaped,
DWORD  dwFlags 
)

Definition at line 1076 of file url.c.

1081{
1082 LPCWSTR src;
1083 DWORD needed = 0, ret;
1084 BOOL stop_escaping = FALSE;
1085 WCHAR next[12], *dst, *dst_ptr;
1086 INT i, len;
1088 DWORD int_flags;
1089 DWORD slashes = 0;
1090 static const WCHAR localhost[] = {'l','o','c','a','l','h','o','s','t',0};
1091
1092 TRACE("(%p(%s) %p %p 0x%08x)\n", pszUrl, debugstr_w(pszUrl),
1093 pszEscaped, pcchEscaped, dwFlags);
1094
1095 if(!pszUrl || !pcchEscaped || !pszEscaped || *pcchEscaped == 0)
1096 return E_INVALIDARG;
1097
1103 FIXME("Unimplemented flags: %08x\n", dwFlags);
1104
1105 dst_ptr = dst = HeapAlloc(GetProcessHeap(), 0, *pcchEscaped*sizeof(WCHAR));
1106 if(!dst_ptr)
1107 return E_OUTOFMEMORY;
1108
1109 /* fix up flags */
1111 /* if SPACES_ONLY specified, reset the other controls */
1115
1116 else
1117 /* if SPACES_ONLY *not* specified the assume DONT_ESCAPE_EXTRA_INFO */
1119
1120
1121 int_flags = 0;
1124 } else {
1125 parsed_url.cbSize = sizeof(parsed_url);
1126 if(ParseURLW(pszUrl, &parsed_url) != S_OK)
1128
1129 TRACE("scheme = %d (%s)\n", parsed_url.nScheme, debugstr_wn(parsed_url.pszProtocol, parsed_url.cchProtocol));
1130
1133
1134 switch(parsed_url.nScheme) {
1135 case URL_SCHEME_FILE:
1137 int_flags &= ~WINE_URL_STOP_ON_HASH;
1138 break;
1139
1140 case URL_SCHEME_HTTP:
1141 case URL_SCHEME_HTTPS:
1142 int_flags |= WINE_URL_BASH_AS_SLASH;
1143 if(parsed_url.pszSuffix[0] != '/' && parsed_url.pszSuffix[0] != '\\')
1144 int_flags |= WINE_URL_ESCAPE_SLASH;
1145 break;
1146
1147 case URL_SCHEME_MAILTO:
1150 break;
1151
1152 case URL_SCHEME_INVALID:
1153 break;
1154
1155 case URL_SCHEME_FTP:
1156 default:
1157 if(parsed_url.pszSuffix[0] != '/')
1158 int_flags |= WINE_URL_ESCAPE_SLASH;
1159 break;
1160 }
1161 }
1162
1163 for(src = pszUrl; *src; ) {
1164 WCHAR cur = *src;
1165 len = 0;
1166
1167 if((int_flags & WINE_URL_COLLAPSE_SLASHES) && src == pszUrl + parsed_url.cchProtocol + 1) {
1168 int localhost_len = sizeof(localhost)/sizeof(WCHAR) - 1;
1169 while(cur == '/' || cur == '\\') {
1170 slashes++;
1171 cur = *++src;
1172 }
1173 if(slashes == 2 && !strncmpiW(src, localhost, localhost_len)) { /* file://localhost/ -> file:/// */
1174 if(*(src + localhost_len) == '/' || *(src + localhost_len) == '\\')
1175 src += localhost_len + 1;
1176 slashes = 3;
1177 }
1178
1179 switch(slashes) {
1180 case 1:
1181 case 3:
1182 next[0] = next[1] = next[2] = '/';
1183 len = 3;
1184 break;
1185 case 0:
1186 len = 0;
1187 break;
1188 default:
1189 next[0] = next[1] = '/';
1190 len = 2;
1191 break;
1192 }
1193 }
1194 if(len == 0) {
1195
1196 if(cur == '#' && (int_flags & WINE_URL_STOP_ON_HASH))
1197 stop_escaping = TRUE;
1198
1199 if(cur == '?' && (int_flags & WINE_URL_STOP_ON_QUESTION))
1200 stop_escaping = TRUE;
1201
1202 if(cur == '\\' && (int_flags & WINE_URL_BASH_AS_SLASH) && !stop_escaping) cur = '/';
1203
1204 if(URL_NeedEscapeW(cur, dwFlags, int_flags) && stop_escaping == FALSE) {
1206 char utf[16];
1207
1208 if ((cur >= 0xd800 && cur <= 0xdfff) &&
1209 (src[1] >= 0xdc00 && src[1] <= 0xdfff))
1210 {
1211#ifdef __REACTOS__
1213 utf, sizeof(utf), NULL, NULL );
1214#else
1216 utf, sizeof(utf), NULL, NULL );
1217#endif
1218 src++;
1219 }
1220 else
1221#ifdef __REACTOS__
1223 utf, sizeof(utf), NULL, NULL );
1224#else
1226 utf, sizeof(utf), NULL, NULL );
1227#endif
1228
1229 if (!len) {
1230 utf[0] = 0xef;
1231 utf[1] = 0xbf;
1232 utf[2] = 0xbd;
1233 len = 3;
1234 }
1235
1236 for(i = 0; i < len; i++) {
1237 next[i*3+0] = '%';
1238 next[i*3+1] = hexDigits[(utf[i] >> 4) & 0xf];
1239 next[i*3+2] = hexDigits[utf[i] & 0xf];
1240 }
1241 len *= 3;
1242 } else {
1243 next[0] = '%';
1244 next[1] = hexDigits[(cur >> 4) & 0xf];
1245 next[2] = hexDigits[cur & 0xf];
1246 len = 3;
1247 }
1248 } else {
1249 next[0] = cur;
1250 len = 1;
1251 }
1252 src++;
1253 }
1254
1255 if(needed + len <= *pcchEscaped) {
1256 memcpy(dst, next, len*sizeof(WCHAR));
1257 dst += len;
1258 }
1259 needed += len;
1260 }
1261
1262 if(needed < *pcchEscaped) {
1263 *dst = '\0';
1264 memcpy(pszEscaped, dst_ptr, (needed+1)*sizeof(WCHAR));
1265
1266 ret = S_OK;
1267 } else {
1268 needed++; /* add one for the '\0' */
1269 ret = E_POINTER;
1270 }
1271 *pcchEscaped = needed;
1272
1273 HeapFree(GetProcessHeap(), 0, dst_ptr);
1274 return ret;
1275}
#define WINE_URL_STOP_ON_QUESTION
Definition: url.c:997
static const CHAR hexDigits[]
Definition: url.c:109
#define WINE_URL_ESCAPE_SLASH
Definition: url.c:993
static BOOL URL_NeedEscapeW(WCHAR ch, DWORD flags, DWORD int_flags)
Definition: url.c:999
#define WINE_URL_ESCAPE_HASH
Definition: url.c:994
#define WINE_URL_STOP_ON_HASH
Definition: url.c:996
#define WINE_URL_BASH_AS_SLASH
Definition: url.c:991
#define WINE_URL_COLLAPSE_SLASHES
Definition: url.c:992
#define WINE_URL_ESCAPE_QUESTION
Definition: url.c:995
#define WC_ERR_INVALID_CHARS
Definition: unicode.h:47
#define debugstr_wn
Definition: kernel32.h:33
static unsigned __int64 next
Definition: rand_nt.c:6
#define CP_UTF8
Definition: nls.h:20

Referenced by test_UrlEscapeW(), URL_CreateFromPath(), UrlCanonicalizeW(), and UrlEscapeA().

◆ UrlGetLocationA()

WINSHLWAPI LPCSTR WINAPI UrlGetLocationA ( LPCSTR  pszUrl)

Definition at line 1457 of file url.c.

1459{
1461 DWORD res1;
1462
1463 base.cbSize = sizeof(base);
1464 res1 = ParseURLA(pszUrl, &base);
1465 if (res1) return NULL; /* invalid scheme */
1466
1467 /* if scheme is file: then never return pointer */
1468 if (strncmp(base.pszProtocol, "file", min(4,base.cchProtocol)) == 0) return NULL;
1469
1470 /* Look for '#' and return its addr */
1471 return strchr(base.pszSuffix, '#');
1472}

◆ UrlGetLocationW()

WINSHLWAPI LPCWSTR WINAPI UrlGetLocationW ( LPCWSTR  pszUrl)

Definition at line 1479 of file url.c.

1481{
1483 DWORD res1;
1484
1485 base.cbSize = sizeof(base);
1486 res1 = ParseURLW(pszUrl, &base);
1487 if (res1) return NULL; /* invalid scheme */
1488
1489 /* if scheme is file: then never return pointer */
1490 if (strncmpW(base.pszProtocol, fileW, min(4,base.cchProtocol)) == 0) return NULL;
1491
1492 /* Look for '#' and return its addr */
1493 return strchrW(base.pszSuffix, '#');
1494}
static const WCHAR fileW[]
Definition: url.c:111

◆ UrlGetPartA()

WINSHLWAPI HRESULT WINAPI UrlGetPartA ( LPCSTR  pszIn,
LPSTR  pszOut,
LPDWORD  pcchOut,
DWORD  dwPart,
DWORD  dwFlags 
)

Definition at line 2229 of file url.c.

2231{
2232 LPWSTR in, out;
2233 DWORD ret, len, len2;
2234
2235 if(!pszIn || !pszOut || !pcchOut || *pcchOut <= 0)
2236 return E_INVALIDARG;
2237
2239 (2*INTERNET_MAX_URL_LENGTH) * sizeof(WCHAR));
2241
2243
2245 ret = UrlGetPartW(in, out, &len, dwPart, dwFlags);
2246
2247 if (FAILED(ret)) {
2248 HeapFree(GetProcessHeap(), 0, in);
2249 return ret;
2250 }
2251
2252 len2 = WideCharToMultiByte(CP_ACP, 0, out, len, NULL, 0, NULL, NULL);
2253 if (len2 > *pcchOut) {
2254 *pcchOut = len2+1;
2255 HeapFree(GetProcessHeap(), 0, in);
2256 return E_POINTER;
2257 }
2258 len2 = WideCharToMultiByte(CP_ACP, 0, out, len+1, pszOut, *pcchOut, NULL, NULL);
2259 *pcchOut = len2-1;
2260 HeapFree(GetProcessHeap(), 0, in);
2261 return ret;
2262}
HRESULT WINAPI UrlGetPartW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut, DWORD dwPart, DWORD dwFlags)
Definition: url.c:2269

Referenced by test_UrlGetPart().

◆ UrlGetPartW()

WINSHLWAPI HRESULT WINAPI UrlGetPartW ( LPCWSTR  pszIn,
LPWSTR  pszOut,
LPDWORD  pcchOut,
DWORD  dwPart,
DWORD  dwFlags 
)

Definition at line 2269 of file url.c.

2271{
2272 WINE_PARSE_URL pl;
2273 HRESULT ret;
2274 DWORD scheme, size, schsize;
2275 LPCWSTR addr, schaddr;
2276
2277 TRACE("(%s %p %p(%d) %08x %08x)\n",
2278 debugstr_w(pszIn), pszOut, pcchOut, *pcchOut, dwPart, dwFlags);
2279
2280 if(!pszIn || !pszOut || !pcchOut || *pcchOut <= 0)
2281 return E_INVALIDARG;
2282
2283 *pszOut = '\0';
2284
2285 addr = strchrW(pszIn, ':');
2286 if(!addr)
2288 else
2289 scheme = get_scheme_code(pszIn, addr-pszIn);
2290
2291 ret = URL_ParseUrl(pszIn, &pl);
2292
2293 switch (dwPart) {
2294 case URL_PART_SCHEME:
2295 if (!pl.szScheme) {
2296 *pcchOut = 0;
2297 return S_FALSE;
2298 }
2299 addr = pl.pScheme;
2300 size = pl.szScheme;
2301 break;
2302
2303 case URL_PART_HOSTNAME:
2304 switch(scheme) {
2305 case URL_SCHEME_FTP:
2306 case URL_SCHEME_HTTP:
2307 case URL_SCHEME_GOPHER:
2308 case URL_SCHEME_TELNET:
2309 case URL_SCHEME_FILE:
2310 case URL_SCHEME_HTTPS:
2311 break;
2312 default:
2313 *pcchOut = 0;
2314 return E_FAIL;
2315 }
2316
2317 if(scheme==URL_SCHEME_FILE && (!pl.szHostName ||
2318 (pl.szHostName==1 && *(pl.pHostName+1)==':'))) {
2319 *pcchOut = 0;
2320 return S_FALSE;
2321 }
2322
2323 if (!pl.szHostName) {
2324 *pcchOut = 0;
2325 return S_FALSE;
2326 }
2327 addr = pl.pHostName;
2328 size = pl.szHostName;
2329 break;
2330
2331 case URL_PART_USERNAME:
2332 if (!pl.szUserName) {
2333 *pcchOut = 0;
2334 return S_FALSE;
2335 }
2336 addr = pl.pUserName;
2337 size = pl.szUserName;
2338 break;
2339
2340 case URL_PART_PASSWORD:
2341 if (!pl.szPassword) {
2342 *pcchOut = 0;
2343 return S_FALSE;
2344 }
2345 addr = pl.pPassword;
2346 size = pl.szPassword;
2347 break;
2348
2349 case URL_PART_PORT:
2350 if (!pl.szPort) {
2351 *pcchOut = 0;
2352 return S_FALSE;
2353 }
2354 addr = pl.pPort;
2355 size = pl.szPort;
2356 break;
2357
2358 case URL_PART_QUERY:
2359 if (!pl.szQuery) {
2360 *pcchOut = 0;
2361 return S_FALSE;
2362 }
2363 addr = pl.pQuery;
2364 size = pl.szQuery;
2365 break;
2366
2367 default:
2368 *pcchOut = 0;
2369 return E_INVALIDARG;
2370 }
2371
2373 if(!pl.pScheme || !pl.szScheme) {
2374 *pcchOut = 0;
2375 return E_FAIL;
2376 }
2377 schaddr = pl.pScheme;
2378 schsize = pl.szScheme;
2379 if (*pcchOut < schsize + size + 2) {
2380 *pcchOut = schsize + size + 2;
2381 return E_POINTER;
2382 }
2383 memcpy(pszOut, schaddr, schsize*sizeof(WCHAR));
2384 pszOut[schsize] = ':';
2385 memcpy(pszOut+schsize+1, addr, size*sizeof(WCHAR));
2386 pszOut[schsize+1+size] = 0;
2387 *pcchOut = schsize + 1 + size;
2388 }
2389 else {
2390 if (*pcchOut < size + 1) {*pcchOut = size+1; return E_POINTER;}
2391 memcpy(pszOut, addr, size*sizeof(WCHAR));
2392 pszOut[size] = 0;
2393 *pcchOut = size;
2394 }
2395 TRACE("len=%d %s\n", *pcchOut, debugstr_w(pszOut));
2396
2397 return ret;
2398}
static LONG URL_ParseUrl(LPCWSTR pszUrl, WINE_PARSE_URL *pl)
Definition: url.c:2147
GLenum const GLvoid * addr
Definition: glext.h:9621
#define URL_PARTFLAG_KEEPSCHEME
Definition: shlwapi.h:594
LPCWSTR pQuery
Definition: url.c:98
DWORD szQuery
Definition: url.c:99
DWORD szPort
Definition: url.c:97
DWORD szHostName
Definition: url.c:95
DWORD szPassword
Definition: url.c:93
LPCWSTR pUserName
Definition: url.c:90
DWORD szUserName
Definition: url.c:91
LPCWSTR pPort
Definition: url.c:96
LPCWSTR pPassword
Definition: url.c:92
DWORD szScheme
Definition: url.c:89
LPCWSTR pHostName
Definition: url.c:94
LPCWSTR pScheme
Definition: url.c:88

Referenced by test_UrlGetPart(), and UrlGetPartA().

◆ UrlHashA()

WINSHLWAPI HRESULT WINAPI UrlHashA ( LPCSTR  pszUrl,
unsigned char lpDest,
DWORD  nDestLen 
)

Definition at line 1616 of file url.c.

1617{
1618 if (IsBadStringPtrA(pszUrl, -1) || IsBadWritePtr(lpDest, nDestLen))
1619 return E_INVALIDARG;
1620
1621 HashData((const BYTE*)pszUrl, (int)strlen(pszUrl), lpDest, nDestLen);
1622 return S_OK;
1623}
BOOL NTAPI IsBadStringPtrA(IN LPCSTR lpsz, IN UINT_PTR ucchMax)
Definition: except.c:989
HRESULT WINAPI HashData(const unsigned char *lpSrc, DWORD nSrcLen, unsigned char *lpDest, DWORD nDestLen)
Definition: url.c:1575

Referenced by hash_url().

◆ UrlHashW()

WINSHLWAPI HRESULT WINAPI UrlHashW ( LPCWSTR  pszUrl,
unsigned char lpDest,
DWORD  nDestLen 
)

Definition at line 1630 of file url.c.

1631{
1632 char szUrl[MAX_PATH];
1633
1634 TRACE("(%s,%p,%d)\n",debugstr_w(pszUrl), lpDest, nDestLen);
1635
1636 if (IsBadStringPtrW(pszUrl, -1) || IsBadWritePtr(lpDest, nDestLen))
1637 return E_INVALIDARG;
1638
1639 /* Win32 hashes the data as an ASCII string, presumably so that both A+W
1640 * return the same digests for the same URL.
1641 */
1642 WideCharToMultiByte(CP_ACP, 0, pszUrl, -1, szUrl, MAX_PATH, NULL, NULL);
1643 HashData((const BYTE*)szUrl, (int)strlen(szUrl), lpDest, nDestLen);
1644 return S_OK;
1645}
BOOL NTAPI IsBadStringPtrW(IN LPCWSTR lpsz, IN UINT_PTR ucchMax)
Definition: except.c:950

Referenced by hash_url().

◆ UrlIsA()

WINSHLWAPI BOOL WINAPI UrlIsA ( LPCSTR  pszUrl,
URLIS  Urlis 
)

Definition at line 1880 of file url.c.

1881{
1883 DWORD res1;
1884 LPCSTR last;
1885
1886 TRACE("(%s %d)\n", debugstr_a(pszUrl), Urlis);
1887
1888 if(!pszUrl)
1889 return FALSE;
1890
1891 switch (Urlis) {
1892
1893 case URLIS_OPAQUE:
1894 base.cbSize = sizeof(base);
1895 res1 = ParseURLA(pszUrl, &base);
1896 if (res1) return FALSE; /* invalid scheme */
1897 switch (base.nScheme)
1898 {
1899 case URL_SCHEME_MAILTO:
1900 case URL_SCHEME_SHELL:
1903 case URL_SCHEME_ABOUT:
1904 return TRUE;
1905 }
1906 return FALSE;
1907
1908 case URLIS_FILEURL:
1910 "file:", 5) == CSTR_EQUAL);
1911
1912 case URLIS_DIRECTORY:
1913 last = pszUrl + strlen(pszUrl) - 1;
1914 return (last >= pszUrl && (*last == '/' || *last == '\\' ));
1915
1916 case URLIS_URL:
1917 return PathIsURLA(pszUrl);
1918
1919 case URLIS_NOHISTORY:
1920 case URLIS_APPLIABLE:
1921 case URLIS_HASQUERY:
1922 default:
1923 FIXME("(%s %d): stub\n", debugstr_a(pszUrl), Urlis);
1924 }
1925 return FALSE;
1926}
BOOL WINAPI PathIsURLA(LPCSTR lpstrPath)
Definition: url.c:2412
static UINT UINT last
Definition: font.c:45

Referenced by test_UrlIs(), test_UrlIs_null(), UrlIsNoHistoryA(), and UrlIsOpaqueA().

◆ UrlIsNoHistoryA()

WINSHLWAPI BOOL WINAPI UrlIsNoHistoryA ( LPCSTR  pszUrl)

Definition at line 1994 of file url.c.

1995{
1996 return UrlIsA(pszUrl, URLIS_NOHISTORY);
1997}
BOOL WINAPI UrlIsA(LPCSTR pszUrl, URLIS Urlis)
Definition: url.c:1880

◆ UrlIsNoHistoryW()

WINSHLWAPI BOOL WINAPI UrlIsNoHistoryW ( LPCWSTR  pszUrl)

Definition at line 2004 of file url.c.

2005{
2006 return UrlIsW(pszUrl, URLIS_NOHISTORY);
2007}
BOOL WINAPI UrlIsW(LPCWSTR pszUrl, URLIS Urlis)
Definition: url.c:1933

◆ UrlIsOpaqueA()

WINSHLWAPI BOOL WINAPI UrlIsOpaqueA ( LPCSTR  pszUrl)

Definition at line 2024 of file url.c.

2025{
2026 return UrlIsA(pszUrl, URLIS_OPAQUE);
2027}

◆ UrlIsOpaqueW()

WINSHLWAPI BOOL WINAPI UrlIsOpaqueW ( LPCWSTR  pszUrl)

Definition at line 2034 of file url.c.

2035{
2036 return UrlIsW(pszUrl, URLIS_OPAQUE);
2037}

◆ UrlIsW()

WINSHLWAPI BOOL WINAPI UrlIsW ( LPCWSTR  pszUrl,
URLIS  Urlis 
)

Definition at line 1933 of file url.c.

1934{
1935 static const WCHAR file_colon[] = { 'f','i','l','e',':',0 };
1937 DWORD res1;
1938 LPCWSTR last;
1939
1940 TRACE("(%s %d)\n", debugstr_w(pszUrl), Urlis);
1941
1942 if(!pszUrl)
1943 return FALSE;
1944
1945 switch (Urlis) {
1946
1947 case URLIS_OPAQUE:
1948 base.cbSize = sizeof(base);
1949 res1 = ParseURLW(pszUrl, &base);
1950 if (res1) return FALSE; /* invalid scheme */
1951 switch (base.nScheme)
1952 {
1953 case URL_SCHEME_MAILTO:
1954 case URL_SCHEME_SHELL:
1957 case URL_SCHEME_ABOUT:
1958 return TRUE;
1959 }
1960 return FALSE;
1961
1962 case URLIS_FILEURL:
1964 file_colon, 5) == CSTR_EQUAL);
1965
1966 case URLIS_DIRECTORY:
1967 last = pszUrl + strlenW(pszUrl) - 1;
1968 return (last >= pszUrl && (*last == '/' || *last == '\\'));
1969
1970 case URLIS_URL:
1971 return PathIsURLW(pszUrl);
1972
1973 case URLIS_NOHISTORY:
1974 case URLIS_APPLIABLE:
1975 case URLIS_HASQUERY:
1976 default:
1977 FIXME("(%s %d): stub\n", debugstr_w(pszUrl), Urlis);
1978 }
1979 return FALSE;
1980}
BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath)
Definition: url.c:2432

Referenced by test_UrlIs(), test_UrlIs_null(), UrlIsNoHistoryW(), and UrlIsOpaqueW().

◆ UrlUnescapeA()

WINSHLWAPI HRESULT WINAPI UrlUnescapeA ( LPSTR  pszUrl,
LPSTR  pszUnescaped,
LPDWORD  pcchUnescaped,
DWORD  dwFlags 
)

Definition at line 1298 of file url.c.

1303{
1304 char *dst, next;
1305 LPCSTR src;
1306 HRESULT ret;
1307 DWORD needed;
1308 BOOL stop_unescaping = FALSE;
1309
1310 TRACE("(%s, %p, %p, 0x%08x)\n", debugstr_a(pszUrl), pszUnescaped,
1311 pcchUnescaped, dwFlags);
1312
1313 if (!pszUrl) return E_INVALIDARG;
1314
1316 dst = pszUrl;
1317 else
1318 {
1319 if (!pszUnescaped || !pcchUnescaped) return E_INVALIDARG;
1320 dst = pszUnescaped;
1321 }
1322
1323 for(src = pszUrl, needed = 0; *src; src++, needed++) {
1325 (*src == '#' || *src == '?')) {
1326 stop_unescaping = TRUE;
1327 next = *src;
1328 } else if(*src == '%' && isxdigit(*(src + 1)) && isxdigit(*(src + 2))
1329 && stop_unescaping == FALSE) {
1330 INT ih;
1331 char buf[3];
1332 memcpy(buf, src + 1, 2);
1333 buf[2] = '\0';
1334 ih = strtol(buf, NULL, 16);
1335 next = (CHAR) ih;
1336 src += 2; /* Advance to end of escape */
1337 } else
1338 next = *src;
1339
1340 if(dwFlags & URL_UNESCAPE_INPLACE || needed < *pcchUnescaped)
1341 *dst++ = next;
1342 }
1343
1344 if(dwFlags & URL_UNESCAPE_INPLACE || needed < *pcchUnescaped) {
1345 *dst = '\0';
1346 ret = S_OK;
1347 } else {
1348 needed++; /* add one for the '\0' */
1349 ret = E_POINTER;
1350 }
1352 *pcchUnescaped = needed;
1353
1354 if (ret == S_OK) {
1355 TRACE("result %s\n", (dwFlags & URL_UNESCAPE_INPLACE) ?
1356 debugstr_a(pszUrl) : debugstr_a(pszUnescaped));
1357 }
1358
1359 return ret;
1360}
#define CHAR(Char)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define URL_DONT_UNESCAPE_EXTRA_INFO
Definition: shlwapi.h:539
_Check_return_ long __cdecl strtol(_In_z_ const char *_Str, _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix)

Referenced by test_UrlUnescape().

◆ UrlUnescapeW()

WINSHLWAPI HRESULT WINAPI UrlUnescapeW ( LPWSTR  pszUrl,
LPWSTR  pszUnescaped,
LPDWORD  pcchUnescaped,
DWORD  dwFlags 
)

Definition at line 1367 of file url.c.

1372{
1373 WCHAR *dst, next;
1374 LPCWSTR src;
1375 HRESULT ret;
1376 DWORD needed;
1377 BOOL stop_unescaping = FALSE;
1378
1379 TRACE("(%s, %p, %p, 0x%08x)\n", debugstr_w(pszUrl), pszUnescaped,
1380 pcchUnescaped, dwFlags);
1381
1382 if(!pszUrl) return E_INVALIDARG;
1383
1385 dst = pszUrl;
1386 else
1387 {
1388 if (!pszUnescaped || !pcchUnescaped) return E_INVALIDARG;
1389 dst = pszUnescaped;
1390 }
1391
1392 for(src = pszUrl, needed = 0; *src; src++, needed++) {
1394 (*src == '#' || *src == '?')) {
1395 stop_unescaping = TRUE;
1396 next = *src;
1397 } else if(*src == '%' && isxdigitW(*(src + 1)) && isxdigitW(*(src + 2))
1398 && stop_unescaping == FALSE) {
1399 INT ih;
1400 WCHAR buf[5] = {'0','x',0};
1401 memcpy(buf + 2, src + 1, 2*sizeof(WCHAR));
1402 buf[4] = 0;
1404 next = (WCHAR) ih;
1405 src += 2; /* Advance to end of escape */
1406 } else
1407 next = *src;
1408
1409 if(dwFlags & URL_UNESCAPE_INPLACE || needed < *pcchUnescaped)
1410 *dst++ = next;
1411 }
1412
1413 if(dwFlags & URL_UNESCAPE_INPLACE || needed < *pcchUnescaped) {
1414 *dst = '\0';
1415 ret = S_OK;
1416 } else {
1417 needed++; /* add one for the '\0' */
1418 ret = E_POINTER;
1419 }
1421 *pcchUnescaped = needed;
1422
1423 if (ret == S_OK) {
1424 TRACE("result %s\n", (dwFlags & URL_UNESCAPE_INPLACE) ?
1425 debugstr_w(pszUrl) : debugstr_w(pszUnescaped));
1426 }
1427
1428 return ret;
1429}
BOOL WINAPI StrToIntExW(const WCHAR *str, DWORD flags, INT *ret)
Definition: string.c:972

Referenced by test_BindToStorage(), test_UrlUnescape(), and UrlCanonicalizeW().

◆ WhichPlatform()

WINSHLWAPI UINT WINAPI WhichPlatform ( void  )

Definition at line 3073 of file ordinal.c.

3075{
3076 static const char szIntegratedBrowser[] = "IntegratedBrowser";
3077 static DWORD dwState = 0;
3078 HKEY hKey;
3079 DWORD dwRet, dwData, dwSize;
3080 HMODULE hshell32;
3081
3082 if (dwState)
3083 return dwState;
3084
3085 /* If shell32 exports DllGetVersion(), the browser is integrated */
3086 dwState = 1;
3087 hshell32 = LoadLibraryA("shell32.dll");
3088 if (hshell32)
3089 {
3090 FARPROC pDllGetVersion;
3091 pDllGetVersion = GetProcAddress(hshell32, "DllGetVersion");
3092 dwState = pDllGetVersion ? 2 : 1;
3093 FreeLibrary(hshell32);
3094 }
3095
3096 /* Set or delete the key accordingly */
3098 "Software\\Microsoft\\Internet Explorer", 0,
3100 if (!dwRet)
3101 {
3102 dwRet = RegQueryValueExA(hKey, szIntegratedBrowser, 0, 0,
3103 (LPBYTE)&dwData, &dwSize);
3104
3105 if (!dwRet && dwState == 1)
3106 {
3107 /* Value exists but browser is not integrated */
3108 RegDeleteValueA(hKey, szIntegratedBrowser);
3109 }
3110 else if (dwRet && dwState == 2)
3111 {
3112 /* Browser is integrated but value does not exist */
3113 dwData = TRUE;
3114 RegSetValueExA(hKey, szIntegratedBrowser, 0, REG_DWORD,
3115 (LPBYTE)&dwData, sizeof(dwData));
3116 }
3118 }
3119 return dwState;
3120}
int(* FARPROC)()
Definition: compat.h:36
#define GetProcAddress(x, y)
Definition: compat.h:753
#define FreeLibrary(x)
Definition: compat.h:748
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
static HANDLE ULONG_PTR dwData
Definition: file.c:35

◆ wnsprintfA()

WINSHLWAPI INT WINAPIV wnsprintfA ( LPSTR  ,
INT  ,
LPCSTR  ,
  ... 
)

◆ wnsprintfW()

WINSHLWAPI INT WINAPIV wnsprintfW ( LPWSTR  ,
INT  ,
LPCWSTR  ,
  ... 
)