![]() |
|
#1
|
||||
|
||||
Help. Need some clarification.Hi,
I have these ff. code: CPP / C++ / C Code:
I know that this is not resourece friendly type of code. The code above is a test/dummy program ,the program will wait at least 5 sec. before it will execute the printf(). The test/dummy program works fine but when I try to insert this logic to the project that I'm currently working on , it does not work. The project mentioned here is converted/or run as a Windows service. I've written the test/dummy program as a Win32 console application. The project that I've mentioned is previously a Win32 console application before it is converted to run as a windows service. Can anyone tell me why this is happening? I'm Using MVC6 and my os is Win2K. BTW: when I tried to convert the test/dummy program run run as a Windows service, the test/dummy program does not execute - I mean does not print ( I've change the printf() to a writeToLog type of function). any kind of help will be appreciated. regards, jaro __________________
Action.....reAction |
|
#2
|
|||
|
|||
Re: Help. Need some clarification.Hi jari,
How about this: Code:
|
|
#3
|
||||
|
||||
Re: Help. Need some clarification.Quote:
Hi Brenton, your suggestion would not do because I need the program to keep on running and would execute a certain code (in this case print "round" in every 5 seconds). anyway thanks for your suggestion. Regards, jaro __________________
Action.....reAction |
|
#4
|
||||
|
||||
Re: Help. Need some clarification.Quote:
Ops Sorry my mistake. It should have been - while the program is running, in every 5 secs it will execute the printf(). Regards, jaro __________________
Action.....reAction |
|
#5
|
||||
|
||||
Re: Help. Need some clarification.You want to run the program as a service. A service is a background function to the OS. Where would it print? There's no screen/window.
__________________
Cow: You're a lawyer too? Mooseblood (mosquito): Ma'am, I was already a bloodsucking parasite. All I needed was a briefcase! |
|
#6
|
|||
|
|||
Re: Help. Need some clarification.Hi jaro,
Is this better: CPP / C++ / C Code:
|
|
#7
|
||||
|
||||
Re: Help. Need some clarification.Quote:
When I convert the program to run as a service ,I've change the printf() part to a writeToFile (in this case a text file). I've tested the program (with the writeTofile ) before converting it to run a service. __________________
Action.....reAction |
|
#8
|
||||
|
||||
Re: Help. Need some clarification.Quote:
thanks Brenton, I'll try this and will post a feedback soon. regards, jaro __________________
Action.....reAction |
|
#9
|
||||
|
||||
Re: Help. Need some clarification.Just found out what causing the bug that I mention on my first post.
And guess what it has nothing to do with the code that I've posted,silly me well anyway thanks to all the people who reply to my thread. BTW: Brenton,I opt to use your solution (code you've last posted) much better than mine. regards, jaro __________________
Action.....reAction |
|
#10
|
||||
|
||||
Re: Help. Need some clarification.Quote:
__________________
Cow: You're a lawyer too? Mooseblood (mosquito): Ma'am, I was already a bloodsucking parasite. All I needed was a briefcase! |
Recent GIDBlog
First week of IA training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| base case clarification | tgtg | C Programming Language | 1 | 20-Jul-2005 08:23 |
| dirent, stat, compar & alphasort | Old_Spen | C Programming Language | 5 | 11-May-2005 08:46 |
| Sorting Array Logic ? | karthikeyansen | C Programming Language | 26 | 06-Apr-2005 08:01 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The