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
f2c00546
Commit
f2c00546
authored
Jan 27, 2017
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Only include matching rows in the table row count.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
35c09b52
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
builtin.c
dlls/wbemprox/builtin.c
+8
-6
No files found.
dlls/wbemprox/builtin.c
View file @
f2c00546
...
...
@@ -2350,7 +2350,7 @@ static enum fill_status fill_printer( struct table *table, const struct expr *co
struct
record_printer
*
rec
;
enum
fill_status
status
=
FILL_STATUS_UNFILTERED
;
PRINTER_INFO_2W
*
info
;
DWORD
i
,
offset
=
0
,
count
=
0
,
size
=
0
;
DWORD
i
,
offset
=
0
,
count
=
0
,
size
=
0
,
num_rows
=
0
;
EnumPrintersW
(
PRINTER_ENUM_LOCAL
,
NULL
,
2
,
NULL
,
0
,
&
size
,
&
count
);
if
(
GetLastError
()
!=
ERROR_INSUFFICIENT_BUFFER
)
return
FILL_STATUS_FAILED
;
...
...
@@ -2382,9 +2382,10 @@ static enum fill_status fill_printer( struct table *table, const struct expr *co
continue
;
}
offset
+=
sizeof
(
*
rec
);
num_rows
++
;
}
TRACE
(
"created %u rows
\n
"
,
count
);
table
->
num_rows
=
count
;
TRACE
(
"created %u rows
\n
"
,
num_rows
);
table
->
num_rows
=
num_rows
;
heap_free
(
info
);
return
status
;
...
...
@@ -2567,7 +2568,7 @@ static enum fill_status fill_processor( struct table *table, const struct expr *
static
const
WCHAR
fmtW
[]
=
{
'C'
,
'P'
,
'U'
,
'%'
,
'u'
,
0
};
WCHAR
caption
[
100
],
device_id
[
14
],
processor_id
[
17
],
manufacturer
[
13
],
name
[
49
]
=
{
0
},
version
[
50
];
struct
record_processor
*
rec
;
UINT
i
,
offset
=
0
,
num_cores
,
num_logical_processors
,
count
=
get_processor_count
();
UINT
i
,
offset
=
0
,
num_
rows
=
0
,
num_
cores
,
num_logical_processors
,
count
=
get_processor_count
();
enum
fill_status
status
=
FILL_STATUS_UNFILTERED
;
if
(
!
resize_table
(
table
,
count
,
sizeof
(
*
rec
)
))
return
FILL_STATUS_FAILED
;
...
...
@@ -2608,10 +2609,11 @@ static enum fill_status fill_processor( struct table *table, const struct expr *
continue
;
}
offset
+=
sizeof
(
*
rec
);
num_rows
++
;
}
TRACE
(
"created %u rows
\n
"
,
count
);
table
->
num_rows
=
count
;
TRACE
(
"created %u rows
\n
"
,
num_rows
);
table
->
num_rows
=
num_rows
;
return
status
;
}
...
...
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