summaryrefslogtreecommitdiffstats
path: root/utils/MTP/MTP_DLL
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 /utils/MTP/MTP_DLL
parent46d8302c7d557033b75705795c46b56f20d98b71 (diff)
downloadrockbox-33d8bb15e28b1a2ef0d4ae3a8bf305230c913182.tar.gz
rockbox-33d8bb15e28b1a2ef0d4ae3a8bf305230c913182.tar.bz2
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
Diffstat (limited to 'utils/MTP/MTP_DLL')
-rw-r--r--utils/MTP/MTP_DLL/sendfirm_win.cpp35
1 files changed, 3 insertions, 32 deletions
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)
if(SUCCEEDED(hr) || hr == WMDM_S_NOT_ALL_PROPERTIES_APPLIED
|| hr == WMDM_S_NOT_ALL_PROPERTIES_RETRIEVED)
+ {
return_value = true;
+ hr = S_FALSE;
+ }
}
}
}
}
}
- /* move to next Storage */
- if(!return_value)
- hr = pIEnumStorage->Next(1, (IWMDMStorage **)&pIStorage, &ulNumFetched);
}
pIEnumStorage->Release();
}
@@ -159,32 +159,3 @@ __declspec(dllexport) bool send_fw(LPWSTR file, int filesize)
return return_value;
}
}
-
-/*
- * Example code:
-
-#include <windows.h>
-int filesize(char* filename)
-{
- FILE* fd;
- int tmp;
- fopen_s(&fd, filename, "r");
- fseek(fd, 0, SEEK_END);
- tmp = ftell(fd);
- fclose(fd);
- return tmp;
-}
-
-__declspec(dllimport) bool send_fw(LPWSTR file, int filesize);
-
-int _tmain(int argc, char* argv[])
-{
- printf("Sending %s [%d]...\n", "Zlant.bin", filesize("Zlant.bin"));
- if(send_fw(L"Zlant.bin", filesize("Zlant.bin")))
- printf("Transmitting succesfull!\n");
- else
- printf("Transmitting failed!\n");
- return 0;
-}
-
- */