OSDN Git Service

Correct mistyped __MINGW_NOTHROW macro.
[mingw/mingw-org-wsl.git] / include / lmchdev.h
1 /**
2  * @file lmchdev.h
3  * Copyright 2012, 2013 MinGW.org project
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  * 
12  * The above copyright notice and this permission notice (including the next
13  * paragraph) shall be included in all copies or substantial portions of the
14  * Software.
15  * 
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 #ifndef _LMCHDEV_H
25 #define _LMCHDEV_H
26 #pragma GCC system_header
27 #include <_mingw.h>
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 #define CHARDEVQ_NO_REQUESTS (-1)
34 #define CHARDEV_CLOSE 0
35 #define CHARDEVQ_MAX_PRIORITY 1
36 #define CHARDEVQ_DEV_PARMNUM 1
37 #define HANDLE_INFO_LEVEL_1 1
38 #define HANDLE_CHARTIME_PARMNUM 1
39 #define HANDLE_CHARCOUNT_PARMNUM 2
40 #define CHARDEV_STAT_OPENED 2
41 #define CHARDEVQ_PRIORITY_PARMNUM 2
42 #define CHARDEVQ_DEVS_PARMNUM 3
43 #define CHARDEV_STAT_ERROR 4
44 #define CHARDEVQ_NUMUSERS_PARMNUM 4
45 #define CHARDEVQ_NUMAHEAD_PARMNUM 5
46 #define CHARDEVQ_DEF_PRIORITY 5
47 #define CHARDEVQ_PRIORITY_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+CHARDEVQ_PRIORITY_PARMNUM)
48 #define CHARDEVQ_DEVS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+CHARDEVQ_DEVS_PARMNUM)
49 #define CHARDEVQ_MIN_PRIORITY 9
50 typedef struct _CHARDEV_INFO_0 { LPWSTR ch0_dev; } CHARDEV_INFO_0,*PCHARDEV_INFO_0,*LPCHARDEV_INFO_0;
51 typedef struct _CHARDEV_INFO_1 {
52         LPWSTR ch1_dev;
53         DWORD ch1_status;
54         LPWSTR ch1_username;
55         DWORD ch1_time;
56 } CHARDEV_INFO_1,*PCHARDEV_INFO_1,*LPCHARDEV_INFO_1;
57 typedef struct _CHARDEVQ_INFO_0 { LPWSTR cq0_dev; } CHARDEVQ_INFO_0,*PCHARDEVQ_INFO_0,*LPCHARDEVQ_INFO_0;
58 typedef struct _CHARDEVQ_INFO_1 {
59         LPWSTR cq1_dev;
60         DWORD cq1_priority;
61         LPWSTR cq1_devs;
62         DWORD cq1_numusers;
63         DWORD cq1_numahead;
64 } CHARDEVQ_INFO_1,*PCHARDEVQ_INFO_1,*LPCHARDEVQ_INFO_1;
65 typedef struct _CHARDEVQ_INFO_1002 { DWORD cq1002_priority; } CHARDEVQ_INFO_1002,*PCHARDEVQ_INFO_1002,*LPCHARDEVQ_INFO_1002;
66 typedef struct _CHARDEVQ_INFO_1003 { LPWSTR cq1003_devs; } CHARDEVQ_INFO_1003,*PCHARDEVQ_INFO_1003,*LPCHARDEVQ_INFO_1003;
67 typedef struct _HANDLE_INFO_1 {
68         DWORD hdli1_chartime;
69         DWORD hdli1_charcount;
70 }HANDLE_INFO_1,*PHANDLE_INFO_1,*LPHANDLE_INFO_1;
71 NET_API_STATUS WINAPI NetCharDevEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
72 NET_API_STATUS WINAPI NetCharDevGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*);
73 NET_API_STATUS WINAPI NetCharDevControl(LPCWSTR,LPCWSTR,DWORD);
74 NET_API_STATUS WINAPI NetCharDevQEnum(LPCWSTR,LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
75 NET_API_STATUS WINAPI NetCharDevQGetInfo(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,PBYTE*);
76 NET_API_STATUS WINAPI NetCharDevQSetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE,PDWORD);
77 NET_API_STATUS WINAPI NetCharDevQPurge(LPCWSTR,LPCWSTR);
78 NET_API_STATUS WINAPI NetCharDevQPurgeSelf(LPCWSTR,LPCWSTR,LPCWSTR);
79 NET_API_STATUS WINAPI NetHandleGetInfo(HANDLE,DWORD,PBYTE*);
80 NET_API_STATUS WINAPI NetHandleSetInfo(HANDLE,DWORD,PBYTE,DWORD,PDWORD);
81
82 #ifdef __cplusplus
83 }
84 #endif
85
86 #endif