Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

TSR in C

Posted on 2002-04-09
4
Medium Priority
?
245 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them 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.

721 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