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
07197a19
Commit
07197a19
authored
Jan 28, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Return an empty object if the path is NULL or empty.
parent
6da3ce27
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
8 deletions
+19
-8
class.c
dlls/wbemprox/class.c
+2
-2
services.c
dlls/wbemprox/services.c
+3
-5
query.c
dlls/wbemprox/tests/query.c
+14
-1
No files found.
dlls/wbemprox/class.c
View file @
07197a19
...
...
@@ -1015,8 +1015,8 @@ HRESULT create_class_object( const WCHAR *name, IEnumWbemClassObject *iter, UINT
co
->
IWbemClassObject_iface
.
lpVtbl
=
&
class_object_vtbl
;
co
->
refs
=
1
;
co
->
name
=
heap_strdupW
(
name
)
;
if
(
!
co
->
name
)
if
(
!
name
)
co
->
name
=
NULL
;
else
if
(
!
(
co
->
name
=
heap_strdupW
(
name
))
)
{
heap_free
(
co
);
return
E_OUTOFMEMORY
;
...
...
dlls/wbemprox/services.c
View file @
07197a19
...
...
@@ -352,11 +352,9 @@ static HRESULT WINAPI wbem_services_GetObject(
if
(
lFlags
)
FIXME
(
"unsupported flags 0x%08x
\n
"
,
lFlags
);
if
(
!
strObjectPath
)
{
FIXME
(
"no support for creating new classes
\n
"
);
return
WBEM_E_FAILED
;
}
if
(
!
strObjectPath
||
!
strObjectPath
[
0
])
return
create_class_object
(
NULL
,
NULL
,
0
,
NULL
,
ppObject
);
return
get_object
(
strObjectPath
,
ppObject
);
}
...
...
dlls/wbemprox/tests/query.c
View file @
07197a19
...
...
@@ -146,7 +146,8 @@ static void test_Win32_Service( IWbemServices *services )
static
const
WCHAR
stoppedW
[]
=
{
'S'
,
't'
,
'o'
,
'p'
,
'p'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
serviceW
[]
=
{
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'_'
,
'S'
,
'e'
,
'r'
,
'v'
,
'i'
,
'c'
,
'e'
,
'.'
,
'N'
,
'a'
,
'm'
,
'e'
,
'='
,
'"'
,
'S'
,
'p'
,
'o'
,
'o'
,
'l'
,
'e'
,
'r'
,
'"'
,
0
};
BSTR
class
=
SysAllocString
(
serviceW
),
method
;
static
const
WCHAR
emptyW
[]
=
{
0
};
BSTR
class
=
SysAllocString
(
serviceW
),
empty
=
SysAllocString
(
emptyW
),
method
;
IWbemClassObject
*
service
,
*
out
;
VARIANT
state
,
retval
;
CIMTYPE
type
;
...
...
@@ -219,6 +220,18 @@ static void test_Win32_Service( IWbemServices *services )
}
VariantClear
(
&
state
);
IWbemClassObject_Release
(
service
);
service
=
NULL
;
hr
=
IWbemServices_GetObject
(
services
,
NULL
,
0
,
NULL
,
&
service
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
if
(
service
)
IWbemClassObject_Release
(
service
);
service
=
NULL
;
hr
=
IWbemServices_GetObject
(
services
,
empty
,
0
,
NULL
,
&
service
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
if
(
service
)
IWbemClassObject_Release
(
service
);
SysFreeString
(
empty
);
SysFreeString
(
class
);
}
...
...
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