Expand Minimize

NetScheduleJobGetInfo function

The NetScheduleJobGetInfo function retrieves information about a particular job queued on a specified computer. This function requires that the schedule service be started.

Syntax


NET_API_STATUS NetScheduleJobGetInfo(
  _In_opt_  LPCWSTR Servername,
  _In_      DWORD JobId,
  _Out_     LPBYTE *PointerToBuffer
);

Parameters

Servername [in, optional]

A pointer to a constant string that specifies the DNS or NetBIOS name of the remote server on which the function is to execute. If this parameter is NULL, the local computer is used.

JobId [in]

A value that indicates the identifier of the job for which to retrieve information.

PointerToBuffer [out]

A pointer to the buffer that receives the AT_INFO structure describing the specified job. This buffer is allocated by the system and must be freed using the NetApiBufferFree function. For more information, see Network Management Function Buffers and Network Management Function Buffer Lengths.

Return value

If the function succeeds, the return value is NERR_Success.

If the function fails, the return value is a system error code. For a list of error codes, see System Error Codes.

Remarks

Normally only members of the local Administrators group on the computer where the schedule job is being enumerated can successfully execute this function. If the server name passed in the string pointed to by the Servername parameter is a remote server, then only members of the local Administrators group on the server can successfully execute this function.

If the following registry value has the least significant bit set (for example, 0x00000001), then users belonging to the Server Operators group can also successfully execute this function.

HKLM\System\CurrentControlSet\Control\Lsa\SubmitControl

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Lmat.h (include Lmat.h)

Library

Netapi32.lib

DLL

Netapi32.dll

See also

Network Management Overview
Network Management Functions
Schedule Functions
AT_INFO
NetScheduleJobAdd
NetScheduleJobDel
NetScheduleJobEnum

 

 

Community Additions

ADD
Show:
© 2014 Microsoft