Ah yes... Pardon me for not reading the post properly. I just read the first line, and assumed. Anyway, the conditions are similar. We are doing the same thing, and the only difference is,
I reset my router so that I can connect to BSNL via PPPOE dialer, and if there is any connection problem it will reconnect automatically
and you havent, so your modem might not reconnect automatically. So you want to restart or run or shutdown or whatever.
I dont understand hindi, so I dont get what you're talking about programming in your post. However, its simple to do it if you can. There is a function called InternetGetConnectedState. MSDN at
*msdn.microsoft.com/en-us/library/aa384702(VS.85).aspx
So I figure the code may be something like:
Code:
DWORD dwNetState;
if(!InternetGetConnectedState(dwNetState, 0))
{
//do whatever you want, its not connected. restart or whatever
}
else
//exit program
That should do it, make this into a program and run it... say every five minutes. If it finds that there is no internet, it will restart automatically, and so will the router, and net will be restored. However, if lets say there is a BSNL problem or something, then your comp will keep on restarting forever
So you can implement something like it writes the no. of restarts done to registry or a log file. If its lets say ten restarts but no internet, then just shut down the comp.
Anyway if you can do it, please
If you cant, I'll try to do it for you. I'm bogged down with my university exams now, and they get over on 13th. After that, expect an entire tutorial on a completely 200% automated BSNL night downloading with torrents and HTTP downloads support
AND a programmer's reference too with pseudocode... so that people can actually LEARN instead of leech