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

@@ -1,109 +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;
/***************************************************************************
* 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

@@ -1,44 +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);
};
/***************************************************************************
* 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

@@ -1,39 +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);
/***************************************************************************
* 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

@@ -1,174 +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
/***************************************************************************
* 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

@@ -1,195 +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;
/***************************************************************************
* 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

@@ -1,325 +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;
}
/***************************************************************************
* 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

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

View File

@@ -1,56 +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*);
/***************************************************************************
* 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

@@ -1,31 +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

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

@@ -1,245 +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>
<?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>

View File

@@ -1,308 +0,0 @@
/***************************************************************************
* Copyright (c) 2008 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 *
* *
***************************************************************************/
#include "stdafx.h"
#include "resource.h"
#include "ThumbFCStd_i.h"
#include <initguid.h>
#include "ThumbFCStd_i.c"
#include "FCStdExtractor.h"
#include <shlobj.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;
}
CComModule _Module;
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_FCStdExtractor, CFCStdExtractor)
END_OBJECT_MAP()
/////////////////////////////////////////////////////////////////////////////
// DLL Entry Point
extern "C"
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
{
if (dwReason == DLL_PROCESS_ATTACH) {
_Module.Init(ObjectMap, hInstance, &LIBID_THUMBFCSTDLib);
DisableThreadLibraryCalls(hInstance);
}
else if (dwReason == DLL_PROCESS_DETACH)
_Module.Term();
return TRUE; // ok
}
/////////////////////////////////////////////////////////////////////////////
// Used to determine whether the DLL can be unloaded by OLE
STDAPI DllCanUnloadNow(void)
{
return (_Module.GetLockCount()==0) ? S_OK : S_FALSE;
}
/////////////////////////////////////////////////////////////////////////////
// Returns a class factory to create an object of the requested type
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
return _Module.GetClassObject(rclsid, riid, ppv);
}
/////////////////////////////////////////////////////////////////////////////
// DllRegisterServer - Adds entries to the system registry
STDAPI DllRegisterServer(void)
{
// registers object, typelib and all interfaces in typelib
return _Module.RegisterServer(TRUE);
}
/////////////////////////////////////////////////////////////////////////////
// DllUnregisterServer - Removes entries from the system registry
STDAPI DllUnregisterServer(void)
{
return _Module.UnregisterServer(TRUE);
}
/////////////////////////////////////////////////////////////////////////////
// CFCStdExtractor
HRESULT CFCStdExtractor::GetLocation(LPWSTR pszPathBuffer,
DWORD cchMax, DWORD *pdwPriority,
const SIZE *prgSize, DWORD dwRecClrDepth,
DWORD *pdwFlags)
{
m_bmSize = *prgSize;
if (*pdwFlags & IEIFLAG_ASYNC)
return E_PENDING;
return NOERROR;
}
HRESULT CFCStdExtractor::Load(LPCOLESTR wszFile, DWORD dwMode)
{
USES_CONVERSION;
_tcscpy(m_szFile, OLE2T((WCHAR*)wszFile));
return S_OK;
};
bool CFCStdExtractor::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;
}
// IExtractImage::Extract
HRESULT CFCStdExtractor::Extract(HBITMAP* phBmpThumbnail)
{
try {
// first make sure we have a zip file but that might still be invalid
if (!CheckZip())
return NOERROR;
zipios::ZipFile file(m_szFile);
zipios::ConstEntries files = file.entries();
// search for a special file name in the project file
zipios::ConstEntryPointer entry = file.getEntry("thumbnails/Thumbnail.png");
if (entry && entry->isValid()) {
// ok, we have found the file. Now, read it in byte for byte
std::istream *str = file.getInputStream(entry);
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) {
m_hPreview = CreateHBITMAP(bmpSrc);
*phBmpThumbnail = m_hPreview;
bmpSrc->Release();
}
}
}
}
catch(...) {
// This may happen if the file is corrupted, not a valid zip file
// or whatever could go wrong
}
return NOERROR;
}
HRESULT CFCStdExtractor::GetDateStamp(FILETIME *pDateStamp)
{
FILETIME ftCreationTime,ftLastAccessTime,ftLastWriteTime;
// open the file and get last write time
HANDLE hFile = CreateFile(m_szFile,GENERIC_READ,FILE_SHARE_READ,NULL,
OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
if(!hFile)
return E_FAIL;
GetFileTime(hFile,&ftCreationTime,&ftLastAccessTime,&ftLastWriteTime);
CloseHandle(hFile);
*pDateStamp = ftLastWriteTime;
return NOERROR;
}

View File

@@ -1,99 +0,0 @@
/***************************************************************************
* Copyright (c) 2008 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 *
* *
***************************************************************************/
#ifndef FC_STD_EXTRACTOR_H
#define FC_STD_EXTRACTOR_H
#include "resource.h" // main symbols
#include <shlguid.h>
#include <AtlCom.h>
#include <shlobj.h>
#include "IExtractImage.h"
/////////////////////////////////////////////////////////////////////////////
// CFCStdExtractor
class ATL_NO_VTABLE CFCStdExtractor :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CFCStdExtractor, &CLSID_FCStdExtractor>,
public IPersistFile,
public IExtractImage2
{
public:
CFCStdExtractor()
{
}
DECLARE_REGISTRY_RESOURCEID(IDR_THUMBSCB)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(CFCStdExtractor)
COM_INTERFACE_ENTRY(IPersistFile)
COM_INTERFACE_ENTRY(IExtractImage)
COM_INTERFACE_ENTRY(IExtractImage2)
END_COM_MAP()
// IExtractImage
public:
STDMETHOD(GetLocation)(LPWSTR pszPathBuffer,
DWORD cchMax,
DWORD *pdwPriority,
const SIZE *prgSize,
DWORD dwRecClrDepth,
DWORD *pdwFlags);
STDMETHOD(Extract)(HBITMAP*);
// IExtractImage2
STDMETHOD(GetDateStamp)(FILETIME *pDateStamp);
// IPersistFile
STDMETHOD(Load)(LPCOLESTR wszFile, DWORD dwMode);
STDMETHOD(GetClassID)(LPCLSID clsid)
{ MessageBox(0,"GetClassID",0,0);
return E_NOTIMPL; }
STDMETHOD(IsDirty)(VOID)
{ MessageBox(0,"IsDirty",0,0);
return E_NOTIMPL; }
STDMETHOD(Save)(LPCOLESTR, BOOL)
{ MessageBox(0,"Save",0,0);
return E_NOTIMPL; }
STDMETHOD(SaveCompleted)(LPCOLESTR)
{ MessageBox(0,"SaveCompleted",0,0);
return E_NOTIMPL; }
STDMETHOD(GetCurFile)(LPOLESTR FAR*)
{ MessageBox(0,"GetCurFile",0,0);
return E_NOTIMPL; }
private:
bool CheckZip() const;
SIZE m_bmSize;
HBITMAP m_hPreview;
TCHAR m_szFile[1000];
};
#endif //FC_STD_EXTRACTOR_H

View File

@@ -1,11 +0,0 @@
; FCThumbs.def : Declares the module parameters for the DLL.
LIBRARY "FCThumbs"
DESCRIPTION 'ThumbScb Windows Dynamic Link Library'
EXPORTS
; Explicit exports can go here
DllCanUnloadNow PRIVATE
DllGetClassObject PRIVATE
DllRegisterServer PRIVATE
DllUnregisterServer PRIVATE

View File

@@ -1,392 +0,0 @@
# Microsoft Developer Studio Project File - Name="FCThumbs" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=FCThumbs - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "FCThumbs.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "FCThumbs.mak" CFG="FCThumbs - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "FCThumbs - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "FCThumbs - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "FCThumbs - Win32 Release"
# PROP BASE Use_MFC 2
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 2
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../" /I "../../3rdParty/CxImage/zlib" /I "../../3rdParty/CxImage" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /D "FCBase" /Yu"stdafx.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /D "NDEBUG" /win32
# ADD BASE RSC /l 0x407 /d "NDEBUG" /d "_AFXDLL"
# ADD RSC /l 0x407 /d "NDEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 qt-mt323.lib gdi32.lib /nologo /subsystem:windows /dll /machine:I386
# Begin Custom Build - Performing Registration on $(InputPath)
OutDir=.\Release
TargetPath=.\Release\FCThumbs.dll
InputPath=.\Release\FCThumbs.dll
SOURCE="$(InputPath)"
"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
# End Custom Build
!ELSEIF "$(CFG)" == "FCThumbs - Win32 Debug"
# PROP BASE Use_MFC 2
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 2
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../3rdParty/CxImage/zlib" /I "../../3rdParty/CxImage" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /D "FCBase" /Yu"stdafx.h" /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /D "_DEBUG" /win32
# ADD BASE RSC /l 0x407 /d "_DEBUG" /d "_AFXDLL"
# ADD RSC /l 0x407 /d "_DEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 gdi32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# Begin Custom Build - Performing Registration on $(InputPath)
OutDir=.\Debug
TargetPath=.\Debug\FCThumbs.dll
InputPath=.\Debug\FCThumbs.dll
SOURCE="$(InputPath)"
"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
# End Custom Build
!ENDIF
# Begin Target
# Name "FCThumbs - Win32 Release"
# Name "FCThumbs - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\FCStdExtractor.cpp
# End Source File
# Begin Source File
SOURCE=.\FCThumbs.def
# End Source File
# Begin Source File
SOURCE=.\FCThumbs.rc
# End Source File
# Begin Source File
SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"stdafx.h"
# End Source File
# Begin Source File
SOURCE=.\ThumbFCStd.idl
# ADD MTL /tlb "./ThumbFCStd.tlb" /h "ThumbFCStd_i.h" /iid "ThumbFCStd_i.c" /Oicf
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\FCStdExtractor.h
# End Source File
# Begin Source File
SOURCE=.\IExtractImage.h
# End Source File
# Begin Source File
SOURCE=.\Resource.h
# End Source File
# Begin Source File
SOURCE=.\StdAfx.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\FCThumbs.rgs
# End Source File
# End Group
# Begin Group "zipios"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Base\zipios\backbuffer.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\basicentry.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\basicentry.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\collcoll.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\collcoll.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\deflateoutputstreambuf.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\deflateoutputstreambuf.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\dircoll.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\dircoll.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\directory.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\directory.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\fcoll.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\fcoll.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\fcollexceptions.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\fcollexceptions.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\fileentry.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\fileentry.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\filepath.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\filepath.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\filterinputstreambuf.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\filterinputstreambuf.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\filteroutputstreambuf.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\filteroutputstreambuf.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\gzipoutputstream.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\gzipoutputstream.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\gzipoutputstreambuf.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\gzipoutputstreambuf.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\inflateinputstreambuf.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\inflateinputstreambuf.h
# End Source File
# Begin Source File
SOURCE="..\..\Base\zipios\meta-iostreams.h"
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\outputstringstream.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\simplesmartptr.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\virtualseeker.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\zipfile.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\zipfile.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\ziphead.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\ziphead.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\zipheadio.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\zipheadio.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\zipinputstream.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\zipinputstream.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\zipinputstreambuf.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\zipinputstreambuf.h
# End Source File
# Begin Source File
SOURCE="..\..\Base\zipios\zipios-config.h"
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\zipios_common.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\zipios_defs.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\zipoutputstream.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\zipoutputstream.h
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\zipoutputstreambuf.cpp
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Base\zipios\zipoutputstreambuf.h
# End Source File
# End Group
# End Target
# End Project

View File

@@ -1,160 +0,0 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "ThumbFCStd DLL\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "ThumbFCStd\0"
VALUE "LegalCopyright", "Copyright (C) 2002\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "ThumbFCStd.DLL\0"
VALUE "ProductName", "ThumbFCStd Dynamic Link Library\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Greek resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ELL)
#ifdef _WIN32
LANGUAGE LANG_GREEK, SUBLANG_DEFAULT
#pragma code_page(1253)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
"#define _AFX_NO_OLE_RESOURCES\r\n"
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
"\r\n"
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
"#ifdef _WIN32\r\n"
"LANGUAGE 9, 1\r\n"
"#pragma code_page(1252)\r\n"
"#endif //_WIN32\r\n"
"#include ""res\\FCThumbs.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
"#include ""afxres.rc"" // Standard components\r\n"
"#endif\r\n"
"1 TYPELIB ""ThumbFCStd.tlb""\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// REGISTRY
//
IDR_THUMBSCB REGISTRY DISCARDABLE "FCThumbs.rgs"
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDR_FCSTD_TYPE "\nFCStd\nFCStd\nFCStd Files (*.FCStd)\n.FCSTD\nFCStd.Document\nFCStd Document"
END
#endif // Greek resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif //_WIN32
#include "afxres.rc" // Standard components
#endif
1 TYPELIB "ThumbFCStd.tlb"
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -1,35 +0,0 @@
HKCR
{
ThumbFCThumbs.Extractor.1 = s 'FCThumbs Thumbnail Extractor Class'
{
CLSID = s '{287CC8A6-B380-4765-8EB1-AFC82D90DF68}'
}
ThumbFCThumbs.Extractor = s 'FCThumbs Thumbnail Extractor Class'
{
CLSID = s '{287CC8A6-B380-4765-8EB1-AFC82D90DF68}'
CurVer = s 'ThumbFCThumbs.Extractor.1'
}
NoRemove CLSID
{
ForceRemove {287CC8A6-B380-4765-8EB1-AFC82D90DF68} = s 'Extractor Class'
{
ProgID = s 'ThumbFCThumbs.Extractor.1'
VersionIndependentProgID = s 'ThumbFCThumbs.Extractor'
ForceRemove 'Programmable'
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
}
'TypeLib' = s '{1C52B730-EC75-423F-A300-4A42CDF1C985}'
}
}
NoRemove .FCStd
{
shellex
{
{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1} = s '{287CC8A6-B380-4765-8EB1-AFC82D90DF68}'
}
}
}

