Author: winesync
Date: Thu Nov 29 14:03:59 2007
New Revision: 30875
URL:
http://svn.reactos.org/svn/reactos?rev=30875&view=rev
Log:
Autosyncing with Wine HEAD
Modified:
trunk/reactos/dll/win32/objsel/factory.c
trunk/reactos/dll/win32/objsel/objsel.c
trunk/reactos/dll/win32/objsel/objsel.rbuild
trunk/reactos/dll/win32/objsel/regsvr.c
Modified: trunk/reactos/dll/win32/objsel/factory.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/objsel/factory.c…
==============================================================================
--- trunk/reactos/dll/win32/objsel/factory.c (original)
+++ trunk/reactos/dll/win32/objsel/factory.c Thu Nov 29 14:03:59 2007
@@ -62,13 +62,13 @@
{
ClassFactoryImpl *This = (ClassFactoryImpl *)iface;
ULONG ref;
-
+
TRACE("\n");
if (This == NULL) return E_POINTER;
-
+
ref = InterlockedIncrement(&This->ref);
-
+
if (ref == 1)
{
InterlockedIncrement(&dll_refs);
@@ -85,13 +85,13 @@
{
ClassFactoryImpl *This = (ClassFactoryImpl *)iface;
ULONG ref;
-
+
TRACE("\n");
if (This == NULL) return E_POINTER;
-
+
ref = InterlockedDecrement(&This->ref);
-
+
if (ref == 0)
{
InterlockedDecrement(&dll_refs);
Modified: trunk/reactos/dll/win32/objsel/objsel.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/objsel/objsel.c?…
==============================================================================
--- trunk/reactos/dll/win32/objsel/objsel.c (original)
+++ trunk/reactos/dll/win32/objsel/objsel.c Thu Nov 29 14:03:59 2007
@@ -202,7 +202,7 @@
{
Instance->lpVtbl = &IDsObjectPicker_Vtbl;
OBJSEL_IDsObjectPicker_AddRef((IDsObjectPicker *)Instance);
-
+
*ppvObj = Instance;
return S_OK;
}
Modified: trunk/reactos/dll/win32/objsel/objsel.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/objsel/objsel.rb…
==============================================================================
--- trunk/reactos/dll/win32/objsel/objsel.rbuild (original)
+++ trunk/reactos/dll/win32/objsel/objsel.rbuild Thu Nov 29 14:03:59 2007
@@ -1,14 +1,13 @@
+<?xml version="1.0"?>
+<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="objsel" type="win32dll"
baseaddress="${BASEADDRESS_OBJSEL}" installbase="system32"
installname="objsel.dll" allowwarnings="true">
<autoregister infsection="OleControlDlls"
type="DllRegisterServer" />
<importlibrary definition="objsel.spec.def" />
<include base="objsel">.</include>
<include base="ReactOS">include/reactos/wine</include>
- <define name="__REACTOS__" />
<define name="__WINESRC__" />
- <define name="__USE_W32API" />
- <define name="_WIN32_IE">0x600</define>
- <define name="_WIN32_WINNT">0x501</define>
- <define name="WINVER">0x501</define>
+ <define name="WINVER">0x600</define>
+ <define name="_WIN32_WINNT">0x600</define>
<library>wine</library>
<library>ole32</library>
<library>oleaut32</library>
Modified: trunk/reactos/dll/win32/objsel/regsvr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/objsel/regsvr.c?…
==============================================================================
--- trunk/reactos/dll/win32/objsel/regsvr.c (original)
+++ trunk/reactos/dll/win32/objsel/regsvr.c Thu Nov 29 14:03:59 2007
@@ -127,9 +127,6 @@
static LONG register_progid(WCHAR const *clsid,
char const *progid, char const *curver_progid,
char const *name, char const *extra);
-static LONG recursive_delete_key(HKEY key);
-static LONG recursive_delete_keyA(HKEY base, char const *name);
-static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/***********************************************************************
* register_interfaces
@@ -216,7 +213,8 @@
WCHAR buf[39];
StringFromGUID2(list->iid, buf, 39);
- res = recursive_delete_keyW(interface_key, buf);
+ res = RegDeleteTreeW(interface_key, buf);
+ if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
}
RegCloseKey(interface_key);
@@ -336,16 +334,19 @@
WCHAR buf[39];
StringFromGUID2(list->clsid, buf, 39);
- res = recursive_delete_keyW(coclass_key, buf);
+ res = RegDeleteTreeW(coclass_key, buf);
+ if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
if (list->progid) {
- res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->progid);
+ res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid);
+ if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
}
if (list->viprogid) {
- res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->viprogid);
+ res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->viprogid);
+ if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
}
}
@@ -454,71 +455,10 @@
}
/***********************************************************************
- * recursive_delete_key
- */
-static LONG recursive_delete_key(HKEY key) {
- LONG res;
- WCHAR subkey_name[MAX_PATH];
- DWORD cName;
- HKEY subkey;
-
- for (;;) {
- cName = sizeof(subkey_name) / sizeof(WCHAR);
- res = RegEnumKeyExW(key, 0, subkey_name, &cName,
- NULL, NULL, NULL, NULL);
- if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) {
- res = ERROR_SUCCESS; /* presumably we're done enumerating */
- break;
- }
- res = RegOpenKeyExW(key, subkey_name, 0,
- KEY_READ | KEY_WRITE, &subkey);
- if (res == ERROR_FILE_NOT_FOUND) continue;
- if (res != ERROR_SUCCESS) break;
-
- res = recursive_delete_key(subkey);
- RegCloseKey(subkey);
- if (res != ERROR_SUCCESS) break;
- }
-
- if (res == ERROR_SUCCESS) res = RegDeleteKeyW(key, 0);
- return res;
-}
-
-/***********************************************************************
- * recursive_delete_keyA
- */
-static LONG recursive_delete_keyA(HKEY base, char const *name) {
- LONG res;
- HKEY key;
-
- res = RegOpenKeyExA(base, name, 0, KEY_READ | KEY_WRITE, &key);
- if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS;
- if (res != ERROR_SUCCESS) return res;
- res = recursive_delete_key(key);
- RegCloseKey(key);
- return res;
-}
-
-/***********************************************************************
- * recursive_delete_keyW
- */
-static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) {
- LONG res;
- HKEY key;
-
- res = RegOpenKeyExW(base, name, 0, KEY_READ | KEY_WRITE, &key);
- if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS;
- if (res != ERROR_SUCCESS) return res;
- res = recursive_delete_key(key);
- RegCloseKey(key);
- return res;
-}
-
-/***********************************************************************
* coclass list
*/
static struct regsvr_coclass const coclass_list[] = {
- {
+ {
&CLSID_DsObjectPicker,
"DsObjectPicker",
NULL,
@@ -527,7 +467,7 @@
"Both",
NULL,
NULL
- },
+ },
{ NULL } /* list terminator */
};