Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
bb14e7b7
Commit
bb14e7b7
authored
Mar 04, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
schedsvc/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f953caf3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
127 additions
and
128 deletions
+127
-128
Makefile.in
dlls/schedsvc/tests/Makefile.in
+0
-1
atsvcapi.c
dlls/schedsvc/tests/atsvcapi.c
+22
-22
rpcapi.c
dlls/schedsvc/tests/rpcapi.c
+105
-105
No files found.
dlls/schedsvc/tests/Makefile.in
View file @
bb14e7b7
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
schedsvc.dll
IMPORTS
=
rpcrt4 ole32
...
...
dlls/schedsvc/tests/atsvcapi.c
View file @
bb14e7b7
...
...
@@ -38,11 +38,11 @@ static int test_failures, test_skipped;
static
LONG
CALLBACK
rpc_exception_filter
(
EXCEPTION_POINTERS
*
ptrs
)
{
if
(
test_skipped
)
skip
(
"Can't connect to ATSvc service: %#x
\n
"
,
ptrs
->
ExceptionRecord
->
ExceptionCode
);
skip
(
"Can't connect to ATSvc service: %#
l
x
\n
"
,
ptrs
->
ExceptionRecord
->
ExceptionCode
);
if
(
winetest_debug
)
{
fprintf
(
stdout
,
"%04x:atsvcapi: 1 tests executed (0 marked as todo, %d %s), %d skipped.
\n
"
,
fprintf
(
stdout
,
"%04
l
x:atsvcapi: 1 tests executed (0 marked as todo, %d %s), %d skipped.
\n
"
,
GetCurrentProcessId
(),
test_failures
,
test_failures
!=
1
?
"failures"
:
"failure"
,
test_skipped
);
fflush
(
stdout
);
}
...
...
@@ -65,14 +65,14 @@ START_TEST(atsvcapi)
total
=
MAX_COMPUTERNAME_LENGTH
+
1
;
SetLastError
(
0xdeadbeef
);
ret
=
GetComputerNameW
(
server_name
,
&
total
);
ok
(
ret
,
"GetComputerName error %u
\n
"
,
GetLastError
());
ok
(
ret
,
"GetComputerName error %
l
u
\n
"
,
GetLastError
());
hr
=
RpcStringBindingComposeA
(
NULL
,
ncalrpc
,
NULL
,
NULL
,
NULL
,
&
binding_str
);
ok
(
hr
==
RPC_S_OK
,
"RpcStringBindingCompose error %#x
\n
"
,
hr
);
ok
(
hr
==
RPC_S_OK
,
"RpcStringBindingCompose error %#
l
x
\n
"
,
hr
);
hr
=
RpcBindingFromStringBindingA
(
binding_str
,
&
atsvc_handle
);
ok
(
hr
==
RPC_S_OK
,
"RpcBindingFromStringBinding error %#x
\n
"
,
hr
);
ok
(
hr
==
RPC_S_OK
,
"RpcBindingFromStringBinding error %#
l
x
\n
"
,
hr
);
hr
=
RpcStringFreeA
(
&
binding_str
);
ok
(
hr
==
RPC_S_OK
,
"RpcStringFree error %#x
\n
"
,
hr
);
ok
(
hr
==
RPC_S_OK
,
"RpcStringFree error %#
l
x
\n
"
,
hr
);
/* widl generated RpcTryExcept/RpcExcept can't catch raised exceptions */
old_exception_filter
=
SetUnhandledExceptionFilter
(
rpc_exception_filter
);
...
...
@@ -91,7 +91,7 @@ START_TEST(atsvcapi)
win_skip
(
"NetrJobAdd: Access denied, skipping the tests
\n
"
);
goto
skip_tests
;
}
ok
(
ret
==
ERROR_SUCCESS
||
broken
(
ret
==
ERROR_NOT_SUPPORTED
)
/* Win8+ */
,
"NetrJobAdd error %u
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
||
broken
(
ret
==
ERROR_NOT_SUPPORTED
)
/* Win8+ */
,
"NetrJobAdd error %
l
u
\n
"
,
ret
);
if
(
ret
==
ERROR_NOT_SUPPORTED
)
{
/* FIXME: use win_skip() when todo_wine above is removed */
...
...
@@ -106,10 +106,10 @@ START_TEST(atsvcapi)
info2
=
NULL
;
ret
=
NetrJobGetInfo
(
server_name
,
0xdeadbeef
,
&
info2
);
ok
(
ret
==
APE_AT_ID_NOT_FOUND
||
broken
(
1
)
/* vista and w2008 return rubbish here */
,
"wrong error %u
\n
"
,
ret
);
ok
(
ret
==
APE_AT_ID_NOT_FOUND
||
broken
(
1
)
/* vista and w2008 return rubbish here */
,
"wrong error %
l
u
\n
"
,
ret
);
ret
=
NetrJobDel
(
server_name
,
0xdeadbeef
,
0xdeadbeef
);
ok
(
ret
==
APE_AT_ID_NOT_FOUND
,
"wrong error %u
\n
"
,
ret
);
ok
(
ret
==
APE_AT_ID_NOT_FOUND
,
"wrong error %
l
u
\n
"
,
ret
);
try_count
=
5
;
...
...
@@ -124,31 +124,31 @@ START_TEST(atsvcapi)
win_skip
(
"NetrJobEnum: Access denied, skipping the tests
\n
"
);
goto
skip_tests_delete
;
}
ok
(
ret
==
ERROR_SUCCESS
,
"NetrJobEnum error %
u (%#
x)
\n
"
,
ret
,
ret
);
ok
(
total
!=
0
,
"total %u
\n
"
,
total
);
ok
(
start_index
==
0
,
"start_index %u
\n
"
,
start_index
);
ok
(
ret
==
ERROR_SUCCESS
,
"NetrJobEnum error %
lu (%#l
x)
\n
"
,
ret
,
ret
);
ok
(
total
!=
0
,
"total %
l
u
\n
"
,
total
);
ok
(
start_index
==
0
,
"start_index %
l
u
\n
"
,
start_index
);
ok
(
container
.
Buffer
!=
NULL
,
"Buffer %p
\n
"
,
container
.
Buffer
);
ok
(
container
.
EntriesRead
!=
0
,
"EntriesRead %u
\n
"
,
container
.
EntriesRead
);
ok
(
container
.
EntriesRead
!=
0
,
"EntriesRead %
l
u
\n
"
,
container
.
EntriesRead
);
found
=
FALSE
;
for
(
i
=
0
;
i
<
container
.
EntriesRead
;
i
++
)
{
trace
(
"%
u: jobid %
u, command %s
\n
"
,
i
,
container
.
Buffer
[
i
].
JobId
,
wine_dbgstr_w
(
container
.
Buffer
[
i
].
Command
));
trace
(
"%
lu: jobid %l
u, command %s
\n
"
,
i
,
container
.
Buffer
[
i
].
JobId
,
wine_dbgstr_w
(
container
.
Buffer
[
i
].
Command
));
if
(
container
.
Buffer
[
i
].
JobId
==
jobid
||
!
lstrcmpW
(
container
.
Buffer
[
i
].
Command
,
task1W
))
{
found
=
TRUE
;
trace
(
"found %
u: jobid %
u, command %s
\n
"
,
i
,
container
.
Buffer
[
i
].
JobId
,
wine_dbgstr_w
(
container
.
Buffer
[
i
].
Command
));
trace
(
"found %
lu: jobid %l
u, command %s
\n
"
,
i
,
container
.
Buffer
[
i
].
JobId
,
wine_dbgstr_w
(
container
.
Buffer
[
i
].
Command
));
}
info2
=
NULL
;
ret
=
NetrJobGetInfo
(
server_name
,
container
.
Buffer
[
i
].
JobId
,
&
info2
);
ok
(
ret
==
ERROR_SUCCESS
,
"NetrJobGetInfo error %u
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"NetrJobGetInfo error %
l
u
\n
"
,
ret
);
ok
(
container
.
Buffer
[
i
].
JobTime
==
info2
->
JobTime
,
"%u != %u
\n
"
,
(
UINT
)
container
.
Buffer
[
i
].
JobTime
,
(
UINT
)
info2
->
JobTime
);
ok
(
container
.
Buffer
[
i
].
DaysOfMonth
==
info2
->
DaysOfMonth
,
"%
u != %
u
\n
"
,
container
.
Buffer
[
i
].
DaysOfMonth
,
info2
->
DaysOfMonth
);
ok
(
container
.
Buffer
[
i
].
DaysOfMonth
==
info2
->
DaysOfMonth
,
"%
lu != %l
u
\n
"
,
container
.
Buffer
[
i
].
DaysOfMonth
,
info2
->
DaysOfMonth
);
ok
(
container
.
Buffer
[
i
].
DaysOfWeek
==
info2
->
DaysOfWeek
,
"%u != %u
\n
"
,
container
.
Buffer
[
i
].
DaysOfWeek
,
info2
->
DaysOfWeek
);
ok
(
container
.
Buffer
[
i
].
Flags
==
info2
->
Flags
,
"%#x != %#x
\n
"
,
container
.
Buffer
[
i
].
Flags
,
info2
->
Flags
);
ok
(
!
lstrcmpW
(
container
.
Buffer
[
i
].
Command
,
info2
->
Command
),
"%s != %s
\n
"
,
wine_dbgstr_w
(
container
.
Buffer
[
i
].
Command
),
wine_dbgstr_w
(
info2
->
Command
));
...
...
@@ -164,17 +164,17 @@ START_TEST(atsvcapi)
MIDL_user_free
(
container
.
Buffer
);
ok
(
found
,
"just added jobid %u should be found
\n
"
,
jobid
);
ok
(
found
,
"just added jobid %
l
u should be found
\n
"
,
jobid
);
skip_tests_delete
:
ret
=
NetrJobDel
(
server_name
,
jobid
,
jobid
);
ok
(
ret
==
ERROR_SUCCESS
,
"NetrJobDel error %u
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"NetrJobDel error %
l
u
\n
"
,
ret
);
skip_tests
:
SetUnhandledExceptionFilter
(
old_exception_filter
);
hr
=
RpcBindingFree
(
&
atsvc_handle
);
ok
(
hr
==
RPC_S_OK
,
"RpcBindingFree error %#x
\n
"
,
hr
);
ok
(
hr
==
RPC_S_OK
,
"RpcBindingFree error %#
l
x
\n
"
,
hr
);
}
DECLSPEC_HIDDEN
handle_t
__RPC_USER
ATSVC_HANDLE_bind
(
ATSVC_HANDLE
str
)
...
...
@@ -185,10 +185,10 @@ DECLSPEC_HIDDEN handle_t __RPC_USER ATSVC_HANDLE_bind(ATSVC_HANDLE str)
HRESULT
hr
;
hr
=
RpcStringBindingComposeA
(
NULL
,
ncalrpc
,
NULL
,
NULL
,
NULL
,
&
binding_str
);
ok
(
hr
==
RPC_S_OK
,
"RpcStringBindingCompose error %#x
\n
"
,
hr
);
ok
(
hr
==
RPC_S_OK
,
"RpcStringBindingCompose error %#
l
x
\n
"
,
hr
);
hr
=
RpcBindingFromStringBindingA
(
binding_str
,
&
rpc_handle
);
ok
(
hr
==
RPC_S_OK
,
"RpcBindingFromStringBinding error %#x
\n
"
,
hr
);
ok
(
hr
==
RPC_S_OK
,
"RpcBindingFromStringBinding error %#
l
x
\n
"
,
hr
);
RpcStringFreeA
(
&
binding_str
);
return
rpc_handle
;
...
...
dlls/schedsvc/tests/rpcapi.c
View file @
bb14e7b7
...
...
@@ -29,11 +29,11 @@ extern handle_t schrpc_handle;
static
LONG
CALLBACK
rpc_exception_filter
(
EXCEPTION_POINTERS
*
ptrs
)
{
skip
(
"Can't connect to Scheduler service: %#x
\n
"
,
ptrs
->
ExceptionRecord
->
ExceptionCode
);
skip
(
"Can't connect to Scheduler service: %#
l
x
\n
"
,
ptrs
->
ExceptionRecord
->
ExceptionCode
);
if
(
winetest_debug
)
{
fprintf
(
stdout
,
"%04x:rpcapi: 0 tests executed (0 marked as todo, 0 failures), 1 skipped.
\n
"
,
GetCurrentProcessId
());
fprintf
(
stdout
,
"%04
l
x:rpcapi: 0 tests executed (0 marked as todo, 0 failures), 1 skipped.
\n
"
,
GetCurrentProcessId
());
fflush
(
stdout
);
}
ExitProcess
(
0
);
...
...
@@ -89,69 +89,69 @@ START_TEST(rpcapi)
IID
iid
;
hr
=
RpcStringBindingComposeA
(
NULL
,
ncalrpc
,
NULL
,
NULL
,
NULL
,
&
binding_str
);
ok
(
hr
==
RPC_S_OK
,
"RpcStringBindingCompose error %#x
\n
"
,
hr
);
ok
(
hr
==
RPC_S_OK
,
"RpcStringBindingCompose error %#
l
x
\n
"
,
hr
);
hr
=
RpcBindingFromStringBindingA
(
binding_str
,
&
schrpc_handle
);
ok
(
hr
==
RPC_S_OK
,
"RpcBindingFromStringBinding error %#x
\n
"
,
hr
);
ok
(
hr
==
RPC_S_OK
,
"RpcBindingFromStringBinding error %#
l
x
\n
"
,
hr
);
hr
=
RpcStringFreeA
(
&
binding_str
);
ok
(
hr
==
RPC_S_OK
,
"RpcStringFree error %#x
\n
"
,
hr
);
ok
(
hr
==
RPC_S_OK
,
"RpcStringFree error %#
l
x
\n
"
,
hr
);
/* widl generated RpcTryExcept/RpcExcept can't catch raised exceptions */
old_exception_filter
=
SetUnhandledExceptionFilter
(
rpc_exception_filter
);
version
=
0
;
hr
=
SchRpcHighestVersion
(
&
version
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
ok
(
version
==
0x10002
/* vista */
||
version
==
0x10003
/* win7 */
||
version
==
0x10004
/* win8 */
||
version
==
0x10005
/* win10 */
||
version
==
0x10006
/* win10 1709 */
,
"wrong version %#x
\n
"
,
version
);
"wrong version %#
l
x
\n
"
,
version
);
SetUnhandledExceptionFilter
(
old_exception_filter
);
hr
=
SchRpcCreateFolder
(
L"
\\
Wine
\\
Folder1"
,
NULL
,
1
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %#x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcCreateFolder
(
L"
\\
Wine
\\
Folder1"
,
NULL
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcCreateFolder
(
L"
\\
Wine
\\
Folder1"
,
NULL
,
0
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_ALREADY_EXISTS
),
"expected ERROR_ALREADY_EXISTS, got %#x
\n
"
,
hr
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_ALREADY_EXISTS
),
"expected ERROR_ALREADY_EXISTS, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcCreateFolder
(
L"Wine
\\
Folder2"
,
L""
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcDelete
(
L"Wine"
,
0
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_DIR_NOT_EMPTY
),
"expected ERROR_DIR_NOT_EMPTY, got %#x
\n
"
,
hr
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_DIR_NOT_EMPTY
),
"expected ERROR_DIR_NOT_EMPTY, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcDelete
(
L"Wine
\\
Folder1"
,
1
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %#x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcDelete
(
L"Wine
\\
Folder1"
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcDelete
(
L"
\\
Wine
\\
Folder2"
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcDelete
(
L"
\\
Wine"
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcDelete
(
L"
\\
Wine"
,
0
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
)
||
broken
(
hr
==
S_OK
),
/* Early versions of Win 10 */
"expected ERROR_FILE_NOT_FOUND, got %#x
\n
"
,
hr
);
"expected ERROR_FILE_NOT_FOUND, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcDelete
(
L""
,
0
);
ok
(
hr
==
E_ACCESSDENIED
/* win7 */
||
hr
==
E_INVALIDARG
/* vista */
,
"expected E_ACCESSDENIED, got %#x
\n
"
,
hr
);
ok
(
hr
==
E_ACCESSDENIED
/* win7 */
||
hr
==
E_INVALIDARG
/* vista */
,
"expected E_ACCESSDENIED, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcCreateFolder
(
L"
\\
Wine"
,
NULL
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
MultiByteToWideChar
(
CP_ACP
,
0
,
xml1
,
-
1
,
xmlW
,
ARRAY_SIZE
(
xmlW
));
path
=
NULL
;
info
=
NULL
;
hr
=
SchRpcRegisterTask
(
L"Wine"
,
xmlW
,
TASK_VALIDATE_ONLY
,
NULL
,
TASK_LOGON_NONE
,
0
,
NULL
,
&
path
,
&
info
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
ok
(
!
path
,
"expected NULL, path %p
\n
"
,
path
);
ok
(
!
info
,
"expected NULL, info %p
\n
"
,
info
);
...
...
@@ -161,12 +161,12 @@ START_TEST(rpcapi)
info
=
NULL
;
hr
=
SchRpcRegisterTask
(
L"
\\
Wine
\\
Task1"
,
xmlW
,
create_new_task
[
i
].
flags
,
NULL
,
TASK_LOGON_NONE
,
0
,
NULL
,
&
path
,
&
info
);
ok
(
hr
==
create_new_task
[
i
].
hr
,
"%
u: expected %#x, got %#
x
\n
"
,
i
,
create_new_task
[
i
].
hr
,
hr
);
ok
(
hr
==
create_new_task
[
i
].
hr
,
"%
lu: expected %#lx, got %#l
x
\n
"
,
i
,
create_new_task
[
i
].
hr
,
hr
);
if
(
hr
==
S_OK
)
{
hr
=
SchRpcDelete
(
L"
\\
Wine
\\
Task1"
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
ok
(
!
info
,
"expected NULL, info %p
\n
"
,
info
);
MIDL_user_free
(
path
);
}
...
...
@@ -175,21 +175,21 @@ START_TEST(rpcapi)
path
=
NULL
;
info
=
NULL
;
hr
=
SchRpcRegisterTask
(
L"
\\
Wine
\\
Task1"
,
xmlW
,
TASK_VALIDATE_ONLY
,
NULL
,
TASK_LOGON_NONE
,
0
,
NULL
,
&
path
,
&
info
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
ok
(
!
path
,
"expected NULL, path %p
\n
"
,
path
);
ok
(
!
info
,
"expected NULL, info %p
\n
"
,
info
);
path
=
NULL
;
info
=
NULL
;
hr
=
SchRpcRegisterTask
(
NULL
,
xmlW
,
TASK_VALIDATE_ONLY
,
NULL
,
TASK_LOGON_NONE
,
0
,
NULL
,
&
path
,
&
info
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
ok
(
!
path
,
"expected NULL, path %p
\n
"
,
path
);
ok
(
!
info
,
"expected NULL, info %p
\n
"
,
info
);
path
=
NULL
;
info
=
NULL
;
hr
=
SchRpcRegisterTask
(
L"Wine
\\
Folder1
\\
Task1"
,
xmlW
,
TASK_CREATE
,
NULL
,
TASK_LOGON_NONE
,
0
,
NULL
,
&
path
,
&
info
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
path
,
L"
\\
Wine
\\
Folder1
\\
Task1"
)
/* win7 */
||
!
lstrcmpW
(
path
,
L"Wine
\\
Folder1
\\
Task1"
)
/* vista */
,
"expected
\\
Wine
\\
Folder1
\\
Task1, task actual path %s
\n
"
,
wine_dbgstr_w
(
path
));
ok
(
!
info
,
"expected NULL, info %p
\n
"
,
info
);
...
...
@@ -201,7 +201,7 @@ START_TEST(rpcapi)
info
=
NULL
;
hr
=
SchRpcRegisterTask
(
L"Wine
\\
Folder1
\\
Task1"
,
xmlW
,
open_existing_task
[
i
].
flags
,
NULL
,
TASK_LOGON_NONE
,
0
,
NULL
,
&
path
,
&
info
);
ok
(
hr
==
open_existing_task
[
i
].
hr
,
"%
u: expected %#x, got %#
x
\n
"
,
i
,
open_existing_task
[
i
].
hr
,
hr
);
ok
(
hr
==
open_existing_task
[
i
].
hr
,
"%
lu: expected %#lx, got %#l
x
\n
"
,
i
,
open_existing_task
[
i
].
hr
,
hr
);
if
(
hr
==
S_OK
)
{
ok
(
!
lstrcmpW
(
path
,
L"
\\
Wine
\\
Folder1
\\
Task1"
)
/* win7 */
||
...
...
@@ -210,64 +210,64 @@ START_TEST(rpcapi)
MIDL_user_free
(
path
);
}
else
ok
(
!
path
,
"%u: expected NULL, path %p
\n
"
,
i
,
path
);
ok
(
!
info
,
"%u: expected NULL, info %p
\n
"
,
i
,
info
);
ok
(
!
path
,
"%
l
u: expected NULL, path %p
\n
"
,
i
,
path
);
ok
(
!
info
,
"%
l
u: expected NULL, info %p
\n
"
,
i
,
info
);
}
path
=
NULL
;
info
=
NULL
;
hr
=
SchRpcRegisterTask
(
L"Wine
\\
Folder1
\\
Task1"
,
xmlW
,
TASK_CREATE
,
NULL
,
TASK_LOGON_NONE
,
0
,
NULL
,
&
path
,
&
info
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_ALREADY_EXISTS
),
"expected ERROR_ALREADY_EXISTS, got %#x
\n
"
,
hr
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_ALREADY_EXISTS
),
"expected ERROR_ALREADY_EXISTS, got %#
l
x
\n
"
,
hr
);
ok
(
!
path
,
"expected NULL, path %p
\n
"
,
path
);
ok
(
!
info
,
"expected NULL, info %p
\n
"
,
info
);
count
=
0
;
xml
=
NULL
;
hr
=
SchRpcRetrieveTask
(
L"
\\
Wine
\\
Folder1
\\
Task1"
,
L""
,
&
count
,
&
xml
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
trace
(
"%s
\n
"
,
wine_dbgstr_w
(
xml
));
MIDL_user_free
(
xml
);
hr
=
SchRpcDelete
(
L"Wine
\\
Folder1
\\
Task1"
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcDelete
(
L"Wine
\\
Folder1"
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcDelete
(
L"Wine"
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
start_index
=
0
;
count
=
0xdeadbeef
;
names
=
NULL
;
hr
=
SchRpcEnumFolders
(
L"
\\
Wine"
,
TASK_ENUM_HIDDEN
,
&
start_index
,
0
,
&
count
,
&
names
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"expected ERROR_FILE_NOT_FOUND, got %#x
\n
"
,
hr
);
ok
(
!
count
,
"expected 0, got %u
\n
"
,
count
);
ok
(
!
start_index
,
"expected 0, got %u
\n
"
,
start_index
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"expected ERROR_FILE_NOT_FOUND, got %#
l
x
\n
"
,
hr
);
ok
(
!
count
,
"expected 0, got %
l
u
\n
"
,
count
);
ok
(
!
start_index
,
"expected 0, got %
l
u
\n
"
,
start_index
);
ok
(
!
names
,
"expected NULL, got %p
\n
"
,
names
);
hr
=
SchRpcCreateFolder
(
L"
\\
Wine"
,
NULL
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
start_index
=
0
;
count
=
0xdeadbeef
;
names
=
NULL
;
hr
=
SchRpcEnumFolders
(
L"
\\
Wine"
,
0
,
&
start_index
,
0
,
&
count
,
&
names
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
!
count
,
"expected 0, got %u
\n
"
,
count
);
ok
(
!
start_index
,
"expected 0, got %u
\n
"
,
start_index
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
ok
(
!
count
,
"expected 0, got %
l
u
\n
"
,
count
);
ok
(
!
start_index
,
"expected 0, got %
l
u
\n
"
,
start_index
);
ok
(
!
names
,
"expected NULL, got %p
\n
"
,
names
);
hr
=
SchRpcCreateFolder
(
L"
\\
Wine
\\
Folder1"
,
NULL
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcCreateFolder
(
L"
\\
Wine
\\
Folder2"
,
NULL
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
start_index
=
0
;
count
=
0xdeadbeef
;
names
=
NULL
;
hr
=
SchRpcEnumFolders
(
L"
\\
Wine"
,
0
,
&
start_index
,
0
,
&
count
,
&
names
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
count
==
2
,
"expected 2, got %u
\n
"
,
count
);
ok
(
start_index
==
2
,
"expected 2, got %u
\n
"
,
start_index
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
ok
(
count
==
2
,
"expected 2, got %
l
u
\n
"
,
count
);
ok
(
start_index
==
2
,
"expected 2, got %
l
u
\n
"
,
start_index
);
ok
(
names
!=
NULL
,
"names should not be NULL
\n
"
);
enumed
=
0
;
for
(
i
=
0
;
i
<
count
;
i
++
)
...
...
@@ -279,15 +279,15 @@ START_TEST(rpcapi)
MIDL_user_free
(
names
[
i
]);
}
MIDL_user_free
(
names
);
ok
(
enumed
==
3
,
"expected 3, got %u
\n
"
,
enumed
);
ok
(
enumed
==
3
,
"expected 3, got %
l
u
\n
"
,
enumed
);
start_index
=
0
;
count
=
0xdeadbeef
;
names
=
NULL
;
hr
=
SchRpcEnumFolders
(
L"
\\
Wine"
,
0
,
&
start_index
,
1
,
&
count
,
&
names
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
ok
(
count
==
1
,
"expected 1, got %u
\n
"
,
count
);
ok
(
start_index
==
1
,
"expected 1, got %u
\n
"
,
start_index
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#
l
x
\n
"
,
hr
);
ok
(
count
==
1
,
"expected 1, got %
l
u
\n
"
,
count
);
ok
(
start_index
==
1
,
"expected 1, got %
l
u
\n
"
,
start_index
);
ok
(
names
!=
NULL
,
"names should not be NULL
\n
"
);
ok
(
!
lstrcmpW
(
names
[
0
],
L"Folder1"
)
||
!
lstrcmpW
(
names
[
0
],
L"Folder2"
),
"got %s
\n
"
,
wine_dbgstr_w
(
names
[
0
]));
MIDL_user_free
(
names
[
0
]);
...
...
@@ -297,9 +297,9 @@ START_TEST(rpcapi)
count
=
0xdeadbeef
;
names
=
NULL
;
hr
=
SchRpcEnumFolders
(
L"
\\
Wine"
,
0
,
&
start_index
,
2
,
&
count
,
&
names
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
ok
(
count
==
2
,
"expected 2, got %u
\n
"
,
count
);
ok
(
start_index
==
2
,
"expected 2, got %u
\n
"
,
start_index
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#
l
x
\n
"
,
hr
);
ok
(
count
==
2
,
"expected 2, got %
l
u
\n
"
,
count
);
ok
(
start_index
==
2
,
"expected 2, got %
l
u
\n
"
,
start_index
);
ok
(
names
!=
NULL
,
"names should not be NULL
\n
"
);
enumed
=
0
;
for
(
i
=
0
;
i
<
count
;
i
++
)
...
...
@@ -311,15 +311,15 @@ START_TEST(rpcapi)
MIDL_user_free
(
names
[
i
]);
}
MIDL_user_free
(
names
);
ok
(
enumed
==
3
,
"expected 3, got %u
\n
"
,
enumed
);
ok
(
enumed
==
3
,
"expected 3, got %
l
u
\n
"
,
enumed
);
start_index
=
0
;
count
=
0xdeadbeef
;
names
=
NULL
;
hr
=
SchRpcEnumFolders
(
L"
\\
Wine"
,
0
,
&
start_index
,
10
,
&
count
,
&
names
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
count
==
2
,
"expected 2, got %u
\n
"
,
count
);
ok
(
start_index
==
2
,
"expected 2, got %u
\n
"
,
start_index
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
ok
(
count
==
2
,
"expected 2, got %
l
u
\n
"
,
count
);
ok
(
start_index
==
2
,
"expected 2, got %
l
u
\n
"
,
start_index
);
ok
(
names
!=
NULL
,
"names should not be NULL
\n
"
);
enumed
=
0
;
for
(
i
=
0
;
i
<
count
;
i
++
)
...
...
@@ -331,35 +331,35 @@ START_TEST(rpcapi)
MIDL_user_free
(
names
[
i
]);
}
MIDL_user_free
(
names
);
ok
(
enumed
==
3
,
"expected 3, got %u
\n
"
,
enumed
);
ok
(
enumed
==
3
,
"expected 3, got %
l
u
\n
"
,
enumed
);
start_index
=
10
;
count
=
0xdeadbeef
;
names
=
NULL
;
hr
=
SchRpcEnumFolders
(
L"
\\
Wine"
,
0
,
&
start_index
,
0
,
&
count
,
&
names
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
ok
(
!
count
,
"expected 0, got %u
\n
"
,
count
);
ok
(
start_index
==
10
,
"expected 10, got %u
\n
"
,
start_index
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#
l
x
\n
"
,
hr
);
ok
(
!
count
,
"expected 0, got %
l
u
\n
"
,
count
);
ok
(
start_index
==
10
,
"expected 10, got %
l
u
\n
"
,
start_index
);
ok
(
!
names
,
"expected NULL, got %p
\n
"
,
names
);
hr
=
SchRpcDelete
(
L"Wine
\\
Folder1"
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcDelete
(
L"
\\
Wine
\\
Folder2"
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
start_index
=
0
;
count
=
0xdeadbeef
;
names
=
NULL
;
hr
=
SchRpcEnumTasks
(
L"
\\
Wine
\\
Folder1"
,
TASK_ENUM_HIDDEN
,
&
start_index
,
0
,
&
count
,
&
names
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"expected ERROR_FILE_NOT_FOUND, got %#x
\n
"
,
hr
);
ok
(
!
count
,
"expected 0, got %u
\n
"
,
count
);
ok
(
!
start_index
,
"expected 0, got %u
\n
"
,
start_index
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"expected ERROR_FILE_NOT_FOUND, got %#
l
x
\n
"
,
hr
);
ok
(
!
count
,
"expected 0, got %
l
u
\n
"
,
count
);
ok
(
!
start_index
,
"expected 0, got %
l
u
\n
"
,
start_index
);
ok
(
!
names
,
"expected NULL, got %p
\n
"
,
names
);
path
=
NULL
;
info
=
NULL
;
hr
=
SchRpcRegisterTask
(
L"Wine
\\
Task1"
,
xmlW
,
TASK_CREATE
,
NULL
,
TASK_LOGON_NONE
,
0
,
NULL
,
&
path
,
&
info
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
path
,
L"
\\
Wine
\\
Task1"
)
/* win7 */
||
!
lstrcmpW
(
path
,
L"Wine
\\
Task1"
)
/* vista */
,
"expected
\\
Wine
\\
Task1, task actual path %s
\n
"
,
wine_dbgstr_w
(
path
));
ok
(
!
info
,
"expected NULL, info %p
\n
"
,
info
);
...
...
@@ -368,7 +368,7 @@ START_TEST(rpcapi)
path
=
NULL
;
info
=
NULL
;
hr
=
SchRpcRegisterTask
(
L"
\\
Wine
\\
Task2"
,
xmlW
,
TASK_CREATE
,
NULL
,
TASK_LOGON_NONE
,
0
,
NULL
,
&
path
,
&
info
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
path
,
L"
\\
Wine
\\
Task2"
),
"expected
\\
Wine
\\
Task2, task actual path %s
\n
"
,
wine_dbgstr_w
(
path
));
ok
(
!
info
,
"expected NULL, info %p
\n
"
,
info
);
MIDL_user_free
(
path
);
...
...
@@ -377,9 +377,9 @@ START_TEST(rpcapi)
count
=
0xdeadbeef
;
names
=
NULL
;
hr
=
SchRpcEnumTasks
(
L"
\\
Wine"
,
0
,
&
start_index
,
0
,
&
count
,
&
names
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
count
==
2
,
"expected 2, got %u
\n
"
,
count
);
ok
(
start_index
==
2
,
"expected 2, got %u
\n
"
,
start_index
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
ok
(
count
==
2
,
"expected 2, got %
l
u
\n
"
,
count
);
ok
(
start_index
==
2
,
"expected 2, got %
l
u
\n
"
,
start_index
);
ok
(
names
!=
NULL
,
"names should not be NULL
\n
"
);
enumed
=
0
;
for
(
i
=
0
;
i
<
count
;
i
++
)
...
...
@@ -391,15 +391,15 @@ START_TEST(rpcapi)
MIDL_user_free
(
names
[
i
]);
}
MIDL_user_free
(
names
);
ok
(
enumed
==
3
,
"expected 3, got %u
\n
"
,
enumed
);
ok
(
enumed
==
3
,
"expected 3, got %
l
u
\n
"
,
enumed
);
start_index
=
0
;
count
=
0xdeadbeef
;
names
=
NULL
;
hr
=
SchRpcEnumTasks
(
L"
\\
Wine"
,
0
,
&
start_index
,
1
,
&
count
,
&
names
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
ok
(
count
==
1
,
"expected 1, got %u
\n
"
,
count
);
ok
(
start_index
==
1
,
"expected 1, got %u
\n
"
,
start_index
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#
l
x
\n
"
,
hr
);
ok
(
count
==
1
,
"expected 1, got %
l
u
\n
"
,
count
);
ok
(
start_index
==
1
,
"expected 1, got %
l
u
\n
"
,
start_index
);
ok
(
names
!=
NULL
,
"names should not be NULL
\n
"
);
/* returned name depends whether directory randomization is on */
ok
(
!
lstrcmpW
(
names
[
0
],
L"Task1"
)
||
!
lstrcmpW
(
names
[
0
],
L"Task2"
),
...
...
@@ -411,9 +411,9 @@ START_TEST(rpcapi)
count
=
0xdeadbeef
;
names
=
NULL
;
hr
=
SchRpcEnumTasks
(
L"
\\
Wine"
,
0
,
&
start_index
,
2
,
&
count
,
&
names
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
ok
(
count
==
2
,
"expected 2, got %u
\n
"
,
count
);
ok
(
start_index
==
2
,
"expected 2, got %u
\n
"
,
start_index
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#
l
x
\n
"
,
hr
);
ok
(
count
==
2
,
"expected 2, got %
l
u
\n
"
,
count
);
ok
(
start_index
==
2
,
"expected 2, got %
l
u
\n
"
,
start_index
);
ok
(
names
!=
NULL
,
"names should not be NULL
\n
"
);
enumed
=
0
;
for
(
i
=
0
;
i
<
count
;
i
++
)
...
...
@@ -425,15 +425,15 @@ START_TEST(rpcapi)
MIDL_user_free
(
names
[
i
]);
}
MIDL_user_free
(
names
);
ok
(
enumed
==
3
,
"expected 3, got %u
\n
"
,
enumed
);
ok
(
enumed
==
3
,
"expected 3, got %
l
u
\n
"
,
enumed
);
start_index
=
0
;
count
=
0xdeadbeef
;
names
=
NULL
;
hr
=
SchRpcEnumTasks
(
L"
\\
Wine"
,
0
,
&
start_index
,
10
,
&
count
,
&
names
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
count
==
2
,
"expected 2, got %u
\n
"
,
count
);
ok
(
start_index
==
2
,
"expected 2, got %u
\n
"
,
start_index
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
ok
(
count
==
2
,
"expected 2, got %
l
u
\n
"
,
count
);
ok
(
start_index
==
2
,
"expected 2, got %
l
u
\n
"
,
start_index
);
ok
(
names
!=
NULL
,
"names should not be NULL
\n
"
);
enumed
=
0
;
for
(
i
=
0
;
i
<
count
;
i
++
)
...
...
@@ -445,12 +445,12 @@ START_TEST(rpcapi)
MIDL_user_free
(
names
[
i
]);
}
MIDL_user_free
(
names
);
ok
(
enumed
==
3
,
"expected 3, got %u
\n
"
,
enumed
);
ok
(
enumed
==
3
,
"expected 3, got %
l
u
\n
"
,
enumed
);
path
=
NULL
;
info
=
NULL
;
hr
=
SchRpcRegisterTask
(
L"Wine
\\
Task3"
,
xmlW
,
TASK_CREATE
,
NULL
,
TASK_LOGON_NONE
,
0
,
NULL
,
&
path
,
&
info
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
path
,
L"
\\
Wine
\\
Task3"
)
/* win7 */
||
!
lstrcmpW
(
path
,
L"Wine
\\
Task3"
)
/* vista */
,
"expected
\\
Wine
\\
Task3, task actual path %s
\n
"
,
wine_dbgstr_w
(
path
));
ok
(
!
info
,
"expected NULL, info %p
\n
"
,
info
);
...
...
@@ -459,9 +459,9 @@ START_TEST(rpcapi)
count
=
0xdeadbeef
;
names
=
NULL
;
hr
=
SchRpcEnumTasks
(
L"Wine"
,
0
,
&
start_index
,
10
,
&
count
,
&
names
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
count
==
1
,
"expected 1, got %u
\n
"
,
count
);
ok
(
start_index
==
3
,
"expected 3, got %u
\n
"
,
start_index
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
ok
(
count
==
1
,
"expected 1, got %
l
u
\n
"
,
count
);
ok
(
start_index
==
3
,
"expected 3, got %
l
u
\n
"
,
start_index
);
ok
(
names
!=
NULL
,
"names should not be NULL
\n
"
);
/* returned name depends whether directory randomization is on */
ok
(
!
lstrcmpW
(
names
[
0
],
L"Task1"
)
||
!
lstrcmpW
(
names
[
0
],
L"Task2"
)
||
!
lstrcmpW
(
names
[
0
],
L"Task3"
),
...
...
@@ -478,45 +478,45 @@ START_TEST(rpcapi)
}
hr
=
SchRpcGetTaskInfo
(
L"Task1"
,
0
,
&
enabled
,
&
state
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"expected ERROR_FILE_NOT_FOUND, got %#x
\n
"
,
hr
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"expected ERROR_FILE_NOT_FOUND, got %#
l
x
\n
"
,
hr
);
enabled
=
state
=
0xdeadbeef
;
hr
=
SchRpcGetTaskInfo
(
L"
\\
Wine
\\
Task1"
,
0
,
&
enabled
,
&
state
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
enabled
==
0
,
"expected 0, got %u
\n
"
,
enabled
);
ok
(
state
==
TASK_STATE_UNKNOWN
,
"expected TASK_STATE_UNKNOWN, got %u
\n
"
,
state
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
ok
(
enabled
==
0
,
"expected 0, got %
l
u
\n
"
,
enabled
);
ok
(
state
==
TASK_STATE_UNKNOWN
,
"expected TASK_STATE_UNKNOWN, got %
l
u
\n
"
,
state
);
enabled
=
state
=
0xdeadbeef
;
hr
=
SchRpcGetTaskInfo
(
L"
\\
Wine
\\
Task1"
,
SCH_FLAG_STATE
,
&
enabled
,
&
state
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
enabled
==
0
,
"expected 0, got %u
\n
"
,
enabled
);
ok
(
state
==
TASK_STATE_DISABLED
,
"expected TASK_STATE_DISABLED, got %u
\n
"
,
state
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
ok
(
enabled
==
0
,
"expected 0, got %
l
u
\n
"
,
enabled
);
ok
(
state
==
TASK_STATE_DISABLED
,
"expected TASK_STATE_DISABLED, got %
l
u
\n
"
,
state
);
hr
=
SchRpcEnableTask
(
L"
\\
Wine
\\
Task1"
,
0xdeadbeef
);
todo_wine
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
enabled
=
state
=
0xdeadbeef
;
hr
=
SchRpcGetTaskInfo
(
L"
\\
Wine
\\
Task1"
,
SCH_FLAG_STATE
,
&
enabled
,
&
state
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
todo_wine
ok
(
enabled
==
1
,
"expected 1, got %u
\n
"
,
enabled
);
ok
(
enabled
==
1
,
"expected 1, got %
l
u
\n
"
,
enabled
);
todo_wine
ok
(
state
==
TASK_STATE_READY
,
"expected TASK_STATE_READY, got %u
\n
"
,
state
);
ok
(
state
==
TASK_STATE_READY
,
"expected TASK_STATE_READY, got %
l
u
\n
"
,
state
);
hr
=
SchRpcDelete
(
L"Wine
\\
Task1"
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcDelete
(
L"Wine
\\
Task2"
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcDelete
(
L"Wine
\\
Task3"
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
hr
=
SchRpcDelete
(
L"
\\
Wine"
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
path
=
NULL
;
info
=
NULL
;
hr
=
SchRpcRegisterTask
(
NULL
,
xmlW
,
TASK_CREATE
,
NULL
,
TASK_LOGON_NONE
,
0
,
NULL
,
&
path
,
&
info
);
ok
(
hr
==
S_OK
||
hr
==
E_ACCESSDENIED
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
||
hr
==
E_ACCESSDENIED
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
if
(
hr
!=
E_ACCESSDENIED
)
{
ok
(
!
info
,
"expected NULL, info %p
\n
"
,
info
);
...
...
@@ -524,14 +524,14 @@ START_TEST(rpcapi)
hr
=
IIDFromString
(
path
+
1
,
&
iid
);
else
hr
=
IIDFromString
(
path
,
&
iid
);
ok
(
hr
==
S_OK
,
"IIDFromString(%s) error %#x
\n
"
,
wine_dbgstr_w
(
path
),
hr
);
ok
(
hr
==
S_OK
,
"IIDFromString(%s) error %#
l
x
\n
"
,
wine_dbgstr_w
(
path
),
hr
);
hr
=
SchRpcDelete
(
path
,
0
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"expected S_OK, got %#
l
x
\n
"
,
hr
);
MIDL_user_free
(
path
);
}
hr
=
RpcBindingFree
(
&
schrpc_handle
);
ok
(
hr
==
RPC_S_OK
,
"RpcBindingFree error %#x
\n
"
,
hr
);
ok
(
hr
==
RPC_S_OK
,
"RpcBindingFree error %#
l
x
\n
"
,
hr
);
}
void
__RPC_FAR
*
__RPC_USER
MIDL_user_allocate
(
SIZE_T
n
)
...
...
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