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
Solved

How to create a system process ?

Posted on 2001-06-09
6
153 Views
Last Modified: 2010-05-02
I want to write a program that running on the system background. That means users will not know the process is running, and the task manager will show the process in the "Processes" tab, NOT in the "Applications" tab.
The project type is Standard EXE.

How to do it ???
Please provide some sample coding to me.
*** the code should work in Win9x/NT/2000/ME ***


MW
0
Comment
Question by:Raymond
6 Comments
 
LVL 3

Expert Comment

by:sridhar_PJ
ID: 6170554
Hi raymng,
I think this will do for u.

Hide application from task manager


' General Declarations.
' API Functions for hiding the
' application from the task manager.
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess Lib "kernel32" _
(ByVal dwProcessID As Long, ByVal dwType As Long) As Long


Sub Form_Load()
' Hide the application from
' the task manager (Ctrl+Alt+Del)
 HideTask True
End Sub

Public Sub HideTask(Hide As Boolean)
Dim lHandle As Long
Dim lService As Long
' If Hide = True, register as a service
lHandle = GetCurrentProcessId()
lService = RegisterServiceProcess(lHandle, Abs(Hide))
End Sub


Good Luck
Sridhar
0
 

Author Comment

by:Raymond
ID: 6170683
When I run it, error occur showing that "Can't find DLL entry point RegisterServiceProcess in kernel32".

My system is Windows2000, also I need the code that work well in Win9x/NT/2000/ME.

Any alternatives for function "RegisterServiceProcess" ??
Thanx !!!


Regards,
MW
0
 
LVL 2

Expert Comment

by:Microsoft
ID: 6171524
if you are running win2000, this has a different kernel32 or win9x/NT/ME

I know this doesnt help you much, Im not sure what to do with this case, maybe some of the other experts have a solution.

I will have alook to see what i can find out, but to be fare im alittle lost myself.

see what other replys you get.

im .....listening on the side for this one.

cheers
Andi
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 2

Expert Comment

by:Microsoft
ID: 6171532
try this :-
#include <windows.h>

DWORD RegisterServiceProcess
(
     DWORD dwProcessId,
     DWORD dwType
);
0
 
LVL 2

Expert Comment

by:Microsoft
ID: 6171536
also have a LQQK at the following url to see if this has anything to do with the kernel32 for windows2000

http://www.winehq.com/WineAPI/RegisterServiceProcess.html

cheers
andy
0
 
LVL 1

Accepted Solution

by:
Moondancer earned 0 total points
ID: 6678409
Points have been refunded to you.  Question closed/moved to PAQ at zero points.

Moondancer
Community Support Moderator @ Experts Exchange
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Computer crashes, following error message in event manager 5 234
Copy a row 12 64
VBA: Select SQL query based on a config Sheet v2 11 49
Add and format columns in vb6 7 63
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

809 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