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.

613 lines
15 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1997 - 1999
  3. Module Name:
  4. senssink.hxx
  5. Abstract:
  6. Header file for Test subscriber.
  7. Author:
  8. Gopal Parupudi <GopalP>
  9. [Notes:]
  10. optional-notes
  11. Revision History:
  12. GopalP 11/19/1997 Start.
  13. --*/
  14. #ifndef __SENSSINK_HXX__
  15. #define __SENSSINK_HXX__
  16. #define TEST_SUBSCRIBER_NAME_NETWORK SENS_STRING("Test subscriber for SENS Network Events")
  17. #define TEST_SUBSCRIBER_NAME_LOGON SENS_STRING("Test subscriber for SENS Logon Events")
  18. #define TEST_SUBSCRIBER_NAME_LOGON2 SENS_STRING("Test subscriber for SENS Logon2 Events")
  19. #define TEST_SUBSCRIBER_NAME_POWER SENS_STRING("Test subscriber for SENS Power Events")
  20. #define TEST_SUBSCIPTION_NAME_NETALIVE SENS_BSTR("Test Subscription to SENS NetAlive Event")
  21. #define TEST_SUBSCIPTION_NAME_NETALIVE_NOQOC SENS_BSTR("Test Subscription to SENS NetAliveNoQOCInfo Event")
  22. #define TEST_SUBSCIPTION_NAME_NETLOST SENS_BSTR("Test Subscription to SENS NetLost Event")
  23. #define TEST_SUBSCIPTION_NAME_REACH SENS_BSTR("Test Subscription to SENS DestinationReachable Event")
  24. #define TEST_SUBSCIPTION_NAME_REACH_NOQOC SENS_BSTR("Test Subscription to SENS DestinationReachableNoQOCInfo Event")
  25. #define TEST_SUBSCIPTION_NAME_LOGON SENS_BSTR("Test Subscription to SENS Logon Event")
  26. #define TEST_SUBSCIPTION_NAME_LOGOFF SENS_BSTR("Test Subscription to SENS Logoff Event")
  27. #define TEST_SUBSCIPTION_NAME_STARTUP SENS_BSTR("Test Subscription to SENS Startup Event")
  28. #define TEST_SUBSCIPTION_NAME_STARTSHELL SENS_BSTR("Test Subscription to SENS StartShell Event")
  29. #define TEST_SUBSCIPTION_NAME_SHUTDOWN SENS_BSTR("Test Subscription to SENS Shutdown Event")
  30. #define TEST_SUBSCIPTION_NAME_LOCK SENS_BSTR("Test Subscription to SENS DisplayLock Event")
  31. #define TEST_SUBSCIPTION_NAME_UNLOCK SENS_BSTR("Test Subscription to SENS DisplayUnlock Event")
  32. #define TEST_SUBSCIPTION_NAME_STARTSCREENSAVER SENS_BSTR("Test Subscription to SENS StartScreenSaver Event")
  33. #define TEST_SUBSCIPTION_NAME_STOPSCREENSAVER SENS_BSTR("Test Subscription to SENS StopScreenSaver Event")
  34. #define TEST_SUBSCIPTION_NAME_ONAC SENS_BSTR("Test Subscription to SENS OnACPower Event")
  35. #define TEST_SUBSCIPTION_NAME_ONBATTERY SENS_BSTR("Test Subscription to SENS OnBatteryPower Event")
  36. #define TEST_SUBSCIPTION_NAME_BATTERYLOW SENS_BSTR("Test Subscription to SENS BatteryLow Event")
  37. #define TEST_SUBSCIPTION_NAME_LOGON2 SENS_BSTR("Test Subscription to SENS ISensLogon2::Logon Event")
  38. #define TEST_SUBSCIPTION_NAME_LOGOFF2 SENS_BSTR("Test Subscription to SENS ISensLogon2::Logoff Event")
  39. #define TEST_SUBSCIPTION_NAME_POSTSHELL SENS_BSTR("Test Subscription to SENS ISensLogon2::PostShell Event")
  40. #define TEST_SUBSCIPTION_NAME_SESSION_DISCONNECT SENS_BSTR("Test Subscription to SENS ISensLogon2::SessionDisconnect Event")
  41. #define TEST_SUBSCIPTION_NAME_SESSION_RECONNECT SENS_BSTR("Test Subscription to SENS ISensLogon2::SessionReconnect Event")
  42. //
  43. // Typedefs
  44. //
  45. typedef struct _TEST_SUBSCRIBER
  46. {
  47. const GUID *pSubscriberGUID;
  48. const GUID *pSubscriberCLSID;
  49. TCHAR *strSubscriberName;
  50. } TEST_SUBSCRIBER, *PTEST_SUBSCRIBER;
  51. typedef struct _TEST_SUBSCRIPTION
  52. {
  53. const GUID *pSubscriberCLSID;
  54. const GUID *pSubscriptionID;
  55. LPOLESTR strSubscriptionName;
  56. LPOLESTR strMethodName;
  57. const GUID *pEventClassID;
  58. const GUID *pInterfaceID;
  59. BOOL bPublisherPropertyPresent;
  60. LPOLESTR strPropertyMethodName;
  61. LPOLESTR strPropertyMethodNameValue;
  62. } TEST_SUBSCRIPTION, *PTEST_SUBSCRIPTION;
  63. //
  64. // Subscription Guids
  65. //
  66. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_NETALIVE =
  67. { /* b0230000-6143-11d1-8dd4-00aa004abd5e */
  68. 0xb0230000,
  69. 0x6143,
  70. 0x11d1,
  71. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  72. };
  73. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_NETALIVE_NOQOC =
  74. { /* b0230001-6143-11d1-8dd4-00aa004abd5e */
  75. 0xb0230001,
  76. 0x6143,
  77. 0x11d1,
  78. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  79. };
  80. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_NETLOST =
  81. { /* b0230002-6143-11d1-8dd4-00aa004abd5e */
  82. 0xb0230002,
  83. 0x6143,
  84. 0x11d1,
  85. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  86. };
  87. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_REACH =
  88. { /* b0230005-6143-11d1-8dd4-00aa004abd5e */
  89. 0xb0230005,
  90. 0x6143,
  91. 0x11d1,
  92. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  93. };
  94. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_REACH_NOQOC =
  95. { /* b0230006-6143-11d1-8dd4-00aa004abd5e */
  96. 0xb0230006,
  97. 0x6143,
  98. 0x11d1,
  99. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  100. };
  101. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_REACH_NOQOC2 =
  102. { /* b0230007-6143-11d1-8dd4-00aa004abd5e */
  103. 0xb0230007,
  104. 0x6143,
  105. 0x11d1,
  106. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  107. };
  108. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_LOGON =
  109. { /* b0230010-6143-11d1-8dd4-00aa004abd5e */
  110. 0xb0230010,
  111. 0x6143,
  112. 0x11d1,
  113. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  114. };
  115. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_LOGOFF =
  116. { /* b0230011-6143-11d1-8dd4-00aa004abd5e */
  117. 0xb0230011,
  118. 0x6143,
  119. 0x11d1,
  120. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  121. };
  122. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_STARTSHELL =
  123. { /* b0230013-6143-11d1-8dd4-00aa004abd5e */
  124. 0xb0230013,
  125. 0x6143,
  126. 0x11d1,
  127. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  128. };
  129. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_LOCK =
  130. { /* b0230015-6143-11d1-8dd4-00aa004abd5e */
  131. 0xb0230015,
  132. 0x6143,
  133. 0x11d1,
  134. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  135. };
  136. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_UNLOCK =
  137. { /* b0230016-6143-11d1-8dd4-00aa004abd5e */
  138. 0xb0230016,
  139. 0x6143,
  140. 0x11d1,
  141. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  142. };
  143. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_STARTSCREENSAVER =
  144. { /* b0230017-6143-11d1-8dd4-00aa004abd5e */
  145. 0xb0230017,
  146. 0x6143,
  147. 0x11d1,
  148. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  149. };
  150. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_STOPSCREENSAVER =
  151. { /* b0230018-6143-11d1-8dd4-00aa004abd5e */
  152. 0xb0230018,
  153. 0x6143,
  154. 0x11d1,
  155. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  156. };
  157. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_ONAC =
  158. { /* b0230020-6143-11d1-8dd4-00aa004abd5e */
  159. 0xb0230020,
  160. 0x6143,
  161. 0x11d1,
  162. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  163. };
  164. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_ONBATTERY =
  165. { /* b0230021-6143-11d1-8dd4-00aa004abd5e */
  166. 0xb0230021,
  167. 0x6143,
  168. 0x11d1,
  169. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  170. };
  171. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_BATTERYLOW =
  172. { /* b0230022-6143-11d1-8dd4-00aa004abd5e */
  173. 0xb0230022,
  174. 0x6143,
  175. 0x11d1,
  176. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  177. };
  178. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_LOGON2 =
  179. { /* b0230030-6143-11d1-8dd4-00aa004abd5e */
  180. 0xb0230030,
  181. 0x6143,
  182. 0x11d1,
  183. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  184. };
  185. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_LOGOFF2 =
  186. { /* b0230031-6143-11d1-8dd4-00aa004abd5e */
  187. 0xb0230031,
  188. 0x6143,
  189. 0x11d1,
  190. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  191. };
  192. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_POSTSHELL =
  193. { /* b0230032-6143-11d1-8dd4-00aa004abd5e */
  194. 0xb0230032,
  195. 0x6143,
  196. 0x11d1,
  197. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  198. };
  199. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_SESSION_DISCONNECT =
  200. { /* b0230033-6143-11d1-8dd4-00aa004abd5e */
  201. 0xb0230033,
  202. 0x6143,
  203. 0x11d1,
  204. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  205. };
  206. EXTERN_C const GUID GUID_TEST_SUBSCRIPTION_SESSION_RECONNECT =
  207. { /* b0230034-6143-11d1-8dd4-00aa004abd5e */
  208. 0xb0230034,
  209. 0x6143,
  210. 0x11d1,
  211. {0x8d, 0xd4, 0x00, 0xaa, 0x00, 0x4a, 0xbd, 0x5e}
  212. };
  213. //
  214. // Global Tables
  215. //
  216. const TEST_SUBSCRIBER gTestSubscribers[] =
  217. {
  218. {
  219. &CLSID_SensTestSubscriberNetwork,
  220. &CLSID_SensTestSubscriberNetwork,
  221. TEST_SUBSCRIBER_NAME_NETWORK
  222. },
  223. {
  224. &CLSID_SensTestSubscriberLogon,
  225. &CLSID_SensTestSubscriberLogon,
  226. TEST_SUBSCRIBER_NAME_LOGON
  227. },
  228. {
  229. &CLSID_SensTestSubscriberOnNow,
  230. &CLSID_SensTestSubscriberOnNow,
  231. TEST_SUBSCRIBER_NAME_POWER
  232. },
  233. {
  234. &CLSID_SensTestSubscriberLogon2,
  235. &CLSID_SensTestSubscriberLogon2,
  236. TEST_SUBSCRIBER_NAME_LOGON2
  237. },
  238. };
  239. #define TEST_SUBSCRIBERS_COUNT (sizeof(gTestSubscribers)/sizeof(TEST_SUBSCRIBER))
  240. const TEST_SUBSCRIPTION gTestSubscriptions[] =
  241. {
  242. {
  243. &CLSID_SensTestSubscriberNetwork,
  244. &GUID_TEST_SUBSCRIPTION_NETALIVE,
  245. TEST_SUBSCIPTION_NAME_NETALIVE,
  246. SENS_BSTR("ConnectionMade"),
  247. &SENSGUID_EVENTCLASS_NETWORK,
  248. &IID_ISensNetwork,
  249. TRUE,
  250. SENS_BSTR("ulConnectionMadeType"),
  251. SENS_BSTR("1")
  252. },
  253. {
  254. &CLSID_SensTestSubscriberNetwork,
  255. &GUID_TEST_SUBSCRIPTION_NETALIVE_NOQOC,
  256. TEST_SUBSCIPTION_NAME_NETALIVE_NOQOC,
  257. SENS_BSTR("ConnectionMadeNoQOCInfo"),
  258. &SENSGUID_EVENTCLASS_NETWORK,
  259. &IID_ISensNetwork,
  260. FALSE,
  261. NULL,
  262. NULL
  263. },
  264. {
  265. &CLSID_SensTestSubscriberNetwork,
  266. &GUID_TEST_SUBSCRIPTION_NETLOST,
  267. TEST_SUBSCIPTION_NAME_NETLOST,
  268. SENS_BSTR("ConnectionLost"),
  269. &SENSGUID_EVENTCLASS_NETWORK,
  270. &IID_ISensNetwork,
  271. FALSE,
  272. NULL,
  273. NULL
  274. },
  275. {
  276. &CLSID_SensTestSubscriberNetwork,
  277. &GUID_TEST_SUBSCRIPTION_REACH,
  278. TEST_SUBSCIPTION_NAME_REACH,
  279. SENS_BSTR("DestinationReachable"),
  280. &SENSGUID_EVENTCLASS_NETWORK,
  281. &IID_ISensNetwork,
  282. TRUE,
  283. SENS_BSTR("bstrDestination"),
  284. SENS_BSTR("trango"),
  285. },
  286. {
  287. &CLSID_SensTestSubscriberNetwork,
  288. &GUID_TEST_SUBSCRIPTION_REACH_NOQOC,
  289. TEST_SUBSCIPTION_NAME_REACH_NOQOC,
  290. SENS_BSTR("DestinationReachableNoQOCInfo"),
  291. &SENSGUID_EVENTCLASS_NETWORK,
  292. &IID_ISensNetwork,
  293. TRUE,
  294. SENS_BSTR("bstrDestinationNoQOC"),
  295. SENS_BSTR("http://mscominternal"),
  296. },
  297. {
  298. &CLSID_SensTestSubscriberNetwork,
  299. &GUID_TEST_SUBSCRIPTION_REACH_NOQOC2,
  300. TEST_SUBSCIPTION_NAME_REACH_NOQOC,
  301. SENS_BSTR("DestinationReachableNoQOCInfo"),
  302. &SENSGUID_EVENTCLASS_NETWORK,
  303. &IID_ISensNetwork,
  304. TRUE,
  305. SENS_BSTR("bstrDestinationNoQOC"),
  306. SENS_BSTR("netshow.ntdev.microsoft.com"),
  307. },
  308. {
  309. &CLSID_SensTestSubscriberLogon,
  310. &GUID_TEST_SUBSCRIPTION_LOGON,
  311. TEST_SUBSCIPTION_NAME_LOGON,
  312. SENS_BSTR("Logon"),
  313. &SENSGUID_EVENTCLASS_LOGON,
  314. &IID_ISensLogon,
  315. FALSE,
  316. NULL,
  317. NULL
  318. },
  319. {
  320. &CLSID_SensTestSubscriberLogon,
  321. &GUID_TEST_SUBSCRIPTION_LOGOFF,
  322. TEST_SUBSCIPTION_NAME_LOGOFF,
  323. SENS_BSTR("Logoff"),
  324. &SENSGUID_EVENTCLASS_LOGON,
  325. &IID_ISensLogon,
  326. FALSE,
  327. NULL,
  328. NULL
  329. },
  330. {
  331. &CLSID_SensTestSubscriberLogon,
  332. &GUID_TEST_SUBSCRIPTION_STARTSHELL,
  333. TEST_SUBSCIPTION_NAME_STARTSHELL,
  334. SENS_BSTR("StartShell"),
  335. &SENSGUID_EVENTCLASS_LOGON,
  336. &IID_ISensLogon,
  337. FALSE,
  338. NULL,
  339. NULL
  340. },
  341. {
  342. &CLSID_SensTestSubscriberLogon,
  343. &GUID_TEST_SUBSCRIPTION_LOCK,
  344. TEST_SUBSCIPTION_NAME_LOCK,
  345. SENS_BSTR("DisplayLock"),
  346. &SENSGUID_EVENTCLASS_LOGON,
  347. &IID_ISensLogon,
  348. FALSE,
  349. NULL,
  350. NULL
  351. },
  352. {
  353. &CLSID_SensTestSubscriberLogon,
  354. &GUID_TEST_SUBSCRIPTION_UNLOCK,
  355. TEST_SUBSCIPTION_NAME_UNLOCK,
  356. SENS_BSTR("DisplayUnlock"),
  357. &SENSGUID_EVENTCLASS_LOGON,
  358. &IID_ISensLogon,
  359. FALSE,
  360. NULL,
  361. NULL
  362. },
  363. {
  364. &CLSID_SensTestSubscriberLogon,
  365. &GUID_TEST_SUBSCRIPTION_STARTSCREENSAVER,
  366. TEST_SUBSCIPTION_NAME_STARTSCREENSAVER,
  367. SENS_BSTR("StartScreenSaver"),
  368. &SENSGUID_EVENTCLASS_LOGON,
  369. &IID_ISensLogon,
  370. FALSE,
  371. NULL,
  372. NULL
  373. },
  374. {
  375. &CLSID_SensTestSubscriberLogon,
  376. &GUID_TEST_SUBSCRIPTION_STOPSCREENSAVER,
  377. TEST_SUBSCIPTION_NAME_STOPSCREENSAVER,
  378. SENS_BSTR("StopScreenSaver"),
  379. &SENSGUID_EVENTCLASS_LOGON,
  380. &IID_ISensLogon,
  381. FALSE,
  382. NULL,
  383. NULL
  384. },
  385. {
  386. &CLSID_SensTestSubscriberOnNow,
  387. &GUID_TEST_SUBSCRIPTION_ONAC,
  388. TEST_SUBSCIPTION_NAME_ONAC,
  389. SENS_BSTR("OnACPower"),
  390. &SENSGUID_EVENTCLASS_ONNOW,
  391. &IID_ISensOnNow,
  392. FALSE,
  393. NULL,
  394. NULL
  395. },
  396. {
  397. &CLSID_SensTestSubscriberOnNow,
  398. &GUID_TEST_SUBSCRIPTION_ONBATTERY,
  399. TEST_SUBSCIPTION_NAME_ONBATTERY,
  400. SENS_BSTR("OnBatteryPower"),
  401. &SENSGUID_EVENTCLASS_ONNOW,
  402. &IID_ISensOnNow,
  403. FALSE,
  404. NULL,
  405. NULL
  406. },
  407. {
  408. &CLSID_SensTestSubscriberOnNow,
  409. &GUID_TEST_SUBSCRIPTION_BATTERYLOW,
  410. TEST_SUBSCIPTION_NAME_BATTERYLOW,
  411. SENS_BSTR("BatteryLow"),
  412. &SENSGUID_EVENTCLASS_ONNOW,
  413. &IID_ISensOnNow,
  414. FALSE,
  415. NULL,
  416. NULL
  417. },
  418. {
  419. &CLSID_SensTestSubscriberLogon2,
  420. &GUID_TEST_SUBSCRIPTION_LOGON2,
  421. TEST_SUBSCIPTION_NAME_LOGON2,
  422. SENS_BSTR("Logon"),
  423. &SENSGUID_EVENTCLASS_LOGON2,
  424. &IID_ISensLogon2,
  425. FALSE,
  426. NULL,
  427. NULL
  428. },
  429. {
  430. &CLSID_SensTestSubscriberLogon2,
  431. &GUID_TEST_SUBSCRIPTION_LOGOFF2,
  432. TEST_SUBSCIPTION_NAME_LOGOFF2,
  433. SENS_BSTR("Logoff"),
  434. &SENSGUID_EVENTCLASS_LOGON2,
  435. &IID_ISensLogon2,
  436. FALSE,
  437. NULL,
  438. NULL
  439. },
  440. {
  441. &CLSID_SensTestSubscriberLogon2,
  442. &GUID_TEST_SUBSCRIPTION_POSTSHELL,
  443. TEST_SUBSCIPTION_NAME_POSTSHELL,
  444. SENS_BSTR("PostShell"),
  445. &SENSGUID_EVENTCLASS_LOGON2,
  446. &IID_ISensLogon2,
  447. FALSE,
  448. NULL,
  449. NULL
  450. },
  451. {
  452. &CLSID_SensTestSubscriberLogon2,
  453. &GUID_TEST_SUBSCRIPTION_SESSION_DISCONNECT,
  454. TEST_SUBSCIPTION_NAME_SESSION_DISCONNECT,
  455. SENS_BSTR("SessionDisconnect"),
  456. &SENSGUID_EVENTCLASS_LOGON2,
  457. &IID_ISensLogon2,
  458. FALSE,
  459. NULL,
  460. NULL
  461. },
  462. {
  463. &CLSID_SensTestSubscriberLogon2,
  464. &GUID_TEST_SUBSCRIPTION_SESSION_RECONNECT,
  465. TEST_SUBSCIPTION_NAME_SESSION_RECONNECT,
  466. SENS_BSTR("SessionReconnect"),
  467. &SENSGUID_EVENTCLASS_LOGON2,
  468. &IID_ISensLogon2,
  469. FALSE,
  470. NULL,
  471. NULL
  472. },
  473. };
  474. #define TEST_SUBSCRIPTIONS_COUNT (sizeof(gTestSubscriptions)/sizeof(TEST_SUBSCRIPTION))
  475. //
  476. // Forward declarations
  477. //
  478. HRESULT
  479. RegisterWithES(
  480. BOOL bUnregister
  481. );
  482. HRESULT
  483. RegisterSubscriptions(
  484. BOOL bUnregister
  485. );
  486. HRESULT
  487. RegisterSubscriberCLSID(
  488. REFIID clsid,
  489. TCHAR* strSubscriberName,
  490. BOOL bUnregister
  491. );
  492. HRESULT
  493. CreateKey(
  494. HKEY hParentKey,
  495. const TCHAR* KeyName,
  496. const TCHAR* defaultValue,
  497. HKEY* hKey
  498. );
  499. HRESULT
  500. CreateNamedValue(
  501. HKEY hKey,
  502. const TCHAR* title,
  503. const TCHAR* value
  504. );
  505. HRESULT
  506. RecursiveDeleteKey(
  507. HKEY hKeyParent,
  508. const TCHAR* lpszKeyChild
  509. );
  510. inline void
  511. Usage(void)
  512. {
  513. SensPrint(SENS_ERR, (SENS_STRING("\nUSAGE: senssink <option>\n\n")));
  514. SensPrint(SENS_ERR, (SENS_STRING(" -i Register Test Subscriber with EventSystem.\n")));
  515. SensPrint(SENS_ERR, (SENS_STRING(" -u Unregister Test Subscriber with EventSystem.\n")));
  516. }
  517. #endif // __SENSSINK_HXX__