467,915 Members | 1,146 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

how to turn on SSDP and Universal Plug And play Windows servicesprogrammatically?

Hi,
could someone please enlighten me on how I could turn on the above
mentioned two windows services programmatically? Reason is i am writing
a program which needs to turn on these two services in order to access
the UPnP router to turn on port forwarding programmatically, and turn it
off after that. Can someone please enlighten me on the functions or
Win32 API to call to achieve it ? thank you so much for enlightening me
on this.
Aug 12 '06 #1
  • viewed: 1764
Share:
1 Reply
"Lonewolf" <an*******@mozilla.orgwrote in message
news:ui**************@TK2MSFTNGP03.phx.gbl...
could someone please enlighten me on how I could turn on the above
mentioned two windows services programmatically? Reason is i am writing a
program which needs to turn on these two services in order to access the
UPnP router to turn on port forwarding programmatically, and turn it off
after that. Can someone please enlighten me on the functions or Win32 API
to call to achieve it ? thank you so much for enlightening me on this.
There are more than a few calls you need to use in a proper solution.

// Once

OpenSCManager();

// Repeat for each service

OpenService();
StartService();
CloseServiceHandle();

// Once

CloseServiceHandle();

Note that you will generally need to run in the context of an account with
administrative privileges.

Regards,
Will


Aug 13 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

33 posts views Thread by news.microsoft.com | last post: by
4 posts views Thread by Brad Markisohn | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.