SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

c++ problems
Goto page Previous  1, 2
 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> VCL Scheduling Agent
View previous topic :: View next topic  
Author Message
petrossa



Joined: 12 Aug 2008
Posts: 23

PostPosted: Wed Aug 20, 2008 5:15 pm    Post subject: Reply with quote

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 Question )
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Thu Aug 21, 2008 4:06 am    Post subject: Reply with quote

This is very strange and we can't catch this behavior. I think this message (it is directly from Vista's scheduler) appears only when using some particular settings. Could you send us a sample project that always reproduces this error?
Back to top
View user's profile Send private message
petrossa



Joined: 12 Aug 2008
Posts: 23

PostPosted: Thu Aug 21, 2008 6:24 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Fri Aug 22, 2008 3:49 am    Post subject: Reply with quote

I'm sorry, but we don't need EXE sample as we can't debug it. We need source sample to see what code causes that error message and try to debug it. Also, as you see the error comes from system DLL and could be a bug in Vista's Scheduler itself.
Back to top
View user's profile Send private message
petrossa



Joined: 12 Aug 2008
Posts: 23

PostPosted: Fri Aug 22, 2008 11:37 am    Post subject: Reply with quote

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/aa383967(VS.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.
Back to top
View user's profile Send private message
petrossa



Joined: 12 Aug 2008
Posts: 23

PostPosted: Sat Aug 23, 2008 3:44 pm    Post subject: Reply with quote

it's that bothersome person again...

Could this be a cause?
http://www.inter-locale.com/whitepaper/DelphiI18NCookbook.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.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Mon Aug 25, 2008 7:55 am    Post subject: Reply with quote

Are you able to reproduce this when using Quick Demos from the Demo project? There is item named "Run notepad.exe every day at 09:00" which creates daily task. We've tested this on our side and it works just fine.
Back to top
View user's profile Send private message
petrossa



Joined: 12 Aug 2008
Posts: 23

PostPosted: Wed Aug 27, 2008 6:43 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
petrossa



Joined: 12 Aug 2008
Posts: 23

PostPosted: Sun Sep 07, 2008 6:33 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> VCL Scheduling Agent All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group