View File

@@ -1,43 +0,0 @@
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}") = "FCThumbs", "FCThumbs.vcxproj", "{5E406625-AFD6-4849-875F-C5740E98A28E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
Unicode Debug|Win32 = Unicode Debug|Win32
Unicode Debug|x64 = Unicode Debug|x64
Unicode Release|Win32 = Unicode Release|Win32
Unicode Release|x64 = Unicode Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5E406625-AFD6-4849-875F-C5740E98A28E}.Debug|Win32.ActiveCfg = Debug|Win32
{5E406625-AFD6-4849-875F-C5740E98A28E}.Debug|Win32.Build.0 = Debug|Win32
{5E406625-AFD6-4849-875F-C5740E98A28E}.Debug|x64.ActiveCfg = Debug|x64
{5E406625-AFD6-4849-875F-C5740E98A28E}.Debug|x64.Build.0 = Debug|x64
{5E406625-AFD6-4849-875F-C5740E98A28E}.Release|Win32.ActiveCfg = Release|Win32
{5E406625-AFD6-4849-875F-C5740E98A28E}.Release|Win32.Build.0 = Release|Win32
{5E406625-AFD6-4849-875F-C5740E98A28E}.Release|x64.ActiveCfg = Release|x64
{5E406625-AFD6-4849-875F-C5740E98A28E}.Release|x64.Build.0 = Release|x64
{5E406625-AFD6-4849-875F-C5740E98A28E}.Unicode Debug|Win32.ActiveCfg = Debug|Win32
{5E406625-AFD6-4849-875F-C5740E98A28E}.Unicode Debug|Win32.Build.0 = Debug|Win32
{5E406625-AFD6-4849-875F-C5740E98A28E}.Unicode Debug|x64.ActiveCfg = Debug|x64
{5E406625-AFD6-4849-875F-C5740E98A28E}.Unicode Debug|x64.Build.0 = Debug|x64
{5E406625-AFD6-4849-875F-C5740E98A28E}.Unicode Release|Win32.ActiveCfg = Release|Win32
{5E406625-AFD6-4849-875F-C5740E98A28E}.Unicode Release|Win32.Build.0 = Release|Win32
{5E406625-AFD6-4849-875F-C5740E98A28E}.Unicode Release|x64.ActiveCfg = Release|x64
{5E406625-AFD6-4849-875F-C5740E98A28E}.Unicode Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A0E0D5A0-B2A9-4F06-8772-5B26FF1EC437}
EndGlobalSection
EndGlobal

