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.

444 lines
13 KiB

  1. #pragma namespace("\\\\.\\root")
  2. instance of __namespace
  3. {
  4. Name = "pchealth";
  5. };
  6. #pragma namespace("\\\\.\\root\\pchealth")
  7. instance of __Win32Provider as $DataProv
  8. {
  9. Name = "MS_VIEW_INSTANCE_PROVIDER";
  10. ClsId = "{AA70DDF4-E11C-11D1-ABB0-00C04FD9159E}";
  11. ImpersonationLevel = 1;
  12. PerUserInitialization = "True";
  13. };
  14. instance of __InstanceProviderRegistration
  15. {
  16. Provider = $DataProv;
  17. SupportsGet = True;
  18. SupportsDelete = True;
  19. SupportsEnumeration = True;
  20. QuerySupportLevels = {"WQL:UnarySelect"};
  21. };
  22. instance of __MethodProviderRegistration
  23. {
  24. Provider = $DataProv;
  25. };
  26. //______________________________________________________________________________
  27. //
  28. // Name: PCH_ProgramGroup
  29. // Synopsis: This is a View class.
  30. // Mapped from Win32_ProgramGroup.
  31. // Source Properties : GroupName, Name, UserName
  32. // View Properties : Groupname, Name, UserName
  33. // There is a change property a string with constant
  34. // value = "SnapShot". This is required for delta computation.
  35. // Missing Data: None
  36. // Additional Data: None
  37. // Created By: kalyanin
  38. //______________________________________________________________________________
  39. [
  40. union,
  41. ViewSources {"select GroupName, Name, UserName FROM Win32_ProgramGroup"},
  42. ViewSpaces ("\\\\.\\root\\cimv2"),
  43. dynamic, provider("MS_VIEW_INSTANCE_PROVIDER")
  44. ]
  45. class PCH_ProgramGroup
  46. {
  47. [PropertySources{"GroupName"}]
  48. string GroupName;
  49. [key, PropertySources{"Name"}]
  50. string Name;
  51. [PropertySources{"UserName"}]
  52. string UserName;
  53. [PropertySources{""}]
  54. string Change = "SnapShot";
  55. };
  56. //______________________________________________________________________________
  57. //
  58. // Name: PCH_NetWorkConnection
  59. // Synopsis: This is a View class.
  60. // Mapped from Win32_NetworkConnection.
  61. // Source Properties : Name, LocalName, RemoteName,
  62. // ResourceType, Status
  63. // View Properties : Name, LocalName, RemoteName,
  64. // Type, Status
  65. // There is a change property a string with constant
  66. // value = "SnapShot". This is required for delta computation.
  67. // Missing Data: None
  68. // Additional Data: Name
  69. // Reasons: Name is a "key" property in win32_NetworkConnection
  70. // class. All Key properties from the source class
  71. // need to be present in the view class.
  72. // Created By: kalyanin
  73. //______________________________________________________________________________
  74. [
  75. union,
  76. ViewSources {"select Name, LocalName, RemoteName, ResourceType, Status FROM Win32_NetworkConnection"},
  77. ViewSpaces ("\\\\.\\root\\cimv2"),
  78. dynamic, provider("MS_VIEW_INSTANCE_PROVIDER")
  79. ]
  80. class PCH_NetworkConnection
  81. {
  82. [key, PropertySources{"Name"}]
  83. string Name;
  84. [PropertySources{"LocalName"}]
  85. string LocalName;
  86. [PropertySources{"RemoteName"}]
  87. string RemoteName;
  88. [PropertySources{"ResourceType"}]
  89. string Type;
  90. [PropertySources{"Status"}]
  91. string Status;
  92. [PropertySources{""}]
  93. string Change = "SnapShot";
  94. };
  95. //______________________________________________________________________________
  96. //
  97. // Name: PCH_PrintJob
  98. // Synopsis: This is a View class.
  99. // Mapped from Win32_PrintJob.
  100. // Source Properties : Name, Size, Status,
  101. // TimeSubmitted, PagesPrinted
  102. // View Properties : Name, Size, Status,
  103. // TimeSubmitted, PagesPrinted
  104. // There is a change property a string with constant
  105. // value = "SnapShot". This is required for delta computation.
  106. // Missing Data: None
  107. // Additional Data: None
  108. // Created By: kalyanin
  109. //______________________________________________________________________________
  110. [
  111. union,
  112. ViewSources {"select Name, Size, Status, TimeSubmitted, PagesPrinted FROM Win32_PrintJob"},
  113. ViewSpaces ("\\\\.\\root\\cimv2"),
  114. dynamic, provider("MS_VIEW_INSTANCE_PROVIDER")
  115. ]
  116. class PCH_PrintJob
  117. {
  118. [key, PropertySources{"Name"}]
  119. string Name;
  120. [PropertySources{"Size"}]
  121. Uint32 Size;
  122. [PropertySources{"Status"}]
  123. string Status;
  124. [PropertySources{"TimeSubmitted"}]
  125. DateTime TimeSubmitted;
  126. [PropertySources{"PagesPrinted"}]
  127. Uint32 PagesPrinted;
  128. [PropertySources{""}]
  129. string Change = "SnapShot";
  130. };
  131. //______________________________________________________________________________
  132. //
  133. // Name: PCH_NetworkProtocol
  134. // Synopsis: This is a View class.
  135. // Mapped from Win32_NetworkProtocol.
  136. // Source Properties : Name, ConnectionlessService,
  137. // GuaranteesDelivery,GuaranteesSequencing
  138. // View Properties : Name, ConnectionlessService,
  139. // GuaranteesDelivery, GuaranteesSequencing
  140. // There is a change property a string with constant
  141. // value = "SnapShot". This is required for delta computation.
  142. // Missing Data: None
  143. // Additional Data: None
  144. // Created By: kalyanin
  145. //______________________________________________________________________________
  146. [
  147. union,
  148. ViewSources {"select Name, ConnectionlessService, GuaranteesDelivery, GuaranteesSequencing from Win32_NetworkProtocol"},
  149. ViewSpaces ("\\\\.\\root\\cimv2"),
  150. dynamic, provider("MS_VIEW_INSTANCE_PROVIDER")
  151. ]
  152. class PCH_NetworkProtocol
  153. {
  154. [key, PropertySources{"Name"}]
  155. string Name;
  156. [PropertySources{"ConnectionLessService"}]
  157. boolean ConnectionLessService ;
  158. [PropertySources{"GuaranteesDelivery"}]
  159. boolean GuaranteesDelivery;
  160. [PropertySources{"GuaranteesSequencing"}]
  161. boolean GuaranteesSequencing;
  162. [PropertySources{""}]
  163. string Change = "SnapShot";
  164. };
  165. //______________________________________________________________________________
  166. //
  167. // Name: PCH_Drive
  168. // Synopsis: This is a View class.
  169. // Mapped from Win32_LogicalDisk.
  170. // Source Properties : DeviceID, FileSystem,
  171. // FreeSpace, Size
  172. // View Properties : DriveLetter, FileSystemType,
  173. // FreeBytes, AvailBytes
  174. // There is a change property a string with constant
  175. // value = "SnapShot". This is required for delta computation.
  176. // Missing Data: None
  177. // Additional Data: None
  178. // Created By: kalyanin
  179. //______________________________________________________________________________
  180. [ Union,
  181. ViewSources {"select DeviceID, FileSystem, FreeSpace, Size FROM win32_LogicalDisk"},
  182. ViewSpaces ("\\\\.\\root\\cimv2"),
  183. dynamic, provider("MS_VIEW_INSTANCE_PROVIDER")
  184. ]
  185. class PCH_Drive
  186. {
  187. [key, PropertySources{"DeviceID"}]
  188. string DriveLetter;
  189. [PropertySources{"FileSystem"}]
  190. string FileSystemType ;
  191. [PropertySources{"FreeSpace"}]
  192. uint64 FreeBytes;
  193. [PropertySources{"Size"}]
  194. uint64 AvailBytes;
  195. [PropertySources{""}]
  196. string Change = "SnapShot";
  197. };
  198. //-----------------------------------------------------------------------------
  199. // Created by : a-jammar
  200. // Date : 04/14/1999
  201. // Sypnosis : This creates a view class to map Win32_CODECFile.
  202. // What we call "category" is the "group" field from
  203. // Win32_CODECFile. What we call "group" is a registry
  204. // key grouping the CODECs, and isn't in Win32_CODECFile.
  205. //
  206. // NOTE: SELECT * used because "Group" is a keyword.
  207. //
  208. // Missing data : Group, Key
  209. //-----------------------------------------------------------------------------
  210. [
  211. union,
  212. ViewSources {"SELECT * FROM Win32_CODECFile"},
  213. ViewSpaces ("\\\\.\\root\\cimv2"),
  214. dynamic, provider("MS_VIEW_INSTANCE_PROVIDER")
  215. ]
  216. class PCH_CODEC
  217. {
  218. [PropertySources{""}]
  219. string Change = "SnapShot";
  220. [PropertySources{"description"}]
  221. string Description;
  222. [key, PropertySources{"name"}]
  223. string CODECDriver;
  224. [PropertySources{"version"}]
  225. string Version;
  226. [PropertySources{"group"}]
  227. string Category;
  228. [PropertySources{"creationdate"}]
  229. datetime Date;
  230. [PropertySources{"filesize"}]
  231. uint64 SizeBytes;
  232. [PropertySources{""}, Description("MISSING DATA")]
  233. string Group = "MISSING";
  234. [PropertySources{""}, Description("MISSING DATA")]
  235. string Key = "MISSING";
  236. };
  237. //-----------------------------------------------------------------------------
  238. // Created by : a-jammar
  239. // Date : 04/06/1999
  240. // Sypnosis : This creates a view class to map Win32_CDROMDrive.
  241. // NOTE: TotalSpaceKB replaced with TotalSpace.
  242. // NOTE: Removing the "device" property?
  243. //
  244. // Missing data : TransferFile, TransferSizeBytes, CPUUtilAt300KBS,
  245. // IntegrityFile, IntegritySize, device(registry)
  246. //-----------------------------------------------------------------------------
  247. [
  248. union,
  249. ViewSources {"SELECT DeviceID, Drive, VolumeName, TransferRate, DriveIntegrity, "
  250. "Description, SCSITargetId, Manufacturer, MaxMediaSize FROM Win32_CDROMDrive"},
  251. ViewSpaces ("\\\\.\\root\\cimv2"),
  252. dynamic, provider("MS_VIEW_INSTANCE_PROVIDER")
  253. ]
  254. class PCH_CDROM
  255. {
  256. [PropertySources{""}]
  257. string Change = "SnapShot";
  258. [key, PropertySources{"DeviceID"}] // new property - a key in source class
  259. string DeviceID;
  260. [key, PropertySources{"Drive"}]
  261. string DriveLetter;
  262. [PropertySources{"VolumeName"}]
  263. string VolumeName;
  264. [PropertySources{"MaxMediaSize"}]
  265. uint64 TotalSpace;
  266. [PropertySources{"TransferRate"}]
  267. real64 TransferRateKBS;
  268. [PropertySources{"DriveIntegrity"}]
  269. boolean DataTransferIntegrity;
  270. [PropertySources{"Description"}]
  271. string Description;
  272. [PropertySources{"SCSITargetId"}]
  273. uint16 SCSI;
  274. [PropertySources{"Manufacturer"}]
  275. string Manufacturer;
  276. [PropertySources{""}, Description("MISSING DATA")]
  277. string TransferFile = "MISSING";
  278. [PropertySources{""}, Description("MISSING DATA")]
  279. uint64 TransferSizeBytes = 0;
  280. [PropertySources{""}, Description("MISSING DATA")]
  281. uint32 CPUUtilAt300KBS = 0;
  282. [PropertySources{""}, Description("MISSING DATA")]
  283. string IntegrityFile = "MISSING";
  284. [PropertySources{""}, Description("MISSING DATA")]
  285. uint64 IntegritySize = 0;
  286. };
  287. //-----------------------------------------------------------------------------
  288. // Created by : a-jammar
  289. // Date : 04/06/1999
  290. // Sypnosis : This creates a view class for startup items.
  291. //
  292. // Missing data : None.
  293. //-----------------------------------------------------------------------------
  294. [
  295. union,
  296. ViewSources {"SELECT User, Name, Location, Command FROM Win32_StartupCommand"},
  297. ViewSpaces ("\\\\.\\root\\cimv2"),
  298. dynamic, provider("MS_VIEW_INSTANCE_PROVIDER")
  299. ]
  300. class PCH_Startup
  301. {
  302. [PropertySources{""}]
  303. string Change = "SnapShot";
  304. [key, PropertySources{"User"}] // new property - a key in source class
  305. string User;
  306. [key, PropertySources{"Name"}]
  307. string Name;
  308. [key, PropertySources{"Location"}]
  309. string LoadedFrom;
  310. [key, PropertySources{"Command"}]
  311. string Command;
  312. };
  313. //-----------------------------------------------------------------------------
  314. // Created by : a-jammar
  315. // Date : 04/14/1999
  316. // Sypnosis : This creates a view class to show RUNNING TASK.
  317. // Note that this class uses two queries and a join between
  318. // the cimv2 classes. The order of the strings is very
  319. // important in the ViewSources, ViewSpaces and
  320. // PropertySources constructs. The first string in the
  321. // ViewSpaces corresponds to the namespace for the first
  322. // SELECT in ViewSources. When specifying the properties
  323. // in PropertySources, the first string corresponds to the
  324. // results of the first SELECT, the second to the second
  325. // SELECT.
  326. //
  327. // Missing data : PartOf, Address
  328. //-----------------------------------------------------------------------------
  329. [
  330. JoinOn("Win32_Process.ExecutablePath = CIM_DataFile.Name"),
  331. ViewSources {"SELECT Caption, ExecutablePath, Handle FROM Win32_Process",
  332. "SELECT Name, Version, Description, Manufacturer, CreationDate FROM CIM_DataFile"},
  333. ViewSpaces {"\\\\.\\root\\cimv2", "\\\\.\\root\\cimv2"},
  334. dynamic, provider("MS_VIEW_INSTANCE_PROVIDER"),
  335. EnumerateClasses{"Win32_Process"}
  336. ]
  337. class PCH_RunningTask
  338. {
  339. [PropertySources{"", ""}]
  340. string Change = "SnapShot";
  341. [PropertySources{"Caption", ""}]
  342. string Name;
  343. [key, PropertySources{"ExecutablePath", "Name"}]
  344. string Path;
  345. [key, PropertySources{"Handle", ""}] // new property - a key in source class
  346. string Handle;
  347. [PropertySources{"", "Version"}]
  348. string Version;
  349. [PropertySources{"", "Description"}]
  350. string Description;
  351. [PropertySources{"", "Manufacturer"}]
  352. string Manufacturer;
  353. [PropertySources{"", "CreationDate"}]
  354. datetime Date;
  355. [PropertySources{"", ""}, Description("MISSING DATA")]
  356. string PartOf = "MISSING";
  357. [PropertySources{"", ""}, Description("MISSING DATA")]
  358. string Address = "MISSING";
  359. };