Does it fail when you press F9 when CPU window appears? Sometimes there are some breakpoints in some Windows DLL, so may be this is the case?
Unfortunately, we were unable to reproduce this on our side.
When F9 is pressed application runs without showing Task properties.
I expressed myself wrong. I can open Task properties, but when I click Edit in Schedule I get these errors...
When I run app outside Delphi and try to view Schedule/Edit error is returned "Access violation at adress NNNN in module comctrl32.dll. Read of adress MMMM"
Strange thing was that it was happening on the demo app too.
Read that the MSTask.DCU file might NOT be the version that came with SiComponents. I do have another MSTask unit in the library path. So I made sure the demo was using that version. And the demo worked.
When I try with my app though... it still did the same thing... perhaps I am not garanteeing that my app is using the SiComp version of MSTask
I compiled the demo app that came with VCL Scheduling Agent.
I thought that maybe it has something to do with conflicting versions of MsTask.pas. And when I removed the other MsTask unit, it seemed to work.
Then the following week, I did a build all on the app and it stopped working again! I renamed the demo.exe to demo_notworking.exe.
I rebooted my PC and recompiled the demo app and it works again. I renamed the demo.exe to demo_works.exe. I compared the EXE's size.
demo_works.exe is about 814KB.
demo_notworking is about 816KB
It's the same source but compiled at different times. I have Norton Anti-virus corporate w/ latest defs and scanned the EXE's and they are fine.
So, I am guessing that somehow, delphi 2006 is compiling a different library into the EXE after some point. Not sure what triggers the library change. I have the EXE's. I don't know if there is a way you would be able to figure it out with the EXE's.
I noticed that the mstask.dcu that was created/compiled during the build all changed in size periodically.
I also noticed in my windows Add/Remove Programs that there was SiComponents Scheduling Agent 1.0.4 AND 1.0.5.
I decided to do an uninstall of both and reinstall only 1.0.5.
still strange behavior occuring.
Then I noticed something. The demo program has Optimization turn on in the compiler. My app has it turned off. It seems to work in my app when the DCU's for SiComp Agent is optimized. And if fails if I have it off.
Thank you very much again for detecting this!
This is just some "compiler magic" and we can't detect the origin of problem. We've fixed it by adding {$O+} switch to the end of DEFS.INC file. You can do this on your side as well.