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.

110 lines
2.4 KiB

  1. //============================================================================
  2. // Copyright (C) Microsoft Corporation, 1996 - 1999
  3. //
  4. // File: CnctDlg.h
  5. //
  6. // History:
  7. // 05/24/96 Michael Clark Created.
  8. //
  9. // Implements the Router Connection dialog
  10. // Implements the Router Connect As dialog
  11. //============================================================================
  12. //
  13. #if _MSC_VER >= 1000
  14. #pragma once
  15. #endif // _MSC_VER >= 1000
  16. #include "commres.h"
  17. #include "dlgcshlp.h"
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CConnectAs dialog
  20. class CConnectAsDlg : public CHelpDialog
  21. {
  22. DECLARE_DYNCREATE(CConnectAsDlg)
  23. // Construction
  24. public:
  25. CConnectAsDlg(CWnd* pParent = NULL); // standard constructor
  26. // Dialog Data
  27. //{{AFX_DATA(CConnectAsDlg)
  28. enum { IDD = IDD_CONNECT_AS };
  29. CString m_sUserName;
  30. CString m_sPassword;
  31. CString m_stTempPassword;
  32. CString m_sRouterName;
  33. //}}AFX_DATA
  34. UCHAR m_ucSeed;
  35. // Overrides
  36. // ClassWizard generated virtual function overrides
  37. //{{AFX_VIRTUAL(CConnectAsDlg)
  38. protected:
  39. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  40. //}}AFX_VIRTUAL
  41. // Implementation
  42. protected:
  43. // Generated message map functions
  44. //{{AFX_MSG(CConnectAsDlg)
  45. // NOTE: the ClassWizard will add member functions here
  46. //}}AFX_MSG
  47. DECLARE_MESSAGE_MAP()
  48. BOOL OnInitDialog();
  49. };
  50. // This is used as the seed value for the RtlRunEncodeUnicodeString
  51. // and RtlRunDecodeUnicodeString functions.
  52. #define CONNECTAS_ENCRYPT_SEED (0xB7)
  53. DWORD RtlEncodeW(PUCHAR pucSeed, LPWSTR pswzString);
  54. DWORD RtlDecodeW(UCHAR ucSeed, LPWSTR pswzString);
  55. HRESULT ConnectAsAdmin( IN LPCTSTR szRouterName);
  56. #ifdef __cplusplus
  57. extern "C" {
  58. #endif
  59. /////////////////////////////////////////////////////////////////////////////
  60. //
  61. // defines
  62. #ifndef NT_INCLUDED
  63. typedef LONG NTSTATUS;
  64. typedef NTSTATUS *PNTSTATUS;
  65. typedef struct _UNICODE_STRING {
  66. USHORT Length;
  67. USHORT MaximumLength;
  68. PWSTR Buffer;
  69. } UNICODE_STRING, *PUNICODE_STRING;
  70. #endif
  71. NTSYSAPI
  72. VOID
  73. NTAPI
  74. RtlRunEncodeUnicodeString(
  75. PUCHAR Seed OPTIONAL,
  76. PUNICODE_STRING String
  77. );
  78. NTSYSAPI
  79. VOID
  80. NTAPI
  81. RtlRunDecodeUnicodeString(
  82. UCHAR Seed,
  83. PUNICODE_STRING String
  84. );
  85. #ifdef __cplusplus
  86. }
  87. #endif