forked from len0rd/rockbox
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
This commit is contained in:
parent
46d8302c7d
commit
33d8bb15e2
4 changed files with 3 additions and 32 deletions
Binary file not shown.
|
|
@ -127,15 +127,15 @@ __declspec(dllexport) bool send_fw(LPWSTR file, int filesize)
|
||||||
|
|
||||||
if(SUCCEEDED(hr) || hr == WMDM_S_NOT_ALL_PROPERTIES_APPLIED
|
if(SUCCEEDED(hr) || hr == WMDM_S_NOT_ALL_PROPERTIES_APPLIED
|
||||||
|| hr == WMDM_S_NOT_ALL_PROPERTIES_RETRIEVED)
|
|| hr == WMDM_S_NOT_ALL_PROPERTIES_RETRIEVED)
|
||||||
|
{
|
||||||
return_value = true;
|
return_value = true;
|
||||||
|
hr = S_FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* move to next Storage */
|
|
||||||
if(!return_value)
|
|
||||||
hr = pIEnumStorage->Next(1, (IWMDMStorage **)&pIStorage, &ulNumFetched);
|
|
||||||
}
|
}
|
||||||
pIEnumStorage->Release();
|
pIEnumStorage->Release();
|
||||||
}
|
}
|
||||||
|
|
@ -159,32 +159,3 @@ __declspec(dllexport) bool send_fw(LPWSTR file, int filesize)
|
||||||
return return_value;
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
|
||||||
0
utils/MTP/sendfirm.exe.manifest → utils/MTP/sendfirm.manifest
Executable file → Normal file
0
utils/MTP/sendfirm.exe.manifest → utils/MTP/sendfirm.manifest
Executable file → Normal file
0
utils/MTP/sendfirm_win.c
Executable file → Normal file
0
utils/MTP/sendfirm_win.c
Executable file → Normal file
Loading…
Add table
Add a link
Reference in a new issue