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.

128 lines
3.3 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: N E T O C . H
  7. //
  8. // Contents: Functions for handling installation and removal of optional
  9. // networking components.
  10. //
  11. // Notes:
  12. //
  13. // Author: danielwe 28 Apr 1997
  14. //
  15. //----------------------------------------------------------------------------
  16. #pragma once
  17. #ifndef _NETOC_H
  18. #define _NETOC_H
  19. #ifndef _OCMANAGE_H
  20. #define _OCMANAGE_H
  21. #include <ocmanage.h> // OC Manager header
  22. #endif //!_OCMANAGE_H
  23. #include "netcon.h"
  24. #include "ncstring.h"
  25. #include "netcfgx.h"
  26. enum EINSTALL_TYPE
  27. {
  28. IT_UNKNOWN = 0x0,
  29. IT_INSTALL = 0x1,
  30. IT_UPGRADE = 0x2,
  31. IT_REMOVE = 0x3,
  32. IT_NO_CHANGE = 0x4,
  33. };
  34. struct OCM_DATA
  35. {
  36. INetCfg * pnc; // Uh, I assume we all know what this is.
  37. HWND hwnd; // hwnd of parent window for any UI
  38. SETUP_INIT_COMPONENT sic; // initialization data
  39. HINF hinfAnswerFile;
  40. BOOL fErrorReported;
  41. BOOL fNoDepends;
  42. OCM_DATA()
  43. {
  44. hwnd = NULL;
  45. hinfAnswerFile = NULL;
  46. pnc = NULL;
  47. fErrorReported = FALSE;
  48. fNoDepends = FALSE;
  49. }
  50. };
  51. //+---------------------------------------------------------------------------
  52. //
  53. // NetOCData - Combines all of the standard parameters that we were
  54. // previously passing all over the place. This will keep
  55. // us from having to continually change all of our prototypes
  56. // when we need other info in ALL functions, and will prevent
  57. // us from instantiating objects such as INetCfg in multiple
  58. // places
  59. //
  60. // Notes: Some members of this structure will not be initialized right away,
  61. // but will be filled in when first needed.
  62. //
  63. // Author: jeffspr 24 Jul 1997
  64. //
  65. struct NetOCData
  66. {
  67. PCWSTR pszSection;
  68. PWSTR pszComponentId;
  69. tstring strDesc;
  70. EINSTALL_TYPE eit;
  71. BOOL fCleanup;
  72. BOOL fFailedToInstall;
  73. HINF hinfFile;
  74. NetOCData()
  75. {
  76. eit = IT_UNKNOWN;
  77. pszSection = NULL;
  78. fCleanup = FALSE;
  79. fFailedToInstall = FALSE;
  80. hinfFile = NULL;
  81. pszComponentId = NULL;
  82. }
  83. ~NetOCData()
  84. {
  85. delete [] pszComponentId;
  86. }
  87. };
  88. typedef struct NetOCData NETOCDATA;
  89. typedef struct NetOCData * PNETOCDATA;
  90. // Extension proc prototype
  91. //
  92. typedef HRESULT (*PFNOCEXTPROC) (PNETOCDATA pnocd, UINT uMsg, WPARAM wParam,
  93. LPARAM lParam);
  94. struct OCEXTPROCS
  95. {
  96. PCWSTR pszComponentName;
  97. PFNOCEXTPROC pfnHrOcExtProc;
  98. };
  99. // Message handler constants
  100. //
  101. const UINT NETOCM_QUERY_CHANGE_SEL_STATE = 1000;
  102. const UINT NETOCM_POST_INSTALL = 1001;
  103. const UINT NETOCM_PRE_INF = 1002;
  104. const UINT NETOCM_QUEUE_FILES = 1003;
  105. extern OCM_DATA g_ocmData;
  106. //
  107. // Public functions
  108. //
  109. HRESULT HrHandleStaticIpDependency(PNETOCDATA pnocd);
  110. HRESULT HrOcGetINetCfg(PNETOCDATA pnocd, BOOL fWriteLock, INetCfg **ppnc);
  111. #endif //!_NETOC_H