Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sam Joan Roque-Worcel
wine
Commits
72da279d
Commit
72da279d
authored
22 years ago
by
Rolf Kalbermatter
Committed by
Alexandre Julliard
22 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Implemented CheckEscapesA/W.
parent
3e588e3a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/shell32/shell32.spec
+6
-6
6 additions, 6 deletions
dlls/shell32/shell32.spec
dlls/shell32/shellstring.c
+56
-29
56 additions, 29 deletions
dlls/shell32/shellstring.c
dlls/shell32/undocshell.h
+3
-0
3 additions, 0 deletions
dlls/shell32/undocshell.h
with
65 additions
and
35 deletions
dlls/shell32/shell32.spec
+
6
−
6
View file @
72da279d
...
...
@@ -17,12 +17,12 @@
19 stdcall ILCloneFirst (ptr)
20 stdcall ILGlobalClone (ptr)
21 stdcall ILIsEqual (ptr ptr)
23 stdcall ILIsParent (
long long
long)
24 stdcall ILFindChild (
long long
)
23 stdcall ILIsParent (
ptr ptr
long)
24 stdcall ILFindChild (
ptr ptr
)
25 stdcall ILCombine(ptr ptr)
26 stdcall ILLoadFromStream (ptr ptr)
27 stdcall ILSaveToStream(ptr ptr)
28 stdcall SHILCreateFromPath
(long long long
) SHILCreateFromPathAW
28 stdcall SHILCreateFromPath
(ptr ptr ptr
) SHILCreateFromPathAW
29 stdcall PathIsRoot(ptr) PathIsRootAW
30 stdcall PathBuildRoot(ptr long) PathBuildRootAW
31 stdcall PathFindExtension(ptr) PathFindExtensionAW
...
...
@@ -190,7 +190,7 @@
209 stub Int64ToString
210 stub LargeIntegerToString
211 stub Printers_GetPidl
212 stub Printer_AddPrinterPropPages
212 stub Printer
s
_AddPrinterPropPages
213 stub Printers_RegisterWindowW
214 stub Printers_UnregisterWindow
215 stub SHStartNetConnectionDialog@12
...
...
@@ -306,8 +306,8 @@
# version 4.0 (win95)
# _WIN32_IE >= 0x0200
#
@ stdcall CheckEscapesA(str
long long ptr ptr
long)
@ stdcall CheckEscapesW(wstr
long long ptr ptr
long)
@ stdcall CheckEscapesA(str long)
@ stdcall CheckEscapesW(wstr long)
@ stdcall CommandLineToArgvW(wstr ptr)
@ stdcall Control_FillCache_RunDLL(long long long long)
@ stub Control_FillCache_RunDLLA
...
...
This diff is collapsed.
Click to expand it.
dlls/shell32/shellstring.c
+
56
−
29
View file @
72da279d
...
...
@@ -29,6 +29,7 @@
#include
"shlobj.h"
#include
"shellapi.h"
#include
"shlwapi.h"
#include
"shell32_main.h"
#include
"undocshell.h"
#include
"wine/unicode.h"
...
...
@@ -217,40 +218,66 @@ BOOL WINAPI OleStrToStrNAW (LPVOID lpOut, INT nOut, LPCVOID lpIn, INT nIn)
/*************************************************************************
* CheckEscapes [SHELL32]
* CheckEscapesA [SHELL32.@]
*
* Checks a string for special characters which are not allowed in a path
* and encloses it in quotes if that is the case.
*
* PARAMS
* string [I/O] string to check and on return eventually quoted
* len [I] length of string
*
* RETURNS
* length of actual string
*
* NOTES
* Not really sure if this function returns actually a value at all.
*/
DWORD
WINAPI
CheckEscapesA
(
LPSTR
string
,
/* [in] string to check ??*/
DWORD
b
,
/* [???] is 0 */
DWORD
c
,
/* [???] is 0 */
LPDWORD
d
,
/* [???] is address */
LPDWORD
e
,
/* [???] is address */
DWORD
handle
)
/* [in] looks like handle but not */
LPSTR
string
,
/* [I/O] string to check ??*/
DWORD
len
)
/* [I] is 0 */
{
FIXME
(
"(%p<%s> %ld %ld %p<%ld> %p<%ld> 0x%08lx) stub
\n
"
,
string
,
debugstr_a
(
string
),
b
,
c
,
d
,
(
d
)
?
*
d
:
0xabbacddc
,
e
,
(
e
)
?
*
e
:
0xabbacddd
,
handle
);
return
0
;
LPWSTR
wString
;
DWORD
ret
=
0
;
TRACE
(
"(%s %ld)
\n
"
,
debugstr_a
(
string
),
len
);
wString
=
(
LPWSTR
)
LocalAlloc
(
LPTR
,
len
*
sizeof
(
WCHAR
));
if
(
wString
)
{
MultiByteToWideChar
(
CP_ACP
,
0
,
string
,
len
,
wString
,
len
);
ret
=
CheckEscapesW
(
wString
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
wString
,
len
,
string
,
len
,
NULL
,
NULL
);
LocalFree
(
wString
);
}
return
ret
;
}
static
const
WCHAR
strEscapedChars
[]
=
{
' '
,
'"'
,
','
,
';'
,
'^'
,
0
};
/*************************************************************************
* CheckEscapesW [SHELL32.@]
*
* see CheckEscapesA
*/
DWORD
WINAPI
CheckEscapesW
(
LPWSTR
string
,
/* [in] string to check ??*/
DWORD
b
,
/* [???] is 0 */
DWORD
c
,
/* [???] is 0 */
LPDWORD
d
,
/* [???] is address */
LPDWORD
e
,
/* [???] is address */
DWORD
handle
)
/* [in] looks like handle but not */
LPWSTR
string
,
DWORD
len
)
{
FIXME
(
"(%p<%s> %ld %ld %p<%ld> %p<%ld> 0x%08lx) stub
\n
"
,
string
,
debugstr_w
(
string
),
b
,
c
,
d
,
(
d
)
?
*
d
:
0xabbacddc
,
e
,
(
e
)
?
*
e
:
0xabbacddd
,
handle
);
return
0
;
DWORD
size
=
lstrlenW
(
string
);
LPWSTR
s
,
d
;
TRACE
(
"(%s %ld) stub
\n
"
,
debugstr_w
(
string
),
len
);
if
(
StrPBrkW
(
string
,
strEscapedChars
)
&&
size
+
2
<=
len
)
{
s
=
&
string
[
size
-
1
];
d
=
&
string
[
size
+
2
];
*
d
--
=
0
;
*
d
--
=
'"'
;
for
(;
d
>
string
;)
*
d
--
=
*
s
--
;
*
d
=
'"'
;
return
size
+
2
;
}
return
size
;
}
This diff is collapsed.
Click to expand it.
dlls/shell32/undocshell.h
+
3
−
0
View file @
72da279d
...
...
@@ -901,6 +901,9 @@ BOOL WINAPI SHGetNewLinkInfoW(
UINT
uFlags
);
#define SHGetNewLinkInfo WINELIB_NAME_AW(SHGetNewLinkInfo)
DWORD
WINAPI
CheckEscapesA
(
LPSTR
string
,
DWORD
len
);
DWORD
WINAPI
CheckEscapesW
(
LPWSTR
string
,
DWORD
len
);
/* policy functions */
BOOL
WINAPI
SHInitRestricted
(
LPCVOID
unused
,
LPCVOID
inpRegKey
);
DWORD
WINAPI
SHRestricted
(
DWORD
policy
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment