Solved

TSR in C

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C dll call freezes 5 101
Problem in finding output of a program 11 104
Problem to scan all sheets 3 103
Acrinis True image 2 77
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…
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 and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.

815 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

12 Experts available now in Live!

Get 1:1 Help Now