Hi! I have an application that starts a service application when it starts. This works when I start the application in an admin account, but if I run the program in a non-admin account I'am not able to start the service with the method StartService(). Here is my code: void startmyService() { SC_HANDLE myManager; SC_HANDLE myService; myManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); myService = OpenService(myManager, "myService app", SERVICE_ALL_ACCESS); if (myService == NULL) { return false; } if (!StartService(myService,0,NULL)) { return false; } CloseServiceHandle(myService); return true; }
Musen80
Posts
-
startService from non-admin account -
two digits in edit controlHi! How is it possible to limit my edit control (MFC) to only accept two digits. Now it is possible to type in how many as you want. To get it to accept only numbers were no problems, is there any properties that I can set to get it to only accept two digits as well?
-
MFC app to service appHi! I have done a MFC application with dialogs in .NET. Now I want that application to run as a service application. Can someone help me with this. Is it hard? Is there any articles on the web about this? Or can anyone explain directly how to do it? Regards Martin
-
ethernet-card choiceI can´t because we are suppose to have a seamless communication between them. If you unplugs the cable for example the application shall use the wireless communication instead of the wired without loosing any data. Is it possible to choose in any way instead of letting windows do it for you? /Martin
-
ethernet-card choiceHi! Is there anyway of se which ethernet cards that exists on your computer? I would like to choose which one of them to use when I program a Socket with C++. For example you can have one ethernet-card that are wired and one that are wireless. How can I in Visual c++ .net choose which one to use? Do microsoft have an class or library for this? It would be very good if someone only have an idea of this. /Martin /Martin