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.

77 lines
1.6 KiB

  1. //
  2. // constr.h
  3. //
  4. // Definition of CRdpConnectionString
  5. //
  6. // CRdpConnectionString implements a generic connection string
  7. // that can specify a server name and optionally a port and other
  8. // connection parameters
  9. //
  10. // Copyright(C) Microsoft Corporation 2002
  11. // Author: Nadim Abdo (nadima)
  12. //
  13. #ifndef _constr_h_
  14. #define _constr_h_
  15. class CRdpConnectionString
  16. {
  17. public:
  18. CRdpConnectionString();
  19. CRdpConnectionString(LPCTSTR szConString);
  20. ~CRdpConnectionString();
  21. //
  22. // Properties
  23. //
  24. HRESULT
  25. SetFullConnectionString(
  26. IN LPCTSTR szConString
  27. );
  28. LPTSTR
  29. GetFullConnectionString(
  30. );
  31. //
  32. // Retreive the server+port portion of the connect string e.g. if
  33. //
  34. // 'nadima3:3389 /connect" then get "nadima3:3389"
  35. //
  36. HRESULT
  37. GetServerPortion(
  38. OUT LPTSTR szServerPortion,
  39. IN ULONG cchServerPortionLen
  40. );
  41. //
  42. // Retreive the server name portion of the connect string e.g. if
  43. //
  44. // 'nadima3:3389 /connect" then get "nadima3"
  45. //
  46. HRESULT
  47. GetServerNamePortion(
  48. OUT LPTSTR szServerPortion,
  49. IN ULONG cchServerPortionLen
  50. );
  51. //
  52. // Retreive the args portion of the connect string e.g. if
  53. //
  54. // 'nadima3:3389 /connect" then get "/connect"
  55. //
  56. HRESULT
  57. GetArgumentsPortion(
  58. OUT LPTSTR szArguments,
  59. IN ULONG cchArgLen
  60. );
  61. static BOOL
  62. ValidateServerPart(
  63. IN LPTSTR szConnectionString
  64. );
  65. private:
  66. TCHAR _szFullConnectionString[TSC_MAX_ADDRESS_LENGTH];
  67. };
  68. #endif //_constr_h_