I wanted to create a timeout while my program is downloading the files through an LAN FTP server. The function is to download files from a host of a FTP server, it was connected with LAN cable to the host. I have tried to set the timeout with
dWtm = 4000; InternetSession->SetOption(INTERNET_OPTION_DATA_RECEIVE_TIMEOUT, &dWtm, 4);
but it doesn't timeout even if the downloading period is already 13 seconds. Is there an alternative where I can create a timeout to end the function after a specified period?