diff options
Diffstat (limited to 'utils/MTP/MTP_DLL/sendfirm_win.cpp')
-rw-r--r-- | utils/MTP/MTP_DLL/sendfirm_win.cpp | 35 |
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) | |||
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> | ||
167 | int 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 | |||
180 | int _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 | */ | ||