Delete deprecated thumbnailer (#8798)

Remove thumbs
This commit is contained in:
mosfet80
2023-03-17 11:06:21 +01:00
committed by GitHub
parent a290fe8ae1
commit 8bb8f76fac
24 changed files with 1220 additions and 3065 deletions

View File

@@ -0,0 +1,97 @@
project(ThumbnailProvider)
cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
add_definitions(-D_UNICODE -D_CRT_SECURE_NO_WARNINGS)
#=================================================
# zlib
#=================================================
find_package(ZLIB REQUIRED)
#=================================================
# FCStdThumbnail
#=================================================
include_directories(
.
../../../
${ZLIB_INCLUDE_DIR}
)
set(THUMBS_LIBS
Shlwapi.lib
${ZLIB_LIBRARIES}
)
set(zipios_DIR ../../..)
SET(zipios_SRCS
${zipios_DIR}/zipios++/backbuffer.h
#${zipios_DIR}/zipios++/basicentry.cpp
#${zipios_DIR}/zipios++/basicentry.h
${zipios_DIR}/zipios++/collcoll.cpp
${zipios_DIR}/zipios++/collcoll.h
${zipios_DIR}/zipios++/deflateoutputstreambuf.cpp
${zipios_DIR}/zipios++/deflateoutputstreambuf.h
#${zipios_DIR}/zipios++/dircoll.cpp
#${zipios_DIR}/zipios++/dircoll.h
#${zipios_DIR}/zipios++/directory.cpp
#${zipios_DIR}/zipios++/directory.h
${zipios_DIR}/zipios++/fcoll.cpp
${zipios_DIR}/zipios++/fcoll.h
${zipios_DIR}/zipios++/fcollexceptions.cpp
${zipios_DIR}/zipios++/fcollexceptions.h
${zipios_DIR}/zipios++/fileentry.cpp
${zipios_DIR}/zipios++/fileentry.h
${zipios_DIR}/zipios++/filepath.cpp
${zipios_DIR}/zipios++/filepath.h
${zipios_DIR}/zipios++/filterinputstreambuf.cpp
${zipios_DIR}/zipios++/filterinputstreambuf.h
${zipios_DIR}/zipios++/filteroutputstreambuf.cpp
${zipios_DIR}/zipios++/filteroutputstreambuf.h
${zipios_DIR}/zipios++/gzipoutputstream.cpp
${zipios_DIR}/zipios++/gzipoutputstream.h
${zipios_DIR}/zipios++/gzipoutputstreambuf.cpp
${zipios_DIR}/zipios++/gzipoutputstreambuf.h
${zipios_DIR}/zipios++/inflateinputstreambuf.cpp
${zipios_DIR}/zipios++/inflateinputstreambuf.h
${zipios_DIR}/zipios++/meta-iostreams.h
${zipios_DIR}/zipios++/outputstringstream.h
${zipios_DIR}/zipios++/simplesmartptr.h
${zipios_DIR}/zipios++/virtualseeker.h
${zipios_DIR}/zipios++/zipfile.cpp
${zipios_DIR}/zipios++/zipfile.h
${zipios_DIR}/zipios++/ziphead.cpp
${zipios_DIR}/zipios++/ziphead.h
${zipios_DIR}/zipios++/zipheadio.cpp
${zipios_DIR}/zipios++/zipheadio.h
${zipios_DIR}/zipios++/zipinputstream.cpp
${zipios_DIR}/zipios++/zipinputstream.h
${zipios_DIR}/zipios++/zipinputstreambuf.cpp
${zipios_DIR}/zipios++/zipinputstreambuf.h
${zipios_DIR}/zipios++/zipios_common.h
${zipios_DIR}/zipios++/zipios-config.h
${zipios_DIR}/zipios++/zipios_defs.h
${zipios_DIR}/zipios++/zipoutputstreambuf.cpp
${zipios_DIR}/zipios++/zipoutputstreambuf.h
${zipios_DIR}/zipios++/zipoutputstream.cpp
${zipios_DIR}/zipios++/zipoutputstream.h
)
SOURCE_GROUP("zipios++" FILES ${zipios_SRCS})
SET(THUMBS_SRCS
${zipios_SRCS}
ClassFactory.cpp
ClassFactory.h
Common.h
FCConfig.h
Main.cpp
ThumbnailProvider.cpp
ThumbnailProvider.def
ThumbnailProvider.h
)
add_library(FCStdThumbnail SHARED ${THUMBS_SRCS})
target_link_libraries(FCStdThumbnail ${THUMBS_LIBS})

View File

@@ -0,0 +1,109 @@
/***************************************************************************
* Copyright (c) 2011 Werner Mayer <wmayer@users.sourceforge.net> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#define INITGUID
#include "Common.h"
#include "ClassFactory.h"
STDAPI CThumbnailProvider_CreateInstance(REFIID riid, void** ppvObject);
CClassFactory::CClassFactory()
{
m_cRef = 1;
DllAddRef();
}
CClassFactory::~CClassFactory()
{
DllRelease();
}
STDMETHODIMP CClassFactory::QueryInterface(REFIID riid,
void** ppvObject)
{
static const QITAB qit[] =
{
QITABENT(CClassFactory, IClassFactory),
{0},
};
return QISearch(this, qit, riid, ppvObject);
}
STDMETHODIMP_(ULONG) CClassFactory::AddRef()
{
LONG cRef = InterlockedIncrement(&m_cRef);
return (ULONG)cRef;
}
STDMETHODIMP_(ULONG) CClassFactory::Release()
{
LONG cRef = InterlockedDecrement(&m_cRef);
if (0 == cRef)
delete this;
return (ULONG)cRef;
}
STDMETHODIMP CClassFactory::CreateInstance(IUnknown* punkOuter,
REFIID riid,
void** ppvObject)
{
if (NULL != punkOuter)
return CLASS_E_NOAGGREGATION;
return CThumbnailProvider_CreateInstance(riid, ppvObject);
}
STDMETHODIMP CClassFactory::LockServer(BOOL fLock)
{
return E_NOTIMPL;
}
STDAPI DllGetClassObject(REFCLSID rclsid,
REFIID riid,
void **ppv)
{
if (NULL == ppv)
return E_INVALIDARG;
if (!IsEqualCLSID(CLSID_SampleThumbnailProvider, rclsid))
return CLASS_E_CLASSNOTAVAILABLE;
CClassFactory *pcf;
HRESULT hr;
pcf = new CClassFactory();
if (NULL == pcf)
return E_OUTOFMEMORY;
hr = pcf->QueryInterface(riid, ppv);
pcf->Release();
return hr;
}

View File

@@ -0,0 +1,44 @@
/***************************************************************************
* Copyright (c) 2011 Werner Mayer <wmayer@users.sourceforge.net> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#pragma once
class CClassFactory : public IClassFactory
{
private:
LONG m_cRef;
~CClassFactory();
public:
CClassFactory();
// IUnknown methods
STDMETHOD(QueryInterface)(REFIID, void**);
STDMETHOD_(ULONG, AddRef)();
STDMETHOD_(ULONG, Release)();
// IClassFactory methods
STDMETHOD(CreateInstance)(IUnknown*, REFIID, void**);
STDMETHOD(LockServer)(BOOL);
};

View File

@@ -0,0 +1,39 @@
/***************************************************************************
* Copyright (c) 2011 Werner Mayer <wmayer@users.sourceforge.net> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#pragma once
#include <windows.h>
#include <shlobj.h>
#include <shlwapi.h>
#include <thumbcache.h>
#include <tchar.h>
#include <strsafe.h>
STDAPI_(ULONG) DllAddRef();
STDAPI_(ULONG) DllRelease();
STDAPI_(HINSTANCE) DllInstance();
// {4BBBEAB5-BE00-41f4-A209-FE838660B9B1}
#define szCLSID_SampleThumbnailProvider L"{4BBBEAB5-BE00-41f4-A209-FE838660B9B1}"
DEFINE_GUID(CLSID_SampleThumbnailProvider, 0x4bbbeab5, 0xbe00, 0x41f4, 0xa2, 0x9, 0xfe, 0x83, 0x86, 0x60, 0xb9, 0xb1);

View File

@@ -0,0 +1,174 @@
/***************************************************************************
* Copyright (c) 2004 Jürgen Riegel <juergen.riegel@web.de> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
/** \file FCConfig.h
* \brief Include all needed defines and macros
* Here all defines and macro switching is done for FreeCAD.
* Every used library has its own section to define the configuration.
* This file keeps the makefiles and project files cleaner.
*/
#ifndef FC_CONFIG_H
#define FC_CONFIG_H
//**************************************************************************
// switching the operating systems
// First check for *WIN64* since the *WIN32* are also set on 64-bit platforms
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__)
# ifndef FC_OS_WIN32
# define FC_OS_WIN32
# endif
# ifndef FC_OS_WIN64
# define FC_OS_WIN64
# endif
#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
# ifndef FC_OS_WIN32
# define FC_OS_WIN32
# endif
# if defined(__MINGW32__)
# if HAVE_CONFIG_H
# include <config.h>
# endif // HAVE_CONFIG_H
# endif
#elif defined(__MWERKS__) && defined(__INTEL__)
# ifndef FC_OS_WIN32
# define FC_OS_WIN32
# endif
#elif defined(__APPLE__)
# ifndef FC_OS_MACOSX
# define FC_OS_MACOSX
# endif
#elif defined(linux) || defined(__linux) || defined(__linux__) || defined(__GLIBC__)
# ifndef FC_OS_LINUX
# define FC_OS_LINUX
# endif
#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
# ifndef FC_OS_BSD
# define FC_OS_BSD
# endif
#elif defined(__CYGWIN__)
# ifndef FC_OS_CYGWIN
# define FC_OS_CYGWIN
// Avoid conflicts with Inventor
# define HAVE_INT8_T
# define HAVE_UINT8_T
# define HAVE_INT16_T
# define HAVE_UINT16_T
# define HAVE_INT32_T
# define HAVE_UINT32_T
# define HAVE_INT64_T
# define HAVE_UINT64_T
# define HAVE_INTPTR_T
# define HAVE_UINTPTR_T
#endif
#else
# error "FreeCAD is not ported to this OS yet. For help see www.freecadweb.org"
#endif
#ifdef FC_OS_WIN32
# define PATHSEP '\\'
#else
# define PATHSEP '/'
#endif
//**************************************************************************
// Standard types for Windows
#if defined(__MINGW32__)
// nothing specific here
#elif defined (FC_OS_WIN64) || defined (FC_OS_WIN32)
#ifndef HAVE_INT8_T
#define HAVE_INT8_T
typedef signed char int8_t;
#endif
#ifndef HAVE_UINT8_T
#define HAVE_UINT8_T
typedef unsigned char uint8_t;
#endif
#ifndef HAVE_INT16_T
#define HAVE_INT16_T
typedef short int16_t;
#endif
#ifndef HAVE_UINT16_T
#define HAVE_UINT16_T
typedef unsigned short uint16_t;
#endif
#ifndef HAVE_INT32_T
#define HAVE_INT32_T
typedef int int32_t;
#endif
#ifndef HAVE_UINT32_T
#define HAVE_UINT32_T
typedef unsigned int uint32_t;
#endif
#ifndef HAVE_INT64_T
#define HAVE_INT64_T
typedef __int64 int64_t;
#endif
#ifndef HAVE_UINT64_T
#define HAVE_UINT64_T
typedef unsigned __int64 uint64_t;
#endif
#endif
//**************************************************************************
// Windows import export DLL defines
#ifndef BaseExport
# define BaseExport
#endif
#ifndef GuiExport
# define GuiExport
#endif
#ifndef AppExport
# define AppExport
#endif
#ifndef DataExport
# define DataExport
#endif
//**************************************************************************
// point at which warnings of overly long specifiers disabled (needed for VC6)
#ifdef _MSC_VER
# pragma warning( disable : 4251 )
# pragma warning( disable : 4996 ) // suppress deprecated warning for e.g. open()
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__)
# pragma warning( disable : 4244 )
# pragma warning( disable : 4267 )
#endif
#endif
#endif //FC_CONFIG_H

