61#define REG_VALUE_ADDR(x) ((x->dwType==REG_SZ)?(const BYTE *)x->szValue:(const BYTE *)&x->dwValue)
62#define REG_VALUE_SIZE(x) ((x->dwType==REG_SZ)?strlen(x->szValue)+1:sizeof(DWORD))
73 {
"WantsFORPARSING",
REG_SZ,
"", 0 },
78 {
"CLSID",
REG_SZ,
"{0AFACED1-E828-11D1-9187-B532F1E9575D}", 0 }
83 {
"Target",
REG_SZ,
"C:\\", 0 }
92 {
"ThreadingModel",
REG_SZ,
"Apartment", 0 }
118 unsigned int iKey, iValue;
120 for (iKey = 0; iKey < numKeys; iKey++) {
124 for (iValue = 0; iValue < keys[iKey].
cValues; iValue++) {
151 for (iKey = 0; iKey < numKeys; iKey++) {
161 LPSHELLFOLDER pDesktopFolder, pWineTestFolder;
167 { 0x9b352ebf, 0x2765, 0x45c1, { 0xb4, 0xc6, 0x85, 0xcc, 0x7f, 0x7a, 0xbc, 0x64 } };
168 WCHAR wszWineTestFolder[] = {
169 ':',
':',
'{',
'9',
'B',
'3',
'5',
'2',
'E',
'B',
'F',
'-',
'2',
'7',
'6',
'5',
'-',
'4',
'5',
'C',
'1',
'-',
170 'B',
'4',
'C',
'6',
'-',
'8',
'5',
'C',
'C',
'7',
'F',
'7',
'A',
'B',
'C',
'6',
'4',
'}',0 };
182 &pidlWineTestFolder,
NULL);
189 IShellFolder_Release(pDesktopFolder);
197 hr = IShellFolder_BindToObject(pDesktopFolder, pidlWineTestFolder,
NULL, &IID_IShellFolder,
198 (
LPVOID*)&pWineTestFolder);
199 IShellFolder_Release(pDesktopFolder);
200 ILFree(pidlWineTestFolder);
201 ok (
SUCCEEDED(
hr),
"IShellFolder::BindToObject(WineTestFolder) failed! hr = %08x\n",
hr);
204 hr = IShellFolder_QueryInterface(pWineTestFolder, &IID_IPersistFolder3, (
LPVOID*)&pWineTestPersistFolder);
205 ok (
SUCCEEDED(
hr),
"IShellFolder::QueryInterface(IPersistFolder3) failed! hr = %08x\n",
hr);
206 IShellFolder_Release(pWineTestFolder);
210 hr = IPersistFolder3_GetClassID(pWineTestPersistFolder, &
clsid);
215 hr = IPersistFolder3_GetCurFolder(pWineTestPersistFolder, &pidlCurFolder);
216 ok (
SUCCEEDED(
hr),
"IPersistFolder3::GetCurFolder failed! hr = %08x\n",
hr);
217 ok (pidlCurFolder->mkid.cb == 20 && ((
LPSHITEMID)((
BYTE*)pidlCurFolder+20))->cb == 0 &&
219 "GetCurFolder returned unexpected pidl!\n");
222 IPersistFolder3_Release(pWineTestPersistFolder);
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
#define RegCloseKey(hKey)
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
LONG WINAPI RegCreateKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD Reserved, _In_ LPSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_ LPDWORD lpdwDisposition)
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
#define ERROR_INVALID_PARAMETER
static void cleanup(void)
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
#define IShellFolder_ParseDisplayName
void WINAPI ILFree(LPITEMIDLIST pidl)
static const WCHAR szName[]
#define IsEqualCLSID(rclsid1, rclsid2)
#define REG_VALUE_SIZE(x)
static BOOL register_keys(HKEY hRootKey, const struct registry_key *keys, unsigned int numKeys)
static const struct registry_key ShortcutCLSID_keys[]
static void test_ShortcutFolder(void)
static const struct registry_value ShellFolder_values[]
static const struct registry_value Instance_values[]
static const struct registry_value InProcServer32_values[]
static const struct registry_value DefaultIcon_values[]
static const struct registry_value ShortcutCLSID_values[]
#define REG_VALUE_ADDR(x)
static const struct registry_value InitPropertyBag_values[]
static const struct registry_key Instance_keys[]
static const struct registry_key HKEY_CLASSES_ROOT_keys[]
static void unregister_keys(HKEY hRootKey, const struct registry_key *keys, unsigned int numKeys)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const unsigned int cSubKeys
const struct registry_value * pValues
const unsigned int cValues
const struct registry_key * pSubKeys
#define HRESULT_FROM_WIN32(x)
#define HKEY_CLASSES_ROOT