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
8599014c
Commit
8599014c
authored
Apr 19, 2016
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Apr 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Implement MimeOleGetPropertySchema.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
076189c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
135 additions
and
2 deletions
+135
-2
mimeole.c
dlls/inetcomm/mimeole.c
+123
-2
mimeole.c
dlls/inetcomm/tests/mimeole.c
+12
-0
No files found.
dlls/inetcomm/mimeole.c
View file @
8599014c
...
...
@@ -115,6 +115,17 @@ static inline MimeBody *impl_from_IMimeBody(IMimeBody *iface)
return
CONTAINING_RECORD
(
iface
,
MimeBody
,
IMimeBody_iface
);
}
typedef
struct
propschema
{
IMimePropertySchema
IMimePropertySchema_iface
;
LONG
ref
;
}
propschema
;
static
inline
propschema
*
impl_from_IMimePropertySchema
(
IMimePropertySchema
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
propschema
,
IMimePropertySchema_iface
);
}
static
LPSTR
strdupA
(
LPCSTR
str
)
{
char
*
ret
;
...
...
@@ -3032,8 +3043,118 @@ HRESULT VirtualStream_create(IUnknown *outer, void **obj)
return
MimeOleCreateVirtualStream
((
IStream
**
)
obj
);
}
HRESULT
WINAPI
MimeOleGetPropertySchema
(
IMimePropertySchema
**
schema
)
/* IMimePropertySchema Interface */
static
HRESULT
WINAPI
propschema_QueryInterface
(
IMimePropertySchema
*
iface
,
REFIID
riid
,
void
**
out
)
{
propschema
*
This
=
impl_from_IMimePropertySchema
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
out
);
*
out
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IMimePropertySchema
))
{
*
out
=
iface
;
}
else
{
FIXME
(
"no interface for %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
IMimePropertySchema_AddRef
(
iface
);
return
S_OK
;
}
static
ULONG
WINAPI
propschema_AddRef
(
IMimePropertySchema
*
iface
)
{
propschema
*
This
=
impl_from_IMimePropertySchema
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
propschema_Release
(
IMimePropertySchema
*
iface
)
{
propschema
*
This
=
impl_from_IMimePropertySchema
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
}
static
HRESULT
WINAPI
propschema_RegisterProperty
(
IMimePropertySchema
*
iface
,
const
char
*
name
,
DWORD
flags
,
DWORD
rownumber
,
VARTYPE
vtdefault
,
DWORD
*
propid
)
{
propschema
*
This
=
impl_from_IMimePropertySchema
(
iface
);
FIXME
(
"(%p)->(%s, %x, %d, %d, %p) stub
\n
"
,
This
,
debugstr_a
(
name
),
flags
,
rownumber
,
vtdefault
,
propid
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
propschema_ModifyProperty
(
IMimePropertySchema
*
iface
,
const
char
*
name
,
DWORD
flags
,
DWORD
rownumber
,
VARTYPE
vtdefault
)
{
propschema
*
This
=
impl_from_IMimePropertySchema
(
iface
);
FIXME
(
"(%p)->(%s, %x, %d, %d) stub
\n
"
,
This
,
debugstr_a
(
name
),
flags
,
rownumber
,
vtdefault
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
propschema_GetPropertyId
(
IMimePropertySchema
*
iface
,
const
char
*
name
,
DWORD
*
propid
)
{
propschema
*
This
=
impl_from_IMimePropertySchema
(
iface
);
FIXME
(
"(%p)->(%s, %p) stub
\n
"
,
This
,
debugstr_a
(
name
),
propid
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
propschema_GetPropertyName
(
IMimePropertySchema
*
iface
,
DWORD
propid
,
char
**
name
)
{
propschema
*
This
=
impl_from_IMimePropertySchema
(
iface
);
FIXME
(
"(%p)->(%d, %p) stub
\n
"
,
This
,
propid
,
name
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
propschema_RegisterAddressType
(
IMimePropertySchema
*
iface
,
const
char
*
name
,
DWORD
*
adrtype
)
{
FIXME
(
"(%p) stub
\n
"
,
schema
);
propschema
*
This
=
impl_from_IMimePropertySchema
(
iface
);
FIXME
(
"(%p)->(%s, %p) stub
\n
"
,
This
,
debugstr_a
(
name
),
adrtype
);
return
E_NOTIMPL
;
}
static
IMimePropertySchemaVtbl
prop_schema_vtbl
=
{
propschema_QueryInterface
,
propschema_AddRef
,
propschema_Release
,
propschema_RegisterProperty
,
propschema_ModifyProperty
,
propschema_GetPropertyId
,
propschema_GetPropertyName
,
propschema_RegisterAddressType
};
HRESULT
WINAPI
MimeOleGetPropertySchema
(
IMimePropertySchema
**
schema
)
{
propschema
*
This
;
TRACE
(
"(%p) stub
\n
"
,
schema
);
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IMimePropertySchema_iface
.
lpVtbl
=
&
prop_schema_vtbl
;
This
->
ref
=
1
;
*
schema
=
&
This
->
IMimePropertySchema_iface
;
return
S_OK
;
}
dlls/inetcomm/tests/mimeole.c
View file @
8599014c
...
...
@@ -353,6 +353,17 @@ void test_BindToObject(void)
IMimeMessage_Release
(
msg
);
}
static
void
test_MimeOleGetPropertySchema
(
void
)
{
HRESULT
hr
;
IMimePropertySchema
*
schema
=
NULL
;
hr
=
MimeOleGetPropertySchema
(
&
schema
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
IMimePropertySchema_Release
(
schema
);
}
START_TEST
(
mimeole
)
{
OleInitialize
(
NULL
);
...
...
@@ -362,5 +373,6 @@ START_TEST(mimeole)
test_Allocator
();
test_CreateMessage
();
test_BindToObject
();
test_MimeOleGetPropertySchema
();
OleUninitialize
();
}
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