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.

82 lines
1.7 KiB

  1. /*++
  2. Copyright (c) 1998-2000 Microsoft Corporation
  3. Module Name:
  4. utl.h
  5. Abstract:
  6. Misc. Shared and Platform-Indepdent Utilities for the RDP Client
  7. Device Redirector
  8. Author:
  9. Tad Brockway
  10. Revision History:
  11. --*/
  12. #ifndef __UTL_H__
  13. #define __UTL_H__
  14. #include <rdpdr.h>
  15. #define INVALID_SESSIONID 0xFFFFFFFF
  16. typedef DWORD (WINAPI *PROCESSIDTOSESSIONID)( DWORD, DWORD* );
  17. //
  18. //
  19. // Allocate a reply packet.
  20. //
  21. NTSTATUS DrUTL_AllocateReplyBuf(PRDPDR_IOREQUEST_PACKET pIoReq,
  22. PRDPDR_IOCOMPLETION_PACKET *pReplyPacket,
  23. OUT ULONG *replyPacketSize);
  24. //
  25. // Check the input/output buffer size for an IO request packet.
  26. //
  27. NTSTATUS DrUTL_CheckIOBufInputSize(PRDPDR_IOREQUEST_PACKET pIoReq,
  28. ULONG requiredSize);
  29. NTSTATUS DrUTL_CheckIOBufOutputSize(PRDPDR_IOREQUEST_PACKET pIoReq,
  30. ULONG requiredSize);
  31. //
  32. // Allocate a reply buffer to be returned in response to a server
  33. // request.
  34. //
  35. NTSTATUS DrUTL_AllocateReplyBuf(
  36. PRDPDR_IOREQUEST_PACKET pIoReq,
  37. PRDPDR_IOCOMPLETION_PACKET *pReplyPacket,
  38. ULONG *replyPacketSize
  39. );
  40. //
  41. // Allocate/release a IO request completion packet for a specified IO
  42. // request packet.
  43. //
  44. PRDPDR_IOCOMPLETION_PACKET DrUTL_AllocIOCompletePacket(
  45. const PRDPDR_IOREQUEST_PACKET pIoRequestPacket,
  46. ULONG sz
  47. );
  48. VOID DrUTL_FreeIOCompletePacket(
  49. PRDPDR_IOCOMPLETION_PACKET packet
  50. );
  51. //
  52. // Retrieve user session ID, return INVALID_SESSIONID
  53. // on win9x, NT4/TS4 SP3
  54. //
  55. DWORD
  56. GetUserSessionID();
  57. #ifdef OS_WINCE
  58. ULONG GetActivePortsList(TCHAR *pszPort);
  59. #endif
  60. #endif