mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-16 20:11:41 -06:00
4.20
This commit is contained in:
committed by
Kornel Lesiński
parent
8c1b5c7b7e
commit
3c510ba80b
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user