ReactOS 0.4.16-dev-91-g764881a
schedule.c File Reference
#include "netapi32.h"
#include "atsvc_c.h"
Include dependency graph for schedule.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (netapi32)
 
handle_t __RPC_USER ATSVC_HANDLE_bind (ATSVC_HANDLE pszSystemName)
 
void __RPC_USER ATSVC_HANDLE_unbind (ATSVC_HANDLE pszSystemName, handle_t hBinding)
 
NET_API_STATUS WINAPI NetScheduleJobAdd (LPCWSTR ServerName, LPBYTE Buffer, LPDWORD JobId)
 
NET_API_STATUS WINAPI NetScheduleJobDel (LPCWSTR ServerName, DWORD MinJobId, DWORD MaxJobId)
 
NET_API_STATUS WINAPI NetScheduleJobEnum (LPCWSTR ServerName, LPBYTE *PointerToBuffer, DWORD PreferredMaximumLength, LPDWORD EntriesRead, LPDWORD TotalEntries, LPDWORD ResumeHandle)
 
NET_API_STATUS WINAPI NetScheduleJobGetInfo (LPCWSTR ServerName, DWORD JobId, LPBYTE *PointerToBuffer)
 

Function Documentation

◆ ATSVC_HANDLE_bind()

handle_t __RPC_USER ATSVC_HANDLE_bind ( ATSVC_HANDLE  pszSystemName)

Definition at line 20 of file schedule.c.

