blob: 6ece37311920a3ac30d0f7d3663b05de8af1784b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
/***************************************************************************
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* This source is subject to the Microsoft Public License.
* See http://www.microsoft.com/en-us/openness/licenses.aspx#MPL.
* All other rights reserved.
*
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
*
***************************************************************************/
/*
* Interface for managing devices.
*
* http://code.msdn.microsoft.com/windowshardware/DevCon-Sample-4e95d71c
* http://support.microsoft.com/kb/311272
*/
#pragma once
#include <windows.h>
#include <tchar.h>
//
// exit codes
//
#define DEVCON_OK (0)
#define DEVCON_REBOOT (1)
#define DEVCON_FAIL (2)
#define DEVCON_USAGE (3)
#define DEVCON_CLASS_DISPLAY TEXT("=DISPLAY")
int
devconEnable(int argc, PCTSTR argv[]);
int
devconDisable(int argc, PCTSTR argv[]);
int
devconRestart(int argc, PCTSTR argv[]);
static inline int
devconEnable(PCTSTR arg)
{
return devconEnable(1, &arg);
}
static inline int
devconDisable(PCTSTR arg)
{
return devconDisable(1, &arg);
}
static inline int
devconRestart(PCTSTR arg)
{
return devconRestart(1, &arg);
}
|