Click here to Skip to main content
15,887,427 members
Please Sign up or sign in to vote.
2.54/5 (3 votes)
See more:
Hi,

I've been trying to host my own Windows Service under svchost.exe.

Can any one help me for write a dll and install it as services and run it as svchost process.

I googled a lot of question, but nothing helpful, if it is possible to do please help me.

thanks.
Posted
Comments
Richard MacCutchan 21-Dec-13 11:35am    
Since you have not given any information about what this service is supposed to do then there is not much that anyone can suggest. However, you may like to Google for "windows service" and see what you can come up with.
ehsanrezaei69 22-Dec-13 0:17am    
Thanks Richard,

I can install exe program as service and it startup when my computer rebooted.

I want to install simple DLL(for example task list) as service.

I want write this work with c++ language, Best Regard.
Richard MacCutchan 22-Dec-13 3:17am    
Do you understand that a DLL cannot run on its own? You need to create a program which uses the DLL.
ehsanrezaei69 22-Dec-13 4:19am    
Please read this topic : social.msdn.microsoft.com/Forums/vstudio/en-US/b38e755e-41d5-4dc3-a4ec-986d2a76209a/host-your-own-service-in-svchostexe?forum=netfxbcl
Richard MacCutchan 22-Dec-13 4:29am    
OK, and what exactly is that supposed to tell me?

1 solution

If he has a Win7 system then in:

C:\Windows\System32\runas.exe which will Run XXXX as a Utility. Also there is
C:\Windows\System32\rundll32.exe which will run a DLL as a Windows host process.

I hope this will be of help.
 
Share this answer
 
Comments
ehsanrezaei69 2-Feb-14 2:52am    
Can you help me to write one simple DLL and run it as service?
The_Inventor 2-Feb-14 7:12am    
http://www.codeproject.com/Articles/6351/Regular-DLL-Tutor-For-Beginners

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900