Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
10b77a99
Commit
10b77a99
authored
Dec 01, 2001
by
Guy L. Albertelli
Committed by
Alexandre Julliard
Dec 01, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fixed PathIsURL{A|W}.
- Implemented PathRenameExtension{A|W}, SHRegDuplicateHKey, ChrCmpI{A|W}. - Added forwards to DrawTextW, CreateDialogParamA, CreateFontW, TracePopupMenuEx.
parent
905f04a9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
94 additions
and
74 deletions
+94
-74
path.c
dlls/shlwapi/path.c
+31
-45
reg.c
dlls/shlwapi/reg.c
+12
-0
shlwapi.spec
dlls/shlwapi/shlwapi.spec
+29
-29
string.c
dlls/shlwapi/string.c
+22
-0
No files found.
dlls/shlwapi/path.c
View file @
10b77a99
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
#include "winreg.h"
#include "winreg.h"
#include "shlwapi.h"
#include "shlwapi.h"
#include "debugtools.h"
#include "debugtools.h"
#include "ordinal.h"
DEFAULT_DEBUG_CHANNEL
(
shell
);
DEFAULT_DEBUG_CHANNEL
(
shell
);
...
@@ -1152,27 +1152,15 @@ BOOL WINAPI PathIsSameRootW(LPCWSTR lpszPath1, LPCWSTR lpszPath2)
...
@@ -1152,27 +1152,15 @@ BOOL WINAPI PathIsSameRootW(LPCWSTR lpszPath1, LPCWSTR lpszPath2)
*/
*/
BOOL
WINAPI
PathIsURLA
(
LPCSTR
lpstrPath
)
BOOL
WINAPI
PathIsURLA
(
LPCSTR
lpstrPath
)
{
{
LPSTR
lpstrRes
;
UNKNOWN_SHLWAPI_1
base
;
int
iSize
,
i
=
0
;
DWORD
res1
;
static
LPSTR
SupportedProtocol
[]
=
{
"http"
,
"https"
,
"ftp"
,
"gopher"
,
"file"
,
"mailto"
,
NULL
};
if
(
!
lpstrPath
)
return
FALSE
;
/* get protocol */
lpstrRes
=
strchr
(
lpstrPath
,
':'
);
if
(
!
lpstrRes
)
return
FALSE
;
iSize
=
lpstrRes
-
lpstrPath
;
while
(
SupportedProtocol
[
i
])
if
(
!
lpstrPath
)
return
FALSE
;
{
if
(
iSize
==
strlen
(
SupportedProtocol
[
i
]))
if
(
!
strncasecmp
(
lpstrPath
,
SupportedProtocol
[
i
],
iSize
))
return
TRUE
;
i
++
;
}
return
FALSE
;
/* get protocol */
base
.
size
=
24
;
res1
=
SHLWAPI_1
(
lpstrPath
,
&
base
);
return
(
base
.
fcncde
)
?
TRUE
:
FALSE
;
}
}
/*************************************************************************
/*************************************************************************
...
@@ -1180,29 +1168,15 @@ BOOL WINAPI PathIsURLA(LPCSTR lpstrPath)
...
@@ -1180,29 +1168,15 @@ BOOL WINAPI PathIsURLA(LPCSTR lpstrPath)
*/
*/
BOOL
WINAPI
PathIsURLW
(
LPCWSTR
lpstrPath
)
BOOL
WINAPI
PathIsURLW
(
LPCWSTR
lpstrPath
)
{
{
LPWSTR
lpstrRes
;
UNKNOWN_SHLWAPI_2
base
;
int
iSize
,
i
=
0
;
DWORD
res1
;
static
WCHAR
SupportedProtocol
[
7
][
7
]
=
{{
'h'
,
't'
,
't'
,
'p'
,
'\0'
},{
'h'
,
't'
,
't'
,
'p'
,
's'
,
'\0'
},{
'f'
,
't'
,
'p'
,
'\0'
},
{
'g'
,
'o'
,
'p'
,
'h'
,
'e'
,
'r'
,
'\0'
},{
'f'
,
'i'
,
'l'
,
'e'
,
'\0'
},
{
'm'
,
'a'
,
'i'
,
'l'
,
't'
,
'o'
,
'\0'
},{
0
}};
if
(
!
lpstrPath
)
return
FALSE
;
if
(
!
lpstrPath
)
return
FALSE
;
/* get protocol */
/* get protocol */
lpstrRes
=
strchrW
(
lpstrPath
,
':'
);
base
.
size
=
24
;
if
(
!
lpstrRes
)
return
FALSE
;
res1
=
SHLWAPI_2
(
lpstrPath
,
&
base
);
iSize
=
lpstrRes
-
lpstrPath
;
return
(
base
.
fcncde
)
?
TRUE
:
FALSE
;
while
(
SupportedProtocol
[
i
])
{
if
(
iSize
==
strlenW
(
SupportedProtocol
[
i
]))
if
(
!
strncmpiW
(
lpstrPath
,
SupportedProtocol
[
i
],
iSize
))
return
TRUE
;
i
++
;
}
return
FALSE
;
}
}
...
@@ -1721,8 +1695,14 @@ BOOL WINAPI PathMakeSystemFolderW(LPCWSTR pszPath)
...
@@ -1721,8 +1695,14 @@ BOOL WINAPI PathMakeSystemFolderW(LPCWSTR pszPath)
*/
*/
BOOL
WINAPI
PathRenameExtensionA
(
LPSTR
pszPath
,
LPCSTR
pszExt
)
BOOL
WINAPI
PathRenameExtensionA
(
LPSTR
pszPath
,
LPCSTR
pszExt
)
{
{
FIXME
(
"%s %s
\n
"
,
pszPath
,
pszExt
);
LPSTR
pszExtension
=
PathFindExtensionA
(
pszPath
);
return
FALSE
;
if
(
!
pszExtension
)
return
FALSE
;
if
(
pszExtension
-
pszPath
+
strlen
(
pszExt
)
>
MAX_PATH
)
return
FALSE
;
strcpy
(
pszExtension
,
pszExt
);
TRACE
(
"%s
\n
"
,
pszPath
);
return
TRUE
;
}
}
/*************************************************************************
/*************************************************************************
...
@@ -1730,8 +1710,14 @@ BOOL WINAPI PathRenameExtensionA(LPSTR pszPath, LPCSTR pszExt)
...
@@ -1730,8 +1710,14 @@ BOOL WINAPI PathRenameExtensionA(LPSTR pszPath, LPCSTR pszExt)
*/
*/
BOOL
WINAPI
PathRenameExtensionW
(
LPWSTR
pszPath
,
LPCWSTR
pszExt
)
BOOL
WINAPI
PathRenameExtensionW
(
LPWSTR
pszPath
,
LPCWSTR
pszExt
)
{
{
FIXME
(
"%s %s
\n
"
,
debugstr_w
(
pszPath
),
debugstr_w
(
pszExt
));
LPWSTR
pszExtension
=
PathFindExtensionW
(
pszPath
);
return
FALSE
;
if
(
!
pszExtension
)
return
FALSE
;
if
(
pszExtension
-
pszPath
+
strlenW
(
pszExt
)
>
MAX_PATH
)
return
FALSE
;
strcpyW
(
pszExtension
,
pszExt
);
TRACE
(
"%s
\n
"
,
debugstr_w
(
pszPath
));
return
TRUE
;
}
}
/*************************************************************************
/*************************************************************************
...
...
dlls/shlwapi/reg.c
View file @
10b77a99
...
@@ -1046,3 +1046,15 @@ BOOL WINAPI SHLWAPI_323(LPCWSTR lpszSubKey)
...
@@ -1046,3 +1046,15 @@ BOOL WINAPI SHLWAPI_323(LPCWSTR lpszSubKey)
return
ret
?
FALSE
:
TRUE
;
return
ret
?
FALSE
:
TRUE
;
}
}
/*************************************************************************
* SHRegDuplicateHKey [SHLWAPI.@]
*/
HKEY
WINAPI
SHRegDuplicateHKey
(
HKEY
hKey
)
{
HKEY
newKey
=
0
;
RegOpenKeyExA
(
hKey
,
0
,
0
,
MAXIMUM_ALLOWED
,
&
newKey
);
TRACE
(
"new key is %08x
\n
"
,
newKey
);
return
newKey
;
}
dlls/shlwapi/shlwapi.spec
View file @
10b77a99
...
@@ -58,7 +58,7 @@ debug_channels (shell)
...
@@ -58,7 +58,7 @@ debug_channels (shell)
46 forward @ user32.CopyAcceleratorTableW
46 forward @ user32.CopyAcceleratorTableW
47 forward @ user32.CreateAcceleratorTableW
47 forward @ user32.CreateAcceleratorTableW
48 forward @ gdi32.CreateDCW
48 forward @ gdi32.CreateDCW
49
stub @
49
forward @ user32.CreateDialogParamA
50 forward @ kernel32.CreateDirectoryW
50 forward @ kernel32.CreateDirectoryW
51 forward @ kernel32.CreateEventW
51 forward @ kernel32.CreateEventW
52 forward @ kernel32.CreateFileW
52 forward @ kernel32.CreateFileW
...
@@ -70,7 +70,7 @@ debug_channels (shell)
...
@@ -70,7 +70,7 @@ debug_channels (shell)
58 stub @
58 stub @
59 stub @
59 stub @
60 forward @ user32.DispatchMessageW
60 forward @ user32.DispatchMessageW
61
stub @
61
forward @ user32.DrawTextW
62 forward @ gdi32.EnumFontFamiliesW
62 forward @ gdi32.EnumFontFamiliesW
63 forward @ gdi32.EnumFontFamiliesExW
63 forward @ gdi32.EnumFontFamiliesExW
64 forward @ kernel32.EnumResourceNamesW
64 forward @ kernel32.EnumResourceNamesW
...
@@ -173,7 +173,7 @@ debug_channels (shell)
...
@@ -173,7 +173,7 @@ debug_channels (shell)
161 stub @
161 stub @
162 stdcall @(str long) SHLWAPI_162
162 stdcall @(str long) SHLWAPI_162
163 stub @
163 stub @
164 st
ub @
164 st
dcall @(ptr ptr ptr ptr ptr ptr) SHLWAPI_164
165 stdcall @(long long long long) SHLWAPI_165
165 stdcall @(long long long long) SHLWAPI_165
166 stub @
166 stub @
167 stub @
167 stub @
...
@@ -181,11 +181,11 @@ debug_channels (shell)
...
@@ -181,11 +181,11 @@ debug_channels (shell)
169 stdcall @(long) SHLWAPI_169
169 stdcall @(long) SHLWAPI_169
170 stdcall @(str) SHLWAPI_170
170 stdcall @(str) SHLWAPI_170
171 stub @
171 stub @
172 st
ub @
172 st
dcall @(ptr ptr) SHLWAPI_172
173 stub @
173 stub @
174 st
ub @
174 st
dcall @(ptr ptr) SHLWAPI_174
175 stub @
175 stub @
176 st
ub @
176 st
dcall @(ptr ptr ptr ptr) SHLWAPI_176
177 stub @
177 stub @
178 stub @
178 stub @
179 stub @
179 stub @
...
@@ -208,7 +208,7 @@ debug_channels (shell)
...
@@ -208,7 +208,7 @@ debug_channels (shell)
196 stub @
196 stub @
197 stub @
197 stub @
198 stub @
198 stub @
199 st
ub @
199 st
dcall @(ptr ptr) SHLWAPI_199
200 stub @
200 stub @
201 stub @
201 stub @
202 stub @
202 stub @
...
@@ -217,10 +217,10 @@ debug_channels (shell)
...
@@ -217,10 +217,10 @@ debug_channels (shell)
205 stdcall @(long str str ptr ptr ptr) SHLWAPI_205
205 stdcall @(long str str ptr ptr ptr) SHLWAPI_205
206 stdcall @(long wstr wstr ptr ptr ptr) SHLWAPI_206
206 stdcall @(long wstr wstr ptr ptr ptr) SHLWAPI_206
207 stub @
207 stub @
208 st
ub @
208 st
dcall @(long long ptr ptr long) SHLWAPI_208
209 stub @
209 stub @
210 st
ub @
210 st
dcall @(ptr long ptr) SHLWAPI_210
211 st
ub @
211 st
dcall @(ptr long) SHLWAPI_211
212 stub @
212 stub @
213 stub @
213 stub @
214 stub @
214 stub @
...
@@ -245,10 +245,10 @@ debug_channels (shell)
...
@@ -245,10 +245,10 @@ debug_channels (shell)
233 stub @
233 stub @
234 stub @
234 stub @
235 stub @
235 stub @
236 st
ub @
236 st
dcall @(ptr) SHLWAPI_236
237 stdcall @(ptr) SHLWAPI_237
237 stdcall @(ptr) SHLWAPI_237
238 stub @
238 stub @
239 st
ub @
239 st
dcall @(long str long) SHLWAPI_239
240 stdcall @(long long long long) SHLWAPI_240
240 stdcall @(long long long long) SHLWAPI_240
241 stdcall @() SHLWAPI_241
241 stdcall @() SHLWAPI_241
242 stub @
242 stub @
...
@@ -309,8 +309,8 @@ debug_channels (shell)
...
@@ -309,8 +309,8 @@ debug_channels (shell)
297 stub @
297 stub @
298 forward @ kernel32.WritePrivateProfileStringW
298 forward @ kernel32.WritePrivateProfileStringW
299 stub @
299 stub @
300
stub @
300
forward @ gdi32.CreateFontW
301 forward @
gdi32.DrawTextExW # FIXME CreateFont
W
301 forward @
user32.DrawTextEx
W
302 forward @ user32.GetMenuItemInfoW
302 forward @ user32.GetMenuItemInfoW
303 forward @ user32.InsertMenuItemW
303 forward @ user32.InsertMenuItemW
304 forward @ gdi32.CreateMetaFileW
304 forward @ gdi32.CreateMetaFileW
...
@@ -351,7 +351,7 @@ debug_channels (shell)
...
@@ -351,7 +351,7 @@ debug_channels (shell)
339 forward @ kernel32.GetNumberFormatW
339 forward @ kernel32.GetNumberFormatW
340 forward @ user32.MessageBoxW
340 forward @ user32.MessageBoxW
341 forward @ kernel32.FindNextFileW
341 forward @ kernel32.FindNextFileW
342 stdcall @(long long long
long
) SHLWAPI_342
342 stdcall @(long long long) SHLWAPI_342
343 stub @
343 stub @
344 stub @
344 stub @
345 stub @
345 stub @
...
@@ -365,7 +365,7 @@ debug_channels (shell)
...
@@ -365,7 +365,7 @@ debug_channels (shell)
353 stub @
353 stub @
354 stub @
354 stub @
355 stub @
355 stub @
356 st
ub @
356 st
dcall @(long long long) SHLWAPI_356
357 stdcall @(wstr wstr wstr long long) SHLWAPI_357
357 stdcall @(wstr wstr wstr long long) SHLWAPI_357
358 stdcall @(ptr ptr ptr ptr ptr ptr) SHLWAPI_358
358 stdcall @(ptr ptr ptr ptr ptr ptr) SHLWAPI_358
359 forward @ kernel32.OpenEventW
359 forward @ kernel32.OpenEventW
...
@@ -385,17 +385,17 @@ debug_channels (shell)
...
@@ -385,17 +385,17 @@ debug_channels (shell)
373 stub @
373 stub @
374 stub @
374 stub @
375 stub @
375 stub @
376 stdcall @(
long
) SHLWAPI_376 # kernel32.GetUserDefaultUILanguage
376 stdcall @() SHLWAPI_376 # kernel32.GetUserDefaultUILanguage
377 stdcall @(
long
long long) SHLWAPI_377
377 stdcall @(
str
long long) SHLWAPI_377
378 stdcall @(
long
long long) SHLWAPI_378
378 stdcall @(
wstr
long long) SHLWAPI_378
379 stub @
379 stub @
380 stub @
380 stub @
381 stub AssocQueryStringA
381 stub AssocQueryStringA
382 stub AssocQueryStringByKeyA
382 stub AssocQueryStringByKeyA
383 stub AssocQueryStringByKeyW
383 stub AssocQueryStringByKeyW
384 stub AssocQueryStringW
384 stub AssocQueryStringW
385 st
ub
ChrCmpIA
385 st
dcall ChrCmpIA(long long)
ChrCmpIA
386 st
ub
ChrCmpIW
386 st
dcall ChrCmpIW(long long)
ChrCmpIW
387 stub ColorAdjustLuma
387 stub ColorAdjustLuma
388 stub @
388 stub @
389 stdcall @(ptr) SHLWAPI_389
389 stdcall @(ptr) SHLWAPI_389
...
@@ -422,7 +422,7 @@ debug_channels (shell)
...
@@ -422,7 +422,7 @@ debug_channels (shell)
410 stub @
410 stub @
411 stub @
411 stub @
412 stub @
412 stub @
413 st
ub @
413 st
dcall @(long) SHLWAPI_413
414 stub @
414 stub @
415 stub @
415 stub @
416 stub @
416 stub @
...
@@ -437,7 +437,7 @@ debug_channels (shell)
...
@@ -437,7 +437,7 @@ debug_channels (shell)
425 stub @
425 stub @
426 stub @
426 stub @
427 stub @
427 stub @
428
stub @
428
forward @ user32.TrackPopupMenuEx
429 stub @
429 stub @
430 stub @
430 stub @
431 stdcall @(long) SHLWAPI_431
431 stdcall @(long) SHLWAPI_431
...
@@ -454,7 +454,7 @@ debug_channels (shell)
...
@@ -454,7 +454,7 @@ debug_channels (shell)
442 forward @ kernel32.GetEnvironmentVariableW
442 forward @ kernel32.GetEnvironmentVariableW
443 forward @ kernel32.GetSystemWindowsDirectoryA
443 forward @ kernel32.GetSystemWindowsDirectoryA
444 forward @ kernel32.GetSystemWindowsDirectoryW
444 forward @ kernel32.GetSystemWindowsDirectoryW
445 st
ub
ColorRGBToHLS
445 st
dcall ColorRGBToHLS(long ptr ptr ptr)
ColorRGBToHLS
446 stub @
446 stub @
@ stdcall DllGetVersion (ptr) SHLWAPI_DllGetVersion
@ stdcall DllGetVersion (ptr) SHLWAPI_DllGetVersion
...
@@ -661,14 +661,14 @@ debug_channels (shell)
...
@@ -661,14 +661,14 @@ debug_channels (shell)
@ stdcall StrToIntW(wstr)StrToIntW
@ stdcall StrToIntW(wstr)StrToIntW
@ stdcall StrTrimA(str str) StrTrimA
@ stdcall StrTrimA(str str) StrTrimA
@ stub StrTrimW
@ stub StrTrimW
@ st
ub
UrlApplySchemeA
@ st
dcall UrlApplySchemeA(str ptr ptr long)
UrlApplySchemeA
@ stdcall UrlApplySchemeW(str ptr ptr long) UrlApplySchemeW
@ stdcall UrlApplySchemeW(
w
str ptr ptr long) UrlApplySchemeW
@ stdcall UrlCanonicalizeA(str ptr ptr long) UrlCanonicalizeA
@ stdcall UrlCanonicalizeA(str ptr ptr long) UrlCanonicalizeA
@ stdcall UrlCanonicalizeW(wstr ptr ptr long) UrlCanonicalizeW
@ stdcall UrlCanonicalizeW(wstr ptr ptr long) UrlCanonicalizeW
@ stdcall UrlCombineA(str str str ptr long) UrlCombineA
@ stdcall UrlCombineA(str str str ptr long) UrlCombineA
@ stdcall UrlCombineW(wstr wstr wstr ptr long) UrlCombineW
@ stdcall UrlCombineW(wstr wstr wstr ptr long) UrlCombineW
@ st
ub
UrlCompareA
@ st
dcall UrlCompareA(str str long)
UrlCompareA
@ st
ub
UrlCompareW
@ st
dcall UrlCompareW(wstr wstr long)
UrlCompareW
@ stub UrlCreateFromPathA
@ stub UrlCreateFromPathA
@ stub UrlCreateFromPathW
@ stub UrlCreateFromPathW
@ stdcall UrlEscapeA(str ptr ptr long)UrlEscapeA
@ stdcall UrlEscapeA(str ptr ptr long)UrlEscapeA
...
@@ -721,7 +721,7 @@ debug_channels (shell)
...
@@ -721,7 +721,7 @@ debug_channels (shell)
@ stub SHCreateStreamWrapper
@ stub SHCreateStreamWrapper
@ stub SHCreateThread
@ stub SHCreateThread
@ stub SHGetThreadRef
@ stub SHGetThreadRef
@ st
ub
SHRegDuplicateHKey
@ st
dcall SHRegDuplicateHKey (long)
SHRegDuplicateHKey
@ stub SHRegSetPathA
@ stub SHRegSetPathA
@ stub SHRegSetPathW
@ stub SHRegSetPathW
@ stub SHRegisterValidateTemplate
@ stub SHRegisterValidateTemplate
...
...
dlls/shlwapi/string.c
View file @
10b77a99
...
@@ -17,6 +17,28 @@
...
@@ -17,6 +17,28 @@
DEFAULT_DEBUG_CHANNEL
(
shell
);
DEFAULT_DEBUG_CHANNEL
(
shell
);
/*************************************************************************
/*************************************************************************
* ChrCmpIA [SHLWAPI.385]
*
* Note: Returns 0 (FALSE) if characters are equal (insensitive).
*/
BOOL
WINAPI
ChrCmpIA
(
WORD
w1
,
WORD
w2
)
{
TRACE
(
"%c ? %c
\n
"
,
w1
,
w2
);
return
(
toupper
(
w1
)
!=
toupper
(
w2
));
}
/*************************************************************************
* ChrCmpIW [SHLWAPI.386]
*
* Note: Returns 0 (FALSE) if characters are equal (insensitive).
*/
BOOL
WINAPI
ChrCmpIW
(
WCHAR
w1
,
WCHAR
w2
)
{
TRACE
(
"%c ? %c
\n
"
,
w1
,
w2
);
return
(
toupperW
(
w1
)
!=
toupperW
(
w2
));
}
/*************************************************************************
* StrChrA [SHLWAPI.@]
* StrChrA [SHLWAPI.@]
*/
*/
LPSTR
WINAPI
StrChrA
(
LPCSTR
str
,
WORD
c
)
LPSTR
WINAPI
StrChrA
(
LPCSTR
str
,
WORD
c
)
...
...
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