[GDI32_WINETEST]
[reactos.git] / rostests / winetests / shell32 / shfldr_netplaces.c
1 /*
2 * Tests for My Network Places shell folder
3 *
4 * Copyright 2008 Robert Shearman for CodeWeavers
5 *
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.
10 *
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.
15 *
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21 #include <stdarg.h>
22 #include <stdio.h>
23
24 #define COBJMACROS
25 #define WIN32_LEAN_AND_MEAN
26 #include <windows.h>
27 #include "shellapi.h"
28 #include "shlobj.h"
29
30 #include "wine/test.h"
31
32 static void test_parse_for_entire_network(void)
33 {
34 static const WCHAR entire_network_path[] = {
35 ':',':','{','2','0','8','D','2','C','6','0','-','3','A','E','A','-',
36 '1','0','6','9','-','A','2','D','7','-','0','8','0','0','2','B','3','0','3','0','9','D',
37 '}','\\','E','n','t','i','r','e','N','e','t','w','o','r','k',0 };
38 IShellFolder *psfDesktop;
39 HRESULT hr;
40 DWORD eaten = 0xdeadbeef;
41 LPITEMIDLIST pidl;
42 DWORD attr = ~0;
43 DWORD expected_attr;
44
45 hr = SHGetDesktopFolder(&psfDesktop);
46 ok(hr == S_OK, "SHGetDesktopFolder failed with error 0x%x\n", hr);
47
48 hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, (LPWSTR)entire_network_path, &eaten, &pidl, &attr);
49 ok(hr == S_OK, "IShellFolder_ParseDisplayName failed with error 0x%x\n", hr);
50 todo_wine
51 ok(eaten == 0xdeadbeef, "eaten should not have been set to %u\n", eaten);
52 expected_attr = SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_STORAGEANCESTOR|SFGAO_HASPROPSHEET|SFGAO_CANLINK;
53 todo_wine
54 ok(attr == expected_attr, "attr should be 0x%x, not 0x%x\n", expected_attr, attr);
55
56 ILFree(pidl);
57 }
58
59
60 START_TEST(shfldr_netplaces)
61 {
62 test_parse_for_entire_network();
63 }