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
53919294
Commit
53919294
authored
Jan 17, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmiutils: Implement IWbemPath::RemoveAllNamespaces.
parent
af84c4c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
2 deletions
+56
-2
path.c
dlls/wmiutils/path.c
+12
-2
path.c
dlls/wmiutils/tests/path.c
+44
-0
No files found.
dlls/wmiutils/path.c
View file @
53919294
...
...
@@ -534,8 +534,18 @@ static HRESULT WINAPI path_RemoveNamespaceAt(
static
HRESULT
WINAPI
path_RemoveAllNamespaces
(
IWbemPath
*
iface
)
{
FIXME
(
"%p
\n
"
,
iface
);
return
E_NOTIMPL
;
struct
path
*
path
=
impl_from_IWbemPath
(
iface
);
int
i
;
TRACE
(
"%p
\n
"
,
iface
);
for
(
i
=
0
;
i
<
path
->
num_namespaces
;
i
++
)
heap_free
(
path
->
namespaces
[
i
]
);
path
->
num_namespaces
=
0
;
heap_free
(
path
->
namespaces
);
path
->
namespaces
=
NULL
;
heap_free
(
path
->
len_namespaces
);
path
->
len_namespaces
=
NULL
;
return
S_OK
;
}
static
HRESULT
WINAPI
path_GetScopeCount
(
...
...
dlls/wmiutils/tests/path.c
View file @
53919294
...
...
@@ -584,6 +584,49 @@ static void test_IWbemPath_GetNamespaceAt(void)
IWbemPath_Release
(
path
);
}
static
void
test_IWbemPath_RemoveAllNamespaces
(
void
)
{
IWbemPath
*
path
;
WCHAR
buf
[
16
];
ULONG
len
;
ULONGLONG
flags
;
HRESULT
hr
;
if
(
!
(
path
=
create_path
()))
return
;
hr
=
IWbemPath_RemoveAllNamespaces
(
path
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
IWbemPath_SetText
(
path
,
WBEMPATH_CREATE_ACCEPT_ALL
,
path17
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
flags
=
0
;
hr
=
IWbemPath_GetInfo
(
path
,
0
,
&
flags
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
flags
==
(
WBEMPATH_INFO_ANON_LOCAL_MACHINE
|
WBEMPATH_INFO_IS_INST_REF
|
WBEMPATH_INFO_HAS_SUBSCOPES
|
WBEMPATH_INFO_V2_COMPLIANT
|
WBEMPATH_INFO_CIM_COMPLIANT
|
WBEMPATH_INFO_PATH_HAD_SERVER
),
"got %lx%08lx
\n
"
,
(
unsigned
long
)(
flags
>>
32
),
(
unsigned
long
)
flags
);
hr
=
IWbemPath_RemoveAllNamespaces
(
path
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
flags
=
0
;
hr
=
IWbemPath_GetInfo
(
path
,
0
,
&
flags
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
flags
==
(
WBEMPATH_INFO_ANON_LOCAL_MACHINE
|
WBEMPATH_INFO_IS_INST_REF
|
WBEMPATH_INFO_HAS_SUBSCOPES
|
WBEMPATH_INFO_V2_COMPLIANT
|
WBEMPATH_INFO_CIM_COMPLIANT
|
WBEMPATH_INFO_PATH_HAD_SERVER
),
"got %lx%08lx
\n
"
,
(
unsigned
long
)(
flags
>>
32
),
(
unsigned
long
)
flags
);
buf
[
0
]
=
0
;
len
=
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]);
hr
=
IWbemPath_GetNamespaceAt
(
path
,
0
,
&
len
,
buf
);
ok
(
hr
==
WBEM_E_INVALID_PARAMETER
,
"got %08x
\n
"
,
hr
);
IWbemPath_Release
(
path
);
}
START_TEST
(
path
)
{
CoInitialize
(
NULL
);
...
...
@@ -596,6 +639,7 @@ START_TEST (path)
test_IWbemPath_GetInfo
();
test_IWbemPath_SetServer
();
test_IWbemPath_GetNamespaceAt
();
test_IWbemPath_RemoveAllNamespaces
();
CoUninitialize
();
}
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