Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bab40d15
Commit
bab40d15
authored
Apr 17, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
schedsvc: Implement NetrJobEnum.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
be3f4a79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
2 deletions
+58
-2
atsvc.c
dlls/schedsvc/atsvc.c
+58
-2
No files found.
dlls/schedsvc/atsvc.c
View file @
bab40d15
...
@@ -367,11 +367,67 @@ DWORD __cdecl NetrJobDel(ATSVC_HANDLE server_name, DWORD min_jobid, DWORD max_jo
...
@@ -367,11 +367,67 @@ DWORD __cdecl NetrJobDel(ATSVC_HANDLE server_name, DWORD min_jobid, DWORD max_jo
return
ERROR_NOT_SUPPORTED
;
return
ERROR_NOT_SUPPORTED
;
}
}
static
void
free_container
(
AT_ENUM_CONTAINER
*
container
)
{
DWORD
i
;
for
(
i
=
0
;
i
<
container
->
EntriesRead
;
i
++
)
heap_free
(
container
->
Buffer
[
i
].
Command
);
heap_free
(
container
->
Buffer
);
}
DWORD
__cdecl
NetrJobEnum
(
ATSVC_HANDLE
server_name
,
AT_ENUM_CONTAINER
*
container
,
DWORD
__cdecl
NetrJobEnum
(
ATSVC_HANDLE
server_name
,
AT_ENUM_CONTAINER
*
container
,
DWORD
max_length
,
DWORD
*
total
,
DWORD
*
resume
)
DWORD
max_length
,
DWORD
*
total
,
DWORD
*
resume
)
{
{
FIXME
(
"%s,%p,%u,%p,%p: stub
\n
"
,
debugstr_w
(
server_name
),
container
,
max_length
,
total
,
resume
);
DWORD
allocated
;
return
ERROR_NOT_SUPPORTED
;
struct
job_t
*
job
;
TRACE
(
"%s,%p,%u,%p,%p
\n
"
,
debugstr_w
(
server_name
),
container
,
max_length
,
total
,
resume
);
*
total
=
0
;
*
resume
=
0
;
container
->
EntriesRead
=
0
;
allocated
=
64
;
container
->
Buffer
=
heap_alloc
(
allocated
*
sizeof
(
AT_ENUM
));
if
(
!
container
->
Buffer
)
return
ERROR_NOT_ENOUGH_MEMORY
;
EnterCriticalSection
(
&
at_job_list_section
);
LIST_FOR_EACH_ENTRY
(
job
,
&
at_job_list
,
struct
job_t
,
entry
)
{
if
(
container
->
EntriesRead
>=
max_length
)
{
*
resume
=
container
->
EntriesRead
;
break
;
}
if
(
allocated
<=
container
->
EntriesRead
)
{
AT_ENUM
*
new_buffer
;
allocated
*=
2
;
new_buffer
=
heap_realloc
(
container
->
Buffer
,
allocated
*
sizeof
(
AT_ENUM
));
if
(
!
new_buffer
)
{
free_container
(
container
);
LeaveCriticalSection
(
&
at_job_list_section
);
return
ERROR_NOT_ENOUGH_MEMORY
;
}
container
->
Buffer
=
new_buffer
;
}
container
->
Buffer
[
container
->
EntriesRead
]
=
job
->
info
;
container
->
Buffer
[
container
->
EntriesRead
].
Command
=
heap_strdupW
(
job
->
info
.
Command
);
container
->
EntriesRead
++
;
}
LeaveCriticalSection
(
&
at_job_list_section
);
*
total
=
container
->
EntriesRead
;
return
ERROR_SUCCESS
;
}
}
DWORD
__cdecl
NetrJobGetInfo
(
ATSVC_HANDLE
server_name
,
DWORD
jobid
,
AT_INFO
**
info
)
DWORD
__cdecl
NetrJobGetInfo
(
ATSVC_HANDLE
server_name
,
DWORD
jobid
,
AT_INFO
**
info
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment