Posted by: Ivano Edilberth Osti
Hi. Excuse-me if I'm double writting this. I'm writting again because I
wrote to forum.td.development and I could not see my subject there.
I know that I can put my application to run as "Service" using XYNTService
or SrvAny.
I downloaded a pretty good sample from "forum.sourcecode" time ago and it
works fine but the problem is that the service runs only for 5 minutes and
then it stops.
Do you have a tip on how to put the service to run full time?
Taking a look at the code that builds the function, I see this:
///////////////////////////////////////////////////////////////////////////////////////////////
// main function to do the real work of the service
// This function performs the main work of the service.
// When this function returns the service has stopped.
void VTBRun()
{
while (m_bIsRunning) {
m_bIsRunning = FALSE;
// must be reset to TRUE by using Function VTBMarkRunning
VTBSendMsg(VTBService_GoLoop);
Sleep(5000);
}
// nothing more to do
}
BOOL VTBMarkRunning()
{
m_bIsRunning = TRUE;
return TRUE;
}
The problem is that there is not a function called "VTBMarkRunning" inside
VTBService.dll
If you have a newer version of VTBService.dll or other sample on how to put
a TD application running as service, please tell me.
Thanks in advance.
PS: Attached the sample that I downloaded