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
92e99866
Commit
92e99866
authored
Jun 18, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Implement IWbemClassObject::Get.
parent
bb80d7db
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
3 deletions
+57
-3
Makefile.in
dlls/wbemprox/Makefile.in
+1
-1
class.c
dlls/wbemprox/class.c
+12
-2
query.c
dlls/wbemprox/query.c
+42
-0
wbemprox_private.h
dlls/wbemprox/wbemprox_private.h
+2
-0
No files found.
dlls/wbemprox/Makefile.in
View file @
92e99866
MODULE
=
wbemprox.dll
IMPORTS
=
ole32 advapi32
IMPORTS
=
ole
aut32 ole
32 advapi32
C_SRCS
=
\
builtin.c
\
...
...
dlls/wbemprox/class.c
View file @
92e99866
...
...
@@ -274,8 +274,18 @@ static HRESULT WINAPI class_object_Get(
CIMTYPE
*
pType
,
LONG
*
plFlavor
)
{
FIXME
(
"%p, %s, %08x, %p, %p, %p
\n
"
,
iface
,
debugstr_w
(
wszName
),
lFlags
,
pVal
,
pType
,
plFlavor
);
return
E_NOTIMPL
;
struct
class_object
*
co
=
impl_from_IWbemClassObject
(
iface
);
struct
enum_class_object
*
ec
=
impl_from_IEnumWbemClassObject
(
co
->
iter
);
struct
view
*
view
=
ec
->
query
->
view
;
TRACE
(
"%p, %s, %08x, %p, %p, %p
\n
"
,
iface
,
debugstr_w
(
wszName
),
lFlags
,
pVal
,
pType
,
plFlavor
);
if
(
plFlavor
)
{
FIXME
(
"flavor parameter not supported
\n
"
);
*
plFlavor
=
0
;
}
return
get_propval
(
view
,
co
->
index
,
wszName
,
pVal
,
pType
);
}
static
HRESULT
WINAPI
class_object_Put
(
...
...
dlls/wbemprox/query.c
View file @
92e99866
...
...
@@ -347,3 +347,45 @@ done:
if
(
hr
!=
S_OK
)
free_query
(
query
);
return
hr
;
}
static
BOOL
is_selected_prop
(
const
struct
view
*
view
,
const
WCHAR
*
name
)
{
const
struct
property
*
prop
=
view
->
proplist
;
if
(
!
prop
)
return
TRUE
;
while
(
prop
)
{
if
(
!
strcmpiW
(
prop
->
name
,
name
))
return
TRUE
;
prop
=
prop
->
next
;
}
return
FALSE
;
}
HRESULT
get_propval
(
const
struct
view
*
view
,
UINT
index
,
const
WCHAR
*
name
,
VARIANT
*
ret
,
CIMTYPE
*
type
)
{
HRESULT
hr
;
UINT
column
,
row
=
view
->
result
[
index
];
INT_PTR
val
;
if
(
!
is_selected_prop
(
view
,
name
))
return
WBEM_E_NOT_FOUND
;
hr
=
get_column_index
(
view
->
table
,
name
,
&
column
);
if
(
hr
!=
S_OK
)
return
WBEM_E_NOT_FOUND
;
hr
=
get_value
(
view
->
table
,
row
,
column
,
&
val
);
if
(
hr
!=
S_OK
)
return
hr
;
switch
(
view
->
table
->
columns
[
column
].
type
)
{
case
CIM_STRING
:
case
CIM_DATETIME
:
V_VT
(
ret
)
=
VT_BSTR
;
V_BSTR
(
ret
)
=
SysAllocString
(
(
const
WCHAR
*
)
val
);
break
;
default:
ERR
(
"unhandled column type %u
\n
"
,
view
->
table
->
columns
[
column
].
type
);
return
WBEM_E_FAILED
;
}
if
(
type
)
*
type
=
view
->
table
->
columns
[
column
].
type
;
return
S_OK
;
}
dlls/wbemprox/wbemprox_private.h
View file @
92e99866
...
...
@@ -111,6 +111,8 @@ HRESULT create_view( const struct property *, const WCHAR *, const struct expr *
struct
view
**
)
DECLSPEC_HIDDEN
;
void
destroy_view
(
struct
view
*
)
DECLSPEC_HIDDEN
;
struct
table
*
get_table
(
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_propval
(
const
struct
view
*
,
UINT
,
const
WCHAR
*
,
VARIANT
*
,
CIMTYPE
*
)
DECLSPEC_HIDDEN
;
HRESULT
WbemLocator_create
(
IUnknown
*
,
LPVOID
*
)
DECLSPEC_HIDDEN
;
HRESULT
WbemServices_create
(
IUnknown
*
,
LPVOID
*
)
DECLSPEC_HIDDEN
;
...
...
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