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
5df59e29
Commit
5df59e29
authored
Dec 18, 2007
by
Huw Davies
Committed by
Alexandre Julliard
Dec 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Add IMimeAllocator implementation.
parent
cbf09632
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
230 additions
and
3 deletions
+230
-3
inetcomm.spec
dlls/inetcomm/inetcomm.spec
+1
-1
inetcomm_main.c
dlls/inetcomm/inetcomm_main.c
+6
-2
inetcomm_private.h
dlls/inetcomm/inetcomm_private.h
+1
-0
mimeole.c
dlls/inetcomm/mimeole.c
+205
-0
regsvr.c
dlls/inetcomm/regsvr.c
+6
-0
mimeole.c
dlls/inetcomm/tests/mimeole.c
+11
-0
No files found.
dlls/inetcomm/inetcomm.spec
View file @
5df59e29
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
@ stub MimeOleGenerateCID
@ stub MimeOleGenerateCID
@ stub MimeOleGenerateFileName
@ stub MimeOleGenerateFileName
@ stub MimeOleGenerateMID
@ stub MimeOleGenerateMID
@ st
ub MimeOleGetAllocator
@ st
dcall MimeOleGetAllocator(ptr)
@ stub MimeOleGetBodyPropA
@ stub MimeOleGetBodyPropA
@ stub MimeOleGetBodyPropW
@ stub MimeOleGetBodyPropW
@ stub MimeOleGetCertsFromThumbprints
@ stub MimeOleGetCertsFromThumbprints
...
...
dlls/inetcomm/inetcomm_main.c
View file @
5df59e29
...
@@ -131,8 +131,8 @@ static const struct IClassFactoryVtbl cf_vtbl =
...
@@ -131,8 +131,8 @@ static const struct IClassFactoryVtbl cf_vtbl =
cf_LockServer
cf_LockServer
};
};
static
cf
mime_body_cf
=
{
&
cf_vtbl
,
MimeBody_create
};
static
cf
mime_body_cf
=
{
&
cf_vtbl
,
MimeBody_create
};
static
cf
mime_allocator_cf
=
{
&
cf_vtbl
,
MimeAllocator_create
};
/***********************************************************************
/***********************************************************************
* DllGetClassObject (INETCOMM.@)
* DllGetClassObject (INETCOMM.@)
...
@@ -147,6 +147,10 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
...
@@ -147,6 +147,10 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
{
{
cf
=
(
IClassFactory
*
)
&
mime_body_cf
.
lpVtbl
;
cf
=
(
IClassFactory
*
)
&
mime_body_cf
.
lpVtbl
;
}
}
else
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_IMimeAllocator
))
{
cf
=
(
IClassFactory
*
)
&
mime_allocator_cf
.
lpVtbl
;
}
if
(
!
cf
)
if
(
!
cf
)
{
{
...
...
dlls/inetcomm/inetcomm_private.h
View file @
5df59e29
...
@@ -70,3 +70,4 @@ BOOL InternetTransport_RegisterClass(HINSTANCE hInstance);
...
@@ -70,3 +70,4 @@ BOOL InternetTransport_RegisterClass(HINSTANCE hInstance);
void
InternetTransport_UnregisterClass
(
HINSTANCE
hInstance
);
void
InternetTransport_UnregisterClass
(
HINSTANCE
hInstance
);
HRESULT
MimeBody_create
(
IUnknown
*
outer
,
void
**
obj
);
HRESULT
MimeBody_create
(
IUnknown
*
outer
,
void
**
obj
);
HRESULT
MimeAllocator_create
(
IUnknown
*
outer
,
void
**
obj
);
dlls/inetcomm/mimeole.c
View file @
5df59e29
...
@@ -1824,3 +1824,208 @@ HRESULT WINAPI MimeOleCreateSecurity(IMimeSecurity **ppSecurity)
...
@@ -1824,3 +1824,208 @@ HRESULT WINAPI MimeOleCreateSecurity(IMimeSecurity **ppSecurity)
*
ppSecurity
=
(
IMimeSecurity
*
)
&
This
->
lpVtbl
;
*
ppSecurity
=
(
IMimeSecurity
*
)
&
This
->
lpVtbl
;
return
S_OK
;
return
S_OK
;
}
}
typedef
struct
{
IMimeAllocatorVtbl
*
lpVtbl
;
}
MimeAllocator
;
static
HRESULT
WINAPI
MimeAlloc_QueryInterface
(
IMimeAllocator
*
iface
,
REFIID
riid
,
void
**
obj
)
{
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
obj
);
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IMalloc
)
||
IsEqualIID
(
riid
,
&
IID_IMimeAllocator
))
{
*
obj
=
iface
;
IUnknown_AddRef
(
iface
);
return
S_OK
;
}
FIXME
(
"no interface for %s
\n
"
,
debugstr_guid
(
riid
));
*
obj
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
MimeAlloc_AddRef
(
IMimeAllocator
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
MimeAlloc_Release
(
IMimeAllocator
*
iface
)
{
return
1
;
}
static
LPVOID
WINAPI
MimeAlloc_Alloc
(
IMimeAllocator
*
iface
,
ULONG
cb
)
{
return
CoTaskMemAlloc
(
cb
);
}
static
LPVOID
WINAPI
MimeAlloc_Realloc
(
IMimeAllocator
*
iface
,
LPVOID
pv
,
ULONG
cb
)
{
return
CoTaskMemRealloc
(
pv
,
cb
);
}
static
void
WINAPI
MimeAlloc_Free
(
IMimeAllocator
*
iface
,
LPVOID
pv
)
{
return
CoTaskMemFree
(
pv
);
}
static
ULONG
WINAPI
MimeAlloc_GetSize
(
IMimeAllocator
*
iface
,
LPVOID
pv
)
{
FIXME
(
"stub
\n
"
);
return
0
;
}
static
int
WINAPI
MimeAlloc_DidAlloc
(
IMimeAllocator
*
iface
,
LPVOID
pv
)
{
FIXME
(
"stub
\n
"
);
return
0
;
}
static
void
WINAPI
MimeAlloc_HeapMinimize
(
IMimeAllocator
*
iface
)
{
FIXME
(
"stub
\n
"
);
return
;
}
static
HRESULT
WINAPI
MimeAlloc_FreeParamInfoArray
(
IMimeAllocator
*
iface
,
ULONG
cParams
,
LPMIMEPARAMINFO
prgParam
,
boolean
fFreeArray
)
{
ULONG
i
;
TRACE
(
"(%p)->(%d, %p, %d)
\n
"
,
iface
,
cParams
,
prgParam
,
fFreeArray
);
for
(
i
=
0
;
i
<
cParams
;
i
++
)
{
IMimeAllocator_Free
(
iface
,
prgParam
[
i
].
pszName
);
IMimeAllocator_Free
(
iface
,
prgParam
[
i
].
pszData
);
}
if
(
fFreeArray
)
IMimeAllocator_Free
(
iface
,
prgParam
);
return
S_OK
;
}
static
HRESULT
WINAPI
MimeAlloc_FreeAddressList
(
IMimeAllocator
*
iface
,
LPADDRESSLIST
pList
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MimeAlloc_FreeAddressProps
(
IMimeAllocator
*
iface
,
LPADDRESSPROPS
pAddress
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MimeAlloc_ReleaseObjects
(
IMimeAllocator
*
iface
,
ULONG
cObjects
,
IUnknown
**
prgpUnknown
,
boolean
fFreeArray
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MimeAlloc_FreeEnumHeaderRowArray
(
IMimeAllocator
*
iface
,
ULONG
cRows
,
LPENUMHEADERROW
prgRow
,
boolean
fFreeArray
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MimeAlloc_FreeEnumPropertyArray
(
IMimeAllocator
*
iface
,
ULONG
cProps
,
LPENUMPROPERTY
prgProp
,
boolean
fFreeArray
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MimeAlloc_FreeThumbprint
(
IMimeAllocator
*
iface
,
THUMBBLOB
*
pthumbprint
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MimeAlloc_PropVariantClear
(
IMimeAllocator
*
iface
,
LPPROPVARIANT
pProp
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
IMimeAllocatorVtbl
mime_alloc_vtbl
=
{
MimeAlloc_QueryInterface
,
MimeAlloc_AddRef
,
MimeAlloc_Release
,
MimeAlloc_Alloc
,
MimeAlloc_Realloc
,
MimeAlloc_Free
,
MimeAlloc_GetSize
,
MimeAlloc_DidAlloc
,
MimeAlloc_HeapMinimize
,
MimeAlloc_FreeParamInfoArray
,
MimeAlloc_FreeAddressList
,
MimeAlloc_FreeAddressProps
,
MimeAlloc_ReleaseObjects
,
MimeAlloc_FreeEnumHeaderRowArray
,
MimeAlloc_FreeEnumPropertyArray
,
MimeAlloc_FreeThumbprint
,
MimeAlloc_PropVariantClear
};
static
MimeAllocator
mime_allocator
=
{
&
mime_alloc_vtbl
};
HRESULT
MimeAllocator_create
(
IUnknown
*
outer
,
void
**
obj
)
{
if
(
outer
)
return
CLASS_E_NOAGGREGATION
;
*
obj
=
&
mime_allocator
;
return
S_OK
;
}
HRESULT
WINAPI
MimeOleGetAllocator
(
IMimeAllocator
**
alloc
)
{
return
MimeAllocator_create
(
NULL
,
(
void
**
)
alloc
);
}
dlls/inetcomm/regsvr.c
View file @
5df59e29
...
@@ -440,6 +440,12 @@ static struct regsvr_coclass const coclass_list[] = {
...
@@ -440,6 +440,12 @@ static struct regsvr_coclass const coclass_list[] = {
"inetcomm.dll"
,
"inetcomm.dll"
,
"Both"
"Both"
},
},
{
&
CLSID_IMimeAllocator
,
"CLSID_IMimeAllocator"
,
NULL
,
"inetcomm.dll"
,
"Both"
},
{
&
CLSID_IMimeMessage
,
{
&
CLSID_IMimeMessage
,
"CLSID_IMimeMessage"
,
"CLSID_IMimeMessage"
,
NULL
,
NULL
,
...
...
dlls/inetcomm/tests/mimeole.c
View file @
5df59e29
...
@@ -137,11 +137,22 @@ static void test_CreateBody(void)
...
@@ -137,11 +137,22 @@ static void test_CreateBody(void)
IMimeBody_Release
(
body
);
IMimeBody_Release
(
body
);
}
}
static
void
test_Allocator
(
void
)
{
HRESULT
hr
;
IMimeAllocator
*
alloc
;
hr
=
MimeOleGetAllocator
(
&
alloc
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
IMimeAllocator_Release
(
alloc
);
}
START_TEST
(
mimeole
)
START_TEST
(
mimeole
)
{
{
OleInitialize
(
NULL
);
OleInitialize
(
NULL
);
test_CreateVirtualStream
();
test_CreateVirtualStream
();
test_CreateSecurity
();
test_CreateSecurity
();
test_CreateBody
();
test_CreateBody
();
test_Allocator
();
OleUninitialize
();
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