summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-07-04 12:45:24 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-07-04 12:45:24 +0000
commit33d8bb15e28b1a2ef0d4ae3a8bf305230c913182 (patch)
tree6a764c7054eff53db4454fbb521b8211ba5f491b
parent46d8302c7d557033b75705795c46b56f20d98b71 (diff)
downloadrockbox-33d8bb15e28b1a2ef0d4ae3a8bf305230c913182.tar.gz
rockbox-33d8bb15e28b1a2ef0d4ae3a8bf305230c913182.zip
Fix infinite loop in sendfirm_win.cpp and other minor fixes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17939 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-xutils/MTP/MTP_DLL.dllbin86016 -> 90112 bytes
-rw-r--r--utils/MTP/MTP_DLL/sendfirm_win.cpp35
-rw-r--r--[-rwxr-xr-x]utils/MTP/sendfirm.manifest (renamed from utils/MTP/sendfirm.exe.manifest)0
-rw-r--r--[-rwxr-xr-x]utils/MTP/sendfirm_win.c0
4 files changed, 3 insertions, 32 deletions
diff --git a/utils/MTP/MTP_DLL.dll b/utils/MTP/MTP_DLL.dll
index f3436e049c..3f9b6c7a50 100755
--- a/utils/MTP/MTP_DLL.dll
+++ b/utils/MTP/MTP_DLL.dll
Binary files differ
diff --git a/utils/MTP/MTP_DLL/sendfirm_win.cpp b/utils/MTP/MTP_DLL/sendfirm_win.cpp
index 9a46e51cbd..e895c024fd 100644
--- a/utils/MTP/MTP_DLL/sendfirm_win.cpp
+++ b/utils/MTP/MTP_DLL/sendfirm_win.cpp
@@ -127,15 +127,15 @@ __declspec(dllexport) bool send_fw(LPWSTR file, int filesize)
127 127
128 if(SUCCEEDED(hr) || hr == WMDM_S_NOT_ALL_PROPERTIES_APPLIED 128 if(SUCCEEDED(hr) || hr == WMDM_S_NOT_ALL_PROPERTIES_APPLIED
129 || hr == WMDM_S_NOT_ALL_PROPERTIES_RETRIEVED) 129 || hr == WMDM_S_NOT_ALL_PROPERTIES_RETRIEVED)
130 {
130 return_value = true; 131 return_value = true;
132 hr = S_FALSE;
133 }
131 } 134 }
132 } 135 }
133 } 136 }
134 } 137 }
135 } 138 }
136 /* move to next Storage */
137 if(!return_value)
138 hr = pIEnumStorage->Next(1, (IWMDMStorage **)&pIStorage, &ulNumFetched);
139 } 139 }
140 pIEnumStorage->Release(); 140 pIEnumStorage->Release();
141 } 141 }
@@ -159,32 +159,3 @@ __declspec(dllexport) bool send_fw(LPWSTR file, int filesize)
159 return return_value; 159 return return_value;
160} 160}
161} 161}
162
163/*
164 * Example code:
165
166#include <windows.h>
167int filesize(char* filename)
168{
169 FILE* fd;
170 int tmp;
171 fopen_s(&fd, filename, "r");
172 fseek(fd, 0, SEEK_END);
173 tmp = ftell(fd);
174 fclose(fd);
175 return tmp;
176}
177
178__declspec(dllimport) bool send_fw(LPWSTR file, int filesize);
179
180int _tmain(int argc, char* argv[])
181{
182 printf("Sending %s [%d]...\n", "Zlant.bin", filesize("Zlant.bin"));
183 if(send_fw(L"Zlant.bin", filesize("Zlant.bin")))
184 printf("Transmitting succesfull!\n");
185 else
186 printf("Transmitting failed!\n");
187 return 0;
188}
189
190 */
diff --git a/utils/MTP/sendfirm.exe.manifest b/utils/MTP/sendfirm.manifest
index 324c707e1c..324c707e1c 100755..100644
--- a/utils/MTP/sendfirm.exe.manifest
+++ b/utils/MTP/sendfirm.manifest
diff --git a/utils/MTP/sendfirm_win.c b/utils/MTP/sendfirm_win.c
index e605d47d0c..e605d47d0c 100755..100644
--- a/utils/MTP/sendfirm_win.c
+++ b/utils/MTP/sendfirm_win.c