Error SetTrigger

This is a discussion on Error SetTrigger within the Windows Programming forums, part of the Platform Specific Boards category; << mod: split from http://cboard.cprogramming.com/showthread.php?t=77802 >> I tried this code but the call of 'pITaskTrigger->SetTrigger(&trigger)' returns the error E_INVALIDARG Any ...

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    2

    Question Error SetTrigger

    << mod: split from Scheduling tasks in Windows >>
    I tried this code
    but the call of 'pITaskTrigger->SetTrigger(&trigger)'
    returns the error
    E_INVALIDARG

    Any ideas why?

    I'm using Visual C++ 6 and Windows 2003 Server


    btw
    setting trigger.cbTriggerSize to
    sizeof (TASK_TRIGGER)+2
    instead of
    sizeof (TASK_TRIGGER)
    makes the code work. I have no idea why
    Last edited by Salem; 12-20-2007 at 07:29 AM. Reason: Split bump from dead thread - see the rules.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,607
    Don't get yourself in trouble - stick to this thread....

    Are you absolutely sure that using "sizeof(TASK_TRIGGER)+2" makes it "work"? Because the size of that structure has not changed when comparing the version that ships with VC 6.0 (which is extremely old) and the Windows Server 2003 R2 Platform SDK.

    gg

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21