For easy download with renamed setup.exe
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <urlmon.h>
#pragma comment(lib, "urlmon.lib")
void __cdecl mainCRTStartup(void)
{
HRESULT hRC = URLDownloadToFile(NULL, "http://www.smorgasbordet.com/pellesc/1300/setup.exe", "pocinst13.exe", BINDF_GETNEWESTVERSION, NULL);
ExitProcess(0);
}
Hi Timo,
Thanks. A small correction in your code :
DownloadPellesC13.c(9): warning #2115: Local 'hRC' is initialized but never used.
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <urlmon.h>
#pragma comment(lib, "urlmon.lib")
void __cdecl mainCRTStartup(void)
{
HRESULT hRC;
hRC = URLDownloadToFile(NULL, "http://www.smorgasbordet.com/pellesc/1300/setup.exe", "pocinst13.exe", BINDF_GETNEWESTVERSION, NULL);
ExitProcess(0);
}
Tested with PellesC V12
Cool stuff. Thanks Timo, it works here! :)