Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

119 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. RxSess.h
  5. Abstract:
  6. Prototypes for down-level remoted RxNetSession routines
  7. Author:
  8. Richard Firth (rfirth) 28-May-1991
  9. Notes:
  10. <lmshare.h> must be included before this file.
  11. Revision History:
  12. 28-May-1991 RFirth
  13. Created dummy file.
  14. 17-Oct-1991 JohnRo
  15. Implement remote NetSession APIs.
  16. 20-Nov-1991 JohnRo
  17. NetSessionGetInfo requires UncClientName and UserName.
  18. --*/
  19. #ifndef _RXSESS_
  20. #define _RXSESS_
  21. //
  22. // Routines called by the DLL stubs:
  23. //
  24. NET_API_STATUS
  25. RxNetSessionEnum (
  26. IN LPTSTR servername,
  27. IN LPTSTR clientname OPTIONAL,
  28. IN LPTSTR username OPTIONAL,
  29. IN DWORD level,
  30. OUT LPBYTE *bufptr,
  31. IN DWORD prefmaxlen,
  32. OUT LPDWORD entriesread,
  33. OUT LPDWORD totalentries,
  34. IN OUT LPDWORD resume_handle OPTIONAL
  35. );
  36. NET_API_STATUS
  37. RxNetSessionDel (
  38. IN LPTSTR servername,
  39. IN LPTSTR clientname,
  40. IN LPTSTR username
  41. );
  42. NET_API_STATUS
  43. RxNetSessionGetInfo (
  44. IN LPTSTR servername,
  45. IN LPTSTR UncClientName,
  46. IN LPTSTR UserName,
  47. IN DWORD level,
  48. OUT LPBYTE *bufptr
  49. );
  50. //
  51. // Private helpers for the above routines:
  52. //
  53. // Note that code in RxpConvertSessionInfo depends on these values:
  54. #define SESSION_SUPERSET_LEVEL 2
  55. #define SESSION_SUPERSET_INFO SESSION_INFO_2
  56. #define LPSESSION_SUPERSET_INFO LPSESSION_INFO_2
  57. VOID
  58. RxpConvertSessionInfo (
  59. IN LPSESSION_SUPERSET_INFO InStructure,
  60. IN DWORD LevelWanted,
  61. OUT LPVOID OutStructure,
  62. IN LPVOID OutFixedDataEnd,
  63. IN OUT LPTSTR *StringLocation
  64. );
  65. NET_API_STATUS
  66. RxpCopyAndConvertSessions(
  67. IN LPSESSION_SUPERSET_INFO InStructureArray,
  68. IN DWORD InEntryCount,
  69. IN DWORD LevelWanted,
  70. IN LPTSTR ClientName OPTIONAL,
  71. IN LPTSTR UserName OPTIONAL,
  72. OUT LPVOID * OutStructureArrayPtr, // alloc'ed (NULL if no match)
  73. OUT LPDWORD OutEntryCountPtr OPTIONAL // 0 if no match.
  74. );
  75. BOOL
  76. RxpSessionMatches (
  77. IN LPSESSION_SUPERSET_INFO Candidate,
  78. IN LPTSTR ClientName OPTIONAL,
  79. IN LPTSTR UserName OPTIONAL
  80. );
  81. //
  82. // NET_API_STATUS
  83. // RxpSessionMissingErrorCode(
  84. // IN LPTSTR ClientName OPTIONAL,
  85. // IN LPTSTR UserName OPTIONAL
  86. // );
  87. //
  88. #define RxpSessionMissingErrorCode( ClientName, UserName ) \
  89. ( ((UserName) != NULL) \
  90. ? NERR_UserNotFound \
  91. : ( ((ClientName) != NULL) \
  92. ? NERR_ClientNameNotFound \
  93. : NERR_Success ) )
  94. #endif // _RXSESS_