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
a484dadf
Commit
a484dadf
authored
Apr 10, 2014
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
schedsvc: Add support for generating new task name in SchRpcRegisterTask.
parent
af0ede42
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
22 deletions
+28
-22
Makefile.in
dlls/schedsvc/Makefile.in
+1
-1
schedsvc.c
dlls/schedsvc/schedsvc.c
+27
-17
rpcapi.c
dlls/schedsvc/tests/rpcapi.c
+0
-4
No files found.
dlls/schedsvc/Makefile.in
View file @
a484dadf
MODULE
=
schedsvc.dll
IMPORTS
=
rpcrt4 advapi32
IMPORTS
=
rpcrt4 advapi32
ole32
C_SRCS
=
\
schedsvc.c
\
...
...
dlls/schedsvc/schedsvc.c
View file @
a484dadf
...
...
@@ -180,27 +180,37 @@ HRESULT __cdecl SchRpcRegisterTask(const WCHAR *path, const WCHAR *xml, DWORD fl
/* FIXME: assume that validation is performed on the client side */
if
(
flags
&
TASK_VALIDATE_ONLY
)
return
S_OK
;
if
(
!
path
)
if
(
path
)
{
FIXME
(
"NULL name is not supported
\n
"
);
return
E_INVALIDARG
;
}
full_name
=
get_full_name
(
path
,
&
relative_path
);
if
(
!
full_name
)
return
E_OUTOFMEMORY
;
full_name
=
get_full_name
(
path
,
&
relative_path
);
if
(
!
full_name
)
return
E_OUTOFMEMORY
;
if
(
strchrW
(
path
,
'\\'
)
||
strchrW
(
path
,
'/'
))
{
WCHAR
*
p
=
strrchrW
(
full_name
,
'/'
);
if
(
!
p
)
p
=
strrchrW
(
full_name
,
'\\'
);
*
p
=
0
;
hr
=
create_directory
(
full_name
);
if
(
hr
!=
S_OK
&&
hr
!=
HRESULT_FROM_WIN32
(
ERROR_ALREADY_EXISTS
))
if
(
strchrW
(
path
,
'\\'
)
||
strchrW
(
path
,
'/'
))
{
heap_free
(
full_name
);
return
hr
;
WCHAR
*
p
=
strrchrW
(
full_name
,
'/'
);
if
(
!
p
)
p
=
strrchrW
(
full_name
,
'\\'
);
*
p
=
0
;
hr
=
create_directory
(
full_name
);
if
(
hr
!=
S_OK
&&
hr
!=
HRESULT_FROM_WIN32
(
ERROR_ALREADY_EXISTS
))
{
heap_free
(
full_name
);
return
hr
;
}
*
p
=
'\\'
;
}
*
p
=
'\\'
;
}
else
{
IID
iid
;
WCHAR
uuid_str
[
39
];
UuidCreate
(
&
iid
);
StringFromGUID2
(
&
iid
,
uuid_str
,
39
);
full_name
=
get_full_name
(
uuid_str
,
&
relative_path
);
if
(
!
full_name
)
return
E_OUTOFMEMORY
;
/* skip leading '\' */
relative_path
++
;
}
switch
(
flags
&
(
TASK_CREATE
|
TASK_UPDATE
))
...
...
dlls/schedsvc/tests/rpcapi.c
View file @
a484dadf
...
...
@@ -521,17 +521,13 @@ todo_wine
path
=
NULL
;
info
=
NULL
;
hr
=
SchRpcRegisterTask
(
NULL
,
xmlW
,
TASK_CREATE
,
NULL
,
TASK_LOGON_NONE
,
0
,
NULL
,
&
path
,
&
info
);
todo_wine
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
!
info
,
"expected NULL, info %p
\n
"
,
info
);
if
(
hr
==
S_OK
)
{
hr
=
IIDFromString
(
path
,
&
iid
);
ok
(
hr
==
S_OK
,
"IIDFromString(%s) error %#x
\n
"
,
wine_dbgstr_w
(
path
),
hr
);
hr
=
SchRpcDelete
(
path
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
MIDL_user_free
(
path
);
}
hr
=
RpcBindingFree
(
&
rpc_handle
);
ok
(
hr
==
RPC_S_OK
,
"RpcBindingFree error %#x
\n
"
,
hr
);
...
...
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