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
4cfd8189
Commit
4cfd8189
authored
Jun 15, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Implement IEnumWbemClassObject::Next.
parent
19f203c7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
4 deletions
+32
-4
class.c
dlls/wbemprox/class.c
+29
-4
query.c
dlls/wbemprox/query.c
+1
-0
wbemprox_private.h
dlls/wbemprox/wbemprox_private.h
+2
-0
No files found.
dlls/wbemprox/class.c
View file @
4cfd8189
...
...
@@ -102,8 +102,27 @@ static HRESULT WINAPI enum_class_object_Next(
IWbemClassObject
**
apObjects
,
ULONG
*
puReturned
)
{
FIXME
(
"%p, %d, %u, %p, %p
\n
"
,
iface
,
lTimeout
,
uCount
,
apObjects
,
puReturned
);
return
E_NOTIMPL
;
struct
enum_class_object
*
ec
=
impl_from_IEnumWbemClassObject
(
iface
);
struct
view
*
view
=
ec
->
query
->
view
;
HRESULT
hr
;
TRACE
(
"%p, %d, %u, %p, %p
\n
"
,
iface
,
lTimeout
,
uCount
,
apObjects
,
puReturned
);
if
(
!
uCount
)
return
WBEM_S_FALSE
;
if
(
!
apObjects
||
!
puReturned
)
return
WBEM_E_INVALID_PARAMETER
;
if
(
lTimeout
!=
WBEM_INFINITE
)
FIXME
(
"timeout not supported
\n
"
);
*
puReturned
=
0
;
if
(
view
->
index
+
uCount
>
view
->
count
)
return
WBEM_S_FALSE
;
hr
=
WbemClassObject_create
(
NULL
,
iface
,
view
->
index
,
(
void
**
)
apObjects
);
if
(
hr
!=
S_OK
)
return
hr
;
view
->
index
++
;
*
puReturned
=
1
;
if
(
view
->
index
==
view
->
count
)
return
WBEM_S_FALSE
;
if
(
uCount
>
1
)
return
WBEM_S_TIMEDOUT
;
return
WBEM_S_NO_ERROR
;
}
static
HRESULT
WINAPI
enum_class_object_NextAsync
(
...
...
@@ -168,6 +187,8 @@ struct class_object
{
IWbemClassObject
IWbemClassObject_iface
;
LONG
refs
;
IEnumWbemClassObject
*
iter
;
UINT
index
;
};
static
inline
struct
class_object
*
impl_from_IWbemClassObject
(
...
...
@@ -191,6 +212,7 @@ static ULONG WINAPI class_object_Release(
if
(
!
refs
)
{
TRACE
(
"destroying %p
\n
"
,
co
);
if
(
co
->
iter
)
IEnumWbemClassObject_Release
(
co
->
iter
);
heap_free
(
co
);
}
return
refs
;
...
...
@@ -472,7 +494,7 @@ static const IWbemClassObjectVtbl class_object_vtbl =
};
HRESULT
WbemClassObject_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
IUnknown
*
pUnkOuter
,
IEnumWbemClassObject
*
iter
,
UINT
index
,
LPVOID
*
ppObj
)
{
struct
class_object
*
co
;
...
...
@@ -482,7 +504,10 @@ HRESULT WbemClassObject_create(
if
(
!
co
)
return
E_OUTOFMEMORY
;
co
->
IWbemClassObject_iface
.
lpVtbl
=
&
class_object_vtbl
;
co
->
refs
=
1
;
co
->
refs
=
1
;
co
->
iter
=
iter
;
co
->
index
=
index
;
if
(
iter
)
IEnumWbemClassObject_AddRef
(
iter
);
*
ppObj
=
&
co
->
IWbemClassObject_iface
;
...
...
dlls/wbemprox/query.c
View file @
4cfd8189
...
...
@@ -41,6 +41,7 @@ HRESULT create_view( const struct property *proplist, const WCHAR *class,
view
->
cond
=
cond
;
view
->
result
=
NULL
;
view
->
count
=
0
;
view
->
index
=
0
;
*
ret
=
view
;
return
S_OK
;
}
...
...
dlls/wbemprox/wbemprox_private.h
View file @
4cfd8189
...
...
@@ -95,6 +95,7 @@ struct view
const
struct
expr
*
cond
;
UINT
*
result
;
UINT
count
;
UINT
index
;
};
struct
query
...
...
@@ -113,6 +114,7 @@ struct table *get_table( const WCHAR * ) DECLSPEC_HIDDEN;
HRESULT
WbemLocator_create
(
IUnknown
*
,
LPVOID
*
)
DECLSPEC_HIDDEN
;
HRESULT
WbemServices_create
(
IUnknown
*
,
LPVOID
*
)
DECLSPEC_HIDDEN
;
HRESULT
WbemClassObject_create
(
IUnknown
*
,
IEnumWbemClassObject
*
,
UINT
,
LPVOID
*
)
DECLSPEC_HIDDEN
;
HRESULT
EnumWbemClassObject_create
(
IUnknown
*
,
struct
query
*
,
LPVOID
*
)
DECLSPEC_HIDDEN
;
static
void
*
heap_alloc
(
size_t
len
)
__WINE_ALLOC_SIZE
(
1
);
...
...
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