ReactOS 0.4.16-dev-1007-g2e85425
main.c
Go to the documentation of this file.
1/*
2 * Copyright 2009 Vincent Povirk for CodeWeavers
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19
20#define COBJMACROS
21
22#include <stdarg.h>
23
24#include "windef.h"
25#include "winbase.h"
26#include "winternl.h"
27#include "objbase.h"
28
29#include "wincodecs_private.h"
30
31#include "wine/debug.h"
32
34
36
38{
39
40 switch (fdwReason)
41 {
44 windowscodecs_module = hinstDLL;
45 break;
47 if (lpvReserved) break;
49 break;
50 }
51
52 return WIC_DllMain(hinstDLL, fdwReason, lpvReserved);
53}
54
55#ifdef __REACTOS__
57{
58 return S_FALSE;
59}
60#endif
61
63{
64 HRESULT hr;
66 IWICPixelFormatInfo *formatinfo;
67
69 if (SUCCEEDED(hr))
70 {
71 hr = IWICComponentInfo_QueryInterface(info, &IID_IWICPixelFormatInfo, (void**)&formatinfo);
72
73 if (SUCCEEDED(hr))
74 {
75 hr = IWICPixelFormatInfo_GetBitsPerPixel(formatinfo, bpp);
76
77 IWICPixelFormatInfo_Release(formatinfo);
78 }
79
80 IWICComponentInfo_Release(info);
81 }
82
83 return hr;
84}
85
87{
88 HRESULT hr;
89 struct decoder *decoder;
91
93
94 if (SUCCEEDED(hr))
96
97 return hr;
98}
99
101{
102 HRESULT hr;
103 struct encoder *encoder;
105
107
108 if (SUCCEEDED(hr))
110
111 return hr;
112}
113
115{
116 HRESULT hr;
117 struct decoder *decoder;
119
121
122 if (SUCCEEDED(hr))
124
125 return hr;
126}
127
129{
130 HRESULT hr;
131 struct encoder *encoder;
133
135
136 if (SUCCEEDED(hr))
138
139 return hr;
140}
static DWORD const fdwReason
HRESULT CommonDecoder_CreateInstance(struct decoder *decoder, const struct decoder_info *decoder_info, REFIID iid, void **ppv)
Definition: decoder.c:780
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
Definition: main.c:26
HRESULT WINAPI DllCanUnloadNow(void)
Definition: main.c:204
DWORD bpp
Definition: surface.c:185
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
pixelformat
Definition: converter.c:37
HRESULT CreateComponentInfo(REFCLSID clsid, IWICComponentInfo **ppIInfo)
Definition: info.c:2030
void ReleaseComponentInfos(void)
Definition: info.c:2110
HRESULT JpegEncoder_CreateInstance(REFIID iid, void **ppv)
Definition: main.c:128
HRESULT get_pixelformat_bpp(const GUID *pixelformat, UINT *bpp)
Definition: main.c:62
HRESULT TiffEncoder_CreateInstance(REFIID iid, void **ppv)
Definition: main.c:100
HRESULT JpegDecoder_CreateInstance(REFIID iid, void **ppv)
Definition: main.c:114
HMODULE windowscodecs_module
Definition: main.c:35
HRESULT TiffDecoder_CreateInstance(REFIID iid, void **ppv)
Definition: main.c:86
BOOL WINAPI WIC_DllMain(HINSTANCE, DWORD, LPVOID)
HRESULT CommonEncoder_CreateInstance(struct encoder *encoder, const struct encoder_info *encoder_info, REFIID iid, void **ppv)
Definition: encoder.c:867
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT CDECL jpeg_decoder_create(struct decoder_info *info, struct decoder **result)
Definition: libjpeg.c:343
HRESULT CDECL jpeg_encoder_create(struct encoder_info *info, struct encoder **result)
Definition: libjpeg.c:638
HRESULT CDECL tiff_decoder_create(struct decoder_info *info, struct decoder **result)
Definition: libtiff.c:1091
HRESULT CDECL tiff_encoder_create(struct encoder_info *info, struct encoder **result)
Definition: libtiff.c:1329
static IN DWORD IN LPVOID lpvReserved
unsigned int UINT
Definition: ndis.h:50
#define REFIID
Definition: guiddef.h:118
HRESULT hr
Definition: shlfolder.c:183
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357