• C

TSR in C

Hi all,

I'm looking to create a TSR program in C but I'm not 100% sure how to do this.  I'm just looking for information, website, or if someone so cares, an easy / simple example.

Who is Participating?
cookreConnect With a Mentor Commented:
The idea behind a TSR was to start it up, have it make a portion of itself resident, and then exit, giving you the command prompt back so you could run another program while the resident portion of the TSR was still active.

In that sense, every Window's program is a TSR.

Now, if the idea is to create a child process to run in the same address space as the caller, you'd use CreateThread().

To create an independant activity, use CreateProcess().

There is no exact equivalent to fork(), i.e., something to clone the parent.

Plenty of examples here:

Be warned, TSRs apply to pure DOS only.
Corey080698Author Commented:
Oh...okay.  I'm actually looking to do this in a Windows environment...how would I do this in Windows?  In linux I could always fork...but in windows, I am lost...
Corey080698Author Commented:
Thanks Cookre....that's excatly what I needed to know!!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.