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
dcab5fe6
Commit
dcab5fe6
authored
May 12, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 12, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Make default context structure layout compatible.
parent
77684998
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
1 deletion
+53
-1
queue.c
dlls/setupapi/queue.c
+6
-1
misc.c
dlls/setupapi/tests/misc.c
+47
-0
No files found.
dlls/setupapi/queue.c
View file @
dcab5fe6
...
...
@@ -39,9 +39,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(setupapi);
/* context structure for the default queue callback */
struct
default_callback_context
{
DWORD
magic
;
HWND
owner
;
DWORD
unk1
[
4
];
DWORD_PTR
unk2
[
7
];
HWND
progress
;
UINT
message
;
DWORD_PTR
unk3
[
5
];
};
struct
file_op
...
...
@@ -1482,8 +1486,9 @@ PVOID WINAPI SetupInitDefaultQueueCallbackEx( HWND owner, HWND progress, UINT ms
{
struct
default_callback_context
*
context
;
if
((
context
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
context
)
)))
if
((
context
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
context
)
)))
{
context
->
magic
=
0x43515053
;
/* "SPQC" */
context
->
owner
=
owner
;
context
->
progress
=
progress
;
context
->
message
=
msg
;
...
...
dlls/setupapi/tests/misc.c
View file @
dcab5fe6
...
...
@@ -731,6 +731,51 @@ static void test_SetupUninstallOEMInf(void)
}
}
struct
default_callback_context
{
DWORD
magic
;
HWND
owner
;
DWORD
unk1
[
4
];
DWORD_PTR
unk2
[
7
];
HWND
progress
;
UINT
message
;
DWORD_PTR
unk3
[
5
];
};
static
void
test_defaultcallback
(
void
)
{
struct
default_callback_context
*
ctxt
;
static
const
DWORD
magic
=
0x43515053
;
/* "SPQC" */
HWND
owner
,
progress
;
owner
=
(
HWND
)
0x123
;
progress
=
(
HWND
)
0x456
;
ctxt
=
SetupInitDefaultQueueCallbackEx
(
owner
,
progress
,
WM_USER
,
0
,
NULL
);
ok
(
ctxt
!=
NULL
,
"got %p
\n
"
,
ctxt
);
ok
(
ctxt
->
magic
==
magic
||
broken
(
ctxt
->
magic
!=
magic
)
/* win2000 */
,
"got magic 0x%08x
\n
"
,
ctxt
->
magic
);
if
(
ctxt
->
magic
==
magic
)
{
ok
(
ctxt
->
owner
==
owner
,
"got %p, expected %p
\n
"
,
ctxt
->
owner
,
owner
);
ok
(
ctxt
->
progress
==
progress
,
"got %p, expected %p
\n
"
,
ctxt
->
progress
,
progress
);
ok
(
ctxt
->
message
==
WM_USER
,
"got %d, expected %d
\n
"
,
ctxt
->
message
,
WM_USER
);
SetupTermDefaultQueueCallback
(
ctxt
);
}
else
{
win_skip
(
"Skipping tests on old systems.
\n
"
);
SetupTermDefaultQueueCallback
(
ctxt
);
return
;
}
ctxt
=
SetupInitDefaultQueueCallback
(
owner
);
ok
(
ctxt
->
magic
==
magic
,
"got magic 0x%08x
\n
"
,
ctxt
->
magic
);
ok
(
ctxt
->
owner
==
owner
,
"got %p, expected %p
\n
"
,
ctxt
->
owner
,
owner
);
ok
(
ctxt
->
progress
==
NULL
,
"got %p, expected %p
\n
"
,
ctxt
->
progress
,
progress
);
ok
(
ctxt
->
message
==
0
,
"got %d
\n
"
,
ctxt
->
message
);
SetupTermDefaultQueueCallback
(
ctxt
);
}
START_TEST
(
misc
)
{
HMODULE
hsetupapi
=
GetModuleHandleA
(
"setupapi.dll"
);
...
...
@@ -760,4 +805,6 @@ START_TEST(misc)
test_SetupUninstallOEMInf
();
else
win_skip
(
"SetupUninstallOEMInfA is not available
\n
"
);
test_defaultcallback
();
}
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