Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
eed690f9
Commit
eed690f9
authored
19 years ago
by
Vitaliy Margolen
Committed by
Alexandre Julliard
19 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ILFree is not available on all versions.
parent
cb7de15e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/shell32/tests/shlfolder.c
+12
-11
12 additions, 11 deletions
dlls/shell32/tests/shlfolder.c
with
12 additions
and
11 deletions
dlls/shell32/tests/shlfolder.c
+
12
−
11
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment