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
0d289208
Commit
0d289208
authored
Sep 06, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Add support for uncommitted instances in IWbemClassObject::Put.
parent
d25450c8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
3 deletions
+40
-3
class.c
dlls/wbemprox/class.c
+38
-2
query.c
dlls/wbemprox/query.c
+1
-1
wbemprox_private.h
dlls/wbemprox/wbemprox_private.h
+1
-0
No files found.
dlls/wbemprox/class.c
View file @
0d289208
...
@@ -335,6 +335,34 @@ static HRESULT WINAPI class_object_Get(
...
@@ -335,6 +335,34 @@ static HRESULT WINAPI class_object_Get(
return
get_propval
(
view
,
co
->
index
,
wszName
,
pVal
,
pType
,
plFlavor
);
return
get_propval
(
view
,
co
->
index
,
wszName
,
pVal
,
pType
,
plFlavor
);
}
}
static
HRESULT
record_set_value
(
struct
record
*
record
,
UINT
index
,
VARIANT
*
var
)
{
LONGLONG
val
;
CIMTYPE
type
;
HRESULT
hr
;
if
((
hr
=
variant_to_longlong
(
var
,
&
val
,
&
type
))
!=
S_OK
)
return
hr
;
if
(
type
!=
record
->
fields
[
index
].
type
)
return
WBEM_E_TYPE_MISMATCH
;
switch
(
type
)
{
case
CIM_STRING
:
case
CIM_DATETIME
:
record
->
fields
[
index
].
u
.
sval
=
(
WCHAR
*
)(
INT_PTR
)
val
;
return
S_OK
;
case
CIM_SINT16
:
case
CIM_UINT16
:
case
CIM_SINT32
:
case
CIM_UINT32
:
record
->
fields
[
index
].
u
.
ival
=
val
;
return
S_OK
;
default:
FIXME
(
"unhandled type %u
\n
"
,
type
);
break
;
}
return
WBEM_E_INVALID_PARAMETER
;
}
static
HRESULT
WINAPI
class_object_Put
(
static
HRESULT
WINAPI
class_object_Put
(
IWbemClassObject
*
iface
,
IWbemClassObject
*
iface
,
LPCWSTR
wszName
,
LPCWSTR
wszName
,
...
@@ -344,11 +372,19 @@ static HRESULT WINAPI class_object_Put(
...
@@ -344,11 +372,19 @@ static HRESULT WINAPI class_object_Put(
{
{
struct
class_object
*
co
=
impl_from_IWbemClassObject
(
iface
);
struct
class_object
*
co
=
impl_from_IWbemClassObject
(
iface
);
struct
enum_class_object
*
ec
=
impl_from_IEnumWbemClassObject
(
co
->
iter
);
struct
enum_class_object
*
ec
=
impl_from_IEnumWbemClassObject
(
co
->
iter
);
struct
view
*
view
=
ec
->
query
->
view
;
TRACE
(
"%p, %s, %08x, %p, %u
\n
"
,
iface
,
debugstr_w
(
wszName
),
lFlags
,
pVal
,
Type
);
TRACE
(
"%p, %s, %08x, %p, %u
\n
"
,
iface
,
debugstr_w
(
wszName
),
lFlags
,
pVal
,
Type
);
return
put_propval
(
view
,
co
->
index
,
wszName
,
pVal
,
Type
);
if
(
co
->
record
)
{
struct
table
*
table
=
get_table
(
co
->
name
);
UINT
index
;
HRESULT
hr
;
if
((
hr
=
get_column_index
(
table
,
wszName
,
&
index
))
!=
S_OK
)
return
hr
;
return
record_set_value
(
co
->
record
,
index
,
pVal
);
}
return
put_propval
(
ec
->
query
->
view
,
co
->
index
,
wszName
,
pVal
,
Type
);
}
}
static
HRESULT
WINAPI
class_object_Delete
(
static
HRESULT
WINAPI
class_object_Delete
(
...
...
dlls/wbemprox/query.c
View file @
0d289208
...
@@ -648,7 +648,7 @@ HRESULT get_propval( const struct view *view, UINT index, const WCHAR *name, VAR
...
@@ -648,7 +648,7 @@ HRESULT get_propval( const struct view *view, UINT index, const WCHAR *name, VAR
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
variant_to_longlong
(
VARIANT
*
var
,
LONGLONG
*
val
,
CIMTYPE
*
type
)
HRESULT
variant_to_longlong
(
VARIANT
*
var
,
LONGLONG
*
val
,
CIMTYPE
*
type
)
{
{
if
(
!
var
)
if
(
!
var
)
{
{
...
...
dlls/wbemprox/wbemprox_private.h
View file @
0d289208
...
@@ -165,6 +165,7 @@ HRESULT set_value( const struct table *, UINT, UINT, LONGLONG, CIMTYPE ) DECLSPE
...
@@ -165,6 +165,7 @@ HRESULT set_value( const struct table *, UINT, UINT, LONGLONG, CIMTYPE ) DECLSPE
HRESULT
get_propval
(
const
struct
view
*
,
UINT
,
const
WCHAR
*
,
VARIANT
*
,
HRESULT
get_propval
(
const
struct
view
*
,
UINT
,
const
WCHAR
*
,
VARIANT
*
,
CIMTYPE
*
,
LONG
*
)
DECLSPEC_HIDDEN
;
CIMTYPE
*
,
LONG
*
)
DECLSPEC_HIDDEN
;
HRESULT
put_propval
(
const
struct
view
*
,
UINT
,
const
WCHAR
*
,
VARIANT
*
,
CIMTYPE
)
DECLSPEC_HIDDEN
;
HRESULT
put_propval
(
const
struct
view
*
,
UINT
,
const
WCHAR
*
,
VARIANT
*
,
CIMTYPE
)
DECLSPEC_HIDDEN
;
HRESULT
variant_to_longlong
(
VARIANT
*
,
LONGLONG
*
,
CIMTYPE
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_properties
(
const
struct
view
*
,
SAFEARRAY
**
)
DECLSPEC_HIDDEN
;
HRESULT
get_properties
(
const
struct
view
*
,
SAFEARRAY
**
)
DECLSPEC_HIDDEN
;
HRESULT
get_object
(
const
WCHAR
*
,
IWbemClassObject
**
)
DECLSPEC_HIDDEN
;
HRESULT
get_object
(
const
WCHAR
*
,
IWbemClassObject
**
)
DECLSPEC_HIDDEN
;
const
WCHAR
*
get_method_name
(
const
WCHAR
*
,
UINT
)
DECLSPEC_HIDDEN
;
const
WCHAR
*
get_method_name
(
const
WCHAR
*
,
UINT
)
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