View File

@@ -0,0 +1,195 @@
/***************************************************************************
* Copyright (c) 2011 Werner Mayer <wmayer@users.sourceforge.net> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#define INITGUID
#include "Common.h"
HINSTANCE g_hinstDll = NULL;
LONG g_cRef = 0;
typedef struct _REGKEY_DELETEKEY
{
HKEY hKey;
LPCWSTR lpszSubKey;
} REGKEY_DELETEKEY;
typedef struct _REGKEY_SUBKEY_AND_VALUE
{
HKEY hKey;
LPCWSTR lpszSubKey;
LPCWSTR lpszValue;
DWORD dwType;
DWORD_PTR dwData;
;
} REGKEY_SUBKEY_AND_VALUE;
STDAPI CreateRegistryKeys(REGKEY_SUBKEY_AND_VALUE* aKeys, ULONG cKeys);
STDAPI DeleteRegistryKeys(REGKEY_DELETEKEY* aKeys, ULONG cKeys);
BOOL APIENTRY DllMain(HINSTANCE hinstDll,
DWORD dwReason,
LPVOID pvReserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
g_hinstDll = hinstDll;
break;
}
return TRUE;
}
STDAPI_(HINSTANCE) DllInstance()
{
return g_hinstDll;
}
STDAPI DllCanUnloadNow()
{
return g_cRef ? S_FALSE : S_OK;
}
STDAPI_(ULONG) DllAddRef()
{
LONG cRef = InterlockedIncrement(&g_cRef);
return cRef;
}
STDAPI_(ULONG) DllRelease()
{
LONG cRef = InterlockedDecrement(&g_cRef);
if (0 > cRef)
cRef = 0;
return cRef;
}
STDAPI DllRegisterServer()
{
// This tells the shell to invalidate the thumbnail cache. This is important because any .recipe files
// viewed before registering this handler would otherwise show cached blank thumbnails.
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);
WCHAR szModule[MAX_PATH];
ZeroMemory(szModule, sizeof(szModule));
GetModuleFileName(g_hinstDll, szModule, ARRAYSIZE(szModule));
//uncomment the following
REGKEY_SUBKEY_AND_VALUE keys[] = {
{HKEY_CLASSES_ROOT, L"CLSID\\" szCLSID_SampleThumbnailProvider, NULL, REG_SZ, (DWORD_PTR)L"FCStd Thumbnail Provider"},
#if 1
//{HKEY_CLASSES_ROOT, L"CLSID\\DisableProcessIsolation", NULL, REG_DWORD, (DWORD) 1},
{HKEY_CLASSES_ROOT, L"CLSID\\" szCLSID_SampleThumbnailProvider, L"DisableProcessIsolation", REG_DWORD, (DWORD) 1},
#endif
{HKEY_CLASSES_ROOT, L"CLSID\\" szCLSID_SampleThumbnailProvider L"\\InprocServer32", NULL, REG_SZ, (DWORD_PTR)szModule},
{HKEY_CLASSES_ROOT, L"CLSID\\" szCLSID_SampleThumbnailProvider L"\\InprocServer32", L"ThreadingModel", REG_SZ, (DWORD_PTR)L"Apartment"},
//{HKEY_CLASSES_ROOT, L".FCStd\\shellex", L"Trick only here to create shellex when not existing",REG_DWORD, 1},
{HKEY_CLASSES_ROOT, L".FCStd\\shellex\\{E357FCCD-A995-4576-B01F-234630154E96}", NULL, REG_SZ, (DWORD_PTR)szCLSID_SampleThumbnailProvider},
{HKEY_CLASSES_ROOT, L".FCBak\\shellex\\{E357FCCD-A995-4576-B01F-234630154E96}", NULL, REG_SZ, (DWORD_PTR)szCLSID_SampleThumbnailProvider}
};
return CreateRegistryKeys(keys, ARRAYSIZE(keys));
}
STDAPI DllUnregisterServer()
{
REGKEY_DELETEKEY keys[] = {{HKEY_CLASSES_ROOT, L"CLSID\\" szCLSID_SampleThumbnailProvider}};
return DeleteRegistryKeys(keys, ARRAYSIZE(keys));
}
STDAPI CreateRegistryKey(REGKEY_SUBKEY_AND_VALUE* pKey)
{
size_t cbData;
LPVOID pvData = NULL;
HRESULT hr = S_OK;
switch(pKey->dwType)
{
case REG_DWORD:
pvData = (LPVOID)(LPDWORD)&pKey->dwData;
cbData = sizeof(DWORD);
break;
case REG_SZ:
case REG_EXPAND_SZ:
hr = StringCbLength((LPCWSTR)pKey->dwData, STRSAFE_MAX_CCH, &cbData);
if (SUCCEEDED(hr))
{
pvData = (LPVOID)(LPCWSTR)pKey->dwData;
cbData += sizeof(WCHAR);
}
break;
default:
hr = E_INVALIDARG;
}
if (SUCCEEDED(hr))
{
LSTATUS status = SHSetValue(pKey->hKey, pKey->lpszSubKey, pKey->lpszValue, pKey->dwType, pvData, (DWORD)cbData);
if (NOERROR != status)
{
hr = HRESULT_FROM_WIN32(status);
}
}
return hr;
}
STDAPI CreateRegistryKeys(REGKEY_SUBKEY_AND_VALUE* aKeys, ULONG cKeys)
{
HRESULT hr = S_OK;
for (ULONG iKey = 0; iKey < cKeys; iKey++)
{
HRESULT hrTemp = CreateRegistryKey(&aKeys[iKey]);
if (FAILED(hrTemp))
{
hr = hrTemp;
}
}
return hr;
}
STDAPI DeleteRegistryKeys(REGKEY_DELETEKEY* aKeys, ULONG cKeys)
{
HRESULT hr = S_OK;
LSTATUS status;
for (ULONG iKey = 0; iKey < cKeys; iKey++)
{
status = RegDeleteTree(aKeys[iKey].hKey, aKeys[iKey].lpszSubKey);
if (NOERROR != status)
{
hr = HRESULT_FROM_WIN32(status);
}
}
return hr;
}

View File

@@ -0,0 +1,325 @@
/***************************************************************************
* Copyright (c) 2011 Werner Mayer <wmayer@users.sourceforge.net> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#pragma warning(disable : 4995)
#include "Common.h"
#include "ThumbnailProvider.h"
#include <iostream>
#include <zipios++/zipinputstream.h>
#include <zipios++/zipfile.h>
#include <wincodec.h>
#include <wincodecsdk.h>
#pragma comment(lib, "WindowsCodecs.lib")
// The functions
// * CreateStreamOnResource
// * LoadBitmapFromStream
// * CreateHBITMAP
// are taken from https://faithlife.codes/blog/2008/09/displaying_a_splash_screen_with_c_part_i/
// The code is released under an MIT-style license
// Creates a stream object initialized with the data from an executable resource.
IStream* CreateStreamOnResource(void* buffer, size_t length)
{
// initialize return value
IStream* ipStream = NULL;
// allocate memory to hold the resource data
HGLOBAL hgblResourceData = GlobalAlloc(GMEM_MOVEABLE, length);
if (hgblResourceData == NULL)
goto Return;
// get a pointer to the allocated memory
LPVOID pvResourceData = GlobalLock(hgblResourceData);
if (pvResourceData == NULL)
goto FreeData;
// copy the data from the resource to the new memory block
CopyMemory(pvResourceData, buffer, length);
GlobalUnlock(hgblResourceData);
// create a stream on the HGLOBAL containing the data
if (SUCCEEDED(CreateStreamOnHGlobal(hgblResourceData, TRUE, &ipStream)))
goto Return;
FreeData:
// couldn't create stream; free the memory
GlobalFree(hgblResourceData);
Return:
// no need to unlock or free the resource
return ipStream;
}
IWICBitmapSource* LoadBitmapFromStream(IStream* ipImageStream)
{
// initialize return value
IWICBitmapSource* ipBitmap = NULL;
// load WIC's PNG decoder
IWICBitmapDecoder* ipDecoder = NULL;
if (FAILED(CoCreateInstance(CLSID_WICPngDecoder, NULL, CLSCTX_INPROC_SERVER, __uuidof(ipDecoder), reinterpret_cast<void**>(&ipDecoder))))
goto Return;
// load the PNG
if (FAILED(ipDecoder->Initialize(ipImageStream, WICDecodeMetadataCacheOnLoad)))
goto ReleaseDecoder;
// check for the presence of the first frame in the bitmap
UINT nFrameCount = 0;
if (FAILED(ipDecoder->GetFrameCount(&nFrameCount)) || nFrameCount != 1)
goto ReleaseDecoder;
// load the first frame (i.e., the image)
IWICBitmapFrameDecode* ipFrame = NULL;
if (FAILED(ipDecoder->GetFrame(0, &ipFrame)))
goto ReleaseDecoder;
// convert the image to 32bpp BGRA format with pre-multiplied alpha
// (it may not be stored in that format natively in the PNG resource,
// but we need this format to create the DIB to use on-screen)
WICConvertBitmapSource(GUID_WICPixelFormat32bppPBGRA, ipFrame, &ipBitmap);
ipFrame->Release();
ReleaseDecoder:
ipDecoder->Release();
Return:
return ipBitmap;
}
HBITMAP CreateHBITMAP(IWICBitmapSource* ipBitmap)
{
// initialize return value
HBITMAP hbmp = NULL;
// get image attributes and check for valid image
UINT width = 0;
UINT height = 0;
if (FAILED(ipBitmap->GetSize(&width, &height)) || width == 0 || height == 0)
goto Return;
// prepare structure giving bitmap information (negative height indicates a top-down DIB)
BITMAPINFO bminfo;
ZeroMemory(&bminfo, sizeof(bminfo));
bminfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bminfo.bmiHeader.biWidth = width;
bminfo.bmiHeader.biHeight = -((LONG)height);
bminfo.bmiHeader.biPlanes = 1;
bminfo.bmiHeader.biBitCount = 32;
bminfo.bmiHeader.biCompression = BI_RGB;
// create a DIB section that can hold the image
void* pvImageBits = NULL;
HDC hdcScreen = GetDC(NULL);
hbmp = CreateDIBSection(hdcScreen, &bminfo, DIB_RGB_COLORS, &pvImageBits, NULL, 0);
ReleaseDC(NULL, hdcScreen);
if (hbmp == NULL)
goto Return;
// extract the image into the HBITMAP
const UINT cbStride = width * 4;
const UINT cbImage = cbStride * height;
if (FAILED(ipBitmap->CopyPixels(NULL, cbStride, cbImage, static_cast<BYTE*>(pvImageBits))))
{
// couldn't extract image; delete HBITMAP
DeleteObject(hbmp);
hbmp = NULL;
}
Return:
return hbmp;
}
CThumbnailProvider::CThumbnailProvider()
{
DllAddRef();
m_cRef = 1;
m_pSite = NULL;
}
CThumbnailProvider::~CThumbnailProvider()
{
if (m_pSite)
{
m_pSite->Release();
m_pSite = NULL;
}
DllRelease();
}
STDMETHODIMP CThumbnailProvider::QueryInterface(REFIID riid,
void** ppvObject)
{
static const QITAB qit[] =
{
//QITABENT(CThumbnailProvider, IInitializeWithStream),
QITABENT(CThumbnailProvider, IInitializeWithFile),
QITABENT(CThumbnailProvider, IThumbnailProvider),
QITABENT(CThumbnailProvider, IObjectWithSite),
{0},
};
return QISearch(this, qit, riid, ppvObject);
}
STDMETHODIMP_(ULONG) CThumbnailProvider::AddRef()
{
LONG cRef = InterlockedIncrement(&m_cRef);
return (ULONG)cRef;
}
STDMETHODIMP_(ULONG) CThumbnailProvider::Release()
{
LONG cRef = InterlockedDecrement(&m_cRef);
if (0 == cRef)
delete this;
return (ULONG)cRef;
}
STDMETHODIMP CThumbnailProvider::Initialize(IStream *pstm,
DWORD grfMode)
{
return S_OK;
}
STDMETHODIMP CThumbnailProvider::Initialize(LPCWSTR pszFilePath,
DWORD grfMode)
{
wcscpy_s(m_szFile, pszFilePath);
return S_OK;
}
bool CThumbnailProvider::CheckZip() const
{
// open file and check magic number (PK\x03\x04)
std::ifstream zip(m_szFile, std::ios::in | std::ios::binary);
unsigned char pk[4] = {0x50, 0x4b, 0x03, 0x04};
for (int i=0; i<4; i++) {
unsigned char c;
if (!zip.get((char&)c))
return false;
if (c != pk[i])
return false;
}
return true;
}
STDMETHODIMP CThumbnailProvider::GetThumbnail(UINT cx,
HBITMAP *phbmp,
WTS_ALPHATYPE *pdwAlpha)
{
try {
// first make sure we have a zip file but that might still be invalid
if (!CheckZip())
return NOERROR;
std::ifstream file(m_szFile, std::ios::in | std::ios::binary);
zipios::ZipInputStream zipstream(file);
zipios::ConstEntryPointer entry;
entry = zipstream.getNextEntry();
while (entry->isValid() && entry->getName() != "thumbnails/Thumbnail.png")
entry = zipstream.getNextEntry();
if (entry && entry->isValid()) {
// ok, we have found the file. Now, read it in byte for byte
std::istream *str = &zipstream;
std::vector<unsigned char> content;
unsigned char c;
while (str->get((char&)c)) {
content.push_back(c);
}
// pass the memory buffer to an IStream to create the bitmap handle
IStream* stream = CreateStreamOnResource(&(content[0]), content.size());
if (stream) {
IWICBitmapSource* bmpSrc = LoadBitmapFromStream(stream);
stream->Release();
if (bmpSrc) {
*phbmp = CreateHBITMAP(bmpSrc);
*pdwAlpha = WTSAT_UNKNOWN;
bmpSrc->Release();
}
}
}
}
catch(...) {
// This may happen if the file is corrupted, not a valid zip file
// or whatever could go wrong
}
return NOERROR;
}
STDMETHODIMP CThumbnailProvider::GetSite(REFIID riid,
void** ppvSite)
{
if (m_pSite)
{
return m_pSite->QueryInterface(riid, ppvSite);
}
return E_NOINTERFACE;
}
STDMETHODIMP CThumbnailProvider::SetSite(IUnknown* pUnkSite)
{
if (m_pSite)
{
m_pSite->Release();
m_pSite = NULL;
}
m_pSite = pUnkSite;
if (m_pSite)
{
m_pSite->AddRef();
}
return S_OK;
}
STDAPI CThumbnailProvider_CreateInstance(REFIID riid, void** ppvObject)
{
*ppvObject = NULL;
CThumbnailProvider* ptp = new CThumbnailProvider();
if (!ptp)
{
return E_OUTOFMEMORY;
}
HRESULT hr = ptp->QueryInterface(riid, ppvObject);
ptp->Release();
return hr;
}

View File

@@ -0,0 +1,7 @@
LIBRARY "FCStdThumbnail"
EXPORTS
DllRegisterServer PRIVATE
DllUnregisterServer PRIVATE
DllGetClassObject PRIVATE
DllCanUnloadNow PRIVATE

View File

@@ -0,0 +1,56 @@
/***************************************************************************
* Copyright (c) 2011 Werner Mayer <wmayer@users.sourceforge.net> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#pragma once
//class CThumbnailProvider : public IThumbnailProvider, IObjectWithSite, IInitializeWithStream
class CThumbnailProvider : public IThumbnailProvider, IObjectWithSite, IInitializeWithFile
{
private:
LONG m_cRef;
IUnknown* m_pSite;
TCHAR m_szFile[1000];
~CThumbnailProvider();
bool CheckZip() const;
public:
CThumbnailProvider();
// IUnknown methods
STDMETHOD(QueryInterface)(REFIID, void**);
STDMETHOD_(ULONG, AddRef)();
STDMETHOD_(ULONG, Release)();
// IInitializeWithSteam methods
STDMETHOD(Initialize)(IStream*, DWORD);
// IInitializeWithFile methods
STDMETHOD(Initialize)(LPCWSTR , DWORD);
// IThumbnailProvider methods
STDMETHOD(GetThumbnail)(UINT, HBITMAP*, WTS_ALPHATYPE*);
// IObjectWithSite methods
STDMETHOD(GetSite)(REFIID, void**);
STDMETHOD(SetSite)(IUnknown*);
};

View File

@@ -0,0 +1,31 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31410.357
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FCStdThumbnail", "ThumbnailProvider.vcxproj", "{B4F22D8C-736E-46BF-85FB-259EF73EA0FC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B4F22D8C-736E-46BF-85FB-259EF73EA0FC}.Debug|x64.ActiveCfg = Debug|x64
{B4F22D8C-736E-46BF-85FB-259EF73EA0FC}.Debug|x64.Build.0 = Debug|x64
{B4F22D8C-736E-46BF-85FB-259EF73EA0FC}.Debug|x86.ActiveCfg = Debug|Win32
{B4F22D8C-736E-46BF-85FB-259EF73EA0FC}.Debug|x86.Build.0 = Debug|Win32
{B4F22D8C-736E-46BF-85FB-259EF73EA0FC}.Release|x64.ActiveCfg = Release|x64
{B4F22D8C-736E-46BF-85FB-259EF73EA0FC}.Release|x64.Build.0 = Release|x64
{B4F22D8C-736E-46BF-85FB-259EF73EA0FC}.Release|x86.ActiveCfg = Release|Win32
{B4F22D8C-736E-46BF-85FB-259EF73EA0FC}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7336F399-F2B2-4F65-A701-52024EB9A7A0}
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,245 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>FCStdThumbnail</ProjectName>
<ProjectGuid>{B4F22D8C-736E-46BF-85FB-259EF73EA0FC}</ProjectGuid>
<RootNamespace>ThumbnailProvider</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>16.0.31401.40</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;THUMBNAILPROVIDER_EXPORTS;FreeCADBase_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;comctl32.lib;propsys.lib;zlibstatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>ThumbnailProvider.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;THUMBNAILPROVIDER_EXPORTS;FreeCADBase_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;comctl32.lib;propsys.lib;zlibstatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>ThumbnailProvider.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>.;..\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;THUMBNAILPROVIDER_EXPORTS;FreeCADBase_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;comctl32.lib;propsys.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>ThumbnailProvider.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>.;..\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;THUMBNAILPROVIDER_EXPORTS;FreeCADBase_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;comctl32.lib;propsys.lib;zlibstatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>ThumbnailProvider.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\zipios++\basicentry.cpp" />
<ClCompile Include="..\..\..\zipios++\collcoll.cpp" />
<ClCompile Include="..\..\..\zipios++\deflateoutputstreambuf.cpp" />
<ClCompile Include="..\..\..\zipios++\dircoll.cpp" />
<ClCompile Include="..\..\..\zipios++\directory.cpp" />
<ClCompile Include="..\..\..\zipios++\fcoll.cpp" />
<ClCompile Include="..\..\..\zipios++\fcollexceptions.cpp" />
<ClCompile Include="..\..\..\zipios++\fileentry.cpp" />
<ClCompile Include="..\..\..\zipios++\filepath.cpp" />
<ClCompile Include="..\..\..\zipios++\filterinputstreambuf.cpp" />
<ClCompile Include="..\..\..\zipios++\filteroutputstreambuf.cpp" />
<ClCompile Include="..\..\..\zipios++\gzipoutputstream.cpp" />
<ClCompile Include="..\..\..\zipios++\gzipoutputstreambuf.cpp" />
<ClCompile Include="..\..\..\zipios++\inflateinputstreambuf.cpp" />
<ClCompile Include="..\..\..\zipios++\zipfile.cpp" />
<ClCompile Include="..\..\..\zipios++\ziphead.cpp" />
<ClCompile Include="..\..\..\zipios++\zipheadio.cpp" />
<ClCompile Include="..\..\..\zipios++\zipinputstream.cpp" />
<ClCompile Include="..\..\..\zipios++\zipinputstreambuf.cpp" />
<ClCompile Include="..\..\..\zipios++\zipoutputstream.cpp" />
<ClCompile Include="..\..\..\zipios++\zipoutputstreambuf.cpp" />
<ClCompile Include="ClassFactory.cpp" />
<ClCompile Include="Main.cpp" />
<ClCompile Include="ThumbnailProvider.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="ThumbnailProvider.def" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\zipios++\backbuffer.h" />
<ClInclude Include="..\..\..\zipios++\basicentry.h" />
<ClInclude Include="..\..\..\zipios++\collcoll.h" />
<ClInclude Include="..\..\..\zipios++\deflateoutputstreambuf.h" />
<ClInclude Include="..\..\..\zipios++\dircoll.h" />
<ClInclude Include="..\..\..\zipios++\directory.h" />
<ClInclude Include="..\..\..\zipios++\fcoll.h" />
<ClInclude Include="..\..\..\zipios++\fcollexceptions.h" />
<ClInclude Include="..\..\..\zipios++\fileentry.h" />
<ClInclude Include="..\..\..\zipios++\filepath.h" />
<ClInclude Include="..\..\..\zipios++\filterinputstreambuf.h" />
<ClInclude Include="..\..\..\zipios++\filteroutputstreambuf.h" />
<ClInclude Include="..\..\..\zipios++\gzipoutputstream.h" />
<ClInclude Include="..\..\..\zipios++\gzipoutputstreambuf.h" />
<ClInclude Include="..\..\..\zipios++\inflateinputstreambuf.h" />
<ClInclude Include="..\..\..\zipios++\meta-iostreams.h" />
<ClInclude Include="..\..\..\zipios++\outputstringstream.h" />
<ClInclude Include="..\..\..\zipios++\simplesmartptr.h" />
<ClInclude Include="..\..\..\zipios++\virtualseeker.h" />
<ClInclude Include="..\..\..\zipios++\zipfile.h" />
<ClInclude Include="..\..\..\zipios++\ziphead.h" />
<ClInclude Include="..\..\..\zipios++\zipheadio.h" />
<ClInclude Include="..\..\..\zipios++\zipinputstream.h" />
<ClInclude Include="..\..\..\zipios++\zipinputstreambuf.h" />
<ClInclude Include="..\..\..\zipios++\zipios-config.h" />
<ClInclude Include="..\..\..\zipios++\zipios_common.h" />
<ClInclude Include="..\..\..\zipios++\zipios_defs.h" />
<ClInclude Include="..\..\..\zipios++\zipoutputstream.h" />
<ClInclude Include="..\..\..\zipios++\zipoutputstreambuf.h" />
<ClInclude Include="ClassFactory.h" />
<ClInclude Include="Common.h" />
<ClInclude Include="ThumbnailProvider.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>