Portability fixes.
[wine.git] / dlls / ole32 / regsvr.c
blobd99171c9ef92365b5086087cd5a43c05c30ed6a1
1 /*
2 * self-registerable dll functions for ole32.dll
4 * Copyright (C) 2003 John K. Hohm
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include "config.h"
23 #include <string.h>
25 #include "windef.h"
26 #include "winbase.h"
27 #include "winuser.h"
28 #include "winreg.h"
29 #include "winerror.h"
31 #include "ole2.h"
32 #include "olectl.h"
34 #include "wine/debug.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(ole);
39 * Near the bottom of this file are the exported DllRegisterServer and
40 * DllUnregisterServer, which make all this worthwhile.
43 /***********************************************************************
44 * interface for self-registering
46 struct regsvr_interface
48 IID const *iid; /* NULL for end of list */
49 LPCSTR name; /* can be NULL to omit */
50 IID const *base_iid; /* can be NULL to omit */
51 int num_methods; /* can be <0 to omit */
52 CLSID const *ps_clsid; /* can be NULL to omit */
53 CLSID const *ps_clsid32; /* can be NULL to omit */
56 static HRESULT register_interfaces(struct regsvr_interface const *list);
57 static HRESULT unregister_interfaces(struct regsvr_interface const *list);
59 struct regsvr_coclass
61 CLSID const *clsid; /* NULL for end of list */
62 LPCSTR name; /* can be NULL to omit */
63 LPCSTR ips; /* can be NULL to omit */
64 LPCSTR ips32; /* can be NULL to omit */
65 LPCSTR ips32_tmodel; /* can be NULL to omit */
68 static HRESULT register_coclasses(struct regsvr_coclass const *list);
69 static HRESULT unregister_coclasses(struct regsvr_coclass const *list);
71 /***********************************************************************
72 * static string constants
74 static WCHAR const interface_keyname[10] = {
75 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 };
76 static WCHAR const base_ifa_keyname[14] = {
77 'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c',
78 'e', 0 };
79 static WCHAR const num_methods_keyname[11] = {
80 'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 };
81 static WCHAR const ps_clsid_keyname[15] = {
82 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's',
83 'i', 'd', 0 };
84 static WCHAR const ps_clsid32_keyname[17] = {
85 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's',
86 'i', 'd', '3', '2', 0 };
87 static WCHAR const clsid_keyname[6] = {
88 'C', 'L', 'S', 'I', 'D', 0 };
89 static WCHAR const ips_keyname[13] = {
90 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r',
91 0 };
92 static WCHAR const ips32_keyname[15] = {
93 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r',
94 '3', '2', 0 };
95 static char const tmodel_valuename[] = "ThreadingModel";
97 /***********************************************************************
98 * static helper functions
100 static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid);
101 static LONG register_key_defvalueW(HKEY base, WCHAR const *name,
102 WCHAR const *value);
103 static LONG register_key_defvalueA(HKEY base, WCHAR const *name,
104 char const *value);
105 static LONG recursive_delete_key(HKEY key);
108 /***********************************************************************
109 * register_interfaces
111 static HRESULT register_interfaces(struct regsvr_interface const *list)
113 LONG res = ERROR_SUCCESS;
114 HKEY interface_key;
116 res = RegCreateKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, NULL, 0,
117 KEY_READ | KEY_WRITE, NULL, &interface_key, NULL);
118 if (res != ERROR_SUCCESS) goto error_return;
120 for (; res == ERROR_SUCCESS && list->iid; ++list) {
121 WCHAR buf[39];
122 HKEY iid_key;
124 StringFromGUID2(list->iid, buf, 39);
125 res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0,
126 KEY_READ | KEY_WRITE, NULL, &iid_key, NULL);
127 if (res != ERROR_SUCCESS) goto error_close_interface_key;
129 if (list->name) {
130 res = RegSetValueExA(iid_key, NULL, 0, REG_SZ,
131 (CONST BYTE*)(list->name),
132 strlen(list->name) + 1);
133 if (res != ERROR_SUCCESS) goto error_close_iid_key;
136 if (list->base_iid) {
137 register_key_guid(iid_key, base_ifa_keyname, list->base_iid);
138 if (res != ERROR_SUCCESS) goto error_close_iid_key;
141 if (0 <= list->num_methods) {
142 static WCHAR const fmt[3] = { '%', 'd', 0 };
143 HKEY key;
145 res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0,
146 KEY_READ | KEY_WRITE, NULL, &key, NULL);
147 if (res != ERROR_SUCCESS) goto error_close_iid_key;
149 wsprintfW(buf, fmt, list->num_methods);
150 res = RegSetValueExW(key, NULL, 0, REG_SZ,
151 (CONST BYTE*)buf,
152 (lstrlenW(buf) + 1) * sizeof(WCHAR));
153 RegCloseKey(key);
155 if (res != ERROR_SUCCESS) goto error_close_iid_key;
158 if (list->ps_clsid) {
159 register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid);
160 if (res != ERROR_SUCCESS) goto error_close_iid_key;
163 if (list->ps_clsid32) {
164 register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32);
165 if (res != ERROR_SUCCESS) goto error_close_iid_key;
168 error_close_iid_key:
169 RegCloseKey(iid_key);
172 error_close_interface_key:
173 RegCloseKey(interface_key);
174 error_return:
175 return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
178 /***********************************************************************
179 * unregister_interfaces
181 static HRESULT unregister_interfaces(struct regsvr_interface const *list)
183 LONG res = ERROR_SUCCESS;
184 HKEY interface_key;
186 res = RegOpenKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0,
187 KEY_READ | KEY_WRITE, &interface_key);
188 if (res == ERROR_FILE_NOT_FOUND) return S_OK;
189 if (res != ERROR_SUCCESS) goto error_return;
191 for (; res == ERROR_SUCCESS && list->iid; ++list) {
192 WCHAR buf[39];
193 HKEY iid_key;
195 StringFromGUID2(list->iid, buf, 39);
196 res = RegOpenKeyExW(interface_key, buf, 0,
197 KEY_READ | KEY_WRITE, &iid_key);
198 if (res == ERROR_FILE_NOT_FOUND) {
199 res = ERROR_SUCCESS;
200 continue;
202 if (res != ERROR_SUCCESS) goto error_close_interface_key;
203 res = recursive_delete_key(iid_key);
204 RegCloseKey(iid_key);
205 if (res != ERROR_SUCCESS) goto error_close_interface_key;
208 error_close_interface_key:
209 RegCloseKey(interface_key);
210 error_return:
211 return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
214 /***********************************************************************
215 * register_coclasses
217 static HRESULT register_coclasses(struct regsvr_coclass const *list)
219 LONG res = ERROR_SUCCESS;
220 HKEY coclass_key;
222 res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0,
223 KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
224 if (res != ERROR_SUCCESS) goto error_return;
226 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
227 WCHAR buf[39];
228 HKEY clsid_key;
230 StringFromGUID2(list->clsid, buf, 39);
231 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
232 KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL);
233 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
235 if (list->name) {
236 res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ,
237 (CONST BYTE*)(list->name),
238 strlen(list->name) + 1);
239 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
242 if (list->ips) {
243 res = register_key_defvalueA(clsid_key, ips_keyname, list->ips);
244 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
247 if (list->ips32) {
248 HKEY ips32_key;
250 res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0,
251 KEY_READ | KEY_WRITE, NULL,
252 &ips32_key, NULL);
253 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
255 res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ,
256 (CONST BYTE*)list->ips32,
257 lstrlenA(list->ips32) + 1);
258 if (res == ERROR_SUCCESS && list->ips32_tmodel)
259 res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ,
260 (CONST BYTE*)list->ips32_tmodel,
261 strlen(list->ips32_tmodel) + 1);
262 RegCloseKey(ips32_key);
263 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
266 error_close_clsid_key:
267 RegCloseKey(clsid_key);
270 error_close_coclass_key:
271 RegCloseKey(coclass_key);
272 error_return:
273 return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
276 /***********************************************************************
277 * unregister_coclasses
279 static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
281 LONG res = ERROR_SUCCESS;
282 HKEY coclass_key;
284 res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0,
285 KEY_READ | KEY_WRITE, &coclass_key);
286 if (res == ERROR_FILE_NOT_FOUND) return S_OK;
287 if (res != ERROR_SUCCESS) goto error_return;
289 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
290 WCHAR buf[39];
291 HKEY clsid_key;
293 StringFromGUID2(list->clsid, buf, 39);
294 res = RegOpenKeyExW(coclass_key, buf, 0,
295 KEY_READ | KEY_WRITE, &clsid_key);
296 if (res == ERROR_FILE_NOT_FOUND) {
297 res = ERROR_SUCCESS;
298 continue;
300 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
301 res = recursive_delete_key(clsid_key);
302 RegCloseKey(clsid_key);
303 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
306 error_close_coclass_key:
307 RegCloseKey(coclass_key);
308 error_return:
309 return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
312 /***********************************************************************
313 * regsvr_key_guid
315 static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
317 WCHAR buf[39];
319 StringFromGUID2(guid, buf, 39);
320 return register_key_defvalueW(base, name, buf);
323 /***********************************************************************
324 * regsvr_key_defvalueW
326 static LONG register_key_defvalueW(
327 HKEY base,
328 WCHAR const *name,
329 WCHAR const *value)
331 LONG res;
332 HKEY key;
334 res = RegCreateKeyExW(base, name, 0, NULL, 0,
335 KEY_READ | KEY_WRITE, NULL, &key, NULL);
336 if (res != ERROR_SUCCESS) return res;
337 res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value,
338 (lstrlenW(value) + 1) * sizeof(WCHAR));
339 RegCloseKey(key);
340 return res;
343 /***********************************************************************
344 * regsvr_key_defvalueA
346 static LONG register_key_defvalueA(
347 HKEY base,
348 WCHAR const *name,
349 char const *value)
351 LONG res;
352 HKEY key;
354 res = RegCreateKeyExW(base, name, 0, NULL, 0,
355 KEY_READ | KEY_WRITE, NULL, &key, NULL);
356 if (res != ERROR_SUCCESS) return res;
357 res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value,
358 lstrlenA(value) + 1);
359 RegCloseKey(key);
360 return res;
363 /***********************************************************************
364 * recursive_delete_key
366 static LONG recursive_delete_key(HKEY key)
368 LONG res;
369 WCHAR subkey_name[MAX_PATH];
370 DWORD cName;
371 HKEY subkey;
373 for (;;) {
374 cName = sizeof(subkey_name) / sizeof(WCHAR);
375 res = RegEnumKeyExW(key, 0, subkey_name, &cName,
376 NULL, NULL, NULL, NULL);
377 if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) {
378 res = ERROR_SUCCESS; /* presumably we're done enumerating */
379 break;
381 res = RegOpenKeyExW(key, subkey_name, 0,
382 KEY_READ | KEY_WRITE, &subkey);
383 if (res == ERROR_FILE_NOT_FOUND) continue;
384 if (res != ERROR_SUCCESS) break;
386 res = recursive_delete_key(subkey);
387 RegCloseKey(subkey);
388 if (res != ERROR_SUCCESS) break;
391 if (res == ERROR_SUCCESS) res = RegDeleteKeyW(key, 0);
392 return res;
395 /***********************************************************************
396 * coclass list
398 static GUID const CLSID_FileMoniker = {
399 0x00000303, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} };
401 static GUID const CLSID_ItemMoniker = {
402 0x00000304, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} };
404 /* FIXME: DfMarshal and PSFactoryBuffer are defined elsewhere too */
406 static GUID const CLSID_DfMarshal = {
407 0x0000030B, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} };
409 static GUID const CLSID_PSFactoryBuffer = {
410 0x00000320, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} };
412 static struct regsvr_coclass const coclass_list[] = {
413 { &CLSID_FileMoniker,
414 "FileMoniker",
415 NULL,
416 "ole32.dll",
417 "Both"
419 { &CLSID_ItemMoniker,
420 "ItemMoniker",
421 NULL,
422 "ole32.dll",
423 "Both"
425 { &CLSID_DfMarshal,
426 "DfMarshal",
427 NULL,
428 "ole32.dll",
429 "Both"
431 { &CLSID_PSFactoryBuffer,
432 "PSFactoryBuffer",
433 NULL,
434 "ole32.dll",
435 "Both"
437 { &CLSID_StdGlobalInterfaceTable,
438 "StdGlobalInterfaceTable",
439 NULL,
440 "ole32.dll",
441 "Apartment"
443 { NULL } /* list terminator */
446 /***********************************************************************
447 * interface list
450 /* FIXME: perhaps the interfaces that are proxied by another dll
451 * should be registered in that dll? Or maybe the choice of proxy is
452 * arbitrary at this point? */
454 static GUID const CLSID_PSFactoryBuffer_ole2disp = {
455 0x00020420, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} };
457 static GUID const CLSID_PSFactoryBuffer_oleaut32 = {
458 0xB196B286, 0xBAB4, 0x101A, {0xB6,0x9C,0x00,0xAA,0x00,0x34,0x1D,0x07} };
460 /* FIXME: these interfaces should be defined in ocidl.idl */
462 static IID const IID_IFontEventsDisp = {
463 0x4EF6100A, 0xAF88, 0x11D0, {0x98,0x46,0x00,0xC0,0x4F,0xC2,0x99,0x93} };
465 static IID const IID_IProvideMultipleClassInfo = {
466 0xA7ABA9C1, 0x8983, 0x11CF, {0x8F,0x20,0x00,0x80,0x5F,0x2C,0xD0,0x64} };
468 static IID const IID_IObjectWithSite = {
469 0xFC4801A3, 0x2BA9, 0x11CF, {0xA2,0x29,0x00,0xAA,0x00,0x3D,0x73,0x52} };
471 static struct regsvr_interface const interface_list[] = {
472 { &IID_IUnknown,
473 "IUnknown",
474 NULL,
476 NULL,
477 &CLSID_PSFactoryBuffer
479 { &IID_IClassFactory,
480 "IClassFactory",
481 NULL,
483 NULL,
484 &CLSID_PSFactoryBuffer
486 { &IID_IStorage,
487 "IStorage",
488 NULL,
490 NULL,
491 &CLSID_PSFactoryBuffer
493 { &IID_IStream,
494 "IStream",
495 NULL,
497 NULL,
498 &CLSID_PSFactoryBuffer
500 { &IID_IPersistStorage,
501 "IPersistStorage",
502 NULL,
504 NULL,
505 &CLSID_PSFactoryBuffer
507 { &IID_IDataObject,
508 "IDataObject",
509 NULL,
511 NULL,
512 &CLSID_PSFactoryBuffer
514 { &IID_IAdviseSink,
515 "IAdviseSink",
516 NULL,
518 NULL,
519 &CLSID_PSFactoryBuffer
521 { &IID_IOleObject,
522 "IOleObject",
523 NULL,
525 NULL,
526 &CLSID_PSFactoryBuffer
528 { &IID_IOleClientSite,
529 "IOleClientSite",
530 NULL,
532 NULL,
533 &CLSID_PSFactoryBuffer
535 { &IID_IDispatch,
536 "IDispatch",
537 NULL,
539 &CLSID_PSFactoryBuffer_ole2disp,
540 &CLSID_PSFactoryBuffer_ole2disp
542 { &IID_ITypeLib2,
543 "ITypeLib2",
544 NULL,
546 NULL,
547 &CLSID_PSFactoryBuffer_ole2disp
549 { &IID_ITypeInfo2,
550 "ITypeInfo2",
551 NULL,
553 NULL,
554 &CLSID_PSFactoryBuffer_ole2disp
556 { &IID_IPropertyPage2,
557 "IPropertyPage2",
558 NULL,
560 NULL,
561 &CLSID_PSFactoryBuffer_oleaut32
563 { &IID_IErrorInfo,
564 "IErrorInfo",
565 NULL,
567 NULL,
568 &CLSID_PSFactoryBuffer_oleaut32
570 { &IID_ICreateErrorInfo,
571 "ICreateErrorInfo",
572 NULL,
574 NULL,
575 &CLSID_PSFactoryBuffer_oleaut32
577 { &IID_IPersistPropertyBag2,
578 "IPersistPropertyBag2",
579 NULL,
581 NULL,
582 &CLSID_PSFactoryBuffer_oleaut32
584 { &IID_IPropertyBag2,
585 "IPropertyBag2",
586 NULL,
588 NULL,
589 &CLSID_PSFactoryBuffer_oleaut32
591 { &IID_IErrorLog,
592 "IErrorLog",
593 NULL,
595 NULL,
596 &CLSID_PSFactoryBuffer_oleaut32
598 { &IID_IPerPropertyBrowsing,
599 "IPerPropertyBrowsing",
600 NULL,
602 NULL,
603 &CLSID_PSFactoryBuffer_oleaut32
605 { &IID_IPersistPropertyBag,
606 "IPersistPropertyBag",
607 NULL,
609 NULL,
610 &CLSID_PSFactoryBuffer_oleaut32
612 { &IID_IAdviseSinkEx,
613 "IAdviseSinkEx",
614 NULL,
616 NULL,
617 &CLSID_PSFactoryBuffer_oleaut32
619 { &IID_IFontEventsDisp,
620 "IFontEventsDisp",
621 NULL,
623 NULL,
624 &CLSID_PSFactoryBuffer_oleaut32
626 { &IID_IPropertyBag,
627 "IPropertyBag",
628 NULL,
630 NULL,
631 &CLSID_PSFactoryBuffer_oleaut32
633 { &IID_IPointerInactive,
634 "IPointerInactive",
635 NULL,
637 NULL,
638 &CLSID_PSFactoryBuffer_oleaut32
640 { &IID_ISimpleFrameSite,
641 "ISimpleFrameSite",
642 NULL,
644 NULL,
645 &CLSID_PSFactoryBuffer_oleaut32
647 { &IID_IPicture,
648 "IPicture",
649 NULL,
651 NULL,
652 &CLSID_PSFactoryBuffer_oleaut32
654 { &IID_IPictureDisp,
655 "IPictureDisp",
656 NULL,
658 NULL,
659 &CLSID_PSFactoryBuffer_oleaut32
661 { &IID_IPersistStreamInit,
662 "IPersistStreamInit",
663 NULL,
665 NULL,
666 &CLSID_PSFactoryBuffer_oleaut32
668 { &IID_IOleUndoUnit,
669 "IOleUndoUnit",
670 NULL,
672 NULL,
673 &CLSID_PSFactoryBuffer_oleaut32
675 { &IID_IPropertyNotifySink,
676 "IPropertyNotifySink",
677 NULL,
679 NULL,
680 &CLSID_PSFactoryBuffer_oleaut32
682 { &IID_IOleInPlaceSiteEx,
683 "IOleInPlaceSiteEx",
684 NULL,
686 NULL,
687 &CLSID_PSFactoryBuffer_oleaut32
689 { &IID_IOleParentUndoUnit,
690 "IOleParentUndoUnit",
691 NULL,
693 NULL,
694 &CLSID_PSFactoryBuffer_oleaut32
696 { &IID_IProvideClassInfo2,
697 "IProvideClassInfo2",
698 NULL,
700 NULL,
701 &CLSID_PSFactoryBuffer_oleaut32
703 { &IID_IProvideMultipleClassInfo,
704 "IProvideMultipleClassInfo",
705 NULL,
707 NULL,
708 &CLSID_PSFactoryBuffer_oleaut32
710 { &IID_IProvideClassInfo,
711 "IProvideClassInfo",
712 NULL,
714 NULL,
715 &CLSID_PSFactoryBuffer_oleaut32
717 { &IID_IConnectionPointContainer,
718 "IConnectionPointContainer",
719 NULL,
721 NULL,
722 &CLSID_PSFactoryBuffer_oleaut32
724 { &IID_IEnumConnectionPoints,
725 "IEnumConnectionPoints",
726 NULL,
728 NULL,
729 &CLSID_PSFactoryBuffer_oleaut32
731 { &IID_IConnectionPoint,
732 "IConnectionPoint",
733 NULL,
735 NULL,
736 &CLSID_PSFactoryBuffer_oleaut32
738 { &IID_IEnumConnections,
739 "IEnumConnections",
740 NULL,
742 NULL,
743 &CLSID_PSFactoryBuffer_oleaut32
745 { &IID_IOleControl,
746 "IOleControl",
747 NULL,
749 NULL,
750 &CLSID_PSFactoryBuffer_oleaut32
752 { &IID_IOleControlSite,
753 "IOleControlSite",
754 NULL,
756 NULL,
757 &CLSID_PSFactoryBuffer_oleaut32
759 { &IID_ISpecifyPropertyPages,
760 "ISpecifyPropertyPages",
761 NULL,
763 NULL,
764 &CLSID_PSFactoryBuffer_oleaut32
766 { &IID_IPropertyPageSite,
767 "IPropertyPageSite",
768 NULL,
770 NULL,
771 &CLSID_PSFactoryBuffer_oleaut32
773 { &IID_IPropertyPage,
774 "IPropertyPage",
775 NULL,
777 NULL,
778 &CLSID_PSFactoryBuffer_oleaut32
780 { &IID_IClassFactory2,
781 "IClassFactory2",
782 NULL,
784 NULL,
785 &CLSID_PSFactoryBuffer_oleaut32
787 { &IID_IEnumOleUndoUnits,
788 "IEnumOleUndoUnits",
789 NULL,
791 NULL,
792 &CLSID_PSFactoryBuffer_oleaut32
794 { &IID_IPersistMemory,
795 "IPersistMemory",
796 NULL,
798 NULL,
799 &CLSID_PSFactoryBuffer_oleaut32
801 { &IID_IFont,
802 "IFont",
803 NULL,
805 NULL,
806 &CLSID_PSFactoryBuffer_oleaut32
808 { &IID_IFontDisp,
809 "IFontDisp",
810 NULL,
812 NULL,
813 &CLSID_PSFactoryBuffer_oleaut32
815 { &IID_IQuickActivate,
816 "IQuickActivate",
817 NULL,
819 NULL,
820 &CLSID_PSFactoryBuffer_oleaut32
822 { &IID_IOleUndoManager,
823 "IOleUndoManager",
824 NULL,
826 NULL,
827 &CLSID_PSFactoryBuffer_oleaut32
829 { &IID_IObjectWithSite,
830 "IObjectWithSite",
831 NULL,
833 NULL,
834 &CLSID_PSFactoryBuffer_oleaut32
836 { NULL } /* list terminator */
839 /***********************************************************************
840 * DllRegisterServer (OLE32.194)
842 HRESULT WINAPI OLE32_DllRegisterServer()
844 HRESULT hr;
846 TRACE("\n");
848 hr = register_coclasses(coclass_list);
849 if (SUCCEEDED(hr))
850 hr = register_interfaces(interface_list);
851 return hr;
854 /***********************************************************************
855 * DllUnregisterServer (OLE32.@)
857 HRESULT WINAPI OLE32_DllUnregisterServer()
859 HRESULT hr;
861 TRACE("\n");
863 hr = unregister_coclasses(coclass_list);
864 if (SUCCEEDED(hr))
865 hr = unregister_interfaces(interface_list);
866 return hr;