[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 249
  • Last Modified:

Using timer in a NT server generated via ATL

1. How to use timer in a stand alone NT server applicaion?
    I have created a NT atand alone server application via ATL wizard.  This server has one interface and a corresponding C++ class.  Since this class was not inhereted from any window message supporting parent I could use a timer.
2. How to make server self start the timer without any client service reques?
0
lyh3
Asked:
lyh3
1 Solution
 
ToronadoCommented:
Hi lyh3,

cann't you use the global timer functions?
Like
UINT SetTimer(
 HWND hWnd, // handle of window for timer messages
  UINT nIDEvent, // timer identifier
  UINT uElapse,  // time-out value
  TIMERPROC lpTimerFunc   // address of timer procedure);

The hWnd parameter can be set to NULL if no window is associated with the timer.

Set this timer function in the startup code of your server.

I hope this answers your questions.

Regards,
 Toronado
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now