Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
46735ae4
Commit
46735ae4
authored
17 years ago
by
Francois Gouget
Committed by
Alexandre Julliard
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
shell32/tests: Use GetProcAddress() on Shell_NotifyIconW() because it is missing on Windows 95.
parent
d22568d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/shell32/tests/systray.c
+27
-18
27 additions, 18 deletions
dlls/shell32/tests/systray.c
with
27 additions
and
18 deletions
dlls/shell32/tests/systray.c
+
27
−
18
View file @
46735ae4
...
...
@@ -26,30 +26,35 @@
static
HWND
hMainWnd
;
static
BOOL
(
WINAPI
*
pShell_NotifyIconW
)(
DWORD
,
PNOTIFYICONDATAW
);
void
test_cbsize
(
void
)
{
NOTIFYICONDATAW
nidW
;
NOTIFYICONDATAA
nidA
;
ZeroMemory
(
&
nidW
,
sizeof
(
nidW
));
nidW
.
cbSize
=
NOTIFYICONDATAW_V1_SIZE
;
nidW
.
hWnd
=
hMainWnd
;
nidW
.
uID
=
1
;
nidW
.
uFlags
=
NIF_ICON
|
NIF_MESSAGE
;
nidW
.
hIcon
=
LoadIcon
(
NULL
,
IDI_APPLICATION
);
nidW
.
uCallbackMessage
=
WM_USER
+
17
;
ok
(
Shell_NotifyIconW
(
NIM_ADD
,
&
nidW
),
"NIM_ADD failed!
\n
"
);
if
(
pShell_NotifyIconW
)
{
NOTIFYICONDATAW
nidW
;
/* using an invalid cbSize does work */
nidW
.
cbSize
=
3
;
nidW
.
hWnd
=
hMainWnd
;
nidW
.
uID
=
1
;
ok
(
Shell_NotifyIconW
(
NIM_DELETE
,
&
nidW
),
"NIM_DELETE failed!
\n
"
);
/* as icon doesn't exist anymore - now there will be an error */
nidW
.
cbSize
=
sizeof
(
nidW
);
/* wine currently doesn't return error code put prints an ERR(...) */
todo_wine
ok
(
!
Shell_NotifyIconW
(
NIM_DELETE
,
&
nidW
),
"The icon was not deleted
\n
"
);
ZeroMemory
(
&
nidW
,
sizeof
(
nidW
));
nidW
.
cbSize
=
NOTIFYICONDATAW_V1_SIZE
;
nidW
.
hWnd
=
hMainWnd
;
nidW
.
uID
=
1
;
nidW
.
uFlags
=
NIF_ICON
|
NIF_MESSAGE
;
nidW
.
hIcon
=
LoadIcon
(
NULL
,
IDI_APPLICATION
);
nidW
.
uCallbackMessage
=
WM_USER
+
17
;
ok
(
pShell_NotifyIconW
(
NIM_ADD
,
&
nidW
),
"NIM_ADD failed!
\n
"
);
/* using an invalid cbSize does work */
nidW
.
cbSize
=
3
;
nidW
.
hWnd
=
hMainWnd
;
nidW
.
uID
=
1
;
ok
(
pShell_NotifyIconW
(
NIM_DELETE
,
&
nidW
),
"NIM_DELETE failed!
\n
"
);
/* as icon doesn't exist anymore - now there will be an error */
nidW
.
cbSize
=
sizeof
(
nidW
);
/* wine currently doesn't return error code put prints an ERR(...) */
todo_wine
ok
(
!
pShell_NotifyIconW
(
NIM_DELETE
,
&
nidW
),
"The icon was not deleted
\n
"
);
}
/* same for Shell_NotifyIconA */
ZeroMemory
(
&
nidA
,
sizeof
(
nidA
));
...
...
@@ -77,6 +82,10 @@ START_TEST(systray)
WNDCLASSA
wc
;
MSG
msg
;
RECT
rc
;
HMODULE
hdll
;
hdll
=
GetModuleHandleA
(
"shell32.dll"
);
pShell_NotifyIconW
=
(
void
*
)
GetProcAddress
(
hdll
,
"Shell_NotifyIconW"
);
wc
.
style
=
CS_HREDRAW
|
CS_VREDRAW
;
wc
.
cbClsExtra
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment