summaryrefslogtreecommitdiff
path: root/utils/MTP
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-06-13 08:12:41 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-06-13 08:12:41 +0000
commitbc18818547da718e46efb107c3369add018aaa1d (patch)
tree64df93f065f3c847610f5cbdd472218497d54299 /utils/MTP
parentb22e604a067790114ee32cbc49e7407182ba9863 (diff)
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
Diffstat (limited to 'utils/MTP')
-rw-r--r--utils/MTP/MTP_DLL/MTP_DLL.cpp2
-rw-r--r--utils/MTP/MTP_DLL/MTP_DLL.h4
-rw-r--r--utils/MTP/MTP_DLL/MTP_DLL.vcproj30
-rw-r--r--utils/MTP/MTP_DLL/mtp_wrapper.cpp8
-rw-r--r--utils/MTP/MTP_DLL/progresshelper.cpp2
-rw-r--r--utils/MTP/MTP_DLL/stdafx.cpp5
-rw-r--r--utils/MTP/MTP_DLL/stdafx.h22
7 files changed, 11 insertions, 62 deletions
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 <windows.h>
#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 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="echo Copying $(TargetName) dll / lib to ..&#x0D;&#x0A;copy /Y &quot;$(InputDir)$(ConfigurationName)\$(TargetFileName)&quot; &quot;$(InputDir)..\&quot;&#x0D;&#x0A;copy /Y &quot;$(InputDir)$(ConfigurationName)\$(TargetName).lib&quot; &quot;$(InputDir)..\&quot;"
+ CommandLine="echo Copying $(TargetName) dll / lib to ..&#x0D;&#x0A;copy /Y &quot;$(InputDir)$(ConfigurationName)\$(TargetFileName)&quot; &quot;$(InputDir)..\&quot;&#x0D;&#x0A;copy /Y &quot;$(InputDir)$(ConfigurationName)\$(TargetName).lib&quot; &quot;$(InputDir)..\&quot;&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
@@ -194,26 +194,6 @@
RelativePath=".\progresshelper.cpp"
>
</File>
- <File
- RelativePath=".\stdafx.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- </File>
</Filter>
<Filter
Name="Header Files"
@@ -228,10 +208,6 @@
RelativePath=".\progresshelper.h"
>
</File>
- <File
- RelativePath=".\stdafx.h"
- >
- </File>
</Filter>
<Filter
Name="Resource Files"
diff --git a/utils/MTP/MTP_DLL/mtp_wrapper.cpp b/utils/MTP/MTP_DLL/mtp_wrapper.cpp
index f444a59631..f3a05f3c0c 100644
--- a/utils/MTP/MTP_DLL/mtp_wrapper.cpp
+++ b/utils/MTP/MTP_DLL/mtp_wrapper.cpp
@@ -31,8 +31,6 @@
*/
-#include "stdafx.h"
-
#include <windows.h>
#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 <windows.h>
#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 <windows.h>