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