forked from len0rd/rockbox
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
This commit is contained in:
parent
b22e604a06
commit
bc18818547
7 changed files with 11 additions and 62 deletions
|
@ -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"
|
||||
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 ..
copy /Y "$(InputDir)$(ConfigurationName)\$(TargetFileName)" "$(InputDir)..\"
copy /Y "$(InputDir)$(ConfigurationName)\$(TargetName).lib" "$(InputDir)..\""
|
||||
CommandLine="echo Copying $(TargetName) dll / lib to ..
copy /Y "$(InputDir)$(ConfigurationName)\$(TargetFileName)" "$(InputDir)..\"
copy /Y "$(InputDir)$(ConfigurationName)\$(TargetName).lib" "$(InputDir)..\"
"
|
||||
/>
|
||||
</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"
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue