From bc18818547da718e46efb107c3369add018aaa1d Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sat, 13 Jun 2009 08:12:41 +0000 Subject: Some more MTP_DLL cleanup. - don't use precompiled headers. - prepare for direct incorporation of the library. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21269 a1c6a512-1295-4272-9138-f99709370657 --- utils/MTP/MTP_DLL/MTP_DLL.cpp | 2 +- utils/MTP/MTP_DLL/MTP_DLL.h | 4 ++++ utils/MTP/MTP_DLL/MTP_DLL.vcproj | 30 +++--------------------------- utils/MTP/MTP_DLL/mtp_wrapper.cpp | 8 +++----- utils/MTP/MTP_DLL/progresshelper.cpp | 2 -- utils/MTP/MTP_DLL/stdafx.cpp | 5 ----- utils/MTP/MTP_DLL/stdafx.h | 22 ---------------------- 7 files changed, 11 insertions(+), 62 deletions(-) delete mode 100644 utils/MTP/MTP_DLL/stdafx.cpp delete mode 100644 utils/MTP/MTP_DLL/stdafx.h (limited to 'utils') diff --git a/utils/MTP/MTP_DLL/MTP_DLL.cpp b/utils/MTP/MTP_DLL/MTP_DLL.cpp index 73085afaee..2d9bbe48cb 100644 --- a/utils/MTP/MTP_DLL/MTP_DLL.cpp +++ b/utils/MTP/MTP_DLL/MTP_DLL.cpp @@ -1,6 +1,6 @@ /* MTP_DLL.cpp : Defines the entry point for the DLL application. */ -#include "stdafx.h" +#include #include "MTP_DLL.h" diff --git a/utils/MTP/MTP_DLL/MTP_DLL.h b/utils/MTP/MTP_DLL/MTP_DLL.h index 2793c936e1..6faab84619 100644 --- a/utils/MTP/MTP_DLL/MTP_DLL.h +++ b/utils/MTP/MTP_DLL/MTP_DLL.h @@ -2,11 +2,15 @@ #ifndef MTP_DLL_H #define MTP_DLL_H +#ifndef MTP_NODLL #ifdef MTP_DLL_EXPORTS #define MTP_DLL_API __declspec(dllexport) #else #define MTP_DLL_API __declspec(dllimport) #endif +#else +#define MTP_DLL_API +#endif #ifdef __cplusplus extern "C" diff --git a/utils/MTP/MTP_DLL/MTP_DLL.vcproj b/utils/MTP/MTP_DLL/MTP_DLL.vcproj index 644e2e445e..d8acdfe8e7 100644 --- a/utils/MTP/MTP_DLL/MTP_DLL.vcproj +++ b/utils/MTP/MTP_DLL/MTP_DLL.vcproj @@ -45,7 +45,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" - UsePrecompiledHeader="2" + UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="true" DebugInformationFormat="4" @@ -121,7 +121,7 @@ AdditionalIncludeDirectories="c:\wmsdk\wmfsdk95\include;c:\wmsdk\wmfsdk95\wmdm\inc" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MTP_DLL_EXPORTS" RuntimeLibrary="2" - UsePrecompiledHeader="2" + UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="true" DebugInformationFormat="3" @@ -170,7 +170,7 @@ /> @@ -194,26 +194,6 @@ RelativePath=".\progresshelper.cpp" > - - - - - - - - - - #include "mswmdm_i.c" #include "mswmdm.h" @@ -120,7 +118,7 @@ static int mtp_close(struct mtp_if* mtp) return 0; } -__declspec(dllexport) int mtp_description(wchar_t* name, wchar_t* manufacturer, DWORD* version) +MTP_DLL_API int mtp_description(wchar_t* name, wchar_t* manufacturer, DWORD* version) { HRESULT hr; int num = 0; @@ -177,7 +175,7 @@ __declspec(dllexport) int mtp_description(wchar_t* name, wchar_t* manufacturer, return (num > 0) ? num : -1; } -__declspec(dllexport) int mtp_sendnk(LPWSTR file, int filesize, void (*callback)(unsigned int progress, unsigned int max)) +MTP_DLL_API int mtp_sendnk(LPWSTR file, int filesize, void (*callback)(unsigned int progress, unsigned int max)) { HRESULT hr; bool return_value = false; @@ -281,4 +279,4 @@ __declspec(dllexport) int mtp_sendnk(LPWSTR file, int filesize, void (*callback) return return_value ? 1 : 0; } -} \ No newline at end of file +} diff --git a/utils/MTP/MTP_DLL/progresshelper.cpp b/utils/MTP/MTP_DLL/progresshelper.cpp index a8aac365c5..0fabebe22e 100644 --- a/utils/MTP/MTP_DLL/progresshelper.cpp +++ b/utils/MTP/MTP_DLL/progresshelper.cpp @@ -30,8 +30,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "stdafx.h" - #include #include "mswmdm_i.c" #include "mswmdm.h" diff --git a/utils/MTP/MTP_DLL/stdafx.cpp b/utils/MTP/MTP_DLL/stdafx.cpp deleted file mode 100644 index c603f4f2c7..0000000000 --- a/utils/MTP/MTP_DLL/stdafx.cpp +++ /dev/null @@ -1,5 +0,0 @@ -/* stdafx.cpp : source file that includes just the standard includes - MTP_DLL.pch will be the pre-compiled header - stdafx.obj will contain the pre-compiled type information */ - -#include "stdafx.h" diff --git a/utils/MTP/MTP_DLL/stdafx.h b/utils/MTP/MTP_DLL/stdafx.h deleted file mode 100644 index dc8d61f531..0000000000 --- a/utils/MTP/MTP_DLL/stdafx.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -/* Modify the following defines if you have to target a platform prior to the ones specified below. - Refer to MSDN for the latest info on corresponding values for different platforms. */ -#ifndef WINVER /* Allow use of features specific to Windows XP or later. */ -#define WINVER 0x0501 /* Change this to the appropriate value to target other versions of Windows. */ -#endif - -#ifndef _WIN32_WINNT /* Allow use of features specific to Windows XP or later. */ -#define _WIN32_WINNT 0x0501 /* Change this to the appropriate value to target other versions of Windows. */ -#endif - -#ifndef _WIN32_WINDOWS /* Allow use of features specific to Windows 98 or later. */ -#define _WIN32_WINDOWS 0x0410 /* Change this to the appropriate value to target Windows Me or later. */ -#endif - -#ifndef _WIN32_IE /* Allow use of features specific to IE 6.0 or later. */ -#define _WIN32_IE 0x0600 /* Change this to the appropriate value to target other versions of IE. */ -#endif - -#define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */ -#include -- cgit v1.2.3