View File

@@ -1,582 +0,0 @@
<?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">
<ProjectGuid>{5E406625-AFD6-4849-875F-C5740E98A28E}</ProjectGuid>
<Keyword>MFCProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<UseOfMfc>Dynamic</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</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" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</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" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</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" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</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" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>16.0.31401.40</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>.\Release\</OutDir>
<IntDir>.\Release\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>.\Debug\</OutDir>
<IntDir>.\Debug\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<CustomBuildStep>
<Message>Performing Registration on $(ProjectPath)</Message>
<Command>regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time &gt; "$(OutDir)regsvr32.trg"
</Command>
<Outputs>$(OutDir)regsvr32.trg;%(Outputs)</Outputs>
</CustomBuildStep>
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Release/FCThumbs.tlb</TypeLibraryName>
<HeaderFileName />
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>../../;$(ProgramFiles)\Microsoft Platform SDK\Include\atl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FreeCADBase_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>.\Release/FCThumbs.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
<ObjectFileName>.\Release/</ObjectFileName>
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0407</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>.\Release/FCThumbs.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<ModuleDefinitionFile>.\FCThumbs.def</ModuleDefinitionFile>
<ProgramDatabaseFile>.\Release/FCThumbs.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention />
<ImportLibrary>.\Release/FCThumbs.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Release/FCThumbs.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<CustomBuildStep>
<Message>Performing Registration on $(ProjectPath)</Message>
<Command>regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time &gt; "$(OutDir)regsvr32.trg"
</Command>
<Outputs>$(OutDir)regsvr32.trg;%(Outputs)</Outputs>
</CustomBuildStep>
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TypeLibraryName>.\Release/FCThumbs.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>../../;$(ProgramFiles)\Microsoft Platform SDK\Include\atl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FreeCADBase_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>.\Release/FCThumbs.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
<ObjectFileName>.\Release/</ObjectFileName>
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0407</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>gdi32.lib;zlibstatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>.\Release/FCThumbs.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<ModuleDefinitionFile>.\FCThumbs.def</ModuleDefinitionFile>
<ProgramDatabaseFile>.\Release/FCThumbs.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>.\Release/FCThumbs.lib</ImportLibrary>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Release/FCThumbs.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<CustomBuildStep>
<Message>Performing Registration on $(ProjectPath)</Message>
<Command>regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time &gt; "$(OutDir)regsvr32.trg"
</Command>
<Outputs>$(OutDir)regsvr32.trg;%(Outputs)</Outputs>
</CustomBuildStep>
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Debug/FCThumbs.tlb</TypeLibraryName>
<HeaderFileName />
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../;$(ProgramFiles)\Microsoft Platform SDK\Include\atl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FreeCADBase_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>.\Debug/FCThumbs.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
<ObjectFileName>.\Debug/</ObjectFileName>
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0407</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>.\Debug/FCThumbs.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<ModuleDefinitionFile>.\FCThumbs.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>.\Debug/FCThumbs.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention />
<ImportLibrary>.\Debug/FCThumbs.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Debug/FCThumbs.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<CustomBuildStep>
<Message>Performing Registration on $(ProjectPath)</Message>
<Command>regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time &gt; "$(OutDir)regsvr32.trg"
</Command>
<Outputs>$(OutDir)regsvr32.trg;%(Outputs)</Outputs>
</CustomBuildStep>
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TypeLibraryName>.\Debug/FCThumbs.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../;$(ProgramFiles)\Microsoft Platform SDK\Include\atl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FreeCADBase_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>.\Debug/FCThumbs.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
<ObjectFileName>.\Debug/</ObjectFileName>
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0407</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>gdi32.lib;zlibstatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>.\Debug/FCThumbs.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<ModuleDefinitionFile>.\FCThumbs.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>.\Debug/FCThumbs.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>.\Debug/FCThumbs.lib</ImportLibrary>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Debug/FCThumbs.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\zipios++\basicentry.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\collcoll.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\deflateoutputstreambuf.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\dircoll.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\directory.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\fcoll.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\fcollexceptions.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\fileentry.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\filepath.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\filterinputstreambuf.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\filteroutputstreambuf.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\gzipoutputstream.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\gzipoutputstreambuf.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\inflateinputstreambuf.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\zipfile.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\ziphead.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\zipheadio.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\zipinputstream.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\zipinputstreambuf.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\zipoutputstream.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\zipios++\zipoutputstreambuf.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="FCStdExtractor.cpp" />
<ClCompile Include="StdAfx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\..\zipios++\zipios.dox" />
<None Include="FCThumbs.def" />
<None Include="FCThumbs.rgs" />
</ItemGroup>
<ItemGroup>
<Midl Include="ThumbFCStd.idl">
<TargetEnvironment Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Win32</TargetEnvironment>
<GenerateStublessProxies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateStublessProxies>
<GenerateStublessProxies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateStublessProxies>
<TypeLibraryName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">./ThumbFCStd.tlb</TypeLibraryName>
<TypeLibraryName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">./ThumbFCStd.tlb</TypeLibraryName>
<HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ThumbFCStd_i.h</HeaderFileName>
<HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ThumbFCStd_i.h</HeaderFileName>
<InterfaceIdentifierFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ThumbFCStd_i.c</InterfaceIdentifierFileName>
<InterfaceIdentifierFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ThumbFCStd_i.c</InterfaceIdentifierFileName>
<TargetEnvironment Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Win32</TargetEnvironment>
<GenerateStublessProxies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateStublessProxies>
<GenerateStublessProxies Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateStublessProxies>
<TypeLibraryName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">./ThumbFCStd.tlb</TypeLibraryName>
<TypeLibraryName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">./ThumbFCStd.tlb</TypeLibraryName>
<HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ThumbFCStd_i.h</HeaderFileName>
<HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ThumbFCStd_i.h</HeaderFileName>
<InterfaceIdentifierFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ThumbFCStd_i.c</InterfaceIdentifierFileName>
<InterfaceIdentifierFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ThumbFCStd_i.c</InterfaceIdentifierFileName>
</Midl>
</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="FCStdExtractor.h" />
<ClInclude Include="IExtractImage.h" />
<ClInclude Include="Resource.h" />
<ClInclude Include="StdAfx.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -1,55 +0,0 @@
// IExtractImage.h
// content taken by shobjidl.h
// Philip Sakellaropoulos 2002
#ifndef __IExtractImage_FWD_DEFINED__
#define __IExtractImage_FWD_DEFINED__
//BB2E617C-0920-11d1-9A0B-00C04FC2D6C1
DEFINE_GUID(IID_IExtractImage,
0xBB2E617C, 0x0920, 0x11d1, 0x9A, 0x0B, 0x00, 0xC0, 0x4F, 0xC2, 0xD6, 0xC1);
#define IEIFLAG_ASYNC 0x0001 // ask the extractor if it supports ASYNC extract (free threaded)
#define IEIFLAG_CACHE 0x0002 // returned from the extractor if it does NOT cache the thumbnail
#define IEIFLAG_ASPECT 0x0004 // passed to the extractor to beg it to render to the aspect ratio of the supplied rect
#define IEIFLAG_OFFLINE 0x0008 // if the extractor shouldn't hit the net to get any content needed for the rendering
#define IEIFLAG_GLEAM 0x0010 // does the image have a gleam ? this will be returned if it does
#define IEIFLAG_SCREEN 0x0020 // render as if for the screen (this is exclusive with IEIFLAG_ASPECT )
#define IEIFLAG_ORIGSIZE 0x0040 // render to the approx size passed, but crop if necessary
#define IEIFLAG_NOSTAMP 0x0080 // returned from the extractor if it does NOT want an icon stamp on the thumbnail
#define IEIFLAG_NOBORDER 0x0100 // returned from the extractor if it does NOT want an a border around the thumbnail
#define IEIFLAG_QUALITY 0x0200 // passed to the Extract method to indicate that a slower, higher quality image is desired, re-compute the thumbnail
#define IEIFLAG_REFRESH 0x0400 // returned from the extractor if it would like to have Refresh Thumbnail available
//#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("BB2E617C-0920-11d1-9A0B-00C04FC2D6C1")
IExtractImage : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetLocation(
/* [size_is][out] */ LPWSTR pszPathBuffer,
/* [in] */ DWORD cch,
/* [unique][out][in] */ DWORD *pdwPriority,
/* [in] */ const SIZE *prgSize,
/* [in] */ DWORD dwRecClrDepth,
/* [in] */ DWORD *pdwFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE Extract(
/* [out] */ HBITMAP *phBmpThumbnail) = 0;
};
DEFINE_GUID(IID_IExtractImage2,
0x953BB1EE, 0x93B4, 0x11d1, 0x98, 0xA3, 0x00, 0xC0, 0x4F, 0xB6, 0x87, 0xDA);
MIDL_INTERFACE("953BB1EE-93B4-11d1-98A3-00C04FB687DA")
IExtractImage2 : public IExtractImage
{
public:
virtual HRESULT STDMETHODCALLTYPE GetDateStamp(
/* [out] */ FILETIME *pDateStamp) = 0;
};
#endif

