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
12caddb4
Commit
12caddb4
authored
Jul 30, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 30, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Store the class name in the class object.
parent
54d21602
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
12 deletions
+19
-12
class.c
dlls/wbemprox/class.c
+16
-10
services.c
dlls/wbemprox/services.c
+1
-1
wbemprox_private.h
dlls/wbemprox/wbemprox_private.h
+2
-1
No files found.
dlls/wbemprox/class.c
View file @
12caddb4
...
...
@@ -125,7 +125,7 @@ static HRESULT WINAPI enum_class_object_Next(
*
puReturned
=
0
;
if
(
ec
->
index
+
uCount
>
view
->
count
)
return
WBEM_S_FALSE
;
hr
=
WbemClassObject_create
(
NULL
,
iface
,
ec
->
index
,
(
void
**
)
apObjects
);
hr
=
create_class_object
(
view
->
table
->
name
,
iface
,
ec
->
index
,
apObjects
);
if
(
hr
!=
S_OK
)
return
hr
;
ec
->
index
++
;
...
...
@@ -216,6 +216,7 @@ struct class_object
{
IWbemClassObject
IWbemClassObject_iface
;
LONG
refs
;
WCHAR
*
name
;
IEnumWbemClassObject
*
iter
;
UINT
index
;
};
...
...
@@ -242,6 +243,7 @@ static ULONG WINAPI class_object_Release(
{
TRACE
(
"destroying %p
\n
"
,
co
);
if
(
co
->
iter
)
IEnumWbemClassObject_Release
(
co
->
iter
);
heap_free
(
co
->
name
);
heap_free
(
co
);
}
return
refs
;
...
...
@@ -606,16 +608,14 @@ static HRESULT WINAPI class_object_GetMethod(
IWbemClassObject
**
ppOutSignature
)
{
struct
class_object
*
co
=
impl_from_IWbemClassObject
(
iface
);
struct
enum_class_object
*
ec
=
impl_from_IEnumWbemClassObject
(
co
->
iter
);
struct
view
*
view
=
ec
->
query
->
view
;
HRESULT
hr
;
TRACE
(
"%p, %s, %08x, %p, %p
\n
"
,
iface
,
debugstr_w
(
wszName
),
lFlags
,
ppInSignature
,
ppOutSignature
);
hr
=
create_signature
(
view
->
table
->
name
,
wszName
,
PARAM_IN
,
ppInSignature
);
hr
=
create_signature
(
co
->
name
,
wszName
,
PARAM_IN
,
ppInSignature
);
if
(
hr
!=
S_OK
)
return
hr
;
hr
=
create_signature
(
view
->
table
->
name
,
wszName
,
PARAM_OUT
,
ppOutSignature
);
hr
=
create_signature
(
co
->
name
,
wszName
,
PARAM_OUT
,
ppOutSignature
);
if
(
hr
!=
S_OK
)
IWbemClassObject_Release
(
*
ppInSignature
);
return
hr
;
}
...
...
@@ -714,24 +714,30 @@ static const IWbemClassObjectVtbl class_object_vtbl =
class_object_GetMethodOrigin
};
HRESULT
WbemClassObject_create
(
IUnknown
*
pUnkOuter
,
IEnumWbemClassObject
*
iter
,
UINT
index
,
LPVOID
*
ppO
bj
)
HRESULT
create_class_object
(
const
WCHAR
*
name
,
IEnumWbemClassObject
*
iter
,
UINT
index
,
IWbemClassObject
**
o
bj
)
{
struct
class_object
*
co
;
TRACE
(
"%
p, %p
\n
"
,
pUnkOuter
,
ppO
bj
);
TRACE
(
"%
s, %p
\n
"
,
debugstr_w
(
name
),
o
bj
);
co
=
heap_alloc
(
sizeof
(
*
co
)
);
if
(
!
co
)
return
E_OUTOFMEMORY
;
co
->
IWbemClassObject_iface
.
lpVtbl
=
&
class_object_vtbl
;
co
->
refs
=
1
;
co
->
name
=
heap_strdupW
(
name
);
if
(
!
co
->
name
)
{
heap_free
(
co
);
return
E_OUTOFMEMORY
;
}
co
->
iter
=
iter
;
co
->
index
=
index
;
if
(
iter
)
IEnumWbemClassObject_AddRef
(
iter
);
*
ppO
bj
=
&
co
->
IWbemClassObject_iface
;
*
o
bj
=
&
co
->
IWbemClassObject_iface
;
TRACE
(
"returning iface %p
\n
"
,
*
ppO
bj
);
TRACE
(
"returning iface %p
\n
"
,
*
o
bj
);
return
S_OK
;
}
dlls/wbemprox/services.c
View file @
12caddb4
...
...
@@ -334,7 +334,7 @@ HRESULT get_object( const WCHAR *object_path, IWbemClassObject **obj )
free_path
(
path
);
return
hr
;
}
hr
=
WbemClassObject_create
(
NULL
,
iter
,
0
,
(
void
**
)
obj
);
hr
=
create_class_object
(
path
->
class
,
iter
,
0
,
obj
);
IEnumWbemClassObject_Release
(
iter
);
free_path
(
path
);
return
hr
;
...
...
dlls/wbemprox/wbemprox_private.h
View file @
12caddb4
...
...
@@ -154,7 +154,8 @@ HRESULT get_object( const WCHAR *, IWbemClassObject ** ) DECLSPEC_HIDDEN;
HRESULT
WbemLocator_create
(
IUnknown
*
,
LPVOID
*
)
DECLSPEC_HIDDEN
;
HRESULT
WbemServices_create
(
IUnknown
*
,
const
WCHAR
*
,
LPVOID
*
)
DECLSPEC_HIDDEN
;
HRESULT
WbemClassObject_create
(
IUnknown
*
,
IEnumWbemClassObject
*
,
UINT
,
LPVOID
*
)
DECLSPEC_HIDDEN
;
HRESULT
create_class_object
(
const
WCHAR
*
,
IEnumWbemClassObject
*
,
UINT
,
IWbemClassObject
**
)
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