[Bug 23706] Ship Simulator 2008 demo needs D3DXSaveSurfaceToFileInMemory

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Feb 17 19:34:59 CST 2011


http://bugs.winehq.org/show_bug.cgi?id=23706

--- Comment #5 from Misha Koshelev <misha680 at gmail.com> 2011-02-17 19:34:57 CST ---
I see... sort of.(In reply to comment #4)
> CreateEncoder is just a wrapper around IWICBitmapEncoderInfo and
> CoCreateInstance. You shouldn't need it.

I see... sort of.

I understand that once I have a IWICBitmapEncoderInfo, I simply call
IWICBitmapEncoderInfo_CreateInstance(bitmapencoderinfo, &bitmapencoder).

However, I am a little unclear on the CoCreateInstance part.

For example, for the imaging factory, I use:
CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void**)&factory);
to create the instance.

If I have a GUID, such as GUID_ContainerFormatBmp, how do I use
CoCreateInstance to create an instance of the appropriate
IWICBitmapEncoderInfo? Is this then the CLSID? For example:
CoCreateInstance(&GUID_ContainerFormatBmp, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICBitmapEncoderInfo, (void**)&bitmapencoderinfo);

Also, would this not work then?
CoCreateInstance(&GUID_ContainerFormatBmp, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICBitmapEncoder, (void**)&bitmapencoderinfo);
and save the call to IWICBitmapEncoderInfo_CreateInstance?

I don't mean to sound naive... but I learn on the fly.

Thank you
Misha

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list