diff options
Diffstat (limited to 'CPP/7zip/Archive/Chm/DllExports.cpp')
-rwxr-xr-x | CPP/7zip/Archive/Chm/DllExports.cpp | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/CPP/7zip/Archive/Chm/DllExports.cpp b/CPP/7zip/Archive/Chm/DllExports.cpp deleted file mode 100755 index ad822094..00000000 --- a/CPP/7zip/Archive/Chm/DllExports.cpp +++ /dev/null @@ -1,77 +0,0 @@ -// DLLExports.cpp - -#include "StdAfx.h" - -#include "Common/MyInitGuid.h" -#include "Common/ComTry.h" -#include "Windows/PropVariant.h" -#include "ChmHandler.h" -#include "../../ICoder.h" - -// {23170F69-40C1-278A-1000-000110E90000} -DEFINE_GUID(CLSID_CChmHandler, - 0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xE9, 0x00, 0x00); - -extern "C" -BOOL WINAPI DllMain(HINSTANCE /* hInstance */, DWORD /* dwReason */, LPVOID /*lpReserved*/) -{ - return TRUE; -} - -STDAPI CreateObject( - const GUID *classID, - const GUID *interfaceID, - void **outObject) -{ - COM_TRY_BEGIN - *outObject = 0; - if (*classID != CLSID_CChmHandler) - return CLASS_E_CLASSNOTAVAILABLE; - if (*interfaceID != IID_IInArchive) - return E_NOINTERFACE; - CMyComPtr<IInArchive> inArchive = (IInArchive *)new NArchive::NChm::CHandler; - *outObject = inArchive.Detach(); - COM_TRY_END - return S_OK; -} - -STDAPI GetHandlerProperty(PROPID propID, PROPVARIANT *value) -{ - NWindows::NCOM::CPropVariant propVariant; - switch(propID) - { - case NArchive::kName: - propVariant = L"Chm"; - break; - case NArchive::kClassID: - { - if ((value->bstrVal = ::SysAllocStringByteLen( - (const char *)&CLSID_CChmHandler, sizeof(GUID))) != 0) - value->vt = VT_BSTR; - return S_OK; - } - case NArchive::kExtension: - propVariant = L"chm chi chq chw hxs hxi hxr hxq hxw lit"; - break; - case NArchive::kUpdate: - propVariant = false; - break; - case NArchive::kKeepName: - propVariant = false; - break; - case NArchive::kStartSignature: - { - const char sig[] = { 'I', 'T', 'S', 'F' }; - if ((value->bstrVal = ::SysAllocStringByteLen(sig, 4)) != 0) - value->vt = VT_BSTR; - return S_OK; - } - case NArchive::kAssociate: - { - propVariant = false; - break; - } - } - propVariant.Detach(value); - return S_OK; -} |