home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 March / PCWorld_2001-03_cd.bin / Software / TemaCD / devc / _SETUP.5 / Group3 / lmshare.h < prev    next >
C/C++ Source or Header  |  1999-11-07  |  5KB  |  143 lines

  1. #ifndef _LMSHARE_H
  2. #define _LMSHARE_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #define SHARE_NETNAME_PARMNUM 1
  7. #define SHARE_TYPE_PARMNUM 3
  8. #define SHARE_REMARK_PARMNUM 4
  9. #define SHARE_PERMISSIONS_PARMNUM 5
  10. #define SHARE_MAX_USES_PARMNUM 6
  11. #define SHARE_CURRENT_USES_PARMNUM 7
  12. #define SHARE_PATH_PARMNUM 8
  13. #define SHARE_PASSWD_PARMNUM 9
  14. #define SHARE_FILE_SD_PARMNUM 501
  15. #define SHARE_REMARK_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SHARE_REMARK_PARMNUM)
  16. #define SHARE_MAX_USES_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SHARE_MAX_USES_PARMNUM)
  17. #define SHARE_FILE_SD_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SHARE_FILE_SD_PARMNUM)
  18. #define SHI1_NUM_ELEMENTS 4
  19. #define SHI2_NUM_ELEMENTS 10
  20. #define STYPE_DISKTREE 0
  21. #define STYPE_PRINTQ 1
  22. #define STYPE_DEVICE 2
  23. #define STYPE_IPC 3
  24. #define STYPE_DFS 100
  25. #define STYPE_SPECIAL 0x80000000
  26. #define SHI_USES_UNLIMITED (DWORD)(-1)
  27. #define SESS_GUEST 1
  28. #define SESS_NOENCRYPTION 2
  29. #define SESI1_NUM_ELEMENTS 8
  30. #define SESI2_NUM_ELEMENTS 9
  31. #define PERM_FILE_READ 1
  32. #define PERM_FILE_WRITE 2
  33. #define PERM_FILE_CREATE 4
  34. typedef struct _FILE_INFO_2 { DWORD fi2_id;} FILE_INFO_2,*PFILE_INFO_2,*LPFILE_INFO_2;
  35. typedef struct _FILE_INFO_3 {
  36.     DWORD fi3_id;
  37.     DWORD fi3_permissions;
  38.     DWORD fi3_num_locks;
  39.     LPTSTR fi3_pathname;
  40.     LPTSTR fi3_username;
  41. } FILE_INFO_3,*PFILE_INFO_3,*LPFILE_INFO_3;
  42. typedef struct _SHARE_INFO_0 { LPTSTR shi0_netname; } SHARE_INFO_0,*PSHARE_INFO_0,*LPSHARE_INFO_0;
  43. typedef struct _SHARE_INFO_1 {
  44.     LPTSTR shi1_netname;
  45.     DWORD shi1_type;
  46.     LPTSTR shi1_remark;
  47. } SHARE_INFO_1,*PSHARE_INFO_1,*LPSHARE_INFO_1;
  48. typedef struct _SHARE_INFO_2 {
  49.     LPTSTR shi2_netname;
  50.     DWORD shi2_type;
  51.     LPTSTR shi2_remark;
  52.     DWORD shi2_permissions;
  53.     DWORD shi2_max_uses;
  54.     DWORD shi2_current_uses;
  55.     LPTSTR shi2_path;
  56.     LPTSTR shi2_passwd;
  57. } SHARE_INFO_2,*PSHARE_INFO_2,*LPSHARE_INFO_2;
  58. typedef struct _SHARE_INFO_502 {
  59.     LPTSTR shi502_netname;
  60.     DWORD shi502_type;
  61.     LPTSTR shi502_remark;
  62.     DWORD shi502_permissions;
  63.     DWORD shi502_max_uses;
  64.     DWORD shi502_current_uses;
  65.     LPTSTR shi502_path;
  66.     LPTSTR shi502_passwd;
  67.     DWORD shi502_reserved;
  68.     PSECURITY_DESCRIPTOR shi502_security_descriptor;
  69. } SHARE_INFO_502,*PSHARE_INFO_502,*LPSHARE_INFO_502;
  70. typedef struct _SHARE_INFO_1004 {
  71.     LPTSTR shi1004_remark;
  72. } SHARE_INFO_1004,*PSHARE_INFO_1004,*LPSHARE_INFO_1004;
  73. typedef struct _SHARE_INFO_1006 {
  74.     DWORD shi1006_max_uses;
  75. } SHARE_INFO_1006,*PSHARE_INFO_1006,*LPSHARE_INFO_1006;
  76. typedef struct _SHARE_INFO_1501 {
  77.     DWORD shi1501_reserved;
  78.     PSECURITY_DESCRIPTOR shi1501_security_descriptor;
  79. } SHARE_INFO_1501,*PSHARE_INFO_1501,*LPSHARE_INFO_1501;
  80. typedef struct _SESSION_INFO_0 { LPTSTR sesi0_cname; } SESSION_INFO_0,*PSESSION_INFO_0,*LPSESSION_INFO_0;
  81. typedef struct _SESSION_INFO_1 {
  82.     LPTSTR sesi1_cname; 
  83.     LPTSTR sesi1_username;
  84.     DWORD sesi1_num_opens;
  85.     DWORD sesi1_time;
  86.     DWORD sesi1_idle_time;
  87.     DWORD sesi1_user_flags;
  88. } SESSION_INFO_1,*PSESSION_INFO_1,*LPSESSION_INFO_1;
  89. typedef struct _SESSION_INFO_2 {
  90.     LPTSTR sesi2_cname; 
  91.     LPTSTR sesi2_username;
  92.     DWORD sesi2_num_opens;
  93.     DWORD sesi2_time;
  94.     DWORD sesi2_idle_time;
  95.     DWORD sesi2_user_flags;
  96.     LPTSTR sesi2_cltype_name;
  97. } SESSION_INFO_2,*PSESSION_INFO_2,*LPSESSION_INFO_2;
  98. typedef struct _SESSION_INFO_10 {
  99.     LPTSTR sesi10_cname; 
  100.     LPTSTR sesi10_username;
  101.     DWORD sesi10_time;
  102.     DWORD sesi10_idle_time;
  103. } SESSION_INFO_10,*PSESSION_INFO_10,*LPSESSION_INFO_10;
  104. typedef struct _SESSION_INFO_502 {
  105.     LPTSTR sesi502_cname; 
  106.     LPTSTR sesi502_username;
  107.     DWORD sesi502_num_opens;
  108.     DWORD sesi502_time;
  109.     DWORD sesi502_idle_time;
  110.     DWORD sesi502_user_flags;
  111.     LPTSTR sesi502_cltype_name;
  112.     LPTSTR sesi502_transport;
  113. } SESSION_INFO_502,*PSESSION_INFO_502,*LPSESSION_INFO_502;
  114. typedef struct _CONNECTION_INFO_0 { DWORD coni0_id; } CONNECTION_INFO_0,*PCONNECTION_INFO_0,*LPCONNECTION_INFO_0;
  115. typedef struct _CONNECTION_INFO_1 {
  116.     DWORD coni1_id;
  117.     DWORD coni1_type;
  118.     DWORD coni1_num_opens;
  119.     DWORD coni1_num_users;
  120.     DWORD coni1_time;
  121.     LPTSTR coni1_username;
  122.     LPTSTR coni1_netname;
  123. } CONNECTION_INFO_1,*PCONNECTION_INFO_1,*LPCONNECTION_INFO_1;
  124. NET_API_STATUS WINAPI NetShareAdd(LPTSTR,DWORD,PBYTE,PDWORD);
  125. NET_API_STATUS WINAPI NetShareEnum(LPTSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
  126. NET_API_STATUS WINAPI NetShareEnumSticky(LPTSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD resume_handle);
  127. NET_API_STATUS WINAPI NetShareGetInfo(LPTSTR,LPTSTR,DWORD,PBYTE*);
  128. NET_API_STATUS WINAPI NetShareSetInfo(LPTSTR,LPTSTR,DWORD,PBYTE,PDWORD);
  129. NET_API_STATUS WINAPI NetShareDel(LPTSTR,LPTSTR,DWORD);
  130. NET_API_STATUS WINAPI NetShareDelSticky(LPTSTR,LPTSTR,DWORD);
  131. NET_API_STATUS WINAPI NetShareCheck(LPTSTR,LPTSTR,PDWORD);
  132. NET_API_STATUS WINAPI NetSessionEnum(LPTSTR,LPTSTR,LPTSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
  133. NET_API_STATUS WINAPI NetSessionDel(LPTSTR,LPTSTR,LPTSTR);
  134. NET_API_STATUS WINAPI NetSessionGetInfo(LPTSTR,LPTSTR,LPTSTR,DWORD,PBYTE*);
  135. NET_API_STATUS WINAPI NetConnectionEnum(LPTSTR,LPTSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
  136. NET_API_STATUS WINAPI NetFileClose(LPTSTR,DWORD);
  137. NET_API_STATUS WINAPI NetFileEnum(LPTSTR,LPTSTR,LPTSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
  138. NET_API_STATUS WINAPI NetFileGetInfo(LPTSTR,DWORD,DWORD,PBYTE*);
  139. #ifdef __cplusplus
  140. }
  141. #endif
  142. #endif 
  143.