This commit is contained in:
Igor Pavlov
2005-05-30 00:00:00 +00:00
committed by Kornel Lesiński
parent 8c1b5c7b7e
commit 3c510ba80b
926 changed files with 40559 additions and 23519 deletions

View File

@@ -2,8 +2,7 @@
#include "StdAfx.h"
#define INITGUID
#include "Common/MyInitGuid.h"
#include "Common/ComTry.h"
#include "ByteSwap.h"
#include "../../ICoder.h"
@@ -18,19 +17,19 @@ STDAPI CreateObject(const GUID *clsid, const GUID *iid, void **outObject)
{
COM_TRY_BEGIN
*outObject = 0;
int correctInterface = (*iid == IID_ICompressCoder);
CMyComPtr<ICompressCoder> coder;
int correctInterface = (*iid == IID_ICompressFilter);
CMyComPtr<ICompressFilter> coder;
if (*clsid == CLSID_CCompressConvertByteSwap2)
{
if (!correctInterface)
return E_NOINTERFACE;
coder = (ICompressCoder *)new CByteSwap2();
coder = (ICompressFilter *)new CByteSwap2();
}
else if (*clsid == CLSID_CCompressConvertByteSwap4)
{
if (!correctInterface)
return E_NOINTERFACE;
coder = (ICompressCoder *)new CByteSwap4();
coder = (ICompressFilter *)new CByteSwap4();
}
else
return CLASS_E_CLASSNOTAVAILABLE;