[Wine-devel] Eter's patch is applied to winehq repo 02/03/11

builder на builder.office.etersoft.ru builder на builder.office.etersoft.ru
Чт Фев 3 21:20:16 MSK 2011


New Etersoft's patches since last build time:
commit 745a50c9dbb03d37db58ff53136e93f00943bc0d
Author: Alexander Morozov <amorozov на etersoft.ru>

    ntoskrnl.exe: Add stub for IoGetDeviceInterfaces.

commit 863059ab175ea0e27913a765d60dcfcbea378b7f
Author: Alexander Morozov <amorozov на etersoft.ru>

    shell32/tests: Add tests for FolderItem::get_Path.

commit 04f2e7612404ad988136a3fe55e018150e5c5e9a
Author: Alexander Morozov <amorozov на etersoft.ru>

    shell32: Release iTypeInfo on error.

---

commit 745a50c9dbb03d37db58ff53136e93f00943bc0d
Author: Alexander Morozov <amorozov на etersoft.ru>
Date:   Thu Feb 3 17:49:10 2011 +0300

    ntoskrnl.exe: Add stub for IoGetDeviceInterfaces.

diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index a5c1659..4f70b98 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -622,6 +622,19 @@ NTSTATUS WINAPI IoDeleteSymbolicLink( UNICODE_STRING *name )
 
 
 /***********************************************************************
+ *           IoGetDeviceInterfaces   (NTOSKRNL.EXE.@)
+ */
+NTSTATUS WINAPI IoGetDeviceInterfaces( CONST GUID *InterfaceClassGuid,
+                                       PDEVICE_OBJECT PhysicalDeviceObject,
+                                       ULONG Flags, PWSTR *SymbolicLinkList )
+{
+    FIXME( "stub: %s %p %x %p\n", debugstr_guid(InterfaceClassGuid),
+           PhysicalDeviceObject, Flags, SymbolicLinkList );
+    return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/***********************************************************************
  *           IoGetDeviceObjectPointer   (NTOSKRNL.EXE.@)
  */
 NTSTATUS  WINAPI IoGetDeviceObjectPointer( UNICODE_STRING *name, ACCESS_MASK access, PFILE_OBJECT *file, PDEVICE_OBJECT *device )
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index ef0d50f..6d645ad 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -381,7 +381,7 @@
 @ stub IoGetCurrentProcess
 @ stub IoGetDeviceAttachmentBaseRef
 @ stub IoGetDeviceInterfaceAlias
-@ stub IoGetDeviceInterfaces
+@ stdcall IoGetDeviceInterfaces(ptr ptr long ptr)
 @ stdcall IoGetDeviceObjectPointer(ptr long ptr ptr)
 @ stdcall IoGetDeviceProperty(ptr long long ptr ptr)
 @ stub IoGetDeviceToVerify
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
index 6df5290..2f3fccb 100644
--- a/include/ddk/wdm.h
+++ b/include/ddk/wdm.h
@@ -1106,6 +1106,7 @@ void      WINAPI IoDeleteDriver(DRIVER_OBJECT*);
 NTSTATUS  WINAPI IoDeleteSymbolicLink(UNICODE_STRING*);
 void      WINAPI IoFreeIrp(IRP*);
 PEPROCESS WINAPI IoGetCurrentProcess(void);
+NTSTATUS  WINAPI IoGetDeviceInterfaces(CONST GUID*,PDEVICE_OBJECT,ULONG,PWSTR*);
 NTSTATUS  WINAPI IoGetDeviceObjectPointer(UNICODE_STRING*,ACCESS_MASK,PFILE_OBJECT*,PDEVICE_OBJECT*);
 NTSTATUS  WINAPI IoGetDeviceProperty(PDEVICE_OBJECT,DEVICE_REGISTRY_PROPERTY,ULONG,PVOID,PULONG);
 PVOID     WINAPI IoGetDriverObjectExtension(PDRIVER_OBJECT,PVOID);

commit 863059ab175ea0e27913a765d60dcfcbea378b7f
Author: Alexander Morozov <amorozov на etersoft.ru>
Date:   Thu Feb 3 17:20:51 2011 +0300

    shell32/tests: Add tests for FolderItem::get_Path.

diff --git a/dlls/shell32/tests/shelldispatch.c b/dlls/shell32/tests/shelldispatch.c
index f253627..2652afe 100644
--- a/dlls/shell32/tests/shelldispatch.c
+++ b/dlls/shell32/tests/shelldispatch.c
@@ -30,29 +30,39 @@
 static HRESULT (WINAPI *pSHGetFolderPathW)(HWND, int, HANDLE, DWORD, LPWSTR);
 static HRESULT (WINAPI *pSHGetNameFromIDList)(PCIDLIST_ABSOLUTE,SIGDN,PWSTR*);
 static HRESULT (WINAPI *pSHGetSpecialFolderLocation)(HWND, int, LPITEMIDLIST *);
+static DWORD (WINAPI *pGetLongPathNameW)(LPCWSTR, LPWSTR, DWORD);
 
 static void init_function_pointers(void)
 {
-    HMODULE hmod;
+    HMODULE hshell32, hkernel32;
 
-    hmod = GetModuleHandleA("shell32.dll");
-    pSHGetFolderPathW = (void*)GetProcAddress(hmod, "SHGetFolderPathW");
-    pSHGetNameFromIDList = (void*)GetProcAddress(hmod, "SHGetNameFromIDList");
-    pSHGetSpecialFolderLocation = (void*)GetProcAddress(hmod,
+    hshell32 = GetModuleHandleA("shell32.dll");
+    hkernel32 = GetModuleHandleA("kernel32.dll");
+    pSHGetFolderPathW = (void*)GetProcAddress(hshell32, "SHGetFolderPathW");
+    pSHGetNameFromIDList = (void*)GetProcAddress(hshell32, "SHGetNameFromIDList");
+    pSHGetSpecialFolderLocation = (void*)GetProcAddress(hshell32,
      "SHGetSpecialFolderLocation");
+    pGetLongPathNameW = (void*)GetProcAddress(hkernel32, "GetLongPathNameW");
 }
 
 static void test_namespace(void)
 {
     static const WCHAR winetestW[] = {'w','i','n','e','t','e','s','t',0};
     static const WCHAR backslashW[] = {'\\',0};
+    static const WCHAR clsidW[] = {
+        ':',':','{','6','4','5','F','F','0','4','0','-','5','0','8','1','-',
+                    '1','0','1','B','-','9','F','0','8','-',
+                    '0','0','A','A','0','0','2','F','9','5','4','E','}',0};
 
     static WCHAR tempW[MAX_PATH], curW[MAX_PATH];
+    WCHAR *long_pathW = NULL;
     HRESULT r;
     IShellDispatch *sd;
     Folder *folder;
+    Folder2 *folder2;
+    FolderItem *item;
     VARIANT var;
-    BSTR title;
+    BSTR title, item_path;
     int len;
 
     r = CoCreateInstance(&CLSID_Shell, NULL, CLSCTX_INPROC_SERVER,
@@ -86,6 +96,14 @@ static void test_namespace(void)
      "IShellDispatch::NameSpace failed: %08x\n", r);
     if (r == S_OK)
     {
+        static WCHAR path[MAX_PATH];
+
+        if (pSHGetFolderPathW)
+        {
+            r = pSHGetFolderPathW(NULL, CSIDL_PROGRAM_FILES, NULL,
+             SHGFP_TYPE_CURRENT, path);
+            ok(r == S_OK, "SHGetFolderPath failed: %08x\n", r);
+        }
         r = Folder_get_Title(folder, &title);
         todo_wine
         ok(r == S_OK, "Folder::get_Title failed: %08x\n", r);
@@ -112,12 +130,8 @@ static void test_namespace(void)
             }
             else if (pSHGetFolderPathW)
             {
-                static WCHAR path[MAX_PATH];
                 WCHAR *p;
 
-                r = pSHGetFolderPathW(NULL, CSIDL_PROGRAM_FILES, NULL,
-                 SHGFP_TYPE_CURRENT, path);
-                ok(r == S_OK, "SHGetFolderPath failed: %08x\n", r);
                 p = path + lstrlenW(path);
                 while (path < p && *(p - 1) != '\\')
                     p--;
@@ -127,6 +141,58 @@ static void test_namespace(void)
             else skip("skipping Folder::get_Title test\n");
             SysFreeString(title);
         }
+        r = Folder_QueryInterface(folder, &IID_Folder2, (LPVOID*)&folder2);
+        ok(r == S_OK, "Folder::QueryInterface failed: %08x\n", r);
+        if (r == S_OK)
+        {
+            r = Folder2_get_Self(folder2, &item);
+            todo_wine
+            ok(r == S_OK, "Folder::get_Self failed: %08x\n", r);
+            if (r == S_OK)
+            {
+                r = FolderItem_get_Path(item, &item_path);
+                todo_wine
+                ok(r == S_OK, "FolderItem::get_Path failed: %08x\n", r);
+                if (pSHGetFolderPathW)
+                    todo_wine
+                    ok(!lstrcmpW(item_path, path), "expected %s, got %s\n",
+                     wine_dbgstr_w(path), wine_dbgstr_w(item_path));
+                SysFreeString(item_path);
+                FolderItem_Release(item);
+            }
+            Folder2_Release(folder2);
+        }
+        Folder_Release(folder);
+    }
+
+    V_VT(&var) = VT_I4;
+    V_I4(&var) = ssfBITBUCKET;
+    r = IShellDispatch_NameSpace(sd, var, &folder);
+    ok(r == S_OK ||
+     broken(r == S_FALSE), /* NT4 */
+     "IShellDispatch::NameSpace failed: %08x\n", r);
+    if (r == S_OK)
+    {
+        r = Folder_QueryInterface(folder, &IID_Folder2, (LPVOID*)&folder2);
+        ok(r == S_OK, "Folder::QueryInterface failed: %08x\n", r);
+        if (r == S_OK)
+        {
+            r = Folder2_get_Self(folder2, &item);
+            todo_wine
+            ok(r == S_OK, "Folder::get_Self failed: %08x\n", r);
+            if (r == S_OK)
+            {
+                r = FolderItem_get_Path(item, &item_path);
+                todo_wine
+                ok(r == S_OK, "FolderItem::get_Path failed: %08x\n", r);
+                todo_wine
+                ok(!lstrcmpW(item_path, clsidW), "expected %s, got %s\n",
+                 wine_dbgstr_w(clsidW), wine_dbgstr_w(item_path));
+                SysFreeString(item_path);
+                FolderItem_Release(item);
+            }
+            Folder2_Release(folder2);
+        }
         Folder_Release(folder);
     }
 
@@ -141,6 +207,13 @@ static void test_namespace(void)
     SysFreeString(V_BSTR(&var));
 
     GetFullPathNameW(winetestW, MAX_PATH, tempW, NULL);
+    if (pGetLongPathNameW)
+    {
+        len = pGetLongPathNameW(tempW, NULL, 0);
+        long_pathW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+        if (long_pathW)
+            pGetLongPathNameW(tempW, long_pathW, len);
+    }
     V_VT(&var) = VT_BSTR;
     V_BSTR(&var) = SysAllocString(tempW);
     r = IShellDispatch_NameSpace(sd, var, &folder);
@@ -155,6 +228,28 @@ static void test_namespace(void)
              wine_dbgstr_w(title));
             SysFreeString(title);
         }
