Windows Service Threading Continued

StuartProgramming Blog

So appropriate threading in a Windows service continued to give me issues after the last discovery of the multi-threaded timer. This time, I discovered a few additional relevant items about starting and stopping a windows service. The first problem I identified in my service is that the OnStart function MUST EXIT or the service will stay in “Starting” status and … Read More

StuartWindows Service Threading Continued

Dangerous .NET Timer Setting

StuartProgramming Blog

I had an idea to set my initial timer interval to 1ms so that when this service was initialized, the timer would fire immediately. It took me a while to find out that 1ms is a short enough time to frequently have multiple threads enter the cycleTimer_Elapsed section. Make sure your initial interval is a few seconds or you will … Read More

StuartDangerous .NET Timer Setting

Return a binary file to a VB Script caller

StuartProgramming Blog

It is occasionally necessary to do some heavy computing such as image manipulation while inside a VBScript. Since script isn't suited to this purpose, the way I've accomplished this in the past is to build a c# COM complaint .dll file and reference it from the script. Then the COM file can do the real processing. The downside here is … Read More

StuartReturn a binary file to a VB Script caller