user32: Change the desktop colour and pattern to match win2k.
[wine] / dlls / inetcomm / tests / mimeole.c
1 /*
2  * MimeOle tests
3  *
4  * Copyright 2007 Huw Davies
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20
21 #define COBJMACROS
22
23 #include "windows.h"
24 #include "ole2.h"
25 #include "ocidl.h"
26
27 #include "initguid.h"
28 #include "mimeole.h"
29
30 #include <stdio.h>
31 #include <assert.h>
32
33 #include "wine/test.h"
34
35
36 static void test_CreateVirtualStream(void)
37 {
38     HRESULT hr;
39     IStream *pstm;
40
41     hr = MimeOleCreateVirtualStream(&pstm);
42     ok(hr == S_OK, "ret %08x\n", hr);
43
44     IStream_Release(pstm);
45 }
46
47 static void test_CreateSecurity(void)
48 {
49     HRESULT hr;
50     IMimeSecurity *sec;
51
52     hr = MimeOleCreateSecurity(&sec);
53     ok(hr == S_OK, "ret %08x\n", hr);
54
55     IMimeSecurity_Release(sec);
56 }
57
58 static void test_CreateBody(void)
59 {
60     HRESULT hr;
61     IMimeBody *body;
62     HBODY handle = (void *)0xdeadbeef;
63
64     hr = CoCreateInstance(&CLSID_IMimeBody, NULL, CLSCTX_INPROC_SERVER, &IID_IMimeBody, (void**)&body);
65     ok(hr == S_OK, "ret %08x\n", hr);
66
67     hr = IMimeBody_GetHandle(body, &handle);
68     ok(hr == MIME_E_NO_DATA, "ret %08x\n", hr);
69     ok(handle == NULL, "handle %p\n", handle);
70
71     IMimeBody_Release(body);
72 }
73
74 START_TEST(mimeole)
75 {
76     OleInitialize(NULL);
77     test_CreateVirtualStream();
78     test_CreateSecurity();
79     test_CreateBody();
80     OleUninitialize();
81 }