2 * Copyright (C) 2008 Google (Roy Shea)
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
29 #include "mstask_private.h"
31 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(mstask
);
37 HRESULT WINAPI
DllGetClassObject(REFCLSID rclsid
, REFIID iid
, LPVOID
*ppv
)
39 TRACE("(%s %s %p)\n", debugstr_guid(rclsid
), debugstr_guid(iid
), ppv
);
41 if (IsEqualGUID(rclsid
, &CLSID_CTaskScheduler
)) {
42 return IClassFactory_QueryInterface((LPCLASSFACTORY
)&MSTASK_ClassFactory
, iid
, ppv
);
45 FIXME("Not supported class: %s\n", debugstr_guid(rclsid
));
46 return CLASS_E_CLASSNOTAVAILABLE
;
49 HRESULT WINAPI
DllCanUnloadNow(void)
51 return dll_ref
!= 0 ? S_FALSE
: S_OK
;
54 DWORD WINAPI
NetrJobAdd_wrapper(ATSVC_HANDLE server_name
, LPAT_INFO info
, LPDWORD jobid
)
56 return NetrJobAdd(server_name
, info
, jobid
);
59 DWORD WINAPI
NetrJobDel_wrapper(ATSVC_HANDLE server_name
, DWORD min_jobid
, DWORD max_jobid
)
61 return NetrJobDel(server_name
, min_jobid
, max_jobid
);
64 DWORD WINAPI
NetrJobEnum_wrapper(ATSVC_HANDLE server_name
, LPAT_ENUM_CONTAINER container
,
65 DWORD max_length
, LPDWORD total
, LPDWORD resume
)
67 return NetrJobEnum(server_name
, container
, max_length
, total
, resume
);
70 DWORD WINAPI
NetrJobGetInfo_wrapper(ATSVC_HANDLE server_name
, DWORD jobid
, LPAT_INFO
*info
)
72 return NetrJobGetInfo(server_name
, jobid
, info
);
75 DECLSPEC_HIDDEN
void __RPC_FAR
*__RPC_USER
MIDL_user_allocate(SIZE_T n
)
77 return HeapAlloc(GetProcessHeap(), 0, n
);
80 DECLSPEC_HIDDEN
void __RPC_USER
MIDL_user_free(void __RPC_FAR
*p
)
82 HeapFree(GetProcessHeap(), 0, p
);
85 DECLSPEC_HIDDEN handle_t __RPC_USER
ATSVC_HANDLE_bind(ATSVC_HANDLE str
)
87 static unsigned char ncalrpc
[] = "ncalrpc";
88 unsigned char *binding_str
;
89 handle_t rpc_handle
= 0;
91 if (RpcStringBindingComposeA(NULL
, ncalrpc
, NULL
, NULL
, NULL
, &binding_str
) == RPC_S_OK
)
93 RpcBindingFromStringBindingA(binding_str
, &rpc_handle
);
94 RpcStringFreeA(&binding_str
);
99 DECLSPEC_HIDDEN
void __RPC_USER
ATSVC_HANDLE_unbind(ATSVC_HANDLE ServerName
, handle_t rpc_handle
)
101 RpcBindingFree(&rpc_handle
);