Leaked source code of windows server 2003
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.

100 lines
3.9 KiB

  1. /****************************************************************************/
  2. // anmapi.h
  3. //
  4. // RDP Network Manager
  5. //
  6. // Copyright (C) 1997-1999 Microsoft Corporation
  7. /****************************************************************************/
  8. #ifndef _H_ANMAPI
  9. #define _H_ANMAPI
  10. #include <nwdwapi.h>
  11. /****************************************************************************/
  12. /* Connection reason codes */
  13. /****************************************************************************/
  14. #define NM_CB_CONN_OK 0 /* Connected successfully */
  15. #define NM_CB_CONN_ERR 1 /* Failed to connect */
  16. /****************************************************************************/
  17. /* Disconnection reason codes */
  18. /****************************************************************************/
  19. #define NM_CB_DISC_SERVER 1 /* Server-initiated disconnection */
  20. #define NM_CB_DISC_LOGOFF 2 /* Logoff */
  21. #define NM_CB_DISC_CLIENT 3 /* Client-initiated disconnection */
  22. #define NM_CB_DISC_NETWORK 4 /* Network error */
  23. /****************************************************************************/
  24. // NM_SendData fast-path output flags. Used in conjunction with some
  25. // TS flags in different bits.
  26. /****************************************************************************/
  27. #define NM_SEND_FASTPATH_OUTPUT 0x01
  28. #define NM_NO_SECURITY_HEADER 0x02
  29. /****************************************************************************/
  30. /* Structure: NM_CHANNEL_DATA */
  31. /* */
  32. /* Description: Data held for each virtual channel */
  33. /****************************************************************************/
  34. typedef struct tagNM_CHANNEL_DATA
  35. {
  36. char name[CHANNEL_NAME_LEN + 1];
  37. UINT16 MCSChannelID;
  38. ULONG flags;
  39. PBYTE pData;
  40. PBYTE pNext;
  41. unsigned dataLength;
  42. unsigned lengthSoFar;
  43. } NM_CHANNEL_DATA, *PNM_CHANNEL_DATA, **PPNM_CHANNEL_DATA;
  44. /****************************************************************************/
  45. /* FUNCTIONS */
  46. /****************************************************************************/
  47. unsigned RDPCALL NM_GetDataSize(void);
  48. BOOL RDPCALL NM_Init(PVOID pNMHandle,
  49. PVOID pSMHandle,
  50. PTSHARE_WD pWDHandle,
  51. DomainHandle hDomainKernel);
  52. void RDPCALL NM_Term(PVOID pNMHandle);
  53. BOOL RDPCALL NM_Connect(PVOID pNMHandle, PRNS_UD_CS_NET pUserData);
  54. BOOL RDPCALL NM_Disconnect(PVOID pNMHandle);
  55. NTSTATUS __fastcall NM_AllocBuffer(PVOID pNMHandle,
  56. PPVOID ppBuffer,
  57. UINT32 bufferSize,
  58. BOOLEAN fWait);
  59. void __fastcall NM_FreeBuffer(PVOID pNMHandle, PVOID pBuffer);
  60. BOOL __fastcall NM_SendData(PVOID, PBYTE, UINT32, UINT32, UINT32, UINT32);
  61. void __stdcall NM_MCSUserCallback(UserHandle hUser,
  62. unsigned Message,
  63. void *Params,
  64. void *UserDefined);
  65. void RDPCALL NM_Dead(PVOID pNMHandle, BOOL dead);
  66. NTSTATUS RDPCALL NM_VirtualQueryBindings(PVOID, PSD_VCBIND, ULONG, PULONG);
  67. VIRTUALCHANNELCLASS RDPCALL NM_MCSChannelToVirtual(PVOID, UINT16,
  68. PPNM_CHANNEL_DATA);
  69. INT16 RDPCALL NM_VirtualChannelToMCS(PVOID, VIRTUALCHANNELCLASS,
  70. PPNM_CHANNEL_DATA);
  71. NTSTATUS RDPCALL NM_QueryChannels(PVOID, PVOID, unsigned, PULONG);
  72. #endif /* _H_ANMAPI */