Hi
I want c language code to open my web browser (IE or Firefox) and close it after 2 min. can any one help me?? please i need it.

Recommended Answers

All 3 Replies

this doesn't make any sense, but if you must do something like this, then you need to get into the deep details of the windows API. since you're even asking this question, then you have no chance of successfully navigating the Windows API

therefore you will have to do something sloppy like::

use a system call to open your application
delay 2 minutes
use a system call to kill the process, with something like this

.

opening is trivial:

system("start http://www.google.com");

But closing... not so much.

commented: and what did this add? besides a worthless bump, that is. -1

Opening a file and closing a file has same importance however it depends on the situation. Because in C if your software is running a process which updates a text file and if you do not kill that process, and instead start a new process for updating file using C. The text file will have messed up data. Because the same text file is being used for two updates. Hope it makes sense.

Sorry if I am being annoying ,but i have been through this before and it gave me a huge problem in one of my projects. So moral of the story is:

"Importance of opening a file == Importance of closing a file"

commented: bumping old thread to make a comment that is irrelevant -1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.