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
b9507d0e
Commit
b9507d0e
authored
May 29, 2023
by
Jinoh Kang
Committed by
Alexandre Julliard
May 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Test setting lpResourceName to NULL for CreateActCtxW.
parent
f0fcce14
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
actctx.c
dlls/kernel32/tests/actctx.c
+54
-0
No files found.
dlls/kernel32/tests/actctx.c
View file @
b9507d0e
...
...
@@ -3779,6 +3779,59 @@ static void test_manifest_in_module(void)
ReleaseActCtx
(
handle
);
}
static
void
test_manifest_resource_name_omitted
(
void
)
{
WCHAR
pathbuf
[
MAX_PATH
];
HANDLE
handle
;
ACTCTXW
ctx
;
DWORD
err
,
len
;
memset
(
&
ctx
,
0
,
sizeof
(
ctx
));
ctx
.
cbSize
=
sizeof
(
ctx
);
ctx
.
dwFlags
=
ACTCTX_FLAG_HMODULE_VALID
;
ctx
.
hModule
=
GetModuleHandleW
(
NULL
);
handle
=
CreateActCtxW
(
&
ctx
);
err
=
GetLastError
();
ok
(
handle
==
INVALID_HANDLE_VALUE
,
"CreateActCtxW shall fail
\n
"
);
todo_wine
ok
(
err
==
ERROR_RESOURCE_TYPE_NOT_FOUND
,
"got %lu
\n
"
,
err
);
memset
(
&
ctx
,
0
,
sizeof
(
ctx
));
ctx
.
cbSize
=
sizeof
(
ctx
);
ctx
.
dwFlags
=
ACTCTX_FLAG_HMODULE_VALID
|
ACTCTX_FLAG_RESOURCE_NAME_VALID
;
ctx
.
hModule
=
GetModuleHandleW
(
NULL
);
ctx
.
lpResourceName
=
NULL
;
handle
=
CreateActCtxW
(
&
ctx
);
err
=
GetLastError
();
ok
(
handle
==
INVALID_HANDLE_VALUE
,
"CreateActCtxW shall fail
\n
"
);
todo_wine
ok
(
err
==
ERROR_INVALID_PARAMETER
,
"got %lu
\n
"
,
err
);
len
=
GetModuleFileNameW
(
NULL
,
pathbuf
,
ARRAY_SIZE
(
pathbuf
));
ok
(
len
>
0
&&
len
<
ARRAY_SIZE
(
pathbuf
),
"GetModuleFileNameW returned error %lu
\n
"
,
GetLastError
());
memset
(
&
ctx
,
0
,
sizeof
(
ctx
));
ctx
.
cbSize
=
sizeof
(
ctx
);
ctx
.
lpSource
=
pathbuf
;
ctx
.
dwFlags
=
0
;
handle
=
CreateActCtxW
(
&
ctx
);
err
=
GetLastError
();
ok
(
handle
==
INVALID_HANDLE_VALUE
,
"CreateActCtxW shall fail
\n
"
);
todo_wine
ok
(
err
==
ERROR_RESOURCE_TYPE_NOT_FOUND
,
"got %lu
\n
"
,
err
);
memset
(
&
ctx
,
0
,
sizeof
(
ctx
));
ctx
.
cbSize
=
sizeof
(
ctx
);
ctx
.
lpSource
=
pathbuf
;
ctx
.
dwFlags
=
ACTCTX_FLAG_RESOURCE_NAME_VALID
;
ctx
.
lpResourceName
=
NULL
;
handle
=
CreateActCtxW
(
&
ctx
);
err
=
GetLastError
();
ok
(
handle
==
INVALID_HANDLE_VALUE
,
"CreateActCtxW shall fail
\n
"
);
todo_wine
ok
(
err
==
ERROR_INVALID_PARAMETER
,
"got %lu
\n
"
,
err
);
}
START_TEST
(
actctx
)
{
int
argc
;
...
...
@@ -3806,6 +3859,7 @@ START_TEST(actctx)
}
test_manifest_in_module
();
test_manifest_resource_name_omitted
();
test_actctx
();
test_create_fail
();
test_CreateActCtx
();
...
...
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