Solved

How to create a system process ?

Posted on 2001-06-09
6
150 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:raymng
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:raymng
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

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

Suggested Solutions

Title # Comments Views Activity
Mysql vs Oracle 10 120
Adding to a VBA? 6 48
vb6 connector to mongodb 2 26
How to measure sizes and angles in scanned images ? 3 26
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

707 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

16 Experts available now in Live!

Get 1:1 Help Now