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.

892 lines
27 KiB

  1. /*++
  2. Copyright (c) 2002 Microsoft Corporation
  3. Module Name:
  4. dlldata_holder.c
  5. Abstract:
  6. Wrapper around the MIDL-generated dlldata.c. This wrapper allows us
  7. to disable warning 4100.
  8. Author:
  9. Ivan Pashov (IVANPASH) 20-Feb-2002
  10. Revision History:
  11. --*/
  12. #pragma warning(disable: 4100)
  13. #include "dlldata.c"
  14. STDAPI DllRegisterServer()
  15. {
  16. DWORD dwError;
  17. HKEY hKeyCLSID;
  18. HKEY hKeyInproc32;
  19. HKEY hKeyIF;
  20. HKEY hKeyStub32;
  21. DWORD dwDisposition;
  22. //
  23. // Main Interfaces
  24. //
  25. //
  26. // UNICODE Main Interface
  27. //
  28. dwError = RegCreateKeyExA( HKEY_CLASSES_ROOT,
  29. "CLSID\\{70B51430-B6CA-11D0-B9B9-00A0C922E750}",
  30. 0,
  31. "",
  32. REG_OPTION_NON_VOLATILE,
  33. KEY_ALL_ACCESS,
  34. NULL,
  35. &hKeyCLSID,
  36. &dwDisposition );
  37. if ( dwError != ERROR_SUCCESS )
  38. {
  39. return E_UNEXPECTED;
  40. }
  41. dwError = RegSetValueExA( hKeyCLSID,
  42. "",
  43. 0,
  44. REG_SZ,
  45. (BYTE*)"PSFactoryBuffer",
  46. sizeof("PSFactoryBuffer") );
  47. if ( dwError != ERROR_SUCCESS )
  48. {
  49. RegCloseKey(hKeyCLSID);
  50. return E_UNEXPECTED;
  51. }
  52. dwError = RegCreateKeyExA( hKeyCLSID,
  53. "InprocServer32",
  54. 0,
  55. "",
  56. REG_OPTION_NON_VOLATILE,
  57. KEY_ALL_ACCESS,
  58. NULL,
  59. &hKeyInproc32,
  60. &dwDisposition );
  61. if ( dwError != ERROR_SUCCESS )
  62. {
  63. RegCloseKey(hKeyCLSID);
  64. return E_UNEXPECTED;
  65. }
  66. dwError = RegSetValueExA( hKeyInproc32,
  67. "",
  68. 0,
  69. REG_SZ,
  70. (BYTE*)"ADMWPROX.DLL",
  71. sizeof("ADMWPROX.DLL") );
  72. if ( dwError != ERROR_SUCCESS )
  73. {
  74. RegCloseKey(hKeyInproc32);
  75. RegCloseKey(hKeyCLSID);
  76. return E_UNEXPECTED;
  77. }
  78. dwError = RegSetValueExA( hKeyInproc32,
  79. "ThreadingModel",
  80. 0,
  81. REG_SZ,
  82. (BYTE*)"Both",
  83. sizeof("Both") );
  84. if ( dwError != ERROR_SUCCESS )
  85. {
  86. RegCloseKey(hKeyInproc32);
  87. RegCloseKey(hKeyCLSID);
  88. return E_UNEXPECTED;
  89. }
  90. RegCloseKey(hKeyInproc32);
  91. RegCloseKey(hKeyCLSID);
  92. dwError = RegCreateKeyExA( HKEY_CLASSES_ROOT,
  93. "CLSID\\{8298d101-f992-43b7-8eca-5052d885b995}",
  94. 0,
  95. "",
  96. REG_OPTION_NON_VOLATILE,
  97. KEY_ALL_ACCESS,
  98. NULL,
  99. &hKeyCLSID,
  100. &dwDisposition );
  101. if ( dwError != ERROR_SUCCESS )
  102. {
  103. return E_UNEXPECTED;
  104. }
  105. dwError = RegSetValueExA( hKeyCLSID,
  106. "",
  107. 0,
  108. REG_SZ,
  109. (BYTE*)"PSFactoryBuffer",
  110. sizeof("PSFactoryBuffer") );
  111. if ( dwError != ERROR_SUCCESS )
  112. {
  113. RegCloseKey(hKeyCLSID);
  114. return E_UNEXPECTED;
  115. }
  116. dwError = RegCreateKeyExA( hKeyCLSID,
  117. "InprocServer32",
  118. 0,
  119. "",
  120. REG_OPTION_NON_VOLATILE,
  121. KEY_ALL_ACCESS,
  122. NULL,
  123. &hKeyInproc32,
  124. &dwDisposition );
  125. if ( dwError != ERROR_SUCCESS )
  126. {
  127. RegCloseKey(hKeyCLSID);
  128. return E_UNEXPECTED;
  129. }
  130. dwError = RegSetValueExA( hKeyInproc32,
  131. "",
  132. 0,
  133. REG_SZ,
  134. (BYTE*)"ADMWPROX.DLL",
  135. sizeof("ADMWPROX.DLL") );
  136. if ( dwError != ERROR_SUCCESS )
  137. {
  138. RegCloseKey(hKeyInproc32);
  139. RegCloseKey(hKeyCLSID);
  140. return E_UNEXPECTED;
  141. }
  142. dwError = RegSetValueExA( hKeyInproc32,
  143. "ThreadingModel",
  144. 0,
  145. REG_SZ,
  146. (BYTE*)"Both",
  147. sizeof("Both") );
  148. if ( dwError != ERROR_SUCCESS )
  149. {
  150. RegCloseKey(hKeyInproc32);
  151. RegCloseKey(hKeyCLSID);
  152. return E_UNEXPECTED;
  153. }
  154. RegCloseKey(hKeyInproc32);
  155. RegCloseKey(hKeyCLSID);
  156. dwError = RegCreateKeyExA( HKEY_CLASSES_ROOT,
  157. "CLSID\\{f612954d-3b0b-4c56-9563-227b7be624b4}",
  158. 0,
  159. "",
  160. REG_OPTION_NON_VOLATILE,
  161. KEY_ALL_ACCESS,
  162. NULL,
  163. &hKeyCLSID,
  164. &dwDisposition );
  165. if ( dwError !=ERROR_SUCCESS )
  166. {
  167. return E_UNEXPECTED;
  168. }
  169. dwError = RegSetValueExA( hKeyCLSID,
  170. "",
  171. 0,
  172. REG_SZ,
  173. (BYTE*)"PSFactoryBuffer",
  174. sizeof("PSFactoryBuffer") );
  175. if ( dwError != ERROR_SUCCESS )
  176. {
  177. RegCloseKey(hKeyCLSID);
  178. return E_UNEXPECTED;
  179. }
  180. dwError = RegCreateKeyExA( hKeyCLSID,
  181. "InprocServer32",
  182. 0,
  183. "",
  184. REG_OPTION_NON_VOLATILE,
  185. KEY_ALL_ACCESS,
  186. NULL,
  187. &hKeyInproc32,
  188. &dwDisposition );
  189. if ( dwError != ERROR_SUCCESS )
  190. {
  191. RegCloseKey(hKeyCLSID);
  192. return E_UNEXPECTED;
  193. }
  194. dwError = RegSetValueExA( hKeyInproc32,
  195. "",
  196. 0,
  197. REG_SZ,
  198. (BYTE*)"ADMWPROX.DLL",
  199. sizeof("ADMWPROX.DLL") );
  200. if ( dwError != ERROR_SUCCESS )
  201. {
  202. RegCloseKey(hKeyInproc32);
  203. RegCloseKey(hKeyCLSID);
  204. return E_UNEXPECTED;
  205. }
  206. dwError = RegSetValueExA( hKeyInproc32,
  207. "ThreadingModel",
  208. 0,
  209. REG_SZ,
  210. (BYTE*)"Both",
  211. sizeof("Both") );
  212. if ( dwError != ERROR_SUCCESS )
  213. {
  214. RegCloseKey(hKeyInproc32);
  215. RegCloseKey(hKeyCLSID);
  216. return E_UNEXPECTED;
  217. }
  218. RegCloseKey(hKeyInproc32);
  219. RegCloseKey(hKeyCLSID);
  220. dwError = RegCreateKeyExA( HKEY_CLASSES_ROOT,
  221. "CLSID\\{29FF67FF-8050-480f-9F30-CC41635F2F9D}",
  222. 0,
  223. "",
  224. REG_OPTION_NON_VOLATILE,
  225. KEY_ALL_ACCESS,
  226. NULL,
  227. &hKeyCLSID,
  228. &dwDisposition );
  229. if ( dwError != ERROR_SUCCESS )
  230. {
  231. return E_UNEXPECTED;
  232. }
  233. dwError = RegSetValueExA( hKeyCLSID,
  234. "",
  235. 0,
  236. REG_SZ,
  237. (BYTE*)"PSFactoryBuffer",
  238. sizeof("PSFactoryBuffer") );
  239. if ( dwError != ERROR_SUCCESS )
  240. {
  241. RegCloseKey(hKeyCLSID);
  242. return E_UNEXPECTED;
  243. }
  244. dwError = RegCreateKeyExA( hKeyCLSID,
  245. "InprocServer32",
  246. 0,
  247. "",
  248. REG_OPTION_NON_VOLATILE,
  249. KEY_ALL_ACCESS,
  250. NULL,
  251. &hKeyInproc32,
  252. &dwDisposition );
  253. if ( dwError != ERROR_SUCCESS )
  254. {
  255. RegCloseKey(hKeyCLSID);
  256. return E_UNEXPECTED;
  257. }
  258. dwError = RegSetValueExA( hKeyInproc32,
  259. "",
  260. 0,
  261. REG_SZ,
  262. (BYTE*)"ADMWPROX.DLL",
  263. sizeof("ADMWPROX.DLL") );
  264. if ( dwError != ERROR_SUCCESS )
  265. {
  266. RegCloseKey(hKeyInproc32);
  267. RegCloseKey(hKeyCLSID);
  268. return E_UNEXPECTED;
  269. }
  270. dwError = RegSetValueExA( hKeyInproc32,
  271. "ThreadingModel",
  272. 0,
  273. REG_SZ,
  274. (BYTE*)"Both",
  275. sizeof("Both") );
  276. if ( dwError != ERROR_SUCCESS )
  277. {
  278. RegCloseKey(hKeyInproc32);
  279. RegCloseKey(hKeyCLSID);
  280. return E_UNEXPECTED;
  281. }
  282. RegCloseKey(hKeyInproc32);
  283. RegCloseKey(hKeyCLSID);
  284. //
  285. // Sink Interfaces
  286. //
  287. //
  288. // UNICODE Sink
  289. //
  290. dwError = RegCreateKeyExA( HKEY_CLASSES_ROOT,
  291. "CLSID\\{A9E69612-B80D-11D0-B9B9-00A0C922E750}",
  292. 0,
  293. "",
  294. REG_OPTION_NON_VOLATILE,
  295. KEY_ALL_ACCESS,
  296. NULL,
  297. &hKeyCLSID,
  298. &dwDisposition );
  299. if ( dwError != ERROR_SUCCESS )
  300. {
  301. return E_UNEXPECTED;
  302. }
  303. dwError = RegSetValueExA( hKeyCLSID,
  304. "",
  305. 0,
  306. REG_SZ,
  307. (BYTE*)"PSFactoryBuffer",
  308. sizeof("PSFactoryBuffer") );
  309. if ( dwError != ERROR_SUCCESS )
  310. {
  311. RegCloseKey(hKeyCLSID);
  312. return E_UNEXPECTED;
  313. }
  314. dwError = RegCreateKeyExA( hKeyCLSID,
  315. "InprocServer32",
  316. 0,
  317. "",
  318. REG_OPTION_NON_VOLATILE,
  319. KEY_ALL_ACCESS,
  320. NULL,
  321. &hKeyInproc32,
  322. &dwDisposition );
  323. if ( dwError != ERROR_SUCCESS )
  324. {
  325. RegCloseKey(hKeyCLSID);
  326. return E_UNEXPECTED;
  327. }
  328. dwError = RegSetValueExA( hKeyInproc32,
  329. "",
  330. 0,
  331. REG_SZ,
  332. (BYTE*)"ADMWPROX.DLL",
  333. sizeof("ADMWPROX.DLL") );
  334. if ( dwError != ERROR_SUCCESS )
  335. {
  336. RegCloseKey(hKeyInproc32);
  337. RegCloseKey(hKeyCLSID);
  338. return E_UNEXPECTED;
  339. }
  340. dwError = RegSetValueExA( hKeyInproc32,
  341. "ThreadingModel",
  342. 0,
  343. REG_SZ,
  344. (BYTE*)"Both",
  345. sizeof("Both") );
  346. if ( dwError != ERROR_SUCCESS )
  347. {
  348. RegCloseKey(hKeyInproc32);
  349. RegCloseKey(hKeyCLSID);
  350. return E_UNEXPECTED;
  351. }
  352. RegCloseKey(hKeyInproc32);
  353. RegCloseKey(hKeyCLSID);
  354. //
  355. // register Interfaces
  356. //
  357. //
  358. // UNICODE Main Interface
  359. //
  360. dwError = RegCreateKeyExA( HKEY_CLASSES_ROOT,
  361. "Interface\\{70B51430-B6CA-11D0-B9B9-00A0C922E750}",
  362. 0,
  363. "",
  364. REG_OPTION_NON_VOLATILE,
  365. KEY_ALL_ACCESS,
  366. NULL,
  367. &hKeyIF,
  368. &dwDisposition );
  369. if ( dwError != ERROR_SUCCESS )
  370. {
  371. return E_UNEXPECTED;
  372. }
  373. dwError = RegSetValueExA( hKeyIF,
  374. "",
  375. 0,
  376. REG_SZ,
  377. (BYTE*)"IADMCOM",
  378. sizeof("IADMCOM") );
  379. if ( dwError != ERROR_SUCCESS )
  380. {
  381. RegCloseKey(hKeyIF);
  382. return E_UNEXPECTED;
  383. }
  384. dwError = RegCreateKeyExA( hKeyIF,
  385. "ProxyStubClsid32",
  386. 0,
  387. "",
  388. REG_OPTION_NON_VOLATILE,
  389. KEY_ALL_ACCESS,
  390. NULL,
  391. &hKeyStub32,
  392. &dwDisposition );
  393. if ( dwError != ERROR_SUCCESS )
  394. {
  395. RegCloseKey(hKeyIF);
  396. return E_UNEXPECTED;
  397. }
  398. dwError = RegSetValueExA( hKeyStub32,
  399. "",
  400. 0,
  401. REG_SZ,
  402. (BYTE*)"{70B51430-B6CA-11D0-B9B9-00A0C922E750}",
  403. sizeof("{70B51430-B6CA-11D0-B9B9-00A0C922E750}") );
  404. if ( dwError != ERROR_SUCCESS )
  405. {
  406. RegCloseKey(hKeyStub32);
  407. RegCloseKey(hKeyIF);
  408. return E_UNEXPECTED;
  409. }
  410. RegCloseKey(hKeyStub32);
  411. RegCloseKey(hKeyIF);
  412. dwError = RegCreateKeyExA( HKEY_CLASSES_ROOT,
  413. "Interface\\{8298d101-f992-43b7-8eca-5052d885b995}",
  414. 0,
  415. "",
  416. REG_OPTION_NON_VOLATILE,
  417. KEY_ALL_ACCESS,
  418. NULL,
  419. &hKeyIF,
  420. &dwDisposition );
  421. if ( dwError != ERROR_SUCCESS )
  422. {
  423. return E_UNEXPECTED;
  424. }
  425. dwError = RegSetValueExA( hKeyIF,
  426. "",
  427. 0,
  428. REG_SZ,
  429. (BYTE*)"IADMCOM2",
  430. sizeof("IADMCOM2") );
  431. if ( dwError != ERROR_SUCCESS )
  432. {
  433. RegCloseKey(hKeyIF);
  434. return E_UNEXPECTED;
  435. }
  436. dwError = RegCreateKeyExA( hKeyIF,
  437. "ProxyStubClsid32",
  438. 0,
  439. "",
  440. REG_OPTION_NON_VOLATILE,
  441. KEY_ALL_ACCESS,
  442. NULL,
  443. &hKeyStub32,
  444. &dwDisposition );
  445. if ( dwError != ERROR_SUCCESS )
  446. {
  447. RegCloseKey(hKeyIF);
  448. return E_UNEXPECTED;
  449. }
  450. dwError = RegSetValueExA( hKeyStub32,
  451. "",
  452. 0,
  453. REG_SZ,
  454. (BYTE*)"{8298d101-f992-43b7-8eca-5052d885b995}",
  455. sizeof("{8298d101-f992-43b7-8eca-5052d885b995}") );
  456. if ( dwError != ERROR_SUCCESS )
  457. {
  458. RegCloseKey(hKeyStub32);
  459. RegCloseKey(hKeyIF);
  460. return E_UNEXPECTED;
  461. }
  462. RegCloseKey(hKeyStub32);
  463. RegCloseKey(hKeyIF);
  464. dwError = RegCreateKeyExA( HKEY_CLASSES_ROOT,
  465. "Interface\\{f612954d-3b0b-4c56-9563-227b7be624b4}",
  466. 0,
  467. "",
  468. REG_OPTION_NON_VOLATILE,
  469. KEY_ALL_ACCESS,
  470. NULL,
  471. &hKeyIF,
  472. &dwDisposition );
  473. if ( dwError != ERROR_SUCCESS )
  474. {
  475. return E_UNEXPECTED;
  476. }
  477. dwError = RegSetValueExA( hKeyIF,
  478. "",
  479. 0,
  480. REG_SZ,
  481. (BYTE*)"IADMCOM3",
  482. sizeof("IADMCOM3") );
  483. if ( dwError != ERROR_SUCCESS )
  484. {
  485. RegCloseKey(hKeyIF);
  486. return E_UNEXPECTED;
  487. }
  488. dwError = RegCreateKeyExA( hKeyIF,
  489. "ProxyStubClsid32",
  490. 0,
  491. "",
  492. REG_OPTION_NON_VOLATILE,
  493. KEY_ALL_ACCESS,
  494. NULL,
  495. &hKeyStub32,
  496. &dwDisposition );
  497. if ( dwError != ERROR_SUCCESS )
  498. {
  499. RegCloseKey(hKeyIF);
  500. return E_UNEXPECTED;
  501. }
  502. dwError = RegSetValueExA( hKeyStub32,
  503. "",
  504. 0,
  505. REG_SZ,
  506. (BYTE*)"{f612954d-3b0b-4c56-9563-227b7be624b4}",
  507. sizeof("{f612954d-3b0b-4c56-9563-227b7be624b4}") );
  508. if ( dwError != ERROR_SUCCESS )
  509. {
  510. RegCloseKey(hKeyStub32);
  511. RegCloseKey(hKeyIF);
  512. return E_UNEXPECTED;
  513. }
  514. RegCloseKey(hKeyStub32);
  515. RegCloseKey(hKeyIF);
  516. dwError = RegCreateKeyExA( HKEY_CLASSES_ROOT,
  517. "Interface\\{29FF67FF-8050-480f-9F30-CC41635F2F9D}",
  518. 0,
  519. "",
  520. REG_OPTION_NON_VOLATILE,
  521. KEY_ALL_ACCESS,
  522. NULL,
  523. &hKeyIF,
  524. &dwDisposition );
  525. if ( dwError != ERROR_SUCCESS )
  526. {
  527. return E_UNEXPECTED;
  528. }
  529. dwError = RegSetValueExA( hKeyIF,
  530. "",
  531. 0,
  532. REG_SZ,
  533. (BYTE*)"IADMIMPEXPHLP",
  534. sizeof("IADMIMPEXPHLP") );
  535. if ( dwError != ERROR_SUCCESS )
  536. {
  537. RegCloseKey(hKeyIF);
  538. return E_UNEXPECTED;
  539. }
  540. dwError = RegCreateKeyExA( hKeyIF,
  541. "ProxyStubClsid32",
  542. 0,
  543. "",
  544. REG_OPTION_NON_VOLATILE,
  545. KEY_ALL_ACCESS,
  546. NULL,
  547. &hKeyStub32,
  548. &dwDisposition );
  549. if ( dwError != ERROR_SUCCESS )
  550. {
  551. RegCloseKey(hKeyIF);
  552. return E_UNEXPECTED;
  553. }
  554. dwError = RegSetValueExA( hKeyStub32,
  555. "",
  556. 0,
  557. REG_SZ,
  558. (BYTE*)"{29FF67FF-8050-480f-9F30-CC41635F2F9D}",
  559. sizeof("{29FF67FF-8050-480f-9F30-CC41635F2F9D}") );
  560. if ( dwError != ERROR_SUCCESS )
  561. {
  562. RegCloseKey(hKeyStub32);
  563. RegCloseKey(hKeyIF);
  564. return E_UNEXPECTED;
  565. }
  566. RegCloseKey(hKeyStub32);
  567. RegCloseKey(hKeyIF);
  568. //
  569. // UNICODE Sink Interface
  570. //
  571. dwError = RegCreateKeyExA( HKEY_CLASSES_ROOT,
  572. "Interface\\{A9E69612-B80D-11D0-B9B9-00A0C922E750}",
  573. 0,
  574. "",
  575. REG_OPTION_NON_VOLATILE,
  576. KEY_ALL_ACCESS,
  577. NULL,
  578. &hKeyIF,
  579. &dwDisposition );
  580. if ( dwError != ERROR_SUCCESS )
  581. {
  582. return E_UNEXPECTED;
  583. }
  584. dwError = RegSetValueExA( hKeyIF,
  585. "",
  586. 0,
  587. REG_SZ,
  588. (BYTE*)"IADMCOMSINK",
  589. sizeof("IADMCOMSINK") );
  590. if ( dwError != ERROR_SUCCESS )
  591. {
  592. RegCloseKey(hKeyIF);
  593. return E_UNEXPECTED;
  594. }
  595. dwError = RegCreateKeyExA( hKeyIF,
  596. "ProxyStubClsid32",
  597. 0,
  598. "",
  599. REG_OPTION_NON_VOLATILE,
  600. KEY_ALL_ACCESS,
  601. NULL,
  602. &hKeyStub32,
  603. &dwDisposition );
  604. if ( dwError != ERROR_SUCCESS )
  605. {
  606. RegCloseKey(hKeyIF);
  607. return E_UNEXPECTED;
  608. }
  609. dwError = RegSetValueExA( hKeyStub32,
  610. "",
  611. 0,
  612. REG_SZ,
  613. (BYTE*)"{A9E69612-B80D-11D0-B9B9-00A0C922E750}",
  614. sizeof("{A9E69612-B80D-11D0-B9B9-00A0C922E750}") );
  615. if ( dwError != ERROR_SUCCESS )
  616. {
  617. RegCloseKey(hKeyStub32);
  618. RegCloseKey(hKeyIF);
  619. return E_UNEXPECTED;
  620. }
  621. // an entry for async version
  622. dwError = RegSetValueExA( hKeyStub32,
  623. "AsynchronousInterface",
  624. 0,
  625. REG_SZ,
  626. (BYTE*)"{A9E69613-B80D-11D0-B9B9-00A0C922E750}",
  627. sizeof("{A9E69613-B80D-11D0-B9B9-00A0C922E750}") );
  628. if ( dwError != ERROR_SUCCESS )
  629. {
  630. RegCloseKey(hKeyStub32);
  631. RegCloseKey(hKeyIF);
  632. return E_UNEXPECTED;
  633. }
  634. RegCloseKey(hKeyStub32);
  635. RegCloseKey(hKeyIF);
  636. //
  637. // UNICODE Async Sink Interface
  638. //
  639. dwError = RegCreateKeyExA( HKEY_CLASSES_ROOT,
  640. "Interface\\{A9E69613-B80D-11D0-B9B9-00A0C922E750}",
  641. 0,
  642. "",
  643. REG_OPTION_NON_VOLATILE,
  644. KEY_ALL_ACCESS,
  645. NULL,
  646. &hKeyIF,
  647. &dwDisposition );
  648. if ( dwError != ERROR_SUCCESS )
  649. {
  650. return E_UNEXPECTED;
  651. }
  652. dwError = RegSetValueExA( hKeyIF,
  653. "",
  654. 0,
  655. REG_SZ,
  656. (BYTE*)"AsyncIADMCOMSINK",
  657. sizeof("AsyncIADMCOMSINK") );
  658. if ( dwError != ERROR_SUCCESS )
  659. {
  660. RegCloseKey(hKeyIF);
  661. return E_UNEXPECTED;
  662. }
  663. // back link to synchronous version
  664. dwError = RegCreateKeyExA( hKeyIF,
  665. "SynchronousInterface",
  666. 0,
  667. "",
  668. REG_OPTION_NON_VOLATILE,
  669. KEY_ALL_ACCESS,
  670. NULL,
  671. &hKeyStub32,
  672. &dwDisposition );
  673. if ( dwError != ERROR_SUCCESS )
  674. {
  675. RegCloseKey(hKeyIF);
  676. return E_UNEXPECTED;
  677. }
  678. dwError = RegSetValueExA( hKeyStub32,
  679. "",
  680. 0,
  681. REG_SZ,
  682. (BYTE*)"{A9E69612-B80D-11D0-B9B9-00A0C922E750}",
  683. sizeof("{A9E69612-B80D-11D0-B9B9-00A0C922E750}") );
  684. if ( dwError != ERROR_SUCCESS )
  685. {
  686. RegCloseKey(hKeyStub32);
  687. return E_UNEXPECTED;
  688. }
  689. RegCloseKey(hKeyStub32);
  690. RegCloseKey(hKeyIF);
  691. return S_OK;
  692. }
  693. STDAPI DllUnregisterServer()
  694. {
  695. //
  696. // Main Interfaces
  697. //
  698. //
  699. // ANSI Main Interface
  700. //
  701. RegDeleteKey( HKEY_CLASSES_ROOT,
  702. "CLSID\\{CBA424F0-483A-11D0-9D2A-00A0C922E703}\\InprocServer32" );
  703. RegDeleteKey( HKEY_CLASSES_ROOT,
  704. "CLSID\\{CBA424F0-483A-11D0-9D2A-00A0C922E703}" );
  705. //
  706. // UNICODE Main Interface
  707. //
  708. RegDeleteKey( HKEY_CLASSES_ROOT,
  709. "CLSID\\{70B51430-B6CA-11D0-B9B9-00A0C922E750}\\InprocServer32" );
  710. RegDeleteKey( HKEY_CLASSES_ROOT,
  711. "CLSID\\{70B51430-B6CA-11D0-B9B9-00A0C922E750}" );
  712. RegDeleteKey( HKEY_CLASSES_ROOT,
  713. "CLSID\\{8298d101-f992-43b7-8eca-5052d885b995}\\InprocServer32" );
  714. RegDeleteKey( HKEY_CLASSES_ROOT,
  715. "CLSID\\{8298d101-f992-43b7-8eca-5052d885b995}" );
  716. //
  717. // Sink Interfaces
  718. //
  719. //
  720. // Ansi Sink
  721. //
  722. RegDeleteKey( HKEY_CLASSES_ROOT,
  723. "CLSID\\{1E056350-761E-11D0-9BA1-00A0C922E703}\\InprocServer32" );
  724. RegDeleteKey( HKEY_CLASSES_ROOT,
  725. "CLSID\\{1E056350-761E-11D0-9BA1-00A0C922E703}" );
  726. //
  727. // UNICODE Sink
  728. //
  729. RegDeleteKey( HKEY_CLASSES_ROOT,
  730. "CLSID\\{A9E69612-B80D-11D0-B9B9-00A0C922E750}\\InprocServer32" );
  731. RegDeleteKey( HKEY_CLASSES_ROOT,
  732. "CLSID\\{A9E69612-B80D-11D0-B9B9-00A0C922E750}" );
  733. //
  734. // deregister Interfaces
  735. //
  736. //
  737. // ANSI Main Interface
  738. //
  739. RegDeleteKey( HKEY_CLASSES_ROOT,
  740. "Interface\\{CBA424F0-483A-11D0-9D2A-00A0C922E703}\\ProxyStubClsid32" );
  741. RegDeleteKey( HKEY_CLASSES_ROOT,
  742. "Interface\\{CBA424F0-483A-11D0-9D2A-00A0C922E703}" );
  743. //
  744. // UNICODE Main Interface
  745. //
  746. RegDeleteKey( HKEY_CLASSES_ROOT,
  747. "Interface\\{70B51430-B6CA-11d0-B9B9-00A0C922E750}\\ProxyStubClsid32" );
  748. RegDeleteKey( HKEY_CLASSES_ROOT,
  749. "Interface\\{70B51430-B6CA-11d0-B9B9-00A0C922E750}" );
  750. RegDeleteKey( HKEY_CLASSES_ROOT,
  751. "Interface\\{8298d101-f992-43b7-8eca-5052d885b995}\\ProxyStubClsid32" );
  752. RegDeleteKey( HKEY_CLASSES_ROOT,
  753. "Interface\\{8298d101-f992-43b7-8eca-5052d885b995}" );
  754. //
  755. // ANSI Sink Interface
  756. //
  757. RegDeleteKey( HKEY_CLASSES_ROOT,
  758. "Interface\\{1E056350-761E-11D0-9BA1-00A0C922E703}\\ProxyStubClsid32" );
  759. RegDeleteKey( HKEY_CLASSES_ROOT,
  760. "Interface\\{1E056350-761E-11D0-9BA1-00A0C922E703}" );
  761. //
  762. // UNICODE Sink Interface
  763. //
  764. RegDeleteKey( HKEY_CLASSES_ROOT,
  765. "Interface\\{A9E69612-B80D-11D0-B9B9-00A0C922E750}\\ProxyStubClsid32" );
  766. RegDeleteKey( HKEY_CLASSES_ROOT,
  767. "Interface\\{A9E69612-B80D-11D0-B9B9-00A0C922E750}" );
  768. //
  769. // UNICODE Async Sink
  770. //
  771. RegDeleteKey( HKEY_CLASSES_ROOT,
  772. "Interface\\{A9E69613-B80D-11D0-B9B9-00A0C922E750}\\SynchronousInterface" );
  773. RegDeleteKey( HKEY_CLASSES_ROOT,
  774. "Interface\\{A9E69613-B80D-11D0-B9B9-00A0C922E750}" );
  775. return S_OK;
  776. }