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.

100 lines
2.0 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved.
  3. Module Name:
  4. RsOptCom.h
  5. Abstract:
  6. Main module for Optional Component install
  7. Author:
  8. Rohde Wakefield [rohde] 09-Oct-1997
  9. Revision History:
  10. --*/
  11. #include "stdafx.h"
  12. #include "rsoptcom.h"
  13. #include "OptCom.h"
  14. #include "Uninstal.h"
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CRsoptcomApp
  17. BEGIN_MESSAGE_MAP(CRsoptcomApp, CWinApp)
  18. //{{AFX_MSG_MAP(CRsoptcomApp)
  19. // NOTE - the ClassWizard will add and remove mapping macros here.
  20. // DO NOT EDIT what you see in these blocks of generated code!
  21. //}}AFX_MSG_MAP
  22. END_MESSAGE_MAP()
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CRsoptcomApp construction
  25. BOOL CRsoptcomApp::InitInstance()
  26. {
  27. TRACEFNBOOL( "CRsoptcomApp::InitInstance" );
  28. //
  29. // Initialize COM in case we need to call back to HSM
  30. //
  31. // This code is commented out:
  32. // - There's no need today to call back to HSM
  33. // - A DLL should avoid calling CoInitialize from its DLLMain
  34. //
  35. /*** HRESULT hrCom = CoInitialize( 0 );
  36. if (!SUCCEEDED(hrCom)) {
  37. boolRet = FALSE;
  38. return( boolRet );
  39. } ***/
  40. boolRet = CWinApp::InitInstance( );
  41. if (! boolRet) {
  42. OutputDebugString(L"RSOPTCOM: Init instance FAILED\n");
  43. }
  44. return( boolRet );
  45. }
  46. int CRsoptcomApp::ExitInstance()
  47. {
  48. TRACEFN( "CRsoptcomApp::ExitInstance" );
  49. // _Module.Term();
  50. int retval = CWinApp::ExitInstance();
  51. return( retval );
  52. }
  53. CRsoptcomApp::CRsoptcomApp()
  54. {
  55. }
  56. /////////////////////////////////////////////////////////////////////////////
  57. // The one and only CRsoptcomApp object
  58. CRsoptcomApp gApp;
  59. CRsUninstall gOptCom;
  60. extern "C" {
  61. DWORD
  62. OcEntry(
  63. IN LPCVOID ComponentId,
  64. IN LPCVOID SubcomponentId,
  65. IN UINT Function,
  66. IN UINT_PTR Param1,
  67. IN OUT PVOID Param2
  68. )
  69. {
  70. TRACEFN( "OcEntry" );
  71. return( gOptCom.SetupProc( ComponentId, SubcomponentId, Function, Param1, Param2 ) );
  72. }
  73. }