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
139c9f02
Commit
139c9f02
authored
Oct 17, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 17, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Implement Win32_Service.ResumeService.
parent
8fe25b2b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
1 deletion
+42
-1
builtin.c
dlls/wbemprox/builtin.c
+5
-1
service.c
dlls/wbemprox/service.c
+35
-0
wbemprox_private.h
dlls/wbemprox/wbemprox_private.h
+2
-0
No files found.
dlls/wbemprox/builtin.c
View file @
139c9f02
...
...
@@ -293,7 +293,8 @@ static const struct column col_service[] =
{
prop_stateW
,
CIM_STRING
},
{
prop_systemnameW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
},
/* methods */
{
method_pauseserviceW
,
CIM_FLAG_ARRAY
|
COL_FLAG_METHOD
}
{
method_pauseserviceW
,
CIM_FLAG_ARRAY
|
COL_FLAG_METHOD
},
{
method_resumeserviceW
,
CIM_FLAG_ARRAY
|
COL_FLAG_METHOD
}
};
static
const
struct
column
col_sounddevice
[]
=
{
...
...
@@ -473,6 +474,7 @@ struct record_service
const
WCHAR
*
systemname
;
/* methods */
class_method
*
pause_service
;
class_method
*
resume_service
;
};
struct
record_sounddevice
{
...
...
@@ -515,6 +517,7 @@ static const struct record_diskdrive data_diskdrive[] =
static
const
struct
record_params
data_params
[]
=
{
{
class_serviceW
,
method_pauseserviceW
,
-
1
,
param_returnvalueW
,
CIM_UINT32
,
VT_I4
},
{
class_serviceW
,
method_resumeserviceW
,
-
1
,
param_returnvalueW
,
CIM_UINT32
,
VT_I4
},
{
class_stdregprovW
,
method_enumkeyW
,
1
,
param_defkeyW
,
CIM_SINT32
,
0
,
0x80000002
},
{
class_stdregprovW
,
method_enumkeyW
,
1
,
param_subkeynameW
,
CIM_STRING
},
{
class_stdregprovW
,
method_enumkeyW
,
-
1
,
param_returnvalueW
,
CIM_UINT32
,
VT_I4
},
...
...
@@ -1114,6 +1117,7 @@ static void fill_service( struct table *table )
rec
->
state
=
get_service_state
(
status
->
dwCurrentState
);
rec
->
systemname
=
heap_strdupW
(
sysnameW
);
rec
->
pause_service
=
service_pause_service
;
rec
->
resume_service
=
service_resume_service
;
heap_free
(
config
);
offset
+=
sizeof
(
*
rec
);
num_rows
++
;
...
...
dlls/wbemprox/service.c
View file @
139c9f02
...
...
@@ -111,3 +111,38 @@ done:
if
(
hr
!=
S_OK
)
IWbemClassObject_Release
(
*
out
);
return
hr
;
}
HRESULT
service_resume_service
(
IWbemClassObject
*
obj
,
IWbemClassObject
*
in
,
IWbemClassObject
**
out
)
{
VARIANT
name
,
retval
;
IWbemClassObject
*
sig
;
HRESULT
hr
;
TRACE
(
"%p, %p, %p
\n
"
,
obj
,
in
,
out
);
hr
=
IWbemClassObject_Get
(
obj
,
prop_nameW
,
0
,
&
name
,
NULL
,
NULL
);
if
(
hr
!=
S_OK
)
return
hr
;
hr
=
create_signature
(
class_serviceW
,
method_resumeserviceW
,
PARAM_OUT
,
&
sig
);
if
(
hr
!=
S_OK
)
{
VariantClear
(
&
name
);
return
hr
;
}
hr
=
IWbemClassObject_SpawnInstance
(
sig
,
0
,
out
);
if
(
hr
!=
S_OK
)
{
VariantClear
(
&
name
);
IWbemClassObject_Release
(
sig
);
return
hr
;
}
hr
=
control_service
(
V_BSTR
(
&
name
),
SERVICE_CONTROL_CONTINUE
,
&
retval
);
if
(
hr
!=
S_OK
)
goto
done
;
hr
=
IWbemClassObject_Put
(
*
out
,
param_returnvalueW
,
0
,
&
retval
,
CIM_UINT32
);
done:
VariantClear
(
&
name
);
IWbemClassObject_Release
(
sig
);
if
(
hr
!=
S_OK
)
IWbemClassObject_Release
(
*
out
);
return
hr
;
}
dlls/wbemprox/wbemprox_private.h
View file @
139c9f02
...
...
@@ -202,6 +202,7 @@ HRESULT reg_enum_key(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **
HRESULT
reg_enum_values
(
IWbemClassObject
*
,
IWbemClassObject
*
,
IWbemClassObject
**
)
DECLSPEC_HIDDEN
;
HRESULT
reg_get_stringvalue
(
IWbemClassObject
*
,
IWbemClassObject
*
,
IWbemClassObject
**
)
DECLSPEC_HIDDEN
;
HRESULT
service_pause_service
(
IWbemClassObject
*
,
IWbemClassObject
*
,
IWbemClassObject
**
)
DECLSPEC_HIDDEN
;
HRESULT
service_resume_service
(
IWbemClassObject
*
,
IWbemClassObject
*
,
IWbemClassObject
**
)
DECLSPEC_HIDDEN
;
static
void
*
heap_alloc
(
size_t
len
)
__WINE_ALLOC_SIZE
(
1
);
static
inline
void
*
heap_alloc
(
size_t
len
)
...
...
@@ -243,6 +244,7 @@ static const WCHAR method_enumkeyW[] = {'E','n','u','m','K','e','y',0};
static
const
WCHAR
method_enumvaluesW
[]
=
{
'E'
,
'n'
,
'u'
,
'm'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
's'
,
0
};
static
const
WCHAR
method_getstringvalueW
[]
=
{
'G'
,
'e'
,
't'
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
0
};
static
const
WCHAR
method_pauseserviceW
[]
=
{
'P'
,
'a'
,
'u'
,
's'
,
'e'
,
'S'
,
'e'
,
'r'
,
'v'
,
'i'
,
'c'
,
'e'
,
0
};
static
const
WCHAR
method_resumeserviceW
[]
=
{
'R'
,
'e'
,
's'
,
'u'
,
'm'
,
'e'
,
'S'
,
'e'
,
'r'
,
'v'
,
'i'
,
'c'
,
'e'
,
0
};
static
const
WCHAR
param_defkeyW
[]
=
{
'h'
,
'D'
,
'e'
,
'f'
,
'K'
,
'e'
,
'y'
,
0
};
static
const
WCHAR
param_namesW
[]
=
{
's'
,
'N'
,
'a'
,
'm'
,
'e'
,
's'
,
0
};
...
...
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