Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d03f65a5
Commit
d03f65a5
authored
Jan 14, 2014
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jan 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Move the aggregation check from object constructors to class factory.
parent
91c5cf33
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
89 additions
and
116 deletions
+89
-116
bmpdecode.c
dlls/windowscodecs/bmpdecode.c
+6
-8
bmpencode.c
dlls/windowscodecs/bmpencode.c
+2
-4
clsfactory.c
dlls/windowscodecs/clsfactory.c
+6
-2
converter.c
dlls/windowscodecs/converter.c
+2
-4
gifformat.c
dlls/windowscodecs/gifformat.c
+12
-14
icnsformat.c
dlls/windowscodecs/icnsformat.c
+3
-5
icoformat.c
dlls/windowscodecs/icoformat.c
+3
-5
imgfactory.c
dlls/windowscodecs/imgfactory.c
+3
-5
jpegformat.c
dlls/windowscodecs/jpegformat.c
+6
-10
metadatahandler.c
dlls/windowscodecs/metadatahandler.c
+5
-7
pngformat.c
dlls/windowscodecs/pngformat.c
+8
-12
proxy.c
dlls/windowscodecs/proxy.c
+1
-1
tgaformat.c
dlls/windowscodecs/tgaformat.c
+2
-4
tiffformat.c
dlls/windowscodecs/tiffformat.c
+6
-10
wincodecs_private.h
dlls/windowscodecs/wincodecs_private.h
+24
-25
No files found.
dlls/windowscodecs/bmpdecode.c
View file @
d03f65a5
...
...
@@ -1185,17 +1185,15 @@ static HRESULT BmpDecoder_Create(int packed, int icoframe, BmpDecoder **ppDecode
return
S_OK
;
}
static
HRESULT
BmpDecoder_Construct
(
int
packed
,
int
icoframe
,
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
static
HRESULT
BmpDecoder_Construct
(
int
packed
,
int
icoframe
,
REFIID
iid
,
void
**
ppv
)
{
BmpDecoder
*
This
;
HRESULT
ret
;
TRACE
(
"(%
p,%s,%p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
iid
),
ppv
);
TRACE
(
"(%
s,%p)
\n
"
,
debugstr_guid
(
iid
),
ppv
);
*
ppv
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
ret
=
BmpDecoder_Create
(
packed
,
icoframe
,
&
This
);
if
(
FAILED
(
ret
))
return
ret
;
...
...
@@ -1205,14 +1203,14 @@ static HRESULT BmpDecoder_Construct(int packed, int icoframe, IUnknown *pUnkOute
return
ret
;
}
HRESULT
BmpDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
BmpDecoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
return
BmpDecoder_Construct
(
FALSE
,
FALSE
,
pUnkOuter
,
iid
,
ppv
);
return
BmpDecoder_Construct
(
FALSE
,
FALSE
,
iid
,
ppv
);
}
HRESULT
DibDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
DibDecoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
return
BmpDecoder_Construct
(
TRUE
,
FALSE
,
pUnkOuter
,
iid
,
ppv
);
return
BmpDecoder_Construct
(
TRUE
,
FALSE
,
iid
,
ppv
);
}
HRESULT
IcoDibDecoder_CreateInstance
(
BmpDecoder
**
ppDecoder
)
...
...
dlls/windowscodecs/bmpencode.c
View file @
d03f65a5
...
...
@@ -601,17 +601,15 @@ static const IWICBitmapEncoderVtbl BmpEncoder_Vtbl = {
BmpEncoder_GetMetadataQueryWriter
};
HRESULT
BmpEncoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
BmpEncoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
BmpEncoder
*
This
;
HRESULT
ret
;
TRACE
(
"(%
p,%s,%p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
iid
),
ppv
);
TRACE
(
"(%
s,%p)
\n
"
,
debugstr_guid
(
iid
),
ppv
);
*
ppv
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BmpEncoder
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
...
...
dlls/windowscodecs/clsfactory.c
View file @
d03f65a5
...
...
@@ -41,7 +41,7 @@ extern HRESULT WINAPI WIC_DllGetClassObject(REFCLSID, REFIID, LPVOID *) DECLSPEC
typedef
struct
{
REFCLSID
classid
;
HRESULT
(
*
constructor
)(
IUnknown
*
,
REFIID
,
void
**
);
HRESULT
(
*
constructor
)(
REFIID
,
void
**
);
}
classinfo
;
static
const
classinfo
wic_classes
[]
=
{
...
...
@@ -131,7 +131,11 @@ static HRESULT WINAPI ClassFactoryImpl_CreateInstance(IClassFactory *iface,
{
ClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
);
return
This
->
info
->
constructor
(
pUnkOuter
,
riid
,
ppv
);
*
ppv
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
return
This
->
info
->
constructor
(
riid
,
ppv
);
}
static
HRESULT
WINAPI
ClassFactoryImpl_LockServer
(
IClassFactory
*
iface
,
BOOL
lock
)
...
...
dlls/windowscodecs/converter.c
View file @
d03f65a5
...
...
@@ -1271,17 +1271,15 @@ static const IWICFormatConverterVtbl FormatConverter_Vtbl = {
FormatConverter_CanConvert
};
HRESULT
FormatConverter_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
FormatConverter_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
FormatConverter
*
This
;
HRESULT
ret
;
TRACE
(
"(%
p,%s,%p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
iid
),
ppv
);
TRACE
(
"(%
s,%p)
\n
"
,
debugstr_guid
(
iid
),
ppv
);
*
ppv
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FormatConverter
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
...
...
dlls/windowscodecs/gifformat.c
View file @
d03f65a5
...
...
@@ -144,9 +144,9 @@ static const MetadataHandlerVtbl LSDReader_Vtbl = {
load_LSD_metadata
};
HRESULT
LSDReader_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
LSDReader_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
return
MetadataReader_Create
(
&
LSDReader_Vtbl
,
pUnkOuter
,
iid
,
ppv
);
return
MetadataReader_Create
(
&
LSDReader_Vtbl
,
iid
,
ppv
);
}
#include "pshpack1.h"
...
...
@@ -242,9 +242,9 @@ static const MetadataHandlerVtbl IMDReader_Vtbl = {
load_IMD_metadata
};
HRESULT
IMDReader_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
IMDReader_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
return
MetadataReader_Create
(
&
IMDReader_Vtbl
,
pUnkOuter
,
iid
,
ppv
);
return
MetadataReader_Create
(
&
IMDReader_Vtbl
,
iid
,
ppv
);
}
static
HRESULT
load_GCE_metadata
(
IStream
*
stream
,
const
GUID
*
vendor
,
DWORD
options
,
...
...
@@ -320,9 +320,9 @@ static const MetadataHandlerVtbl GCEReader_Vtbl = {
load_GCE_metadata
};
HRESULT
GCEReader_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
GCEReader_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
return
MetadataReader_Create
(
&
GCEReader_Vtbl
,
pUnkOuter
,
iid
,
ppv
);
return
MetadataReader_Create
(
&
GCEReader_Vtbl
,
iid
,
ppv
);
}
static
HRESULT
load_APE_metadata
(
IStream
*
stream
,
const
GUID
*
vendor
,
DWORD
options
,
...
...
@@ -427,9 +427,9 @@ static const MetadataHandlerVtbl APEReader_Vtbl = {
load_APE_metadata
};
HRESULT
APEReader_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
APEReader_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
return
MetadataReader_Create
(
&
APEReader_Vtbl
,
pUnkOuter
,
iid
,
ppv
);
return
MetadataReader_Create
(
&
APEReader_Vtbl
,
iid
,
ppv
);
}
static
HRESULT
load_GifComment_metadata
(
IStream
*
stream
,
const
GUID
*
vendor
,
DWORD
options
,
...
...
@@ -521,9 +521,9 @@ static const MetadataHandlerVtbl GifCommentReader_Vtbl = {
load_GifComment_metadata
};
HRESULT
GifCommentReader_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
GifCommentReader_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
return
MetadataReader_Create
(
&
GifCommentReader_Vtbl
,
pUnkOuter
,
iid
,
ppv
);
return
MetadataReader_Create
(
&
GifCommentReader_Vtbl
,
iid
,
ppv
);
}
static
IStream
*
create_stream
(
const
void
*
data
,
int
data_size
)
...
...
@@ -1417,17 +1417,15 @@ static const IWICMetadataBlockReaderVtbl GifDecoder_BlockVtbl =
GifDecoder_Block_GetEnumerator
};
HRESULT
GifDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
GifDecoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
GifDecoder
*
This
;
HRESULT
ret
;
TRACE
(
"(%
p,%s,%p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
iid
),
ppv
);
TRACE
(
"(%
s,%p)
\n
"
,
debugstr_guid
(
iid
),
ppv
);
*
ppv
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
GifDecoder
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
...
...
dlls/windowscodecs/icnsformat.c
View file @
d03f65a5
...
...
@@ -747,17 +747,15 @@ static const IWICBitmapEncoderVtbl IcnsEncoder_Vtbl = {
IcnsEncoder_GetMetadataQueryWriter
};
HRESULT
IcnsEncoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
IcnsEncoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
IcnsEncoder
*
This
;
HRESULT
ret
;
TRACE
(
"(%
p,%s,%p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
iid
),
ppv
);
TRACE
(
"(%
s,%p)
\n
"
,
debugstr_guid
(
iid
),
ppv
);
*
ppv
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IcnsEncoder
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
...
...
@@ -780,7 +778,7 @@ HRESULT IcnsEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
#else
/* !defined(HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H) ||
MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4 */
HRESULT
IcnsEncoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
IcnsEncoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
ERR
(
"Trying to save ICNS picture, but ICNS support is not compiled in.
\n
"
);
return
E_FAIL
;
...
...
dlls/windowscodecs/icoformat.c
View file @
d03f65a5
...
...
@@ -397,7 +397,7 @@ static HRESULT ReadIcoPng(IStream *stream, IcoFrameDecode *result)
WICRect
rect
;
HRESULT
hr
;
hr
=
PngDecoder_CreateInstance
(
NULL
,
&
IID_IWICBitmapDecoder
,
(
void
**
)
&
decoder
);
hr
=
PngDecoder_CreateInstance
(
&
IID_IWICBitmapDecoder
,
(
void
**
)
&
decoder
);
if
(
FAILED
(
hr
))
goto
end
;
hr
=
IWICBitmapDecoder_Initialize
(
decoder
,
stream
,
WICDecodeMetadataCacheOnLoad
);
...
...
@@ -738,17 +738,15 @@ static const IWICBitmapDecoderVtbl IcoDecoder_Vtbl = {
IcoDecoder_GetFrame
};
HRESULT
IcoDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
IcoDecoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
IcoDecoder
*
This
;
HRESULT
ret
;
TRACE
(
"(%
p,%s,%p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
iid
),
ppv
);
TRACE
(
"(%
s,%p)
\n
"
,
debugstr_guid
(
iid
),
ppv
);
*
ppv
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IcoDecoder
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
...
...
dlls/windowscodecs/imgfactory.c
View file @
d03f65a5
...
...
@@ -423,7 +423,7 @@ static HRESULT WINAPI ComponentFactory_CreatePalette(IWICComponentFactory *iface
static
HRESULT
WINAPI
ComponentFactory_CreateFormatConverter
(
IWICComponentFactory
*
iface
,
IWICFormatConverter
**
ppIFormatConverter
)
{
return
FormatConverter_CreateInstance
(
NULL
,
&
IID_IWICFormatConverter
,
(
void
**
)
ppIFormatConverter
);
return
FormatConverter_CreateInstance
(
&
IID_IWICFormatConverter
,
(
void
**
)
ppIFormatConverter
);
}
static
HRESULT
WINAPI
ComponentFactory_CreateBitmapScaler
(
IWICComponentFactory
*
iface
,
...
...
@@ -1032,17 +1032,15 @@ static const IWICComponentFactoryVtbl ComponentFactory_Vtbl = {
ComponentFactory_CreateEncoderPropertyBag
};
HRESULT
ComponentFactory_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
ComponentFactory_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
ComponentFactory
*
This
;
HRESULT
ret
;
TRACE
(
"(%
p,%s,%p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
iid
),
ppv
);
TRACE
(
"(%
s,%p)
\n
"
,
debugstr_guid
(
iid
),
ppv
);
*
ppv
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
ComponentFactory
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
...
...
dlls/windowscodecs/jpegformat.c
View file @
d03f65a5
...
...
@@ -715,12 +715,12 @@ static const IWICBitmapFrameDecodeVtbl JpegDecoder_Frame_Vtbl = {
JpegDecoder_Frame_GetThumbnail
};
HRESULT
JpegDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
JpegDecoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
JpegDecoder
*
This
;
HRESULT
ret
;
TRACE
(
"(%
p,%s,%p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
iid
),
ppv
);
TRACE
(
"(%
s,%p)
\n
"
,
debugstr_guid
(
iid
),
ppv
);
if
(
!
libjpeg_handle
&&
!
load_libjpeg
())
{
...
...
@@ -730,8 +730,6 @@ HRESULT JpegDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
*
ppv
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
JpegDecoder
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
...
...
@@ -1457,17 +1455,15 @@ static const IWICBitmapEncoderVtbl JpegEncoder_Vtbl = {
JpegEncoder_GetMetadataQueryWriter
};
HRESULT
JpegEncoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
JpegEncoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
JpegEncoder
*
This
;
HRESULT
ret
;
TRACE
(
"(%
p,%s,%p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
iid
),
ppv
);
TRACE
(
"(%
s,%p)
\n
"
,
debugstr_guid
(
iid
),
ppv
);
*
ppv
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
if
(
!
libjpeg_handle
&&
!
load_libjpeg
())
{
ERR
(
"Failed writing JPEG because unable to find %s
\n
"
,
SONAME_LIBJPEG
);
...
...
@@ -1502,13 +1498,13 @@ HRESULT JpegEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
#else
/* !defined(SONAME_LIBJPEG) */
HRESULT
JpegDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
JpegDecoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
ERR
(
"Trying to load JPEG picture, but JPEG support is not compiled in.
\n
"
);
return
E_FAIL
;
}
HRESULT
JpegEncoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
JpegEncoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
ERR
(
"Trying to save JPEG picture, but JPEG support is not compiled in.
\n
"
);
return
E_FAIL
;
...
...
dlls/windowscodecs/metadatahandler.c
View file @
d03f65a5
...
...
@@ -456,7 +456,7 @@ static const IWICPersistStreamVtbl MetadataHandler_PersistStream_Vtbl = {
MetadataHandler_SaveEx
};
HRESULT
MetadataReader_Create
(
const
MetadataHandlerVtbl
*
vtable
,
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
MetadataReader_Create
(
const
MetadataHandlerVtbl
*
vtable
,
REFIID
iid
,
void
**
ppv
)
{
MetadataHandler
*
This
;
HRESULT
hr
;
...
...
@@ -465,8 +465,6 @@ HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, IUnknown *pUnkO
*
ppv
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
MetadataHandler
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
...
...
@@ -725,9 +723,9 @@ static const MetadataHandlerVtbl UnknownMetadataReader_Vtbl = {
LoadUnknownMetadata
};
HRESULT
UnknownMetadataReader_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
UnknownMetadataReader_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
return
MetadataReader_Create
(
&
UnknownMetadataReader_Vtbl
,
pUnkOuter
,
iid
,
ppv
);
return
MetadataReader_Create
(
&
UnknownMetadataReader_Vtbl
,
iid
,
ppv
);
}
#define SWAP_USHORT(x) do { if (!native_byte_order) (x) = RtlUshortByteSwap(x); } while(0)
...
...
@@ -1160,7 +1158,7 @@ static const MetadataHandlerVtbl IfdMetadataReader_Vtbl = {
LoadIfdMetadata
};
HRESULT
IfdMetadataReader_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
IfdMetadataReader_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
return
MetadataReader_Create
(
&
IfdMetadataReader_Vtbl
,
pUnkOuter
,
iid
,
ppv
);
return
MetadataReader_Create
(
&
IfdMetadataReader_Vtbl
,
iid
,
ppv
);
}
dlls/windowscodecs/pngformat.c
View file @
d03f65a5
...
...
@@ -148,9 +148,9 @@ static const MetadataHandlerVtbl TextReader_Vtbl = {
LoadTextMetadata
};
HRESULT
PngTextReader_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
PngTextReader_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
return
MetadataReader_Create
(
&
TextReader_Vtbl
,
pUnkOuter
,
iid
,
ppv
);
return
MetadataReader_Create
(
&
TextReader_Vtbl
,
iid
,
ppv
);
}
#ifdef SONAME_LIBPNG
...
...
@@ -982,17 +982,15 @@ static const IWICMetadataBlockReaderVtbl PngDecoder_BlockVtbl = {
PngDecoder_Block_GetEnumerator
,
};
HRESULT
PngDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
PngDecoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
PngDecoder
*
This
;
HRESULT
ret
;
TRACE
(
"(%
p,%s,%p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
iid
),
ppv
);
TRACE
(
"(%
s,%p)
\n
"
,
debugstr_guid
(
iid
),
ppv
);
*
ppv
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
if
(
!
libpng_handle
&&
!
load_libpng
())
{
ERR
(
"Failed reading PNG because unable to find %s
\n
"
,
SONAME_LIBPNG
);
...
...
@@ -1674,17 +1672,15 @@ static const IWICBitmapEncoderVtbl PngEncoder_Vtbl = {
PngEncoder_GetMetadataQueryWriter
};
HRESULT
PngEncoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
PngEncoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
PngEncoder
*
This
;
HRESULT
ret
;
TRACE
(
"(%
p,%s,%p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
iid
),
ppv
);
TRACE
(
"(%
s,%p)
\n
"
,
debugstr_guid
(
iid
),
ppv
);
*
ppv
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
if
(
!
libpng_handle
&&
!
load_libpng
())
{
ERR
(
"Failed writing PNG because unable to find %s
\n
"
,
SONAME_LIBPNG
);
...
...
@@ -1722,13 +1718,13 @@ HRESULT PngEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
#else
/* !HAVE_PNG_H */
HRESULT
PngDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
PngDecoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
ERR
(
"Trying to load PNG picture, but PNG support is not compiled in.
\n
"
);
return
E_FAIL
;
}
HRESULT
PngEncoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
PngEncoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
ERR
(
"Trying to save PNG picture, but PNG support is not compiled in.
\n
"
);
return
E_FAIL
;
...
...
dlls/windowscodecs/proxy.c
View file @
d03f65a5
...
...
@@ -637,7 +637,7 @@ HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT SDKVersion, IWICImagingFactory
{
TRACE
(
"%x, %p
\n
"
,
SDKVersion
,
ppIImagingFactory
);
return
ComponentFactory_CreateInstance
(
NULL
,
&
IID_IWICImagingFactory
,
(
void
**
)
ppIImagingFactory
);
return
ComponentFactory_CreateInstance
(
&
IID_IWICImagingFactory
,
(
void
**
)
ppIImagingFactory
);
}
HRESULT
WINAPI
WICSetEncoderFormat_Proxy
(
IWICBitmapSource
*
pSourceIn
,
...
...
dlls/windowscodecs/tgaformat.c
View file @
d03f65a5
...
...
@@ -951,17 +951,15 @@ static const IWICBitmapFrameDecodeVtbl TgaDecoder_Frame_Vtbl = {
TgaDecoder_Frame_GetThumbnail
};
HRESULT
TgaDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
TgaDecoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
TgaDecoder
*
This
;
HRESULT
ret
;
TRACE
(
"(%
p,%s,%p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
iid
),
ppv
);
TRACE
(
"(%
s,%p)
\n
"
,
debugstr_guid
(
iid
),
ppv
);
*
ppv
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
TgaDecoder
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
...
...
dlls/windowscodecs/tiffformat.c
View file @
d03f65a5
...
...
@@ -1296,17 +1296,15 @@ static const IWICMetadataBlockReaderVtbl TiffFrameDecode_BlockVtbl =
TiffFrameDecode_Block_GetEnumerator
};
HRESULT
TiffDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
TiffDecoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
HRESULT
ret
;
TiffDecoder
*
This
;
TRACE
(
"(%
p,%s,%p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
iid
),
ppv
);
TRACE
(
"(%
s,%p)
\n
"
,
debugstr_guid
(
iid
),
ppv
);
*
ppv
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
if
(
!
load_libtiff
())
{
ERR
(
"Failed reading TIFF because unable to load %s
\n
"
,
SONAME_LIBTIFF
);
...
...
@@ -2040,17 +2038,15 @@ static const IWICBitmapEncoderVtbl TiffEncoder_Vtbl = {
TiffEncoder_GetMetadataQueryWriter
};
HRESULT
TiffEncoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
TiffEncoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
TiffEncoder
*
This
;
HRESULT
ret
;
TRACE
(
"(%
p,%s,%p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
iid
),
ppv
);
TRACE
(
"(%
s,%p)
\n
"
,
debugstr_guid
(
iid
),
ppv
);
*
ppv
=
NULL
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
if
(
!
load_libtiff
())
{
ERR
(
"Failed writing TIFF because unable to load %s
\n
"
,
SONAME_LIBTIFF
);
...
...
@@ -2079,13 +2075,13 @@ HRESULT TiffEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
#else
/* !SONAME_LIBTIFF */
HRESULT
TiffDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
TiffDecoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
ERR
(
"Trying to load TIFF picture, but Wine was compiled without TIFF support.
\n
"
);
return
E_FAIL
;
}
HRESULT
TiffEncoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
TiffEncoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
{
ERR
(
"Trying to save TIFF picture, but Wine was compiled without TIFF support.
\n
"
);
return
E_FAIL
;
...
...
dlls/windowscodecs/wincodecs_private.h
View file @
d03f65a5
...
...
@@ -67,22 +67,21 @@ DECLARE_INTERFACE_(IMILUnknown2,IUnknown)
};
#undef INTERFACE
extern
HRESULT
FormatConverter_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
ComponentFactory_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
BmpDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
PngDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
PngEncoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
BmpEncoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
DibDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
GifDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
IcoDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
JpegDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
JpegEncoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
TiffDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
TiffEncoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
IcnsEncoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
TgaDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
FormatConverter_CreateInstance
(
REFIID
riid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
ComponentFactory_CreateInstance
(
REFIID
riid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
BmpDecoder_CreateInstance
(
REFIID
riid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
PngDecoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
PngEncoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
BmpEncoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
DibDecoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
GifDecoder_CreateInstance
(
REFIID
riid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
IcoDecoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
JpegDecoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
JpegEncoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
TiffDecoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
TiffEncoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
IcnsEncoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
TgaDecoder_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
BitmapImpl_Create
(
UINT
uiWidth
,
UINT
uiHeight
,
UINT
stride
,
UINT
datasize
,
BYTE
*
bits
,
...
...
@@ -135,16 +134,16 @@ typedef struct _MetadataHandlerVtbl
ULARGE_INTEGER
*
size
);
}
MetadataHandlerVtbl
;
extern
HRESULT
MetadataReader_Create
(
const
MetadataHandlerVtbl
*
vtable
,
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
MetadataReader_Create
(
const
MetadataHandlerVtbl
*
vtable
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
UnknownMetadataReader_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
IfdMetadataReader_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
PngTextReader_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
LSDReader_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
IMDReader_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
GCEReader_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
APEReader_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
GifCommentReader_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
UnknownMetadataReader_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
IfdMetadataReader_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
PngTextReader_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
LSDReader_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
IMDReader_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
GCEReader_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
APEReader_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
GifCommentReader_CreateInstance
(
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
stream_initialize_from_filehandle
(
IWICStream
*
iface
,
HANDLE
hfile
)
DECLSPEC_HIDDEN
;
...
...
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