48 ERR(
"RpcServerUseProtseqEpW() failed (Status %lx)\n",
Status);
55 ERR(
"RpcServerRegisterIf() failed (Status %lx)\n",
Status);
62 ERR(
"RpcServerListen() failed (Status %lx)\n",
Status);
91 TRACE(
"NetrJobAdd(%S %p %p)\n",
92 ServerName, pAtInfo, pJobId);
136 *pJobId = pJob->
JobId;
153 TRACE(
"NetrJobDel(%S %lu %lu)\n",
154 ServerName, MinJobId, MaxJobId);
157 if (MinJobId > MaxJobId)
168 if ((CurrentJob->
JobId >= MinJobId) && (CurrentJob->
JobId <= MaxJobId))
177 NextEntry = JobEntry->
Flink;
182 JobEntry = NextEntry;
187 JobEntry = JobEntry->
Flink;
207 DWORD PreferedMaximumLength,
214 DWORD dwStartIndex, dwIndex;
215 DWORD dwEntriesToRead, dwEntriesRead;
216 DWORD dwRequiredSize, dwEntrySize;
220 TRACE(
"NetrJobEnum(%S %p %lu %p %p)\n",
221 ServerName, pEnumContainer, PreferedMaximumLength, pTotalEntries, pResumeHandle);
223 if (pEnumContainer ==
NULL)
235 dwStartIndex = *pResumeHandle;
236 TRACE(
"dwStartIndex: %lu\n", dwStartIndex);
249 if (dwIndex >= dwStartIndex)
251 TRACE(
"dwIndex: %lu\n", dwIndex);
252 dwEntrySize =
sizeof(
AT_ENUM) +
254 TRACE(
"dwEntrySize: %lu\n", dwEntrySize);
256 if ((PreferedMaximumLength !=
ULONG_MAX) &&
257 (dwRequiredSize + dwEntrySize > PreferedMaximumLength))
260 dwRequiredSize += dwEntrySize;
264 JobEntry = JobEntry->
Flink;
267 TRACE(
"dwEntriesToRead: %lu\n", dwEntriesToRead);
268 TRACE(
"dwRequiredSize: %lu\n", dwRequiredSize);
271 dwRequiredSize = PreferedMaximumLength;
273 TRACE(
"Allocating dwRequiredSize: %lu\n", dwRequiredSize);
290 if (dwIndex >= dwStartIndex)
305 if (dwEntriesRead == dwEntriesToRead)
309 JobEntry = JobEntry->
Flink;
314 pEnumContainer->
Buffer = pEnum;
317 *pResumeHandle = dwIndex;
319 if (dwEntriesRead + dwStartIndex <
dwJobCount)
345 TRACE(
"NetrJobGetInfo(%S %lu %p)\n",
346 ServerName, JobId, ppAtInfo);
358 if (CurrentJob->
JobId == JobId)
388 JobEntry = JobEntry->
Flink;
static INT DeleteJob(PWSTR pszComputerName, ULONG ulJobId, BOOL bForceDelete)
const wchar_t * ATSVC_HANDLE
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
DWORD WINAPI RpcThreadRoutine(LPVOID lpParameter)
LONG SaveJob(_In_ PJOB pJob)
VOID CalculateNextStartTime(_In_ PJOB pJob)
VOID DumpStartList(_In_ PLIST_ENTRY StartListHead)
NET_API_STATUS WINAPI NetrJobDel(ATSVC_HANDLE ServerName, DWORD MinJobId, DWORD MaxJobId)
NET_API_STATUS WINAPI NetrJobAdd(ATSVC_HANDLE ServerName, LPAT_INFO pAtInfo, LPDWORD pJobId)
NET_API_STATUS WINAPI NetrJobGetInfo(ATSVC_HANDLE ServerName, DWORD JobId, LPAT_INFO *ppAtInfo)
NET_API_STATUS __stdcall NetrJobEnum(ATSVC_HANDLE ServerName, LPAT_ENUM_CONTAINER pEnumContainer, DWORD PreferedMaximumLength, LPDWORD pTotalEntries, LPDWORD pResumeHandle)
#define ERROR_INVALID_PARAMETER
#define HeapFree(x, y, z)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define ERROR_FILE_NOT_FOUND
NTSYSAPI BOOLEAN NTAPI RtlAcquireResourceShared(_In_ PRTL_RESOURCE Resource, _In_ BOOLEAN Wait)
NTSYSAPI BOOLEAN NTAPI RtlAcquireResourceExclusive(_In_ PRTL_RESOURCE Resource, _In_ BOOLEAN Wait)
NTSYSAPI VOID NTAPI RtlReleaseResource(_In_ PRTL_RESOURCE Resource)
RPC_STATUS WINAPI RpcServerListen(UINT MinimumCallThreads, UINT MaxCalls, UINT DontWait)
RPC_STATUS WINAPI RpcServerRegisterIf(RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, RPC_MGR_EPV *MgrEpv)
RPC_STATUS WINAPI RpcServerUseProtseqEpW(RPC_WSTR Protseq, UINT MaxCalls, RPC_WSTR Endpoint, LPVOID SecurityDescriptor)
#define RPC_C_LISTEN_MAX_CALLS_DEFAULT
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define midl_user_allocate
struct _LIST_ENTRY * Flink
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
#define CONTAINING_RECORD(address, type, field)