borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (How to print Text.txt to word.dco?)Next Topic (Printing Access Like Report from Excel) New Topic New Poll Post Reply
AndreaVB Forum : Printing : converting an application to System Process
Poster Message
binu4ever
Level: Guest


icon converting an application to System Process

Hello,

While executing an exe file its normally shows as a n application. i need tht exe should run as a system process, i mean this shld work in back ground. Pls mail me if u ve any idea abt this

12-10-2003 at 05:41 AM
| Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: converting an application to System Process

If u want to register ur program as a service then use this API's:

Const RSP_SIMPLE_SERVICE = 1
Const RSP_UNREGISTER_SERVICE = 0

Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long


When you register your program as a service, it will continue to run after users log off.

____________________________
If you find the answer helpful, please mark this topic as solved.

12-10-2003 at 03:27 PM
View Profile Send Email to User Show All Posts | Quote Reply
Anitha_232
Level: Scholar

Registered: 03-03-2004
Posts: 47
icon Re: converting an application to System Process

plz helppp !!
i Tried the Code mentioned..but its givg me error 453.
i am working on windows2000 server
Thank you once again

30-03-2004 at 12:46 PM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: converting an application to System Process

Which code have you tried? Above are only functions and constants that are used. Check this topic

http://www.andreavb.com/forum/viewtopic.php?TopicID=2884&page=0#9974



____________________________
If you find the answer helpful, please mark this topic as solved.

30-03-2004 at 03:37 PM
View Profile Send Email to User Show All Posts | Quote Reply
Anitha_232
Level: Scholar

Registered: 03-03-2004
Posts: 47
icon Re: converting an application to System Process

Hi...
what i meant is that i called the function as mentioned in the link
GetCurrentProcessID works but when i call the function RegisterServiceProcess it gives me an error saying
"Runtime error 453
Cant find DLL entryPoint RegisterServiceProcess in kernel32"


what i am tryg to do is as follows:
i have made an application and want to run it on system-startup. adding it to the startup folder gives me the solution. but in this case, my app is listed in list of running applications. instead what i want is to add it to the list of running processes.
also it shud startup each time system startsup.. i hope i hav made my idea clear

can this be done? cud u explain whats happening?

thanx for all the help. very much appreciated


31-03-2004 at 05:25 AM
View Profile Send Email to User Show All Posts | Quote Reply
Anitha_232
Level: Scholar

Registered: 03-03-2004
Posts: 47
icon Re: converting an application to System Process


Seems like RegisterServiceProcess works on windows98\ME only (atleast thats what i understood by chekg on the net)

so isnt there a similar function that will work on all windows platforms? or some other menas to go about this?

helppppppppppppppppp !!!

31-03-2004 at 10:04 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Printing : converting an application to System Process
Previous Topic (How to print Text.txt to word.dco?)Next Topic (Printing Access Like Report from Excel) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder