Solved

TSR in C

Posted on 2002-04-09
4
234 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 50 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
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 nested-loops in the C programming language.

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now