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.

124 lines
3.4 KiB

  1. // COMTestDriver.cpp : Defines the class behaviors for the application.
  2. //
  3. #include "stdafx.h"
  4. #import "\bin\McsVarSetMin.tlb" no_namespace, named_guids
  5. #import "\bin\McsDispatcher.tlb" named_guids
  6. #import "\bin\MigDrvr.tlb" no_namespace, named_guids
  7. #include "Driver.h"
  8. #include "Dispatch.h"
  9. #include "PwdAge.h"
  10. #include "Reboot.h"
  11. #include "ChgDom.h"
  12. #include "Rename.h"
  13. #include "AcctRepl.h"
  14. #include "SecTrans.h"
  15. #include "Rights.h"
  16. #include "Status.h"
  17. #include "AccChk.h"
  18. #include "PlugIn.h"
  19. #include "MigDrvr.h"
  20. #include "TrustTst.h"
  21. #include "MoveTest.h"
  22. #ifdef _DEBUG
  23. #define new DEBUG_NEW
  24. #undef THIS_FILE
  25. static char THIS_FILE[] = __FILE__;
  26. #endif
  27. /////////////////////////////////////////////////////////////////////////////
  28. // CCOMTestDriverApp
  29. BEGIN_MESSAGE_MAP(CCOMTestDriverApp, CWinApp)
  30. //{{AFX_MSG_MAP(CCOMTestDriverApp)
  31. // NOTE - the ClassWizard will add and remove mapping macros here.
  32. // DO NOT EDIT what you see in these blocks of generated code!
  33. //}}AFX_MSG
  34. ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  35. END_MESSAGE_MAP()
  36. /////////////////////////////////////////////////////////////////////////////
  37. // CCOMTestDriverApp construction
  38. CCOMTestDriverApp::CCOMTestDriverApp()
  39. {
  40. // TODO: add construction code here,
  41. // Place all significant initialization in InitInstance
  42. }
  43. /////////////////////////////////////////////////////////////////////////////
  44. // The one and only CCOMTestDriverApp object
  45. CCOMTestDriverApp theApp;
  46. /////////////////////////////////////////////////////////////////////////////
  47. // CCOMTestDriverApp initialization
  48. BOOL CCOMTestDriverApp::InitInstance()
  49. {
  50. AfxEnableControlContainer();
  51. // Standard initialization
  52. // If you are not using these features and wish to reduce the size
  53. // of your final executable, you should remove from the following
  54. // the specific initialization routines you do not need.
  55. #ifdef _AFXDLL
  56. Enable3dControls(); // Call this when using MFC in a shared DLL
  57. #else
  58. Enable3dControlsStatic(); // Call this when linking to MFC statically
  59. #endif
  60. HRESULT hr = CoInitialize(NULL);
  61. if ( FAILED(hr) )
  62. {
  63. CString msg;
  64. msg.Format(L"CoInitialize Failed, hr=%lx",hr);
  65. MessageBox(NULL,msg,NULL,MB_OK);
  66. }
  67. else
  68. {
  69. {
  70. CPropertySheet ps(L"Domain Migration Component Test Driver");
  71. CChangeDomTestDlg d1;
  72. //CRenameTestDlg d2;
  73. CRebootTestDlg d3;
  74. CAccessCheckTestDlg d4;
  75. CCompPwdAgeTestDlg d5;
  76. CMigrationDriverTestDlg d6;
  77. CPlugIn d7;
  78. CMoveTest d8;
  79. CTrustTst d9;
  80. ps.AddPage(&d1);
  81. //ps.AddPage(&d2);
  82. ps.AddPage(&d3);
  83. ps.AddPage(&d4);
  84. ps.AddPage(&d5);
  85. ps.AddPage(&d6);
  86. ps.AddPage(&d7);
  87. ps.AddPage(&d8);
  88. ps.AddPage(&d9);
  89. m_pMainWnd = &d3;
  90. int nResponse = ps.DoModal();
  91. if (nResponse == IDOK)
  92. {
  93. // TODO: Place code here to handle when the dialog is
  94. // dismissed with OK
  95. }
  96. else if (nResponse == IDCANCEL)
  97. {
  98. // TODO: Place code here to handle when the dialog is
  99. // dismissed with Cancel
  100. }
  101. }
  102. CoUninitialize();
  103. }
  104. // Since the dialog has been closed, return FALSE so that we exit the
  105. // application, rather than start the application's message pump.
  106. return FALSE;
  107. }