OSDN Git Service

Timeval struct bitness issue [#2059]
[mingw/mingw-org-wsl.git] / include / nddeapi.h
1 /**
2  * @file nddeapi.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 _NDDEAPI_H
25 #define _NDDEAPI_H
26 #pragma GCC system_header
27 #include <_mingw.h>
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 #ifndef CNLEN /* also in lmcons.h */
34 #define CNLEN 15
35 #define UNCLEN (CNLEN + 2)
36 #endif
37 #define SEP_CHAR ','
38 #define BAR_CHAR "|"
39 #define SEP_WCHAR L','
40 #define BAR_WCHAR L"|"
41 #define NDDE_NO_ERROR 0
42 #define NDDE_ACCESS_DENIED 1
43 #define NDDE_BUF_TOO_SMALL 2
44 #define NDDE_ERROR_MORE_DATA 3
45 #define NDDE_INVALID_SERVER 4
46 #define NDDE_INVALID_SHARE 5
47 #define NDDE_INVALID_PARAMETER 6
48 #define NDDE_INVALID_LEVEL 7
49 #define NDDE_INVALID_PASSWORD 8
50 #define NDDE_INVALID_ITEMNAME 9
51 #define NDDE_INVALID_TOPIC 10
52 #define NDDE_INTERNAL_ERROR 11
53 #define NDDE_OUT_OF_MEMORY 12
54 #define NDDE_INVALID_APPNAME 13
55 #define NDDE_NOT_IMPLEMENTED 14
56 #define NDDE_SHARE_ALREADY_EXIST 15
57 #define NDDE_SHARE_NOT_EXIST 16
58 #define NDDE_INVALID_FILENAME 17
59 #define NDDE_NOT_RUNNING 18
60 #define NDDE_INVALID_WINDOW 19
61 #define NDDE_INVALID_SESSION 20
62 #define NDDE_INVALID_ITEM_LIST 21
63 #define NDDE_SHARE_DATA_CORRUPTED 22
64 #define NDDE_REGISTRY_ERROR 23
65 #define NDDE_CANT_ACCESS_SERVER 24
66 #define NDDE_INVALID_SPECIAL_COMMAND 25
67 #define NDDE_INVALID_SECURITY_DESC 26
68 #define NDDE_TRUST_SHARE_FAIL 27
69 #define MAX_NDDESHARENAME 256
70 #define MAX_DOMAINNAME 15
71 #define MAX_USERNAME 15
72 #define MAX_APPNAME 255
73 #define MAX_TOPICNAME 255
74 #define MAX_ITEMNAME 255
75 #define NDDEF_NOPASSWORDPROMPT 0x0001
76 #define NDDEF_NOCACHELOOKUP 0x0002
77 #define NDDEF_STRIP_NDDE 0x0004
78 #define SHARE_TYPE_OLD 0x01
79 #define SHARE_TYPE_NEW 0x02
80 #define SHARE_TYPE_STATIC 0x04
81 #define NDDE_TRUST_SHARE_START 0x80000000L
82 #define NDDE_TRUST_SHARE_INIT 0x40000000L
83 #define NDDE_TRUST_SHARE_DEL 0x20000000L
84 #define NDDE_TRUST_CMD_SHOW 0x10000000L
85 #define NDDE_CMD_SHOW_MASK 0x0000FFFFL
86 struct NDdeShareInfo_tag {
87         LONG lRevision;
88         LPTSTR lpszShareName;
89         LONG lShareType;
90         LPTSTR lpszAppTopicList;
91         LONG fSharedFlag;
92         LONG fService;
93         LONG fStartAppFlag;
94         LONG nCmdShow;
95         LONG qModifyId[2];
96         LONG cNumItems;
97         LPTSTR lpszItemList;
98 } NDDESHAREINFO,*PNDDESHAREINFO;
99
100 UINT WINAPI NDdeGetErrorStringA(UINT,LPSTR,DWORD);
101 UINT WINAPI NDdeGetErrorStringW(UINT,LPWSTR,DWORD);
102 UINT WINAPI NDdeGetShareSecurityA(LPSTR,LPSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
103 UINT WINAPI NDdeGetShareSecurityW(LPWSTR,LPWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
104 UINT WINAPI NDdeGetTrustedShareA(LPSTR,LPSTR,PDWORD,PDWORD,PDWORD);
105 UINT WINAPI NDdeGetTrustedShareW(LPWSTR,LPWSTR,PDWORD,PDWORD,PDWORD);
106 BOOL WINAPI NDdeIsValidShareNameA(LPSTR);
107 BOOL WINAPI NDdeIsValidShareNameW(LPWSTR);
108 BOOL WINAPI NDdeIsValidAppTopicListA(LPSTR);
109 BOOL WINAPI NDdeIsValidAppTopicListW(LPWSTR);
110 UINT WINAPI NDdeSetShareSecurityA(LPSTR,LPSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
111 UINT WINAPI NDdeSetShareSecurityW(LPWSTR,LPWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
112 UINT WINAPI NDdeSetTrustedShareA(LPSTR,LPSTR,DWORD);
113 UINT WINAPI NDdeSetTrustedShareW(LPWSTR,LPWSTR,DWORD);
114 UINT WINAPI NDdeShareAddA(LPSTR,UINT,PSECURITY_DESCRIPTOR,PBYTE,DWORD);
115 UINT WINAPI NDdeShareAddW(LPWSTR,UINT,PSECURITY_DESCRIPTOR,PBYTE,DWORD);
116 UINT WINAPI NDdeShareDelA(LPSTR,LPSTR,UINT);
117 UINT WINAPI NDdeShareDelW(LPWSTR,LPWSTR,UINT);
118 UINT WINAPI NDdeShareEnumA(LPSTR,UINT,PBYTE,DWORD,PDWORD,PDWORD);
119 UINT WINAPI NDdeShareEnumW(LPWSTR,UINT,PBYTE,DWORD,PDWORD,PDWORD);
120 UINT WINAPI NDdeShareGetInfoA(LPSTR,LPSTR,UINT,PBYTE,DWORD,PDWORD,PWORD);
121 UINT WINAPI NDdeShareGetInfoW(LPWSTR,LPWSTR,UINT,PBYTE,DWORD,PDWORD,PWORD);
122 UINT WINAPI NDdeShareSetInfoA(LPSTR,LPSTR,UINT,PBYTE,DWORD,WORD);
123 UINT WINAPI NDdeShareSetInfoW(LPWSTR,LPWSTR,UINT,PBYTE,DWORD,WORD);
124 UINT WINAPI NDdeTrustedShareEnumA(LPSTR,UINT,PBYTE,DWORD,PDWORD,PDWORD);
125 UINT WINAPI NDdeTrustedShareEnumW(LPWSTR,UINT,PBYTE,DWORD,PDWORD,PDWORD);
126 #define NDdeShareAdd __AW(NDdeShareAdd)
127 #define NDdeShareDel __AW(NDdeShareDel)
128 #define NDdeSetShareSecurity __AW(NDdeSetShareSecurity)
129 #define NDdeGetShareSecurity __AW(NDdeGetShareSecurity)
130 #define NDdeShareEnum __AW(NDdeShareEnum)
131 #define NDdeShareGetInfo __AW(NDdeShareGetInfo)
132 #define NDdeShareSetInfo __AW(NDdeShareSetInfo)
133 #define NDdeGetErrorString __AW(NDdeGetErrorString)
134 #define NDdeSetTrustedShare __AW(NDdeSetTrustedShare)
135 #define NDdeGetTrustedShare __AW(NDdeGetTrustedShare)
136 #define NDdeTrustedShareEnum __AW(NDdeTrustedShareEnum)
137
138 #ifdef __cplusplus
139 }
140 #endif
141
142 #endif