472,958 Members | 2,570 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

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
1 1931
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bing | last post by:
Hi, I am configuring the same DB2 v8.1 JDBC universal driver (db2jcc.jar and db2jcc_license_cisuz.jar) from DB2 SP5 fix pack under WSAD 5.1.x environment and WebSphere application Server 5.0.2...
33
by: news.microsoft.com | last post by:
To Microsoft and fellow MSDN Universal subscribers... Regarding new MSDN Universal (I mean Premier) price and level changes: 1) Way too expensive for the small and medium developer Universal...
1
by: Homa | last post by:
I have a web service that want to print something to a printer connected on another computer in the network. And that printer happens to be a non-plug and play printer (It's a thermal printer). ...
4
by: Brad Markisohn | last post by:
Is there a way to determine, programmatically, when Plug-and-Play devices are connected or removed from the PC? In VB 6 I caught events from the SysInfo control, but I don't believe that this...
9
by: Morris Neuman | last post by:
Im working with VS 2005 and trying to use a Hyperlink field in a datagrid to play a wave file that is not located in the website folders but is in a plain folder on the same machine, windows 2003...
6
by: Rob R. Ainscough | last post by:
I can't seem to locate the appropriate area in VS 2005 where I can accomplish this -- is this a C# only option? Thanks, Rob.
1
by: riteshhatui | last post by:
I want to install Oracle ODBC driver for Oracle 10g on Microsoft Windows Vista but Oracle Universal Installer gave error related to OS compatibility. I am looking for Oracle Universal Installer...
0
by: Peter Donis | last post by:
When running a doctest text file with doctest.testfile, I noticed that universal newline support did not appear to work when module_relative is False. My text file was saved on a Windows machine...
6
by: elizabeth1986 | last post by:
Hello, Is it possible to detect the insertion and removal of Plug and play devices (for example : keyboard , mouse etc) while the computer is still ON. We wanted to do the above in C#. We...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.