1*c2c66affSColin Finck /*
2*c2c66affSColin Finck * Copyright 2013 Hans Leidekker for CodeWeavers
3*c2c66affSColin Finck *
4*c2c66affSColin Finck * This library is free software; you can redistribute it and/or
5*c2c66affSColin Finck * modify it under the terms of the GNU Lesser General Public
6*c2c66affSColin Finck * License as published by the Free Software Foundation; either
7*c2c66affSColin Finck * version 2.1 of the License, or (at your option) any later version.
8*c2c66affSColin Finck *
9*c2c66affSColin Finck * This library is distributed in the hope that it will be useful,
10*c2c66affSColin Finck * but WITHOUT ANY WARRANTY; without even the implied warranty of
11*c2c66affSColin Finck * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12*c2c66affSColin Finck * Lesser General Public License for more details.
13*c2c66affSColin Finck *
14*c2c66affSColin Finck * You should have received a copy of the GNU Lesser General Public
15*c2c66affSColin Finck * License along with this library; if not, write to the Free Software
16*c2c66affSColin Finck * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17*c2c66affSColin Finck */
18*c2c66affSColin Finck
19*c2c66affSColin Finck #define COBJMACROS
20*c2c66affSColin Finck
21*c2c66affSColin Finck #include <stdio.h>
22*c2c66affSColin Finck #include "windows.h"
23*c2c66affSColin Finck #include "objbase.h"
24*c2c66affSColin Finck #include "wincodec.h"
25*c2c66affSColin Finck #include "wine/test.h"
26*c2c66affSColin Finck
27*c2c66affSColin Finck HRESULT WINAPI WICCreateColorTransform_Proxy(IWICColorTransform**);
28*c2c66affSColin Finck
test_WICCreateColorTransform_Proxy(void)29*c2c66affSColin Finck static void test_WICCreateColorTransform_Proxy(void)
30*c2c66affSColin Finck {
31*c2c66affSColin Finck HRESULT hr;
32*c2c66affSColin Finck IWICColorTransform *transform;
33*c2c66affSColin Finck
34*c2c66affSColin Finck hr = WICCreateColorTransform_Proxy( NULL );
35*c2c66affSColin Finck ok( hr == E_INVALIDARG, "got %08x\n", hr );
36*c2c66affSColin Finck
37*c2c66affSColin Finck transform = NULL;
38*c2c66affSColin Finck hr = WICCreateColorTransform_Proxy( &transform );
39*c2c66affSColin Finck ok( hr == S_OK, "got %08x\n", hr );
40*c2c66affSColin Finck if (transform) IWICColorTransform_Release( transform );
41*c2c66affSColin Finck
42*c2c66affSColin Finck hr = CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
43*c2c66affSColin Finck ok( hr == S_OK, "got %08x\n", hr );
44*c2c66affSColin Finck
45*c2c66affSColin Finck transform = NULL;
46*c2c66affSColin Finck hr = WICCreateColorTransform_Proxy( &transform );
47*c2c66affSColin Finck ok( hr == S_OK, "got %08x\n", hr );
48*c2c66affSColin Finck if (transform) IWICColorTransform_Release( transform );
49*c2c66affSColin Finck CoUninitialize();
50*c2c66affSColin Finck
51*c2c66affSColin Finck hr = CoInitializeEx( NULL, COINIT_MULTITHREADED );
52*c2c66affSColin Finck ok( hr == S_OK, "got %08x\n", hr );
53*c2c66affSColin Finck
54*c2c66affSColin Finck transform = NULL;
55*c2c66affSColin Finck hr = WICCreateColorTransform_Proxy( &transform );
56*c2c66affSColin Finck ok( hr == S_OK, "got %08x\n", hr );
57*c2c66affSColin Finck if (transform) IWICColorTransform_Release( transform );
58*c2c66affSColin Finck CoUninitialize();
59*c2c66affSColin Finck }
60*c2c66affSColin Finck
START_TEST(transform)61*c2c66affSColin Finck START_TEST(transform)
62*c2c66affSColin Finck {
63*c2c66affSColin Finck test_WICCreateColorTransform_Proxy();
64*c2c66affSColin Finck }
65