I designed a DNS monitor program in VB6 that has an active desktop component and a service component. The service component starts automatically and works in the background even when the user is logged off. I have tested it on windows XP, Vista, and 7 (all 32 bit), and although I am currently having some problems with 64 bit Win7, both programs work very well with the following exceptions.
1. The service component stops working after the computer is revived from a sleep mode. As per the samples provided by NT Kernel Resources, the packet read routine is in a loop. I have the program logging whenever it enters and leaves that loop, and it does not exit the loop. I have no idea how to troubleshoot this problem. Any help would be appreciated.
2. The logfile name uses the current date in the format “yymmdd.log”. This format is necessary to keep the file names in chronological order. On a Vista machine (and I presume Win7), the month and day get reversed using the service component in Session 0. The desktop component in Session 1 conforms to the specified format.
12/06/10 03:16 PM 79 100612.log <---- Service component
12/06/10 03:16 PM 72 101206.log <---- Desktop component
I changed both programs to “yyyymmdd.log” with the same results. This is obviously an OS issue, but I got no help from Microsoft Technet.
J.A. Coutts