View File

@@ -1,40 +0,0 @@
/***************************************************************************
* Copyright (c) 2008 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 *
* *
***************************************************************************/
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by FCThumbs.rc
//
#define IDR_FCSTD_TYPE 100
#define IDR_THUMBSCB 2000
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 2007
#define _APS_NEXT_COMMAND_VALUE 32772
#define _APS_NEXT_CONTROL_VALUE 2000
#define _APS_NEXT_SYMED_VALUE 2001
#endif
#endif

View File

@@ -1,35 +0,0 @@
/***************************************************************************
* Copyright (c) 2008 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 *
* *
***************************************************************************/
// stdafx.cpp : source file that includes just the standard includes
// stdafx.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
#ifdef _ATL_STATIC_REGISTRY
#include <statreg.h>
#endif
#include <atlimpl.cpp>

View File

@@ -1,47 +0,0 @@
/***************************************************************************
* Copyright (c) 2008 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 *
* *
***************************************************************************/
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently
//
#if !defined(AFX_STDAFX_H__BA56C57E_75FC_4E34_A374_AEA259EB50FA__INCLUDED_)
#define AFX_STDAFX_H__BA56C57E_75FC_4E34_A374_AEA259EB50FA__INCLUDED_
#pragma once
// Disable warnings
#pragma warning(disable : 4996)
#define _ATL_APARTMENT_THREADED
#include <atlbase.h>
//You may derive a class from CComModule and use it if you want to override
//something, but do not change the name of _Module
extern CComModule _Module;
#include <atlcom.h>
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__BA56C57E_75FC_4E34_A374_AEA259EB50FA__INCLUDED_)

View File

@@ -1,38 +0,0 @@
// ThumbFCStd.idl : IDL source for FCThumbs.exe
//
// This file will be processed by the MIDL tool to
// produce the type library (FCThumbs.tlb) and marshalling code.
import "oaidl.idl";
import "ocidl.idl";
[
object,
uuid(08FB392E-6B54-4796-A960-10399D754C93),
dual,
helpstring("IFCStdExtractor Interface"),
pointer_default(unique)
]
interface IFCStdExtractor : IDispatch
{
};
[
uuid(1C52B730-EC75-423F-A300-4A42CDF1C985),
version(1.0),
helpstring("ThumbFCStd 1.0 Type Library")
]
library THUMBFCSTDLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
[
uuid(287CC8A6-B380-4765-8EB1-AFC82D90DF68),
helpstring("FCStdExtractor Class")
]
coclass FCStdExtractor
{
[default] interface IFCStdExtractor;
};
};