diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-07-03 23:30:28 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-07-03 23:30:28 +0000 |
commit | 936650104dc1ecf0114ea606f86741e18c7f3465 (patch) | |
tree | c1e69acd3a6a7488a6059c2bd985593e0dd38374 | |
parent | b42a51bf6425539793326cfec4a1f4219b0be8ff (diff) | |
download | rockbox-936650104dc1ecf0114ea606f86741e18c7f3465.tar.gz rockbox-936650104dc1ecf0114ea606f86741e18c7f3465.zip |
Add example program + fix some mistakes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17933 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-x | utils/MTP/MTP_DLL.dll (renamed from utils/MTP/MTP_DLL/MTP_DLL.dll) | bin | 90112 -> 86016 bytes | |||
-rw-r--r-- | utils/MTP/MTP_DLL/MTP_DLL.h | 4 | ||||
-rw-r--r-- | utils/MTP/MTP_DLL/MTP_DLL.vcproj | 2 | ||||
-rw-r--r-- | utils/MTP/MTP_DLL/sendfirm_win.cpp | 3 | ||||
-rw-r--r-- | utils/MTP/Makefile | 3 |
5 files changed, 10 insertions, 2 deletions
diff --git a/utils/MTP/MTP_DLL/MTP_DLL.dll b/utils/MTP/MTP_DLL.dll index 01e7c1f72d..1985f0ef30 100755 --- a/utils/MTP/MTP_DLL/MTP_DLL.dll +++ b/utils/MTP/MTP_DLL.dll | |||
Binary files differ | |||
diff --git a/utils/MTP/MTP_DLL/MTP_DLL.h b/utils/MTP/MTP_DLL/MTP_DLL.h index a2d7c76fdb..45352830a3 100644 --- a/utils/MTP/MTP_DLL/MTP_DLL.h +++ b/utils/MTP/MTP_DLL/MTP_DLL.h | |||
@@ -9,3 +9,7 @@ | |||
9 | #else | 9 | #else |
10 | #define MTP_DLL_API __declspec(dllimport) | 10 | #define MTP_DLL_API __declspec(dllimport) |
11 | #endif | 11 | #endif |
12 | |||
13 | extern "C" { | ||
14 | __declspec(dllexport) bool send_fw(LPWSTR file, int filesize); | ||
15 | } | ||
diff --git a/utils/MTP/MTP_DLL/MTP_DLL.vcproj b/utils/MTP/MTP_DLL/MTP_DLL.vcproj index d7234bb610..295ef49d80 100644 --- a/utils/MTP/MTP_DLL/MTP_DLL.vcproj +++ b/utils/MTP/MTP_DLL/MTP_DLL.vcproj | |||
@@ -140,7 +140,7 @@ | |||
140 | AdditionalDependencies="mssachlp.lib" | 140 | AdditionalDependencies="mssachlp.lib" |
141 | LinkIncremental="1" | 141 | LinkIncremental="1" |
142 | AdditionalLibraryDirectories="d:\wmsdk\wmfsdk95\lib,d:\wmsdk\wmfsdk95\wmdm\lib" | 142 | AdditionalLibraryDirectories="d:\wmsdk\wmfsdk95\lib,d:\wmsdk\wmfsdk95\wmdm\lib" |
143 | GenerateDebugInformation="true" | 143 | GenerateDebugInformation="false" |
144 | SubSystem="2" | 144 | SubSystem="2" |
145 | OptimizeReferences="2" | 145 | OptimizeReferences="2" |
146 | EnableCOMDATFolding="2" | 146 | EnableCOMDATFolding="2" |
diff --git a/utils/MTP/MTP_DLL/sendfirm_win.cpp b/utils/MTP/MTP_DLL/sendfirm_win.cpp index 12c3e3e88b..9a46e51cbd 100644 --- a/utils/MTP/MTP_DLL/sendfirm_win.cpp +++ b/utils/MTP/MTP_DLL/sendfirm_win.cpp | |||
@@ -20,7 +20,7 @@ | |||
20 | * Link to "mssachlp.lib" | 20 | * Link to "mssachlp.lib" |
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | 23 | extern "C" { | |
24 | __declspec(dllexport) bool send_fw(LPWSTR file, int filesize) | 24 | __declspec(dllexport) bool send_fw(LPWSTR file, int filesize) |
25 | { | 25 | { |
26 | bool return_value = false; | 26 | bool return_value = false; |
@@ -158,6 +158,7 @@ __declspec(dllexport) bool send_fw(LPWSTR file, int filesize) | |||
158 | 158 | ||
159 | return return_value; | 159 | return return_value; |
160 | } | 160 | } |
161 | } | ||
161 | 162 | ||
162 | /* | 163 | /* |
163 | * Example code: | 164 | * Example code: |
diff --git a/utils/MTP/Makefile b/utils/MTP/Makefile index 4678546b02..63e7b3adf5 100644 --- a/utils/MTP/Makefile +++ b/utils/MTP/Makefile | |||
@@ -7,5 +7,8 @@ all: $(OUTPUT) | |||
7 | $(OUTPUT): sendfirm.c | 7 | $(OUTPUT): sendfirm.c |
8 | gcc $(CFLAGS) $(LIBS) -o $(OUTPUT) sendfirm.c | 8 | gcc $(CFLAGS) $(LIBS) -o $(OUTPUT) sendfirm.c |
9 | 9 | ||
10 | $(OUTPUT).exe: sendfirm_win.c | ||
11 | gcc $(CFLAGS) -o $(OUTPUT).exe sendfirm_win.c MTP_DLL.dll | ||
12 | |||
10 | clean: | 13 | clean: |
11 | rm -f $(OUTPUT) | 14 | rm -f $(OUTPUT) |