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
16231678
Commit
16231678
authored
Jul 01, 2016
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jul 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Support LPSTR to LPWSTR conversion in GetProp.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bf026723
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
Makefile.in
dlls/inetcomm/Makefile.in
+1
-1
mimeole.c
dlls/inetcomm/mimeole.c
+6
-1
mimeole.c
dlls/inetcomm/tests/mimeole.c
+14
-0
No files found.
dlls/inetcomm/Makefile.in
View file @
16231678
MODULE
=
inetcomm.dll
IMPORTLIB
=
inetcomm
IMPORTS
=
uuid oleaut32 ole32 ws2_32 user32 advapi32
IMPORTS
=
uuid
propsys
oleaut32 ole32 ws2_32 user32 advapi32
C_SRCS
=
\
imaptransport.c
\
...
...
dlls/inetcomm/mimeole.c
View file @
16231678
...
...
@@ -31,6 +31,7 @@
#include "objbase.h"
#include "ole2.h"
#include "mimeole.h"
#include "propvarutil.h"
#include "wine/list.h"
#include "wine/debug.h"
...
...
@@ -785,7 +786,11 @@ static HRESULT WINAPI MimeBody_GetProp(
hr
=
find_prop
(
This
,
pszName
,
&
header
);
if
(
hr
==
S_OK
)
{
PropVariantCopy
(
pValue
,
&
header
->
value
);
TRACE
(
"type %d->%d
\n
"
,
header
->
value
.
vt
,
pValue
->
vt
);
hr
=
PropVariantChangeType
(
pValue
,
&
header
->
value
,
0
,
pValue
->
vt
);
if
(
FAILED
(
hr
))
FIXME
(
"Conversion not currently supported (%d->%d)
\n
"
,
header
->
value
.
vt
,
pValue
->
vt
);
}
return
hr
;
...
...
dlls/inetcomm/tests/mimeole.c
View file @
16231678
...
...
@@ -335,6 +335,7 @@ static void test_CreateMessage(void)
static
void
test_MessageSetProp
(
void
)
{
static
const
char
topic
[]
=
"wine topic"
;
static
const
WCHAR
topicW
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
' '
,
't'
,
'o'
,
'p'
,
'i'
,
'c'
,
0
};
HRESULT
hr
;
IMimeMessage
*
msg
;
IMimeBody
*
body
;
...
...
@@ -370,6 +371,7 @@ static void test_MessageSetProp(void)
hr
=
IMimeBody_GetProp
(
body
,
"Wine-Topic"
,
0
,
&
prop
);
ok
(
hr
==
MIME_E_NOT_FOUND
,
"ret %08x
\n
"
,
hr
);
prop
.
vt
=
VT_LPSTR
;
hr
=
IMimeBody_GetProp
(
body
,
"Thread-Topic"
,
0
,
&
prop
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
...
...
@@ -386,6 +388,7 @@ static void test_MessageSetProp(void)
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
PropVariantClear
(
&
prop
);
prop
.
vt
=
VT_LPSTR
;
hr
=
IMimeBody_GetProp
(
body
,
PIDTOSTR
(
PID_HDR_SUBJECT
),
0
,
&
prop
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
...
...
@@ -396,6 +399,7 @@ static void test_MessageSetProp(void)
}
/* Using the name or PID returns the same result. */
prop
.
vt
=
VT_LPSTR
;
hr
=
IMimeBody_GetProp
(
body
,
"Subject"
,
0
,
&
prop
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
...
...
@@ -405,6 +409,16 @@ static void test_MessageSetProp(void)
PropVariantClear
(
&
prop
);
}
prop
.
vt
=
VT_LPWSTR
;
hr
=
IMimeBody_GetProp
(
body
,
"Subject"
,
0
,
&
prop
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
ok
(
prop
.
vt
==
VT_LPWSTR
,
"type %d
\n
"
,
prop
.
vt
);
ok
(
!
lstrcmpW
(
prop
.
u
.
pwszVal
,
topicW
),
"got %s
\n
"
,
wine_dbgstr_w
(
prop
.
u
.
pwszVal
));
PropVariantClear
(
&
prop
);
}
prop
.
vt
=
VT_LPSTR
;
prop
.
u
.
pszVal
=
CoTaskMemAlloc
(
strlen
(
topic
)
+
1
);
strcpy
(
prop
.
u
.
pszVal
,
topic
);
...
...
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