Hi, I am developing a Windows service in C#. I have couple of question on that. 1. Is it possible to set a Start up parameter during installation of the service? I know that I can pass a parameter while calling ServiceController.Start() method. But the service start type is Autometic and I want the service to run everytime with the same parameter. 2. Is it possible to uninstall the service from within. Say if I meet certain criteria in the service work flow, I want to uninstall the service. Is it possible? Thanks.
Aryan S
Posts
-
Couple of questions regarding Windows Service in C# -
Problem in getting hash values [modified]I want to get hash values from two string. I am using the following code snippet for that purpose locale loc("English_US"); LONG lValue1 = use_facet< collate<_TCHAR> >(loc).hash(&lpszString1, &lpszString1[_tcslen(lpszString1) - 1]); LONG lValue2 = use_facet< collate<_TCHAR> >(loc).hash(&lpszString2, &lpszString2[_tcslen(lpszString2) - 1]); This is working fine. But in a few XP system this piece of code is getting hanged. Do you have any clue what could be the possible reason. Thanks.
modified on Tuesday, September 23, 2008 8:35 AM
-
Problem in accessing nodes of a list in Release buildThanks!!! I am actually new in this field... :(
-
Problem in accessing nodes of a list in Release buildHi, I am facing a problem while accessing values in a std::list in release build. The code I am using is like struct _STRUCT_ABC { int iIdCount; string szName; }STRUCTABC, *PSTRUCTABC; list<<PSTRUCTABC>>:: iterator ittr = g_ABCList.begin(); // g_ABCList is a golbal list with PSTRUCTABC int iCount = ittr._Ptr->_Myval->iIdCount; // Works fine with _DEBUG prepocessor but does not work in release mode if _DEBUG prepocessor is not defined. Now according to VS2005 compiler _Ptr is a private variable if _DEBUG is not defined. In that case how to access the values inside the list? Thanks in advance.
-
Monitoring a process running on a remote systemIs there a way to monitor a process, running on a remote system? I want to get its memory usage.... Thanks in advance...
-
Single instance applicationI am working with an MFC application. I want, user should be able to invoke only one process for the application. If it's already running in a system, then user should not be able to invoke another instance of the same exe. How can I achive that?
-
How to check network connection?I want to check whether the system, in which my application will run is connected in Network or not? How can I do that?
-
Image in CListCtrlI want to show images in each subitem in List view of style report. I am able to show the image at the beginning of the subitem by SetImag API, but I want to place the image at the end. The image should be after the text. How can I do that?
-
Combo box in CListCtrlI am working on creating a drop down combo box if user clicks on a column in a list control. I have got one document in the link: http://www.codeproject.com/listctrl/CustomizedReportListCtrl.asp But the problem is CBS_DROPDOWNLIST style has been used in that combo list. But I want to make that combo box editable. CBS_DROPDOWN is not working. Could anyone tell me how to do that?
-
How to get the point clicked in NM_DBLCLK.I am handling NM_DBLCLK message for a CListCtrl in my application. In that function I need to know the point where the double click is made. How can i know that?
-
Different text color for different index in CListCtrlI am working with a CListCtrl. Is it possible to set different text color of different back ground color for different index? Suppose index 1 would have red colored text while index 2 would have green. Is it possibl?
-
How to check extended style of List View?I want to check whether LVS_EX_CHECKBOXES is set as the extended style of a list view. How to check that?
-
How to show tool tip help for tool bar items?I am working with tool bar in dialog based application. How to show tool tip help for the tool bar items? Thanks in advance.
-
Check box in a menuI want to use check boxes in a menu as item. The idea is, user can select a feature by checking a box in the menu. How to show a check box in a menu item?
-
How to put combo box as list subitem?I am working on list view control.I want to add a combo box as a sub item in the list viw control. I have used the view type as report. Any suggestion is welcome.
-
Problem with RegOpenKeyEx() in VistaYes, the user has administrative rights. Though the user is not the by default (in built) administrator. GetLastError is returning Access denied.
-
Problem with RegOpenKeyEx() in VistaWhere is the manual?
-
Problem with RegOpenKeyEx() in VistaI want to write reg value in HKLM in windows Vista. But RegOpenKeyEx() API is failing. I am using access rights as KEY_READ | KEY_WRITE. Please give some suggestion.
-
Problem with RegOpenKeyEx() in VistaI want to write reg value in HKLM in windows Vista. But RegOpenKeyEx() API is failing. I am using access rights as KEY_READ | KEY_WRITE. Please give some suggestion.
-
Loading menu in dialog box. in WIN32 application.From an dialog based win32 app I awant to load a menu in the dialog. How to do that?