+        r = Folder_QueryInterface(folder, &IID_Folder2, (LPVOID*)&folder2);
+        ok(r == S_OK, "Folder::QueryInterface failed: %08x\n", r);
+        if (r == S_OK)
+        {
+            r = Folder2_get_Self(folder2, &item);
+            todo_wine
+            ok(r == S_OK, "Folder::get_Self failed: %08x\n", r);
+            if (r == S_OK)
+            {
+                r = FolderItem_get_Path(item, &item_path);
+                todo_wine
+                ok(r == S_OK, "FolderItem::get_Path failed: %08x\n", r);
+                if (long_pathW)
+                    todo_wine
+                    ok(!lstrcmpW(item_path, long_pathW),
+                     "expected %s, got %s\n", wine_dbgstr_w(long_pathW),
+                     wine_dbgstr_w(item_path));
+                SysFreeString(item_path);
+                FolderItem_Release(item);
+            }
+            Folder2_Release(folder2);
+        }
         Folder_Release(folder);
     }
     SysFreeString(V_BSTR(&var));
@@ -177,11 +272,34 @@ static void test_namespace(void)
                  wine_dbgstr_w(title));
                 SysFreeString(title);
             }
+            r = Folder_QueryInterface(folder, &IID_Folder2, (LPVOID*)&folder2);
+            ok(r == S_OK, "Folder::QueryInterface failed: %08x\n", r);
+            if (r == S_OK)
+            {
+                r = Folder2_get_Self(folder2, &item);
+                todo_wine
+                ok(r == S_OK, "Folder::get_Self failed: %08x\n", r);
+                if (r == S_OK)
+                {
+                    r = FolderItem_get_Path(item, &item_path);
+                    todo_wine
+                    ok(r == S_OK, "FolderItem::get_Path failed: %08x\n", r);
+                    if (long_pathW)
+                        todo_wine
+                        ok(!lstrcmpW(item_path, long_pathW),
+                         "expected %s, got %s\n", wine_dbgstr_w(long_pathW),
+                         wine_dbgstr_w(item_path));
+                    SysFreeString(item_path);
+                    FolderItem_Release(item);
+                }
+                Folder2_Release(folder2);
+            }
             Folder_Release(folder);
         }
         SysFreeString(V_BSTR(&var));
     }
 
+    HeapFree(GetProcessHeap(), 0, long_pathW);
     RemoveDirectoryW(winetestW);
     SetCurrentDirectoryW(curW);
     IShellDispatch_Release(sd);

commit 04f2e7612404ad988136a3fe55e018150e5c5e9a
Author: Alexander Morozov <amorozov на etersoft.ru>
Date:   Wed Feb 2 20:14:40 2011 +0300

    shell32: Release iTypeInfo on error.

diff --git a/dlls/shell32/shelldispatch.c b/dlls/shell32/shelldispatch.c
index 67501ae..4458252 100644
--- a/dlls/shell32/shelldispatch.c
+++ b/dlls/shell32/shelldispatch.c
@@ -391,6 +391,7 @@ static HRESULT Folder_Constructor(VARIANT *dir, Folder **ppsdf)
     ret = VariantCopy(&This->dir, dir);
     if (FAILED(ret))
     {
+        ITypeInfo_Release(This->iTypeInfo);
         HeapFree(GetProcessHeap(), 0, This);
         return E_OUTOFMEMORY;
     }


Подробная информация о списке рассылки Wine-devel