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
72da279d
Commit
72da279d
authored
Mar 26, 2003
by
Rolf Kalbermatter
Committed by
Alexandre Julliard
Mar 26, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented CheckEscapesA/W.
parent
3e588e3a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
35 deletions
+65
-35
shell32.spec
dlls/shell32/shell32.spec
+6
-6
shellstring.c
dlls/shell32/shellstring.c
+56
-29
undocshell.h
dlls/shell32/undocshell.h
+3
-0
No files found.
dlls/shell32/shell32.spec
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
...
...
dlls/shell32/shellstring.c
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
;
}
dlls/shell32/undocshell.h
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
);
...
...
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