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
7ae2a7cb
Commit
7ae2a7cb
authored
Dec 03, 2020
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mapi32: Use wide-char string literals.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
24ac30d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
19 deletions
+11
-19
prop.c
dlls/mapi32/tests/prop.c
+5
-5
util.c
dlls/mapi32/util.c
+6
-14
No files found.
dlls/mapi32/tests/prop.c
View file @
7ae2a7cb
...
...
@@ -102,7 +102,7 @@ static ULONG ptTypes[] = {
static
void
test_PropCopyMore
(
void
)
{
static
char
szHiA
[]
=
"Hi!"
;
static
WCHAR
szHiW
[]
=
{
'H'
,
'i'
,
'!'
,
'\0'
}
;
static
WCHAR
szHiW
[]
=
L"Hi!"
;
SPropValue
*
lpDest
=
NULL
,
*
lpSrc
=
NULL
;
ULONG
i
;
SCODE
scode
;
...
...
@@ -182,7 +182,7 @@ static void test_PropCopyMore(void)
static
void
test_UlPropSize
(
void
)
{
static
char
szHiA
[]
=
"Hi!"
;
static
WCHAR
szHiW
[]
=
{
'H'
,
'i'
,
'!'
,
'\0'
}
;
static
WCHAR
szHiW
[]
=
L"Hi!"
;
LPSTR
buffa
[
2
];
LPWSTR
buffw
[
2
];
SBinary
buffbin
[
2
];
...
...
@@ -702,7 +702,7 @@ static void test_PpropFindProp(void)
static
void
test_ScCountProps
(
void
)
{
static
char
szHiA
[]
=
"Hi!"
;
static
WCHAR
szHiW
[]
=
{
'H'
,
'i'
,
'!'
,
'\0'
}
;
static
WCHAR
szHiW
[]
=
L"Hi!"
;
static
const
ULONG
ULHILEN
=
4
;
/* chars in szHiA/W incl. NUL */
LPSTR
buffa
[
3
];
LPWSTR
buffw
[
3
];
...
...
@@ -971,7 +971,7 @@ static void test_FBadRglpszA(void)
static
void
test_FBadRglpszW
(
void
)
{
LPWSTR
lpStrs
[
4
];
static
WCHAR
szString
[]
=
{
'A'
,
' '
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
'\0'
}
;
static
WCHAR
szString
[]
=
L"A String"
;
BOOL
bRet
;
if
(
!
pFBadRglpszW
)
...
...
@@ -1063,7 +1063,7 @@ static void test_FBadRow(void)
static
void
test_FBadProp
(
void
)
{
static
WCHAR
szEmpty
[]
=
{
'\0'
}
;
static
WCHAR
szEmpty
[]
=
L""
;
GUID
iid
;
ULONG
pt
,
res
;
SPropValue
pv
;
...
...
dlls/mapi32/util.c
View file @
7ae2a7cb
...
...
@@ -966,8 +966,6 @@ static HMODULE mapi_ex_provider;
*/
static
void
load_mapi_provider
(
HKEY
hkeyMail
,
LPCWSTR
valueName
,
HMODULE
*
mapi_provider
)
{
static
const
WCHAR
mapi32_dll
[]
=
{
'm'
,
'a'
,
'p'
,
'i'
,
'3'
,
'2'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
DWORD
dwType
,
dwLen
=
0
;
LPWSTR
dllPath
;
...
...
@@ -982,7 +980,7 @@ static void load_mapi_provider(HKEY hkeyMail, LPCWSTR valueName, HMODULE *mapi_p
RegQueryValueExW
(
hkeyMail
,
valueName
,
NULL
,
NULL
,
(
LPBYTE
)
dllPath
,
&
dwLen
);
/* Check that this value doesn't refer to mapi32.dll (eg, as Outlook does) */
if
(
lstrcmpiW
(
dllPath
,
mapi32_dll
)
!=
0
)
if
(
lstrcmpiW
(
dllPath
,
L"mapi32.dll"
)
!=
0
)
{
if
(
dwType
==
REG_EXPAND_SZ
)
{
...
...
@@ -1022,13 +1020,7 @@ static void load_mapi_provider(HKEY hkeyMail, LPCWSTR valueName, HMODULE *mapi_p
*/
void
load_mapi_providers
(
void
)
{
static
const
WCHAR
regkey_mail
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'C'
,
'l'
,
'i'
,
'e'
,
'n'
,
't'
,
's'
,
'\\'
,
'M'
,
'a'
,
'i'
,
'l'
,
0
};
static
const
WCHAR
regkey_dllpath
[]
=
{
'D'
,
'L'
,
'L'
,
'P'
,
'a'
,
't'
,
'h'
,
0
};
static
const
WCHAR
regkey_dllpath_ex
[]
=
{
'D'
,
'L'
,
'L'
,
'P'
,
'a'
,
't'
,
'h'
,
'E'
,
'x'
,
0
};
static
const
WCHAR
regkey_backslash
[]
=
{
'\\'
,
0
};
static
const
WCHAR
regkey_mail
[]
=
L"Software
\\
Clients
\\
Mail"
;
HKEY
hkeyMail
;
DWORD
dwType
,
dwLen
=
0
;
...
...
@@ -1056,13 +1048,13 @@ void load_mapi_providers(void)
TRACE
(
"appName: %s
\n
"
,
debugstr_w
(
appName
));
appKey
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
(
lstrlenW
(
regkey_mail
)
+
lstrlenW
(
regkey_backslash
)
+
lstrlenW
(
appName
)
+
1
));
lstrlenW
(
L"
\\
"
)
+
lstrlenW
(
appName
)
+
1
));
if
(
!
appKey
)
goto
cleanUp
;
lstrcpyW
(
appKey
,
regkey_mail
);
lstrcatW
(
appKey
,
regkey_backslash
);
lstrcatW
(
appKey
,
L"
\\
"
);
lstrcatW
(
appKey
,
appName
);
RegCloseKey
(
hkeyMail
);
...
...
@@ -1074,8 +1066,8 @@ void load_mapi_providers(void)
goto
cleanUp
;
/* Try to load the providers */
load_mapi_provider
(
hkeyMail
,
regkey_dllpath
,
&
mapi_provider
);
load_mapi_provider
(
hkeyMail
,
regkey_dllpath_ex
,
&
mapi_ex_provider
);
load_mapi_provider
(
hkeyMail
,
L"DLLPath"
,
&
mapi_provider
);
load_mapi_provider
(
hkeyMail
,
L"DLLPathEx"
,
&
mapi_ex_provider
);
/* Now try to load our function pointers */
ZeroMemory
(
&
mapiFunctions
,
sizeof
(
mapiFunctions
));
...
...
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