Click here to Skip to main content
15,891,951 members
Home / Discussions / C#
   

C#

 
GeneralRe: classes Pin
J4amieC12-Jul-05 22:06
J4amieC12-Jul-05 22:06 
GeneralRe: classes Pin
sosodev12-Jul-05 22:17
sosodev12-Jul-05 22:17 
GeneralRe: classes Pin
enjoycrack12-Jul-05 22:09
enjoycrack12-Jul-05 22:09 
GeneralRe: classes Pin
sosodev12-Jul-05 23:03
sosodev12-Jul-05 23:03 
GeneralIntegrate WIndows Service and my application project Pin
ksanju100012-Jul-05 20:42
ksanju100012-Jul-05 20:42 
GeneralWindows Service in Windows XP Pin
ksanju100012-Jul-05 20:40
ksanju100012-Jul-05 20:40 
GeneralRe: Windows Service in Windows XP Pin
Dave Kreskowiak13-Jul-05 2:29
mveDave Kreskowiak13-Jul-05 2:29 
GeneralRe: Windows Service in Windows XP Pin
ksanju100013-Jul-05 4:14
ksanju100013-Jul-05 4:14 
hi I have installed dotnetframework in Win XP and Win2k

when i run Windows Service and click on desktop of my product
its showing me the following error

Commn Language Runtime Debugging Services

Process id=0xb50(2896),Thread id=0xb54(2900)
click OK to terminate the application
Click CANCEL to debug the application


What should i write in my Windows Services(User defined service) so that it should not

show the above error


When i run my product exe from the desktop and after that i run my windows services it

shows that only one instance of application is allowed at a time


This program should identify if any man.exe exist it should stop that instance and start

another instance of man.exe but this program as a windows service does not work
protected override void OnStart(string[] args)
{
// TODO: Add code here to start your service.


Process[] aProcesses1;

if (aProcesses1.Length > 0)
{
if(rd1==true)
{
// The last excel process is the orphaned process which is killed
aProcesses1[aProcesses1.Length-1].Kill();

rd1=false;
}
}
int intExcelPID;
aProcesses1=Process.GetProcessesByName("man");
string strProc="These are the processes running \n";
for (int i = 0; i <= aProcesses1.GetUpperBound(0); i++)
{
intExcelPID = aProcesses1[i].Id;
strProc+=intExcelPID.ToString()+ " ";
}


//Retrive from registry the value of Path
RegistryKey hklm =Registry.LocalMachine;
hklm=hklm.OpenSubKey("SOFTWARE\\man");
Object obp=hklm.GetValue("Path");
string file=obp.ToString() + "\\man.exe";
Process.Start(@file);
}

When i write the above program it does not work even it does not start when i start my

computer
Regards
sanjeev
GeneralRe: Windows Service in Windows XP Pin
Dave Kreskowiak13-Jul-05 5:06
mveDave Kreskowiak13-Jul-05 5:06 
GeneralProblem in creating objects of derived class Pin
tttyip12-Jul-05 20:28
tttyip12-Jul-05 20:28 
GeneralRe: Problem in creating objects of derived class Pin
S. Senthil Kumar12-Jul-05 21:15
S. Senthil Kumar12-Jul-05 21:15 
GeneralRe: Problem in creating objects of derived class Pin
tttyip13-Jul-05 16:11
tttyip13-Jul-05 16:11 
GeneralIIS Root Path location Pin
Sau Fan Lee12-Jul-05 17:28
Sau Fan Lee12-Jul-05 17:28 
GeneralRe: IIS Root Path location Pin
Expert Coming12-Jul-05 18:02
Expert Coming12-Jul-05 18:02 
GeneralMs Word Field Codes Pin
bootn12-Jul-05 17:05
bootn12-Jul-05 17:05 
GeneralRe: Ms Word Field Codes Pin
ekynox13-Jul-05 19:29
ekynox13-Jul-05 19:29 
GeneralSave as &quot;TXT&quot; File Pin
tatchung12-Jul-05 15:47
tatchung12-Jul-05 15:47 
GeneralRe: Save as &quot;TXT&quot; File Pin
Christian Graus12-Jul-05 17:28
protectorChristian Graus12-Jul-05 17:28 
GeneralRe: Save as &quot;TXT&quot; File Pin
tatchung12-Jul-05 17:36
tatchung12-Jul-05 17:36 
GeneralRe: Save as &quot;TXT&quot; File Pin
Christian Graus12-Jul-05 17:45
protectorChristian Graus12-Jul-05 17:45 
GeneralRe: Save as &quot;TXT&quot; File Pin
tatchung12-Jul-05 17:53
tatchung12-Jul-05 17:53 
GeneralRe: Save as &quot;TXT&quot; File Pin
Christian Graus12-Jul-05 17:55
protectorChristian Graus12-Jul-05 17:55 
GeneralRe: Save as &quot;TXT&quot; File Pin
tatchung12-Jul-05 18:03
tatchung12-Jul-05 18:03 
GeneralRe: Save as &quot;TXT&quot; File Pin
Christian Graus12-Jul-05 18:12
protectorChristian Graus12-Jul-05 18:12 
GeneralRe: Save as &quot;TXT&quot; File Pin
tatchung12-Jul-05 18:23
tatchung12-Jul-05 18:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.