Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
eed690f9
Commit
eed690f9
authored
Jun 29, 2005
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Jun 29, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ILFree is not available on all versions.
parent
cb7de15e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
shlfolder.c
dlls/shell32/tests/shlfolder.c
+12
-11
No files found.
dlls/shell32/tests/shlfolder.c
View file @
eed690f9
...
...
@@ -47,12 +47,16 @@ static BOOL (WINAPI *pSHGetSpecialFolderPathW)(HWND, LPWSTR, int, BOOL);
static
void
init_function_pointers
(
void
)
{
HMODULE
hmod
=
GetModuleHandleA
(
"shell32.dll"
);
HRESULT
hr
;
if
(
hmod
)
{
pSHBindToParent
=
(
void
*
)
GetProcAddress
(
hmod
,
"SHBindToParent"
);
pSHGetSpecialFolderPathW
=
(
void
*
)
GetProcAddress
(
hmod
,
"SHGetSpecialFolderPathW"
);
}
hr
=
SHGetMalloc
(
&
ppM
);
ok
(
hr
==
S_OK
,
"SHGetMalloc failed %08lx
\n
"
,
hr
);
}
/* creates a file with the specified name for tests */
...
...
@@ -200,7 +204,7 @@ static void test_BindToObject(void)
hr
=
IShellFolder_BindToObject
(
psfDesktop
,
pidlMyComputer
,
NULL
,
&
IID_IShellFolder
,
(
LPVOID
*
)
&
psfMyComputer
);
ok
(
SUCCEEDED
(
hr
),
"Desktop failed to bind to MyComputer object! hr = %08lx
\n
"
,
hr
);
IShellFolder_Release
(
psfDesktop
);
I
LFree
(
pidlMyComputer
);
I
Malloc_Free
(
ppM
,
pidlMyComputer
);
if
(
FAILED
(
hr
))
return
;
hr
=
IShellFolder_BindToObject
(
psfMyComputer
,
pidlEmpty
,
NULL
,
&
IID_IShellFolder
,
(
LPVOID
*
)
&
psfChild
);
...
...
@@ -226,7 +230,7 @@ static void test_BindToObject(void)
hr
=
IShellFolder_BindToObject
(
psfMyComputer
,
pidlSystemDir
,
NULL
,
&
IID_IShellFolder
,
(
LPVOID
*
)
&
psfSystemDir
);
ok
(
SUCCEEDED
(
hr
),
"MyComputer failed to bind to a FileSystem ShellFolder! hr = %08lx
\n
"
,
hr
);
IShellFolder_Release
(
psfMyComputer
);
I
LFree
(
pidlSystemDir
);
I
Malloc_Free
(
ppM
,
pidlSystemDir
);
if
(
FAILED
(
hr
))
return
;
hr
=
IShellFolder_BindToObject
(
psfSystemDir
,
pidlEmpty
,
NULL
,
&
IID_IShellFolder
,
(
LPVOID
*
)
&
psfChild
);
...
...
@@ -398,7 +402,7 @@ static void test_CallForAttributes(void)
lResult
=
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
wszMyDocumentsKey
,
0
,
KEY_WRITE
|
KEY_READ
,
&
hKey
);
todo_wine
{
ok
(
lResult
==
ERROR_SUCCESS
,
"RegOpenKeyEx failed! result: %08lx
\n
"
,
lResult
);
}
if
(
lResult
!=
ERROR_SUCCESS
)
{
I
LFree
(
pidlMyDocuments
);
I
Malloc_Free
(
ppM
,
pidlMyDocuments
);
IShellFolder_Release
(
psfDesktop
);
return
;
}
...
...
@@ -409,7 +413,7 @@ static void test_CallForAttributes(void)
ok
(
lResult
==
ERROR_SUCCESS
,
"RegQueryValueEx failed! result: %08lx
\n
"
,
lResult
);
if
(
lResult
!=
ERROR_SUCCESS
)
{
RegCloseKey
(
hKey
);
I
LFree
(
pidlMyDocuments
);
I
Malloc_Free
(
ppM
,
pidlMyDocuments
);
IShellFolder_Release
(
psfDesktop
);
return
;
}
...
...
@@ -421,7 +425,7 @@ static void test_CallForAttributes(void)
ok
(
lResult
==
ERROR_SUCCESS
,
"RegQueryValueEx failed! result: %08lx
\n
"
,
lResult
);
if
(
lResult
!=
ERROR_SUCCESS
)
{
RegCloseKey
(
hKey
);
I
LFree
(
pidlMyDocuments
);
I
Malloc_Free
(
ppM
,
pidlMyDocuments
);
IShellFolder_Release
(
psfDesktop
);
return
;
}
...
...
@@ -454,7 +458,7 @@ static void test_CallForAttributes(void)
RegSetValueExW
(
hKey
,
wszCallForAttributes
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
dwOrigCallForAttributes
,
sizeof
(
DWORD
));
RegCloseKey
(
hKey
);
I
LFree
(
pidlMyDocuments
);
I
Malloc_Free
(
ppM
,
pidlMyDocuments
);
IShellFolder_Release
(
psfDesktop
);
}
...
...
@@ -518,7 +522,7 @@ static void test_GetAttributesOf(void)
hr
=
IShellFolder_BindToObject
(
psfDesktop
,
pidlMyComputer
,
NULL
,
&
IID_IShellFolder
,
(
LPVOID
*
)
&
psfMyComputer
);
ok
(
SUCCEEDED
(
hr
),
"Desktop failed to bind to MyComputer object! hr = %08lx
\n
"
,
hr
);
IShellFolder_Release
(
psfDesktop
);
I
LFree
(
pidlMyComputer
);
I
Malloc_Free
(
ppM
,
pidlMyComputer
);
if
(
FAILED
(
hr
))
return
;
hr
=
IShellFolder_GetAttributesOf
(
psfMyComputer
,
1
,
&
pidlEmpty
,
&
dwFlags
);
...
...
@@ -573,7 +577,7 @@ static void test_SHGetPathFromIDList(void)
ok
(
!
result
,
"SHGetPathFromIDList succeeded where it shouldn't!
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"SHGetPathFromIDList shouldn't set last error! Last error: %08lx
\n
"
,
GetLastError
());
I
LFree
(
pidlMyComputer
);
I
Malloc_Free
(
ppM
,
pidlMyComputer
);
}
static
void
test_EnumObjects_and_CompareIDs
(
void
)
...
...
@@ -591,9 +595,6 @@ static void test_EnumObjects_and_CompareIDs(void)
OleInitialize
(
NULL
);
hr
=
SHGetMalloc
(
&
ppM
);
ok
(
hr
==
S_OK
,
"SHGetMalloc failed %08lx
\n
"
,
hr
);
hr
=
SHGetDesktopFolder
(
&
IDesktopFolder
);
ok
(
hr
==
S_OK
,
"SHGetDesktopfolder failed %08lx
\n
"
,
hr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment