Announcement

Collapse
No announcement yet.

Addjob API

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Addjob API

    Has anyone tried using the Addjob and ScheduleJob API calls?

    I'm not getting much success with these functions.

    ------------------

  • #2
    I have been able to view what has been scheduled, but I have not been able to get anything scheduled. I have tried all sorts of different things. I stopped work on it some time ago and moved on to other things.

    I think a UDT or the function declare has a problem.

    Let me know if you find anything.

    Ray

    Comment


    • #3
      dont have anything on AddJob, but here's something from the Windows NT/2000 Native API reference if it helps ...
      (should be able to search msdn.microsoft.com to find more)

      ZwCreateJobObject creates or opens a job object.


      NTSYSAPI
      NTSTATUS
      NTAPI
      ZwCreateJobObject(
      OUT PHANDLE
      JobHandle,
      IN ACCESS_MASK DesiredAccess,
      IN POBJECT_ATTRIBUTES ObjectAttributes
      );

      Parameters

      JobHandle
      Points to a variable that will receive the job object handle if the call is successful.

      Desired Access
      Specifies the type of access that the caller requires to the job object. This parameter can be zero, or any combination of the following flags:
      Code:
       JOB_OBJECT_ASSIGN_PROCESS          Add process to job
       JOB_OBJECT_SET_ATTRIBUTES          Set job attributes
       JOB_OBJECT_QUERY                   Query job attributes
       JOB_OBJECT_TERMINATE               Terminate job
       JOB_OBJECT_SET_SECURITY_ATTRIBUTES Set job security attributes
       JOB_OBJECT_ALL_ACCESS              All of the preceding + 
                                          STANDARD_RIGHTS_ALL
      ObjectAttributes
      Points to a structure that specifies the object's attributes.

      Return Value
      Returns STATUS_SUCCESS or an error status, such as STATUS_ACCESS_DENIED.

      Related Win32 Functions
      CreateJobObject

      Remarks
      The routine ZwCreateJobObject is only present in Windows 2000.

      ---
      Declaration for ZwOpenJobObject:

      NTSYSAPI
      NTSTATUS
      NTAPI
      ZwOpenJobObject(
      OUT PHANDLE
      JobHandle,
      IN ACCESS_MASK DesiredAccess,
      IN POBJECT_ATTRIBUTES ObjectAttributes
      );

      ---
      Declaration for ZwTerminateJobObject:

      NTSYSAPI
      NTSTATUS
      NTAPI
      ZwTerminateJobObject(
      IN HANDLE
      JobHandle,
      IN STATUS ExitStatus
      );

      ------------------


      [This message has been edited by Wayne Diamond (edited October 13, 2000).]
      -

      Comment

      Working...
      X