Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
b6f34d3c
Commit
b6f34d3c
authored
Sep 11, 2003
by
Robert Shearman
Committed by
Alexandre Julliard
Sep 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Convert ordinals to their real names.
- Partially implement a few Assoc* functions.
parent
721dbf0b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
158 additions
and
115 deletions
+158
-115
assoc.c
dlls/shlwapi/assoc.c
+61
-18
clist.c
dlls/shlwapi/clist.c
+19
-19
istream.c
dlls/shlwapi/istream.c
+3
-3
ordinal.c
dlls/shlwapi/ordinal.c
+0
-0
path.c
dlls/shlwapi/path.c
+22
-22
reg.c
dlls/shlwapi/reg.c
+33
-33
regstream.c
dlls/shlwapi/regstream.c
+1
-1
shlwapi.spec
dlls/shlwapi/shlwapi.spec
+0
-0
string.c
dlls/shlwapi/string.c
+5
-5
thread.c
dlls/shlwapi/thread.c
+2
-2
url.c
dlls/shlwapi/url.c
+12
-12
No files found.
dlls/shlwapi/assoc.c
View file @
b6f34d3c
...
...
@@ -60,6 +60,8 @@ typedef struct
{
ICOM_VFIELD
(
IQueryAssociations
);
LONG
ref
;
HKEY
hkeySource
;
HKEY
hkeyProgID
;
}
IQueryAssociationsImpl
;
static
struct
ICOM_VTABLE
(
IQueryAssociations
)
IQueryAssociations_vtbl
;
...
...
@@ -76,6 +78,8 @@ static IQueryAssociations* IQueryAssociations_Constructor(void)
iface
=
(
IQueryAssociationsImpl
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IQueryAssociationsImpl
));
iface
->
lpVtbl
=
&
IQueryAssociations_vtbl
;
iface
->
ref
=
1
;
iface
->
hkeySource
=
NULL
;
iface
->
hkeyProgID
=
NULL
;
TRACE
(
"Returning IQueryAssociations* %p
\n
"
,
iface
);
return
(
IQueryAssociations
*
)
iface
;
...
...
@@ -113,7 +117,7 @@ static BOOL SHLWAPI_ParamAToW(LPCSTR lpszParam, LPWSTR lpszBuff, DWORD dwLen,
}
/*************************************************************************
* AssocCreate [SHLWAPI.
253
]
* AssocCreate [SHLWAPI.
@
]
*
* Create a new IQueryAssociations object.
*
...
...
@@ -156,7 +160,7 @@ HRESULT WINAPI AssocCreate(CLSID clsid, REFIID refiid, void **lpInterface)
}
/*************************************************************************
* AssocQueryKeyW [SHLWAPI.
255
]
* AssocQueryKeyW [SHLWAPI.
@
]
*
* See AssocQueryKeyA.
*/
...
...
@@ -185,7 +189,7 @@ HRESULT WINAPI AssocQueryKeyW(ASSOCF cfFlags, ASSOCKEY assockey, LPCWSTR pszAsso
}
/*************************************************************************
* AssocQueryKeyA [SHLWAPI.
254
]
* AssocQueryKeyA [SHLWAPI.
@
]
*
* Get a file association key from the registry.
*
...
...
@@ -226,7 +230,7 @@ HRESULT WINAPI AssocQueryKeyA(ASSOCF cfFlags, ASSOCKEY assockey, LPCSTR pszAssoc
}
/*************************************************************************
* AssocQueryStringW [SHLWAPI.
384
]
* AssocQueryStringW [SHLWAPI.
@
]
*
* See AssocQueryStringA.
*/
...
...
@@ -259,7 +263,7 @@ HRESULT WINAPI AssocQueryStringW(ASSOCF cfFlags, ASSOCSTR str, LPCWSTR pszAssoc,
}
/*************************************************************************
* AssocQueryStringA [SHLWAPI.
381
]
* AssocQueryStringA [SHLWAPI.
@
]
*
* Get a file association string from the registry.
*
...
...
@@ -321,7 +325,7 @@ HRESULT WINAPI AssocQueryStringA(ASSOCF cfFlags, ASSOCSTR str, LPCSTR pszAssoc,
}
/*************************************************************************
* AssocQueryStringByKeyW [SHLWAPI.
383
]
* AssocQueryStringByKeyW [SHLWAPI.
@
]
*
* See AssocQueryStringByKeyA.
*/
...
...
@@ -352,7 +356,7 @@ HRESULT WINAPI AssocQueryStringByKeyW(ASSOCF cfFlags, ASSOCSTR str, HKEY hkAssoc
}
/*************************************************************************
* AssocQueryStringByKeyA [SHLWAPI.
382
]
* AssocQueryStringByKeyA [SHLWAPI.
@
]
*
* Get a file association string from the registry, given a starting key.
*
...
...
@@ -486,11 +490,11 @@ static ULONG WINAPI IQueryAssociations_fnRelease(IQueryAssociations *iface)
* Initialise an IQueryAssociations object.
*
* PARAMS
* iface [I] IQueryAssociations interface to initialise
* cfFlags [I] ASSOCF_ flags from "shlwapi.h"
* pszAssoc [I] String for the root key name, or NULL if hkProgid is given
* hkProgid [I] Handle for the root key, or NULL if pszAssoc is given
* hWnd [I] Reserved, must be NULL.
* iface
[I] IQueryAssociations interface to initialise
* cfFlags
[I] ASSOCF_ flags from "shlwapi.h"
* pszAssoc
[I] String for the root key name, or NULL if hkProgid is given
* hk
ey
Progid [I] Handle for the root key, or NULL if pszAssoc is given
* hWnd
[I] Reserved, must be NULL.
*
* RETURNS
* Success: S_OK. iface is initialised with the parameters given.
...
...
@@ -500,14 +504,53 @@ static HRESULT WINAPI IQueryAssociations_fnInit(
IQueryAssociations
*
iface
,
ASSOCF
cfFlags
,
LPCWSTR
pszAssoc
,
HKEY
hkProgid
,
HKEY
hk
ey
Progid
,
HWND
hWnd
)
{
ICOM_THIS
(
IQueryAssociationsImpl
,
iface
);
FIXME
(
"(%p,0x%8lx,%s,%p,%p)-stub!
\n
"
,
This
,
cfFlags
,
debugstr_w
(
pszAssoc
),
hkProgid
,
hWnd
);
return
E_NOTIMPL
;
static
const
WCHAR
szProgID
[]
=
{
'P'
,
'r'
,
'o'
,
'g'
,
'I'
,
'D'
,
0
};
ICOM_THIS
(
IQueryAssociationsImpl
,
iface
);
HRESULT
hr
;
TRACE
(
"(%p)->(%ld,%s,%p,%p)
\n
"
,
iface
,
cfFlags
,
debugstr_w
(
pszAssoc
),
hkeyProgid
,
hWnd
);
if
(
hWnd
!=
NULL
)
FIXME
(
"hwnd != NULL not supported
\n
"
);
if
(
cfFlags
!=
0
)
FIXME
(
"unsupported flags: %lx
\n
"
,
cfFlags
);
if
(
pszAssoc
!=
NULL
)
{
hr
=
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
pszAssoc
,
0
,
KEY_READ
,
&
This
->
hkeySource
);
if
(
FAILED
(
hr
))
return
HRESULT_FROM_WIN32
(
ERROR_NO_ASSOCIATION
);
/* if this is not a prog id */
if
((
*
pszAssoc
==
'.'
)
||
(
*
pszAssoc
==
'{'
))
{
hr
=
RegOpenKeyExW
(
This
->
hkeySource
,
szProgID
,
0
,
KEY_READ
,
&
This
->
hkeyProgID
);
if
(
FAILED
(
hr
))
FIXME
(
"Don't know what to return
\n
"
);
}
else
This
->
hkeyProgID
=
This
->
hkeySource
;
return
S_OK
;
}
else
if
(
hkeyProgid
!=
NULL
)
{
This
->
hkeyProgID
=
hkeyProgid
;
return
S_OK
;
}
else
return
E_FAIL
;
}
/**************************************************************************
...
...
dlls/shlwapi/clist.c
View file @
b6f34d3c
...
...
@@ -40,7 +40,7 @@ typedef const SHLWAPI_CLIST* LPCSHLWAPI_CLIST;
/* ulId for contained SHLWAPI_CLIST items */
#define CLIST_ID_CONTAINER (~0UL)
HRESULT
WINAPI
SH
LWAPI_20
(
LPSHLWAPI_CLIST
*
,
LPCSHLWAPI_CLIST
);
HRESULT
WINAPI
SH
AddDataBlock
(
LPSHLWAPI_CLIST
*
,
LPCSHLWAPI_CLIST
);
/*************************************************************************
* NextItem
...
...
@@ -73,17 +73,17 @@ inline static LPSHLWAPI_CLIST NextItem(LPCSHLWAPI_CLIST lpList)
*
* The exposed API consists of:
*
* SH
LWAPI_17()
Write a compact list to a stream,
* SH
WriteDataBlockList -
Write a compact list to a stream,
*
* SH
LWAPI_18()
Read and create a list from a stream,
* SH
ReadDataBlockList -
Read and create a list from a stream,
*
* SH
LWAPI_19()
Free a list,
* SH
FreeDataBlockList -
Free a list,
*
* SH
LWAPI_20()
Insert a new item into a list,
* SH
AddDataBlock -
Insert a new item into a list,
*
* SH
LWAPI_21()
Remove an item from a list,
* SH
RemoveDataBlock -
Remove an item from a list,
*
* SH
LWAPI_22()
Find an item in a list.
* SH
FindDataBlock -
Find an item in a list.
*
* The compact list is stored packed into a memory array. Each element has a
* size and an associated ID. Elements must be less than 64k if the list is
...
...
@@ -95,7 +95,7 @@ inline static LPSHLWAPI_CLIST NextItem(LPCSHLWAPI_CLIST lpList)
*
* These functions are slow for large objects and long lists.
*/
HRESULT
WINAPI
SH
LWAPI_17
(
IStream
*
lpStream
,
LPSHLWAPI_CLIST
lpList
)
HRESULT
WINAPI
SH
WriteDataBlockList
(
IStream
*
lpStream
,
LPSHLWAPI_CLIST
lpList
)
{
ULONG
ulSize
;
HRESULT
hRet
=
E_FAIL
;
...
...
@@ -149,9 +149,9 @@ HRESULT WINAPI SHLWAPI_17(IStream* lpStream, LPSHLWAPI_CLIST lpList)
*
* NOTES
* When read from a file, list objects are limited in size to 64k.
* See SH
LWAPI_17
.
* See SH
WriteDataBlockList
.
*/
HRESULT
WINAPI
SH
LWAPI_18
(
IStream
*
lpStream
,
LPSHLWAPI_CLIST
*
lppList
)
HRESULT
WINAPI
SH
ReadDataBlockList
(
IStream
*
lpStream
,
LPSHLWAPI_CLIST
*
lppList
)
{
SHLWAPI_CLIST
bBuff
[
128
];
/* Temporary storage for new list item */
ULONG
ulBuffSize
=
sizeof
(
bBuff
);
...
...
@@ -223,7 +223,7 @@ HRESULT WINAPI SHLWAPI_18(IStream* lpStream, LPSHLWAPI_CLIST* lppList)
if
(
FAILED
(
hRet
)
||
ulRead
!=
ulSize
)
break
;
SH
LWAPI_20
(
lppList
,
pItem
);
/* Insert Item */
SH
AddDataBlock
(
lppList
,
pItem
);
/* Insert Item */
}
}
while
(
1
);
...
...
@@ -246,9 +246,9 @@ HRESULT WINAPI SHLWAPI_18(IStream* lpStream, LPSHLWAPI_CLIST* lppList)
* Nothing.
*
* NOTES
* See SH
LWAPI_17
.
* See SH
WriteDataBlockList
.
*/
VOID
WINAPI
SH
LWAPI_19
(
LPSHLWAPI_CLIST
lpList
)
VOID
WINAPI
SH
FreeDataBlockList
(
LPSHLWAPI_CLIST
lpList
)
{
TRACE
(
"(%p)
\n
"
,
lpList
);
...
...
@@ -273,9 +273,9 @@ VOID WINAPI SHLWAPI_19(LPSHLWAPI_CLIST lpList)
* If the size of the element to be inserted is less than the size of a
* SHLWAPI_CLIST node, or the Id for the item is CLIST_ID_CONTAINER,
* the call returns S_OK but does not actually add the element.
* See SH
LWAPI_17
.
* See SH
WriteDataBlockList
.
*/
HRESULT
WINAPI
SH
LWAPI_20
(
LPSHLWAPI_CLIST
*
lppList
,
LPCSHLWAPI_CLIST
lpNewItem
)
HRESULT
WINAPI
SH
AddDataBlock
(
LPSHLWAPI_CLIST
*
lppList
,
LPCSHLWAPI_CLIST
lpNewItem
)
{
LPSHLWAPI_CLIST
lpInsertAt
=
NULL
;
ULONG
ulSize
;
...
...
@@ -365,9 +365,9 @@ HRESULT WINAPI SHLWAPI_20(LPSHLWAPI_CLIST* lppList, LPCSHLWAPI_CLIST lpNewItem)
* Failure: FALSE, If any parameters are invalid, or the item was not found.
*
* NOTES
* See SH
LWAPI_17
.
* See SH
WriteDataBlockList
.
*/
BOOL
WINAPI
SH
LWAPI_21
(
LPSHLWAPI_CLIST
*
lppList
,
ULONG
ulId
)
BOOL
WINAPI
SH
RemoveDataBlock
(
LPSHLWAPI_CLIST
*
lppList
,
ULONG
ulId
)
{
LPSHLWAPI_CLIST
lpList
=
0
;
LPSHLWAPI_CLIST
lpItem
=
NULL
;
...
...
@@ -435,9 +435,9 @@ BOOL WINAPI SHLWAPI_21(LPSHLWAPI_CLIST* lppList, ULONG ulId)
* Failure: NULL
*
* NOTES
* See SH
LWAPI_17
.
* See SH
WriteDataBlockList
.
*/
LPSHLWAPI_CLIST
WINAPI
SH
LWAPI_22
(
LPSHLWAPI_CLIST
lpList
,
ULONG
ulId
)
LPSHLWAPI_CLIST
WINAPI
SH
FindDataBlock
(
LPSHLWAPI_CLIST
lpList
,
ULONG
ulId
)
{
TRACE
(
"(%p,%ld)
\n
"
,
lpList
,
ulId
);
...
...
dlls/shlwapi/istream.c
View file @
b6f34d3c
...
...
@@ -557,7 +557,7 @@ HRESULT WINAPI SHLWAPI_184(IStream *lpStream, LPVOID lpvDest, ULONG ulSize)
* TRUE: If the stream has 0 length
* FALSE: Otherwise.
*/
BOOL
WINAPI
SH
LWAPI_166
(
IStream
*
lpStream
)
BOOL
WINAPI
SH
IsEmptyStream
(
IStream
*
lpStream
)
{
STATSTG
statstg
;
BOOL
bRet
=
TRUE
;
...
...
@@ -630,7 +630,7 @@ HRESULT WINAPI SHLWAPI_212(IStream *lpStream, LPCVOID lpvSrc, ULONG ulSize)
* Success: S_OK. The current position within the stream is updated
* Failure: An HRESULT error code.
*/
HRESULT
WINAPI
SHLWAPI_213
(
IStream
*
lpStream
)
HRESULT
WINAPI
IStream_Reset
(
IStream
*
lpStream
)
{
LARGE_INTEGER
zero
;
TRACE
(
"(%p)
\n
"
,
lpStream
);
...
...
@@ -651,7 +651,7 @@ HRESULT WINAPI SHLWAPI_213(IStream *lpStream)
* Success: S_OK. lpulSize contains the size of the stream.
* Failure: An HRESULT error code.
*/
HRESULT
WINAPI
SHLWAPI_214
(
IStream
*
lpStream
,
ULARGE_INTEGER
*
lpulSize
)
HRESULT
WINAPI
IStream_Size
(
IStream
*
lpStream
,
ULARGE_INTEGER
*
lpulSize
)
{
STATSTG
statstg
;
HRESULT
hRet
;
...
...
dlls/shlwapi/ordinal.c
View file @
b6f34d3c
This diff is collapsed.
Click to expand it.
dlls/shlwapi/path.c
View file @
b6f34d3c
...
...
@@ -55,7 +55,7 @@ extern HMODULE SHLWAPI_hshell32;
typedef
BOOL
(
WINAPI
*
fnpIsNetDrive
)(
int
);
static
fnpIsNetDrive
pIsNetDrive
;
HRESULT
WINAPI
SH
LWAPI_441
(
LPCWSTR
,
LPWSTR
,
DWORD
);
HRESULT
WINAPI
SH
GetWebFolderFilePathW
(
LPCWSTR
,
LPWSTR
,
DWORD
);
/*************************************************************************
* PathAppendA [SHLWAPI.@]
...
...
@@ -1052,9 +1052,9 @@ int WINAPI PathParseIconLocationW(LPWSTR lpszPath)
/*************************************************************************
* @ [SHLWAPI.4]
*
* Unicode version of
SHLWAPI_3
.
* Unicode version of
PathFileExistsDefExtA
.
*/
BOOL
WINAPI
SHLWAPI_4
(
LPWSTR
lpszPath
,
DWORD
dwWhich
)
BOOL
WINAPI
PathFileExistsDefExtW
(
LPWSTR
lpszPath
,
DWORD
dwWhich
)
{
static
const
WCHAR
pszExts
[
7
][
5
]
=
{
{
'.'
,
'p'
,
'i'
,
'f'
,
0
},
{
'.'
,
'c'
,
'o'
,
'm'
,
0
},
...
...
@@ -1116,7 +1116,7 @@ BOOL WINAPI SHLWAPI_4(LPWSTR lpszPath,DWORD dwWhich)
* users (here through PathFindOnPathA()) and keeping advanced functionality for
* their own developers exclusive use. Monopoly, anyone?
*/
BOOL
WINAPI
SHLWAPI_3
(
LPSTR
lpszPath
,
DWORD
dwWhich
)
BOOL
WINAPI
PathFileExistsDefExtA
(
LPSTR
lpszPath
,
DWORD
dwWhich
)
{
BOOL
bRet
=
FALSE
;
...
...
@@ -1126,7 +1126,7 @@ BOOL WINAPI SHLWAPI_3(LPSTR lpszPath,DWORD dwWhich)
{
WCHAR
szPath
[
MAX_PATH
];
MultiByteToWideChar
(
0
,
0
,
lpszPath
,
-
1
,
szPath
,
MAX_PATH
);
bRet
=
SHLWAPI_4
(
szPath
,
dwWhich
);
bRet
=
PathFileExistsDefExtW
(
szPath
,
dwWhich
);
if
(
bRet
)
WideCharToMultiByte
(
0
,
0
,
szPath
,
-
1
,
lpszPath
,
MAX_PATH
,
0
,
0
);
}
...
...
@@ -1153,7 +1153,7 @@ static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
GetSystemDirectoryW
(
buff
,
MAX_PATH
);
if
(
!
PathAppendW
(
buff
,
lpszFile
))
return
FALSE
;
if
(
SHLWAPI_4
(
buff
,
dwWhich
))
if
(
PathFileExistsDefExtW
(
buff
,
dwWhich
))
{
strcpyW
(
lpszFile
,
buff
);
return
TRUE
;
...
...
@@ -1161,7 +1161,7 @@ static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
GetWindowsDirectoryW
(
buff
,
MAX_PATH
);
if
(
!
PathAppendW
(
buff
,
szSystem
)
||
!
PathAppendW
(
buff
,
lpszFile
))
return
FALSE
;
if
(
SHLWAPI_4
(
buff
,
dwWhich
))
if
(
PathFileExistsDefExtW
(
buff
,
dwWhich
))
{
strcpyW
(
lpszFile
,
buff
);
return
TRUE
;
...
...
@@ -1169,7 +1169,7 @@ static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
GetWindowsDirectoryW
(
buff
,
MAX_PATH
);
if
(
!
PathAppendW
(
buff
,
lpszFile
))
return
FALSE
;
if
(
SHLWAPI_4
(
buff
,
dwWhich
))
if
(
PathFileExistsDefExtW
(
buff
,
dwWhich
))
{
strcpyW
(
lpszFile
,
buff
);
return
TRUE
;
...
...
@@ -1200,7 +1200,7 @@ static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
if
(
!
PathAppendW
(
buff
,
lpszFile
))
return
FALSE
;
if
(
SHLWAPI_4
(
buff
,
dwWhich
))
if
(
PathFileExistsDefExtW
(
buff
,
dwWhich
))
{
strcpyW
(
lpszFile
,
buff
);
free
(
lpszPATH
);
...
...
@@ -1225,7 +1225,7 @@ static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
* Success: TRUE. The path to the executable is stored in lpszFile.
* Failure: FALSE. The path to the executable is unchanged.
*/
BOOL
WINAPI
SHLWAPI_5
(
LPSTR
lpszFile
,
LPCSTR
*
lppszOtherDirs
,
DWORD
dwWhich
)
BOOL
WINAPI
PathFindOnPathExA
(
LPSTR
lpszFile
,
LPCSTR
*
lppszOtherDirs
,
DWORD
dwWhich
)
{
WCHAR
szFile
[
MAX_PATH
];
WCHAR
buff
[
MAX_PATH
];
...
...
@@ -1247,7 +1247,7 @@ BOOL WINAPI SHLWAPI_5(LPSTR lpszFile,LPCSTR *lppszOtherDirs,DWORD dwWhich)
{
MultiByteToWideChar
(
0
,
0
,
*
lpszOtherPath
,
-
1
,
szOther
,
MAX_PATH
);
PathCombineW
(
buff
,
szOther
,
szFile
);
if
(
SHLWAPI_4
(
buff
,
dwWhich
))
if
(
PathFileExistsDefExtW
(
buff
,
dwWhich
))
{
WideCharToMultiByte
(
0
,
0
,
buff
,
-
1
,
lpszFile
,
MAX_PATH
,
0
,
0
);
return
TRUE
;
...
...
@@ -1267,9 +1267,9 @@ BOOL WINAPI SHLWAPI_5(LPSTR lpszFile,LPCSTR *lppszOtherDirs,DWORD dwWhich)
/*************************************************************************
* @ [SHLWAPI.6]
*
* Unicode version of
SHLWAPI_5
.
* Unicode version of
PathFindOnPathExA
.
*/
BOOL
WINAPI
SHLWAPI_6
(
LPWSTR
lpszFile
,
LPCWSTR
*
lppszOtherDirs
,
DWORD
dwWhich
)
BOOL
WINAPI
PathFindOnPathExW
(
LPWSTR
lpszFile
,
LPCWSTR
*
lppszOtherDirs
,
DWORD
dwWhich
)
{
WCHAR
buff
[
MAX_PATH
];
...
...
@@ -1285,7 +1285,7 @@ BOOL WINAPI SHLWAPI_6(LPWSTR lpszFile,LPCWSTR *lppszOtherDirs,DWORD dwWhich)
while
(
lpszOtherPath
&&
*
lpszOtherPath
&&
(
*
lpszOtherPath
)[
0
])
{
PathCombineW
(
buff
,
*
lpszOtherPath
,
lpszFile
);
if
(
SHLWAPI_4
(
buff
,
dwWhich
))
if
(
PathFileExistsDefExtW
(
buff
,
dwWhich
))
{
strcpyW
(
lpszFile
,
buff
);
return
TRUE
;
...
...
@@ -1313,7 +1313,7 @@ BOOL WINAPI SHLWAPI_6(LPWSTR lpszFile,LPCWSTR *lppszOtherDirs,DWORD dwWhich)
BOOL
WINAPI
PathFindOnPathA
(
LPSTR
lpszFile
,
LPCSTR
*
lppszOtherDirs
)
{
TRACE
(
"(%s,%p)
\n
"
,
debugstr_a
(
lpszFile
),
lppszOtherDirs
);
return
SHLWAPI_5
(
lpszFile
,
lppszOtherDirs
,
0
);
return
PathFindOnPathExA
(
lpszFile
,
lppszOtherDirs
,
0
);
}
/*************************************************************************
...
...
@@ -1324,7 +1324,7 @@ BOOL WINAPI PathFindOnPathA(LPSTR lpszFile, LPCSTR *lppszOtherDirs)
BOOL
WINAPI
PathFindOnPathW
(
LPWSTR
lpszFile
,
LPCWSTR
*
lppszOtherDirs
)
{
TRACE
(
"(%s,%p)
\n
"
,
debugstr_w
(
lpszFile
),
lppszOtherDirs
);
return
SHLWAPI_6
(
lpszFile
,
lppszOtherDirs
,
0
);
return
PathFindOnPathExW
(
lpszFile
,
lppszOtherDirs
,
0
);
}
/*************************************************************************
...
...
@@ -3816,7 +3816,7 @@ VOID WINAPI PathUndecorateW(LPWSTR lpszPath)
}
/*************************************************************************
*
SHLWAPI_440
[SHLWAPI.440]
*
@
[SHLWAPI.440]
*
* Find localised or default web content in "%WINDOWS%\web\".
*
...
...
@@ -3829,7 +3829,7 @@ VOID WINAPI PathUndecorateW(LPWSTR lpszPath)
* Success: S_OK. lpszPath contains the full path to the content.
* Failure: E_FAIL. The content does not exist or lpszPath is too short.
*/
HRESULT
WINAPI
SH
LWAPI_440
(
LPCSTR
lpszFile
,
LPSTR
lpszPath
,
DWORD
dwPathLen
)
HRESULT
WINAPI
SH
GetWebFolderFilePathA
(
LPCSTR
lpszFile
,
LPSTR
lpszPath
,
DWORD
dwPathLen
)
{
WCHAR
szFile
[
MAX_PATH
],
szPath
[
MAX_PATH
];
HRESULT
hRet
;
...
...
@@ -3838,17 +3838,17 @@ HRESULT WINAPI SHLWAPI_440(LPCSTR lpszFile, LPSTR lpszPath, DWORD dwPathLen)
MultiByteToWideChar
(
0
,
0
,
lpszFile
,
-
1
,
szFile
,
MAX_PATH
);
szPath
[
0
]
=
'\0'
;
hRet
=
SH
LWAPI_441
(
szFile
,
szPath
,
dwPathLen
);
hRet
=
SH
GetWebFolderFilePathW
(
szFile
,
szPath
,
dwPathLen
);
WideCharToMultiByte
(
0
,
0
,
szPath
,
-
1
,
lpszPath
,
dwPathLen
,
0
,
0
);
return
hRet
;
}
/*************************************************************************
*
SHLWAPI_441
[SHLWAPI.441]
*
@
[SHLWAPI.441]
*
* Unicode version of SH
LWAPI_440
.
* Unicode version of SH
GetWebFolderFilePathA
.
*/
HRESULT
WINAPI
SH
LWAPI_441
(
LPCWSTR
lpszFile
,
LPWSTR
lpszPath
,
DWORD
dwPathLen
)
HRESULT
WINAPI
SH
GetWebFolderFilePathW
(
LPCWSTR
lpszFile
,
LPWSTR
lpszPath
,
DWORD
dwPathLen
)
{
static
const
WCHAR
szWeb
[]
=
{
'\\'
,
'W'
,
'e'
,
'b'
,
'\\'
,
'\0'
};
static
const
WCHAR
szWebMui
[]
=
{
'm'
,
'u'
,
'i'
,
'\\'
,
'%'
,
'0'
,
'4'
,
'x'
,
'\\'
,
'\0'
};
...
...
dlls/shlwapi/reg.c
View file @
b6f34d3c
...
...
@@ -53,8 +53,8 @@ typedef struct {
WCHAR
key_string
[
MAX_PATH
];
/* additional path from 'start' */
}
Internal_HUSKEY
,
*
LPInternal_HUSKEY
;
DWORD
WINAPI
SH
LWAPI_24
(
REFGUID
,
LPWSTR
,
INT
);
HRESULT
WINAPI
SH
LWAPI_344
(
REFGUID
,
LPCWSTR
,
BOOL
,
BOOL
,
PHKEY
);
DWORD
WINAPI
SH
StringFromGUIDW
(
REFGUID
,
LPWSTR
,
INT
);
HRESULT
WINAPI
SH
RegGetCLSIDKeyW
(
REFGUID
,
LPCWSTR
,
BOOL
,
BOOL
,
PHKEY
);
#define REG_HKCU TRUE
...
...
@@ -1675,7 +1675,7 @@ LONG WINAPI SHEnumValueW(HKEY hKey, DWORD dwIndex, LPWSTR lpszValue,
* Failure: An error code from RegOpenKeyExA() or SHQueryValueExA(),
* or ERROR_INVALID_FUNCTION in the machine is in safe mode.
*/
DWORD
WINAPI
SH
LWAPI_205
(
HKEY
hkey
,
LPCSTR
pSubKey
,
LPCSTR
pValue
,
DWORD
WINAPI
SH
GetValueGoodBootA
(
HKEY
hkey
,
LPCSTR
pSubKey
,
LPCSTR
pValue
,
LPDWORD
pwType
,
LPVOID
pvData
,
LPDWORD
pbData
)
{
if
(
GetSystemMetrics
(
SM_CLEANBOOT
))
...
...
@@ -1686,9 +1686,9 @@ DWORD WINAPI SHLWAPI_205(HKEY hkey, LPCSTR pSubKey, LPCSTR pValue,
/*************************************************************************
* @ [SHLWAPI.206]
*
* Unicode version of SH
LWAPI_205
.
* Unicode version of SH
GetValueGoodBootW
.
*/
DWORD
WINAPI
SH
LWAPI_206
(
HKEY
hkey
,
LPCWSTR
pSubKey
,
LPCWSTR
pValue
,
DWORD
WINAPI
SH
GetValueGoodBootW
(
HKEY
hkey
,
LPCWSTR
pSubKey
,
LPCWSTR
pValue
,
LPDWORD
pwType
,
LPVOID
pvData
,
LPDWORD
pbData
)
{
if
(
GetSystemMetrics
(
SM_CLEANBOOT
))
...
...
@@ -1709,7 +1709,7 @@ DWORD WINAPI SHLWAPI_206(HKEY hkey, LPCWSTR pSubKey, LPCWSTR pValue,
* Success: TRUE
* Failure: FALSE
*/
BOOL
WINAPI
SHLWAPI_320
(
LPCSTR
lpszSubKey
,
LPCSTR
lpszValue
)
BOOL
WINAPI
RegisterMIMETypeForExtensionA
(
LPCSTR
lpszSubKey
,
LPCSTR
lpszValue
)
{
DWORD
dwRet
;
...
...
@@ -1727,9 +1727,9 @@ BOOL WINAPI SHLWAPI_320(LPCSTR lpszSubKey, LPCSTR lpszValue)
/*************************************************************************
* @ [SHLWAPI.321]
*
* Unicode version of
SHLWAPI_320
.
* Unicode version of
RegisterMIMETypeForExtensionA
.
*/
BOOL
WINAPI
SHLWAPI_321
(
LPCWSTR
lpszSubKey
,
LPCWSTR
lpszValue
)
BOOL
WINAPI
RegisterMIMETypeForExtensionW
(
LPCWSTR
lpszSubKey
,
LPCWSTR
lpszValue
)
{
DWORD
dwRet
;
...
...
@@ -1756,7 +1756,7 @@ BOOL WINAPI SHLWAPI_321(LPCWSTR lpszSubKey, LPCWSTR lpszValue)
* Success: TRUE
* Failure: FALSE
*/
BOOL
WINAPI
SHLWAPI_322
(
LPCSTR
lpszSubKey
)
BOOL
WINAPI
UnregisterMIMETypeForExtensionA
(
LPCSTR
lpszSubKey
)
{
HRESULT
ret
=
SHDeleteValueA
(
HKEY_CLASSES_ROOT
,
lpszSubKey
,
lpszContentTypeA
);
return
ret
?
FALSE
:
TRUE
;
...
...
@@ -1765,9 +1765,9 @@ BOOL WINAPI SHLWAPI_322(LPCSTR lpszSubKey)
/*************************************************************************
* @ [SHLWAPI.323]
*
* Unicode version of
SHLWAPI_322
.
* Unicode version of
UnregisterMIMETypeForExtensionA
.
*/
BOOL
WINAPI
SHLWAPI_323
(
LPCWSTR
lpszSubKey
)
BOOL
WINAPI
UnregisterMIMETypeForExtensionW
(
LPCWSTR
lpszSubKey
)
{
HRESULT
ret
=
SHDeleteValueW
(
HKEY_CLASSES_ROOT
,
lpszSubKey
,
lpszContentTypeW
);
return
ret
?
FALSE
:
TRUE
;
...
...
@@ -1790,7 +1790,7 @@ BOOL WINAPI SHLWAPI_323(LPCWSTR lpszSubKey)
* NOTES
* The base path for the key is "MIME\Database\Content Type\"
*/
BOOL
WINAPI
SHLWAPI_328
(
LPCSTR
lpszType
,
LPSTR
lpszBuffer
,
DWORD
dwLen
)
BOOL
WINAPI
GetMIMETypeSubKeyA
(
LPCSTR
lpszType
,
LPSTR
lpszBuffer
,
DWORD
dwLen
)
{
TRACE
(
"(%s,%p,%ld)
\n
"
,
debugstr_a
(
lpszType
),
lpszBuffer
,
dwLen
);
...
...
@@ -1811,9 +1811,9 @@ BOOL WINAPI SHLWAPI_328(LPCSTR lpszType, LPSTR lpszBuffer, DWORD dwLen)
/*************************************************************************
* @ [SHLWAPI.329]
*
* Unicode version of
SHLWAPI_328
.
* Unicode version of
GetMIMETypeSubKeyA
.
*/
BOOL
WINAPI
SHLWAPI_329
(
LPCWSTR
lpszType
,
LPWSTR
lpszBuffer
,
DWORD
dwLen
)
BOOL
WINAPI
GetMIMETypeSubKeyW
(
LPCWSTR
lpszType
,
LPWSTR
lpszBuffer
,
DWORD
dwLen
)
{
TRACE
(
"(%s,%p,%ld)
\n
"
,
debugstr_w
(
lpszType
),
lpszBuffer
,
dwLen
);
...
...
@@ -1844,14 +1844,14 @@ BOOL WINAPI SHLWAPI_329(LPCWSTR lpszType, LPWSTR lpszBuffer, DWORD dwLen)
* Success: TRUE. The file extension is set in the registry.
* Failure: FALSE.
*/
BOOL
WINAPI
SHLWAPI_324
(
LPCSTR
lpszExt
,
LPCSTR
lpszType
)
BOOL
WINAPI
RegisterExtensionForMIMETypeA
(
LPCSTR
lpszExt
,
LPCSTR
lpszType
)
{
DWORD
dwLen
;
char
szKey
[
MAX_PATH
];
TRACE
(
"(%s,%s)
\n
"
,
debugstr_a
(
lpszExt
),
debugstr_a
(
lpszType
));
if
(
!
SHLWAPI_328
(
lpszType
,
szKey
,
MAX_PATH
))
/* Get full path to the key */
if
(
!
GetMIMETypeSubKeyA
(
lpszType
,
szKey
,
MAX_PATH
))
/* Get full path to the key */
return
FALSE
;
dwLen
=
strlen
(
lpszExt
)
+
1
;
...
...
@@ -1864,9 +1864,9 @@ BOOL WINAPI SHLWAPI_324(LPCSTR lpszExt, LPCSTR lpszType)
/*************************************************************************
* @ [SHLWAPI.325]
*
* Unicode version of
SHLWAPI_324
.
* Unicode version of
RegisterExtensionForMIMETypeA
.
*/
BOOL
WINAPI
SHLWAPI_325
(
LPCWSTR
lpszExt
,
LPCWSTR
lpszType
)
BOOL
WINAPI
RegisterExtensionForMIMETypeW
(
LPCWSTR
lpszExt
,
LPCWSTR
lpszType
)
{
DWORD
dwLen
;
WCHAR
szKey
[
MAX_PATH
];
...
...
@@ -1874,7 +1874,7 @@ BOOL WINAPI SHLWAPI_325(LPCWSTR lpszExt, LPCWSTR lpszType)
TRACE
(
"(%s,%s)
\n
"
,
debugstr_w
(
lpszExt
),
debugstr_w
(
lpszType
));
/* Get the full path to the key */
if
(
!
SHLWAPI_329
(
lpszType
,
szKey
,
MAX_PATH
))
/* Get full path to the key */
if
(
!
GetMIMETypeSubKeyW
(
lpszType
,
szKey
,
MAX_PATH
))
/* Get full path to the key */
return
FALSE
;
dwLen
=
(
lstrlenW
(
lpszExt
)
+
1
)
*
sizeof
(
WCHAR
);
...
...
@@ -1899,13 +1899,13 @@ BOOL WINAPI SHLWAPI_325(LPCWSTR lpszExt, LPCWSTR lpszType)
* NOTES
* If deleting the extension leaves an orphan key, the key is removed also.
*/
BOOL
WINAPI
SHLWAPI_326
(
LPCSTR
lpszType
)
BOOL
WINAPI
UnregisterExtensionForMIMETypeA
(
LPCSTR
lpszType
)
{
char
szKey
[
MAX_PATH
];
TRACE
(
"(%s)
\n
"
,
debugstr_a
(
lpszType
));
if
(
!
SHLWAPI_328
(
lpszType
,
szKey
,
MAX_PATH
))
/* Get full path to the key */
if
(
!
GetMIMETypeSubKeyA
(
lpszType
,
szKey
,
MAX_PATH
))
/* Get full path to the key */
return
FALSE
;
if
(
!
SHDeleteValueA
(
HKEY_CLASSES_ROOT
,
szKey
,
szExtensionA
))
...
...
@@ -1919,15 +1919,15 @@ BOOL WINAPI SHLWAPI_326(LPCSTR lpszType)
/*************************************************************************
* @ [SHLWAPI.327]
*
* Unicode version of
SHLWAPI_326
.
* Unicode version of
UnregisterExtensionForMIMETypeA
.
*/
BOOL
WINAPI
SHLWAPI_327
(
LPCWSTR
lpszType
)
BOOL
WINAPI
UnregisterExtensionForMIMETypeW
(
LPCWSTR
lpszType
)
{
WCHAR
szKey
[
MAX_PATH
];
TRACE
(
"(%s)
\n
"
,
debugstr_w
(
lpszType
));
if
(
!
SHLWAPI_329
(
lpszType
,
szKey
,
MAX_PATH
))
/* Get full path to the key */
if
(
!
GetMIMETypeSubKeyW
(
lpszType
,
szKey
,
MAX_PATH
))
/* Get full path to the key */
return
FALSE
;
if
(
!
SHDeleteValueW
(
HKEY_CLASSES_ROOT
,
szKey
,
szExtensionW
))
...
...
@@ -2096,7 +2096,7 @@ DWORD WINAPI SHCopyKeyW(HKEY hKeyDst, LPCWSTR lpszSubKey, HKEY hKeySrc, DWORD dw
*/
/*************************************************************************
*
SHLWAPI_280
[SHLWAPI.280]
*
@
[SHLWAPI.280]
*
* Read an integer value from the registry, falling back to a default.
*
...
...
@@ -2109,7 +2109,7 @@ DWORD WINAPI SHCopyKeyW(HKEY hKeyDst, LPCWSTR lpszSubKey, HKEY hKeySrc, DWORD dw
* The value contained in the given registry value if present, otherwise
* iDefault.
*/
int
WINAPI
SH
LWAPI_280
(
HKEY
hKey
,
LPCWSTR
lpszValue
,
int
iDefault
)
int
WINAPI
SH
RegGetIntW
(
HKEY
hKey
,
LPCWSTR
lpszValue
,
int
iDefault
)
{
TRACE
(
"(%p,%s,%d)"
,
hKey
,
debugstr_w
(
lpszValue
),
iDefault
);
...
...
@@ -2127,7 +2127,7 @@ int WINAPI SHLWAPI_280(HKEY hKey, LPCWSTR lpszValue, int iDefault)
}
/*************************************************************************
*
SHLWAPI_343
[SHLWAPI.343]
*
@
[SHLWAPI.343]
*
* Create or open an explorer ClassId Key.
*
...
...
@@ -2142,22 +2142,22 @@ int WINAPI SHLWAPI_280(HKEY hKey, LPCWSTR lpszValue, int iDefault)
* Success: S_OK. phKey contains the resulting registry handle.
* Failure: An HRESULT error code indicating the problem.
*/
HRESULT
WINAPI
SH
LWAPI_343
(
REFGUID
guid
,
LPCSTR
lpszValue
,
BOOL
bUseHKCU
,
BOOL
bCreate
,
PHKEY
phKey
)
HRESULT
WINAPI
SH
RegGetCLSIDKeyA
(
REFGUID
guid
,
LPCSTR
lpszValue
,
BOOL
bUseHKCU
,
BOOL
bCreate
,
PHKEY
phKey
)
{
WCHAR
szValue
[
MAX_PATH
];
if
(
lpszValue
)
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszValue
,
-
1
,
szValue
,
sizeof
(
szValue
)
/
sizeof
(
WCHAR
));
return
SH
LWAPI_344
(
guid
,
lpszValue
?
szValue
:
NULL
,
bUseHKCU
,
bCreate
,
phKey
);
return
SH
RegGetCLSIDKeyW
(
guid
,
lpszValue
?
szValue
:
NULL
,
bUseHKCU
,
bCreate
,
phKey
);
}
/*************************************************************************
*
SHLWAPI_344
[SHLWAPI.344]
*
@
[SHLWAPI.344]
*
* Unicode version of SH
LWAPI_343
.
* Unicode version of SH
RegGetCLSIDKeyA
.
*/
HRESULT
WINAPI
SH
LWAPI_344
(
REFGUID
guid
,
LPCWSTR
lpszValue
,
BOOL
bUseHKCU
,
HRESULT
WINAPI
SH
RegGetCLSIDKeyW
(
REFGUID
guid
,
LPCWSTR
lpszValue
,
BOOL
bUseHKCU
,
BOOL
bCreate
,
PHKEY
phKey
)
{
static
const
WCHAR
szClassIdKey
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
...
...
@@ -2171,7 +2171,7 @@ HRESULT WINAPI SHLWAPI_344(REFGUID guid, LPCWSTR lpszValue, BOOL bUseHKCU,
/* Create the key string */
memcpy
(
szKey
,
szClassIdKey
,
sizeof
(
szClassIdKey
));
SH
LWAPI_24
(
guid
,
szKey
+
szClassIdKeyLen
,
39
);
/* Append guid */
SH
StringFromGUIDW
(
guid
,
szKey
+
szClassIdKeyLen
,
39
);
/* Append guid */
if
(
lpszValue
)
{
...
...
dlls/shlwapi/regstream.c
View file @
b6f34d3c
...
...
@@ -485,7 +485,7 @@ IStream * WINAPI SHOpenRegStreamW(HKEY hkey, LPCWSTR pszSubkey,
* A copy of the memory pointed to by lpbData is made, and is freed
* when the stream is released.
*/
IStream
*
WINAPI
SH
LWAPI_12
(
LPBYTE
lpbData
,
DWORD
dwDataLen
)
IStream
*
WINAPI
SH
CreateMemStream
(
LPBYTE
lpbData
,
DWORD
dwDataLen
)
{
IStream
*
iStrmRet
=
NULL
;
...
...
dlls/shlwapi/shlwapi.spec
View file @
b6f34d3c
This diff is collapsed.
Click to expand it.
dlls/shlwapi/string.c
View file @
b6f34d3c
...
...
@@ -2076,7 +2076,7 @@ BOOL WINAPI StrIsIntlEqualW(BOOL bCase, LPCWSTR lpszStr, LPCWSTR lpszComp,
* Success: A pointer to the last character written.
* Failure: lpszDest, if any arguments are invalid.
*/
LPSTR
WINAPI
S
HLWAPI_399
(
LPSTR
lpszDest
,
LPCSTR
lpszSrc
,
int
iLen
)
LPSTR
WINAPI
S
trCpyNXA
(
LPSTR
lpszDest
,
LPCSTR
lpszSrc
,
int
iLen
)
{
TRACE
(
"(%p,%s,%i)
\n
"
,
lpszDest
,
debugstr_a
(
lpszSrc
),
iLen
);
...
...
@@ -2093,9 +2093,9 @@ LPSTR WINAPI SHLWAPI_399(LPSTR lpszDest, LPCSTR lpszSrc, int iLen)
/*************************************************************************
* @ [SHLWAPI.400]
*
* Unicode version of S
HLWAPI_399
.
* Unicode version of S
trCpyNXA
.
*/
LPWSTR
WINAPI
S
HLWAPI_400
(
LPWSTR
lpszDest
,
LPCWSTR
lpszSrc
,
int
iLen
)
LPWSTR
WINAPI
S
trCpyNXW
(
LPWSTR
lpszDest
,
LPCWSTR
lpszSrc
,
int
iLen
)
{
TRACE
(
"(%p,%s,%i)
\n
"
,
lpszDest
,
debugstr_w
(
lpszSrc
),
iLen
);
...
...
@@ -2325,7 +2325,7 @@ LPSTR WINAPI StrFormatByteSizeA(DWORD dwBytes, LPSTR lpszDest, UINT cchMax)
}
/*************************************************************************
*
SHLWAPI_203
[SHLWAPI.203]
*
@
[SHLWAPI.203]
*
* Remove a single non-trailing ampersand ('&') from a string.
*
...
...
@@ -2336,7 +2336,7 @@ LPSTR WINAPI StrFormatByteSizeA(DWORD dwBytes, LPSTR lpszDest, UINT cchMax)
* The character after the first ampersand in lpszStr, or the first character
* in lpszStr if there is no ampersand in the string.
*/
char
WINAPI
SH
LWAPI_203
(
LPCSTR
lpszStr
)
char
WINAPI
SH
StripMneumonicA
(
LPCSTR
lpszStr
)
{
LPSTR
lpszIter
,
lpszTmp
;
char
ch
;
...
...
dlls/shlwapi/thread.c
View file @
b6f34d3c
...
...
@@ -51,7 +51,7 @@ static HRESULT (WINAPI *pSHGetInstanceExplorer)(IUnknown**);
extern
DWORD
SHLWAPI_ThreadRef_index
;
/* Initialised in shlwapi_main.c */
DWORD
WINAPI
SH
LWAPI_23
(
REFGUID
,
LPSTR
,
INT
);
DWORD
WINAPI
SH
StringFromGUIDA
(
REFGUID
,
LPSTR
,
INT
);
/**************************************************************************
* _CreateAllAccessSecurityAttributes [SHLWAPI.356]
...
...
@@ -475,6 +475,6 @@ HANDLE WINAPI _SHGlobalCounterCreate (REFGUID guid)
TRACE
(
"(%s)
\n
"
,
debugstr_guid
(
guid
));
/* Create a named semaphore using the GUID string */
SH
LWAPI_23
(
guid
,
szName
,
sizeof
(
szName
)
-
1
);
SH
StringFromGUIDA
(
guid
,
szName
,
sizeof
(
szName
)
-
1
);
return
_SHGlobalCounterCreateNamedA
(
szName
,
0
);
}
dlls/shlwapi/url.c
View file @
b6f34d3c
...
...
@@ -270,7 +270,7 @@ static BOOL URL_JustLocation(LPCWSTR str)
* Success: S_OK. y contains the parsed Url details.
* Failure: An HRESULT error code.
*/
DWORD
WINAPI
SHLWAPI_1
(
LPCSTR
x
,
UNKNOWN_SHLWAPI_1
*
y
)
DWORD
WINAPI
ParseURLA
(
LPCSTR
x
,
UNKNOWN_SHLWAPI_1
*
y
)
{
DWORD
cnt
;
const
SHL_2_inet_scheme
*
inet_pro
;
...
...
@@ -322,9 +322,9 @@ DWORD WINAPI SHLWAPI_1 (LPCSTR x, UNKNOWN_SHLWAPI_1 *y)
/*************************************************************************
* @ [SHLWAPI.2]
*
* Unicode version of
SHLWAPI_1
.
* Unicode version of
ParseURLA
.
*/
DWORD
WINAPI
SHLWAPI_2
(
LPCWSTR
x
,
UNKNOWN_SHLWAPI_2
*
y
)
DWORD
WINAPI
ParseURLW
(
LPCWSTR
x
,
UNKNOWN_SHLWAPI_2
*
y
)
{
DWORD
cnt
;
const
SHL_2_inet_scheme
*
inet_pro
;
...
...
@@ -681,7 +681,7 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
ret
=
UrlCanonicalizeW
(
pszRelative
,
mrelative
,
&
len
,
myflags
);
/* See if the base has a scheme */
res1
=
SHLWAPI_2
(
mbase
,
&
base
);
res1
=
ParseURLW
(
mbase
,
&
base
);
if
(
res1
)
{
/* if pszBase has no scheme, then return pszRelative */
TRACE
(
"no scheme detected in Base
\n
"
);
...
...
@@ -719,7 +719,7 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
* the last '/'
*/
res2
=
SHLWAPI_2
(
mrelative
,
&
relative
);
res2
=
ParseURLW
(
mrelative
,
&
relative
);
if
(
res2
)
{
/* no scheme in pszRelative */
TRACE
(
"no scheme detected in Relative
\n
"
);
...
...
@@ -1265,7 +1265,7 @@ LPCSTR WINAPI UrlGetLocationA(
DWORD
res1
;
base
.
size
=
24
;
res1
=
SHLWAPI_1
(
pszUrl
,
&
base
);
res1
=
ParseURLA
(
pszUrl
,
&
base
);
if
(
res1
)
return
NULL
;
/* invalid scheme */
/* if scheme is file: then never return pointer */
...
...
@@ -1287,7 +1287,7 @@ LPCWSTR WINAPI UrlGetLocationW(
DWORD
res1
;
base
.
size
=
24
;
res1
=
SHLWAPI_2
(
pszUrl
,
&
base
);
res1
=
ParseURLW
(
pszUrl
,
&
base
);
if
(
res1
)
return
NULL
;
/* invalid scheme */
/* if scheme is file: then never return pointer */
...
...
@@ -1569,7 +1569,7 @@ HRESULT WINAPI UrlApplySchemeW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut, DW
in_scheme
.
size
=
24
;
/* See if the base has a scheme */
res1
=
SHLWAPI_2
(
pszIn
,
&
in_scheme
);
res1
=
ParseURLW
(
pszIn
,
&
in_scheme
);
if
(
res1
)
{
/* no scheme in input, need to see if we need to guess */
if
(
dwFlags
&
URL_APPLY_GUESSSCHEME
)
{
...
...
@@ -1635,7 +1635,7 @@ BOOL WINAPI UrlIsA(LPCSTR pszUrl, URLIS Urlis)
case
URLIS_OPAQUE
:
base
.
size
=
24
;
res1
=
SHLWAPI_1
(
pszUrl
,
&
base
);
res1
=
ParseURLA
(
pszUrl
,
&
base
);
if
(
res1
)
return
FALSE
;
/* invalid scheme */
if
((
*
base
.
ap2
==
'/'
)
&&
(
*
(
base
.
ap2
+
1
)
==
'/'
))
/* has scheme followed by 2 '/' */
...
...
@@ -1668,7 +1668,7 @@ BOOL WINAPI UrlIsW(LPCWSTR pszUrl, URLIS Urlis)
case
URLIS_OPAQUE
:
base
.
size
=
24
;
res1
=
SHLWAPI_2
(
pszUrl
,
&
base
);
res1
=
ParseURLW
(
pszUrl
,
&
base
);
if
(
res1
)
return
FALSE
;
/* invalid scheme */
if
((
*
base
.
ap2
==
L'/'
)
&&
(
*
(
base
.
ap2
+
1
)
==
L'/'
))
/* has scheme followed by 2 '/' */
...
...
@@ -2039,7 +2039,7 @@ BOOL WINAPI PathIsURLA(LPCSTR lpstrPath)
/* get protocol */
base
.
size
=
sizeof
(
base
);
res1
=
SHLWAPI_1
(
lpstrPath
,
&
base
);
res1
=
ParseURLA
(
lpstrPath
,
&
base
);
return
(
base
.
fcncde
>
0
);
}
...
...
@@ -2057,7 +2057,7 @@ BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath)
/* get protocol */
base
.
size
=
sizeof
(
base
);
res1
=
SHLWAPI_2
(
lpstrPath
,
&
base
);
res1
=
ParseURLW
(
lpstrPath
,
&
base
);
return
(
base
.
fcncde
>
0
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment