The Boundary Exception occurs when this function is called.
FInterface := itf.RegisterTaskDefinition(CollapseName(FTaskName),
FTaskDefinition, TASK_CREATE_OR_UPDATE, s, s,
FTaskDefinition.Principal.LogonType, s);
see www.petrossa.com/screenshot.jpg for output
It only occurs in Vista
(Detail: The application is called TaskExplorer, why it becomes TaskEplorer )
c++ problems
www.petrossa.com/sample.rar
when tracing into the function i end up in the in the system lib. As its the c++ inmplementation it jumps to the ASM section. The exception occurs after this sequence
procedure _LStrArrayClr(var StrArray; cnt: longint); (seems to work)
procedure _WStrClr(var S); (causes the exception)
on copying the parameters to the taskschedulerfunction. If i counted right its the 3rd or 4th parameter
ps
i just leave all settings at default, and give only the taskname.
tried filling out all fields no diff
when tracing into the function i end up in the in the system lib. As its the c++ inmplementation it jumps to the ASM section. The exception occurs after this sequence
procedure _LStrArrayClr(var StrArray; cnt: longint); (seems to work)
procedure _WStrClr(var S); (causes the exception)
on copying the parameters to the taskschedulerfunction. If i counted right its the 3rd or 4th parameter
ps
i just leave all settings at default, and give only the taskname.
tried filling out all fields no diff
yes i quessed as much, but the present source depends on 3rd party vcl components so i cant give it.
I just hoped it meant something to you, because read i the tasksched doc the there is a StartBoundary defined in the vista taskscheduler
http://msdn.microsoft.com/en-us/library ... S.85).aspx
Could it be that there's ghost info in the buffer? Should i start looking in the trigger source? Can you give a quick codefragmednt which zeros the trigger data buffer?
Anyway there's a memory overwrite somewhere which causes the application name to miss a letter, i double checked but the Application.Title property does give false info.
I just hoped it meant something to you, because read i the tasksched doc the there is a StartBoundary defined in the vista taskscheduler
http://msdn.microsoft.com/en-us/library ... S.85).aspx
Could it be that there's ghost info in the buffer? Should i start looking in the trigger source? Can you give a quick codefragmednt which zeros the trigger data buffer?
Anyway there's a memory overwrite somewhere which causes the application name to miss a letter, i double checked but the Application.Title property does give false info.
it's that bothersome person again...
Could this be a cause?
http://www.inter-locale.com/whitepaper/ ... kbook.html
the exception goes as follows:
when defining a task and you choose from the dropdowncombobox the schedule, choosing:
Once only, gives (7,8)Startboundary:.
Daily, gives (10,8)Startboundary:.
Weekly, gives (11,8)Startboundary:.
Monthly, gives (24,8)Startboundary:.
all other choices throw no exceptions, and the wizard finishes normally.
Could this be a cause?
http://www.inter-locale.com/whitepaper/ ... kbook.html
the exception goes as follows:
when defining a task and you choose from the dropdowncombobox the schedule, choosing:
Once only, gives (7,8)Startboundary:.
Daily, gives (10,8)Startboundary:.
Weekly, gives (11,8)Startboundary:.
Monthly, gives (24,8)Startboundary:.
all other choices throw no exceptions, and the wizard finishes normally.
tnx for your efforts, i appreciate them. I can only quess there's some weird interaction that takes place between different VCL's.
I use also LMD-tools v7 and it seems theres some 'i dont know what' which interacts when compiling the taskwizard.pas in a c++ project.
I also build your delphidemo (ofcourse) and it works perfectly. So i gave up and i am rewriting the createtask wizard from ground up in C.
I did notice however that in a c++ project in need to include satask.pas and sautils.pas in the project to prevent linker errors.
The c++ project to build the component omits IsUserAdmin and CreateTaskDefinition.
But your component is ok, thats for sure.
I use also LMD-tools v7 and it seems theres some 'i dont know what' which interacts when compiling the taskwizard.pas in a c++ project.
I also build your delphidemo (ofcourse) and it works perfectly. So i gave up and i am rewriting the createtask wizard from ground up in C.
I did notice however that in a c++ project in need to include satask.pas and sautils.pas in the project to prevent linker errors.
The c++ project to build the component omits IsUserAdmin and CreateTaskDefinition.
But your component is ok, thats for sure.
Can't get rid of the startboundary exception. I finally managed to trap the errorcode, it's
SCHED_E_MISSINGNODE
0x80041319
The task XML is missing a required element or attribute.
Can you point me in the direction where to fix this? Perhaps you know this immediately whilst i have to read the entire docs.....
(the File not Found exception was caused by not setting VistaSelectedFolder btw)
UPDATE:
Found it. Even when you set TriggerType to ttOnce you have to zero the TriggerDetails....
According to the docs it shouldn't matter, but now i got it running without exceptions.
SCHED_E_MISSINGNODE
0x80041319
The task XML is missing a required element or attribute.
Can you point me in the direction where to fix this? Perhaps you know this immediately whilst i have to read the entire docs.....
(the File not Found exception was caused by not setting VistaSelectedFolder btw)
UPDATE:
Found it. Even when you set TriggerType to ttOnce you have to zero the TriggerDetails....
According to the docs it shouldn't matter, but now i got it running without exceptions.