Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

TSR in C

Posted on 2002-04-09
4
Medium Priority
?
247 Views
Last Modified: 2010-04-15
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.

Thanks,
Corey
0
Comment
Question by:Corey080698
  • 2
  • 2
4 Comments
 
LVL 22

Expert Comment

by:cookre
ID: 6932673
Plenty of examples here:
http://www.simtel.net/pub/msdos/tsrutil/

Be warned, TSRs apply to pure DOS only.
0
 

Author Comment

by:Corey080698
ID: 6932690
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...
0
 
LVL 22

Accepted Solution

by:
cookre earned 200 total points
ID: 6932728
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.

0
 

Author Comment

by:Corey080698
ID: 6933745
Thanks Cookre....that's excatly what I needed to know!!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question