G
GoneRural
Hello,
I am trying to figure out how to create multiple timers at run-time
(which could vary each time) that I can then reference? Basically I
have a service that will check a registry key and each subkey under
that registry key will require a timer in which each subkey will
contain a couple of settings such as the timer interval and job name.
I can enumerate and read the registry no problem, but I am unclear how
to create a timer for each one of those subkeys and then be able to
reference that timer setting it's interval based on the setting in the
registry for that job. I know I can add the handlers to it and use the
sender to determine which timer has fired, but the creation of the
timers dynamically like that and understanding how they would be
referenced is what confuses me.
Can anyone help me with some sample code on how this could be done. I
have been continuously searching for the answer but have not found
anything that would help me.
Thanks in advance for your help,
Ron
I am trying to figure out how to create multiple timers at run-time
(which could vary each time) that I can then reference? Basically I
have a service that will check a registry key and each subkey under
that registry key will require a timer in which each subkey will
contain a couple of settings such as the timer interval and job name.
I can enumerate and read the registry no problem, but I am unclear how
to create a timer for each one of those subkeys and then be able to
reference that timer setting it's interval based on the setting in the
registry for that job. I know I can add the handlers to it and use the
sender to determine which timer has fired, but the creation of the
timers dynamically like that and understanding how they would be
referenced is what confuses me.
Can anyone help me with some sample code on how this could be done. I
have been continuously searching for the answer but have not found
anything that would help me.
Thanks in advance for your help,
Ron