21{
23 LPWSTR pszStringBinding;
25
26 TRACE("ATSVC_HANDLE_bind() called\n");
27
29 L"ncacn_np",
30 (RPC_WSTR)pszSystemName,
31 L"\\pipe\\atsvc",
32 NULL,
33 &pszStringBinding);
34 if (status)
35 {
36 TRACE("RpcStringBindingCompose returned 0x%x\n", status);
37 return NULL;
38 }
39
40 /* Set the binding handle that will be used to bind to the server. */
41 status = RpcBindingFromStringBindingW(pszStringBinding,
42 &hBinding);
43 if (status)
44 {
45 TRACE("RpcBindingFromStringBinding returned 0x%x\n", status);
46 }
47
48 status = RpcStringFreeW(&pszStringBinding);
49 if (status)
50 {
51// TRACE("RpcStringFree returned 0x%x\n", status);
52 }
53
54 return hBinding;
55}
handle_t hBinding
Definition: ctx_c.c:54
#define NULL
Definition: types.h:112
#define L(x)
Definition: ntvdm.h:50
RPC_STATUS WINAPI RpcBindingFromStringBindingW(RPC_WSTR StringBinding, RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:880
RPC_STATUS WINAPI RpcStringBindingComposeW(RPC_WSTR ObjUuid, RPC_WSTR Protseq, RPC_WSTR NetworkAddr, RPC_WSTR Endpoint, RPC_WSTR Options, RPC_WSTR *StringBinding)
Definition: rpc_binding.c:510
unsigned short * RPC_WSTR
Definition: rpcdce.h:46
RPC_STATUS WINAPI RpcStringFreeW(RPC_WSTR *String)
Definition: rpcrt4_main.c:175
long RPC_STATUS
Definition: rpc.h:52
#define TRACE(s)
Definition: solgame.cpp:4
Definition: ps.c:97
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ ATSVC_HANDLE_unbind()

void __RPC_USER ATSVC_HANDLE_unbind ( ATSVC_HANDLE  pszSystemName,
handle_t  hBinding 
)

Definition at line 59 of file schedule.c.

61{
63
64 TRACE("ATSVC_HANDLE_unbind() called\n");
65
67 if (status)
68 {
69 TRACE("RpcBindingFree returned 0x%x\n", status);
70 }
71}
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:787

◆ NetScheduleJobAdd()

NET_API_STATUS WINAPI NetScheduleJobAdd ( LPCWSTR  ServerName,
LPBYTE  Buffer,
LPDWORD  JobId 
)

Definition at line 76 of file schedule.c.

80{
82
83 TRACE("NetScheduleJobAdd(%s, %p, %p)\n", debugstr_w(ServerName),
84 Buffer, JobId);
85
87 {
88 status = NetrJobAdd(ServerName,
90 JobId);
91 }
93 {
95 }
97
98 return status;
99}
NET_API_STATUS WINAPI NetrJobAdd(ATSVC_HANDLE ServerName, LPAT_INFO pAtInfo, LPDWORD pJobId)
Definition: rpcserver.c:84
Definition: bufpool.h:45
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define debugstr_w
Definition: kernel32.h:32
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:740
#define RpcEndExcept
Definition: rpc.h:128
#define RpcTryExcept
Definition: rpc.h:126
#define RpcExcept(expr)
Definition: rpc.h:127
#define RpcExceptionCode()
Definition: rpc.h:132
Definition: lmat.h:22

Referenced by AddJob().

◆ NetScheduleJobDel()

NET_API_STATUS WINAPI NetScheduleJobDel ( LPCWSTR  ServerName,
DWORD  MinJobId,
DWORD  MaxJobId 
)

Definition at line 104 of file schedule.c.

108{
110
111 TRACE("NetScheduleJobDel(%s, %d, %d)\n", debugstr_w(ServerName),
112 MinJobId, MaxJobId);
113
115 {
116 status = NetrJobDel(ServerName,
117 MinJobId,
118 MaxJobId);
119 }
121 {
123 }
125
126 return status;
127}
NET_API_STATUS WINAPI NetrJobDel(ATSVC_HANDLE ServerName, DWORD MinJobId, DWORD MaxJobId)
Definition: rpcserver.c:145

Referenced by DeleteJob().

◆ NetScheduleJobEnum()

NET_API_STATUS WINAPI NetScheduleJobEnum ( LPCWSTR  ServerName,
LPBYTE PointerToBuffer,
DWORD  PreferredMaximumLength,
LPDWORD  EntriesRead,
LPDWORD  TotalEntries,
LPDWORD  ResumeHandle 
)

Definition at line 132 of file schedule.c.

139{
140 AT_ENUM_CONTAINER EnumContainer;
142
143 TRACE("NetScheduleJobEnum(%s, %p, %d, %p, %p, %p)\n", debugstr_w(ServerName),
144 PointerToBuffer, PreferredMaximumLength, EntriesRead, TotalEntries, ResumeHandle);
145
146 EnumContainer.EntriesRead = 0;
147 EnumContainer.Buffer = NULL;
148
150 {
151 status = NetrJobEnum(ServerName,
152 &EnumContainer,
153 PreferredMaximumLength,
154 TotalEntries,
155 ResumeHandle);
157 {
158 *PointerToBuffer = (LPBYTE)EnumContainer.Buffer;
159 *EntriesRead = EnumContainer.EntriesRead;
160 }
161 }
163 {
165 }
167
168 return status;
169}
NET_API_STATUS __stdcall NetrJobEnum(ATSVC_HANDLE ServerName, LPAT_ENUM_CONTAINER pEnumContainer, DWORD PreferedMaximumLength, LPDWORD pTotalEntries, LPDWORD pResumeHandle)
Definition: rpcserver.c:204
#define ERROR_MORE_DATA
Definition: dderror.h:13
#define NERR_Success
Definition: lmerr.h:5
DWORD EntriesRead
Definition: atsvc.idl:30
LPAT_ENUM Buffer
Definition: atsvc.idl:31
unsigned char * LPBYTE
Definition: typedefs.h:53

Referenced by PrintAllJobs().

◆ NetScheduleJobGetInfo()

NET_API_STATUS WINAPI NetScheduleJobGetInfo ( LPCWSTR  ServerName,
DWORD  JobId,
LPBYTE PointerToBuffer 
)

Definition at line 174 of file schedule.c.

178{
180
181 TRACE("NetScheduleJobGetInfo(%s, %d, %p)\n", debugstr_w(ServerName),
182 JobId, PointerToBuffer);
183
185 {
186 status = NetrJobGetInfo(ServerName,
187 JobId,
188 (LPAT_INFO *)PointerToBuffer);
189 }
191 {
193 }
195
196 return status;
197}
NET_API_STATUS WINAPI NetrJobGetInfo(ATSVC_HANDLE ServerName, DWORD JobId, LPAT_INFO *ppAtInfo)
Definition: rpcserver.c:335

Referenced by PrintJobDetails().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( netapi32  )