打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
NetScheduleJobEnum function

NetScheduleJobEnum function

[NetScheduleJobEnum is no longer available for use as of Windows 8. Instead, use the Task Scheduler 2.0 Interfaces. ]

The NetScheduleJobEnum function lists the jobs queued on a specified computer. This function requires that the schedule service be started.

Syntax

NET_API_STATUS NetScheduleJobEnum(  _In_opt_ LPCWSTR Servername,  _Out_    LPBYTE  *PointerToBuffer,  _In_     DWORD   PreferredMaximumLength,  _Out_    LPDWORD EntriesRead,  _Out_    LPDWORD TotalEntries,  _Inout_  LPDWORD ResumeHandle);

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.

PointerToBuffer [out]

A pointer to the buffer that receives the data. The return information is an array of AT_ENUM structures. The buffer is allocated by the system and must be freed using a single call to the NetApiBufferFree function. Note that you must free the buffer even if the function fails with ERROR_MORE_DATA.

PreferredMaximumLength [in]

A value that indicates the preferred maximum length of the returned data, in bytes. If you specify MAX_PREFERRED_LENGTH, the function allocates the amount of memory required for the data. If you specify another value in this parameter, it can restrict the number of bytes that the function returns. If the buffer size is insufficient to hold all entries, the function returns ERROR_MORE_DATA. For more information, seeNetwork Management Function Buffers and Network Management Function Buffer Lengths.

EntriesRead [out]

A pointer to a value that receives the count of elements actually enumerated.

TotalEntries [out]

A pointer to a value that receives the total number of entries that could have been enumerated from the current resume position. Note that applications should consider this value only as a hint.

ResumeHandle [in, out]

A pointer to a value that contains a resume handle which is used to continue a job enumeration. The handle should be zero on the first call and left unchanged for subsequent calls. If this parameter is NULL, then no resume handle is stored.

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

Each entry returned contains an AT_ENUM structure. The value of the JobId member can be used when calling functions that require a job identifier parameter, such as the NetScheduleJobDel function.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

End of client support

Windows 7

End of server support

Windows Server 2008

Header

Lmat.h (include Lmat.h)

Library

Netapi32.lib

DLL

Netapi32.dll

See also

Network Management Overview
Network Management Functions
Schedule Functions
AT_ENUM
NetScheduleJobAdd
NetScheduleJobDel
NetScheduleJobGetInfo

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
windows api 梳理
线程ID与线程句柄的关系
DynamicWrapperX v1.0
Data Types
C 语言实现模拟键盘输入
实现windows下的动态域名解析服务
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服