Is WIC COM or not
-
Friday, June 01, 2012 8:15 PM
http://msdn.microsoft.com/en-us/library/windows/desktop/ee719655(v=vs.85).aspx states "The Windows Imaging Component (WIC) provides a Component Object Model (COM) based API for use in C and C++."
If you try and register windowscodecs.dll you get the following error "C:\WINDOWS\system32\windowscodecs.dll was loaded, but the DllRegisterServer entry point was not found. This file can not be registered."
If you try and add it to a Visual Studio project (2010 in this case) you get "A reference to 'C:\WINDOWS\system32\windowscodecs.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."
It seems as though WIC does not implement the necessary COM interfaces. What am I missing here?
All Replies
-
Friday, July 13, 2012 3:56 AM
DllRegisterServer is not required, the only required (exported) function in a dll that implements a COM interface is DllGetClassObject.
The smoking gun: "The IWICImagingFactory interface inherits from the IUnknown interface."
- Proposed As Answer by WndSks Friday, July 13, 2012 4:27 AM
-
Friday, December 21, 2012 11:59 PM
IUnknown is commonly used for making things have reference counting, but isn't necessarily truely "COM". For example, DirectX 11. It's basically "COM Llite" because you cannot use CoCreateInstance to start the object and the lifetime of the device child objects is based on the lifetime of the device even if their reference counts are non-zero.
The WIC Factory is created via CoCreateInstance. You also have to call CoInitilize before it works. That's COM :>
WIC is part of the OS, so you don't need to 'register' it. What language is the OP trying to use WIC from?


