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