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
c092d825
Commit
c092d825
authored
Dec 21, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmiutils: Implement IWbemPath::SetText and IWbemPath::GetText.
parent
633a5741
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
4 deletions
+53
-4
path.c
dlls/wmiutils/path.c
+35
-4
wmiutils.idl
include/wmiutils.idl
+18
-0
No files found.
dlls/wmiutils/path.c
View file @
c092d825
...
...
@@ -24,6 +24,7 @@
#include "windef.h"
#include "winbase.h"
#include "ole2.h"
#include "wbemcli.h"
#include "wmiutils.h"
#include "wine/debug.h"
...
...
@@ -36,6 +37,8 @@ struct path
{
IWbemPath
IWbemPath_iface
;
LONG
refs
;
WCHAR
*
text
;
int
len
;
};
static
inline
struct
path
*
impl_from_IWbemPath
(
IWbemPath
*
iface
)
...
...
@@ -58,6 +61,7 @@ static ULONG WINAPI path_Release(
if
(
!
refs
)
{
TRACE
(
"destroying %p
\n
"
,
path
);
HeapFree
(
GetProcessHeap
(),
0
,
path
->
text
);
HeapFree
(
GetProcessHeap
(),
0
,
path
);
}
return
refs
;
...
...
@@ -91,8 +95,20 @@ static HRESULT WINAPI path_SetText(
ULONG
uMode
,
LPCWSTR
pszPath
)
{
FIXME
(
"%p, %u, %s
\n
"
,
iface
,
uMode
,
debugstr_w
(
pszPath
));
return
E_NOTIMPL
;
struct
path
*
path
=
impl_from_IWbemPath
(
iface
);
int
len
;
TRACE
(
"%p, %u, %s
\n
"
,
iface
,
uMode
,
debugstr_w
(
pszPath
));
if
(
uMode
)
FIXME
(
"igoring mode %u
\n
"
,
uMode
);
len
=
strlenW
(
pszPath
);
if
(
!
(
path
->
text
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
)
)))
return
E_OUTOFMEMORY
;
strcpyW
(
path
->
text
,
pszPath
);
path
->
len
=
len
;
return
S_OK
;
}
static
HRESULT
WINAPI
path_GetText
(
...
...
@@ -101,8 +117,23 @@ static HRESULT WINAPI path_GetText(
ULONG
*
puBufferLength
,
LPWSTR
pszText
)
{
FIXME
(
"%p, 0x%x, %p, %p
\n
"
,
iface
,
lFlags
,
puBufferLength
,
pszText
);
return
E_NOTIMPL
;
struct
path
*
path
=
impl_from_IWbemPath
(
iface
);
TRACE
(
"%p, 0x%x, %p, %p
\n
"
,
iface
,
lFlags
,
puBufferLength
,
pszText
);
if
(
lFlags
!=
WBEMPATH_GET_ORIGINAL
)
{
FIXME
(
"flags 0x%x not supported
\n
"
,
lFlags
);
return
WBEM_E_INVALID_PARAMETER
;
}
if
(
*
puBufferLength
<
path
->
len
+
1
)
{
*
puBufferLength
=
path
->
len
+
1
;
return
S_OK
;
}
if
(
pszText
)
strcpyW
(
pszText
,
path
->
text
);
*
puBufferLength
=
path
->
len
+
1
;
return
S_OK
;
}
static
HRESULT
WINAPI
path_GetInfo
(
...
...
include/wmiutils.idl
View file @
c092d825
...
...
@@ -21,6 +21,24 @@ import "oaidl.idl";
interface
IWbemPath
;
interface
IWbemPathKeyList
;
typedef
[
v1_enum
]
enum
tag_WBEM_PATH_CREATE_FLAG
{
WBEMPATH_CREATE_ACCEPT_RELATIVE
=
0
x1
,
WBEMPATH_CREATE_ACCEPT_ABSOLUTE
=
0
x2
,
WBEMPATH_CREATE_ACCEPT_ALL
=
0
x4
,
WBEMPATH_TREAT_SINGLE_IDENT_AS_NS
=
0
x8
}
tag_WBEM_PATH_CREATE_FLAG
;
typedef
[
v1_enum
]
enum
tag_WBEM_GET_TEXT_FLAGS
{
WBEMPATH_COMPRESSED
=
0
x1
,
WBEMPATH_GET_RELATIVE_ONLY
=
0
x2
,
WBEMPATH_GET_SERVER_TOO
=
0
x4
,
WBEMPATH_GET_SERVER_AND_NAMESPACE_ONLY
=
0
x8
,
WBEMPATH_GET_NAMESPACE_ONLY
=
0
x10
,
WBEMPATH_GET_ORIGINAL
=
0
x20
}
tag_WBEM_GET_TEXT_FLAGS
;
[
local
,
object
,
...
...
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