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
444a8e51
Commit
444a8e51
authored
Aug 15, 2007
by
Paul Vriens
Committed by
Alexandre Julliard
Aug 16, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Use GetModuleHandle instead of LoadLibrary.
parent
13ae5f8e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
40 deletions
+34
-40
shellpath.c
dlls/shell32/tests/shellpath.c
+33
-37
string.c
dlls/shell32/tests/string.c
+1
-3
No files found.
dlls/shell32/tests/shellpath.c
View file @
444a8e51
...
...
@@ -73,7 +73,7 @@ struct shellExpectedValues {
BYTE
pidlType
;
};
static
H
MODULE
hShell32
;
static
H
RESULT
(
WINAPI
*
pDllGetVersion
)(
DLLVERSIONINFO
*
)
;
static
HRESULT
(
WINAPI
*
pSHGetFolderPathA
)(
HWND
,
int
,
HANDLE
,
DWORD
,
LPSTR
);
static
HRESULT
(
WINAPI
*
pSHGetFolderLocation
)(
HWND
,
int
,
HANDLE
,
DWORD
,
LPITEMIDLIST
*
);
...
...
@@ -152,45 +152,42 @@ static const struct shellExpectedValues optionalShellValues[] = {
static
void
loadShell32
(
void
)
{
hShell32
=
LoadLibraryA
(
"shell32"
);
if
(
hShell32
)
HMODULE
hShell32
=
GetModuleHandleA
(
"shell32"
);
#define GET_PROC(func) \
p ## func = (void*)GetProcAddress(hShell32, #func); \
if(!p ## func) \
trace("GetProcAddress(%s) failed\n", #func);
GET_PROC
(
DllGetVersion
)
GET_PROC
(
SHGetFolderPathA
)
GET_PROC
(
SHGetFolderLocation
)
GET_PROC
(
SHGetSpecialFolderPathA
)
GET_PROC
(
SHGetSpecialFolderLocation
)
GET_PROC
(
ILFindLastID
)
if
(
!
pILFindLastID
)
pILFindLastID
=
(
void
*
)
GetProcAddress
(
hShell32
,
(
LPCSTR
)
16
);
GET_PROC
(
SHFileOperationA
)
GET_PROC
(
SHGetMalloc
)
ok
(
pSHGetMalloc
!=
NULL
,
"shell32 is missing SHGetMalloc
\n
"
);
if
(
pSHGetMalloc
)
{
HRESULT
(
WINAPI
*
pDllGetVersion
)(
DLLVERSIONINFO
*
);
pSHGetFolderPathA
=
(
void
*
)
GetProcAddress
(
hShell32
,
"SHGetFolderPathA"
);
pSHGetFolderLocation
=
(
void
*
)
GetProcAddress
(
hShell32
,
"SHGetFolderLocation"
);
pSHGetSpecialFolderPathA
=
(
void
*
)
GetProcAddress
(
hShell32
,
"SHGetSpecialFolderPathA"
);
pSHGetSpecialFolderLocation
=
(
void
*
)
GetProcAddress
(
hShell32
,
"SHGetSpecialFolderLocation"
);
pDllGetVersion
=
(
void
*
)
GetProcAddress
(
hShell32
,
"DllGetVersion"
);
pILFindLastID
=
(
void
*
)
GetProcAddress
(
hShell32
,
"ILFindLastID"
);
if
(
!
pILFindLastID
)
pILFindLastID
=
(
void
*
)
GetProcAddress
(
hShell32
,
(
LPCSTR
)
16
);
pSHFileOperationA
=
(
void
*
)
GetProcAddress
(
hShell32
,
"SHFileOperationA"
);
pSHGetMalloc
=
(
void
*
)
GetProcAddress
(
hShell32
,
"SHGetMalloc"
);
ok
(
pSHGetMalloc
!=
NULL
,
"shell32 is missing SHGetMalloc
\n
"
);
if
(
pSHGetMalloc
)
{
HRESULT
hr
=
pSHGetMalloc
(
&
pMalloc
);
HRESULT
hr
=
pSHGetMalloc
(
&
pMalloc
);
ok
(
SUCCEEDED
(
hr
),
"SHGetMalloc failed: 0x%08x
\n
"
,
hr
);
ok
(
pMalloc
!=
NULL
,
"SHGetMalloc returned a NULL IMalloc
\n
"
);
}
ok
(
SUCCEEDED
(
hr
),
"SHGetMalloc failed: 0x%08x
\n
"
,
hr
);
ok
(
pMalloc
!=
NULL
,
"SHGetMalloc returned a NULL IMalloc
\n
"
);
}
if
(
pDllGetVersion
)
{
shellVersion
.
cbSize
=
sizeof
(
shellVersion
);
pDllGetVersion
(
&
shellVersion
);
if
(
winetest_interactive
)
printf
(
"shell32 version is %d.%d
\n
"
,
shellVersion
.
dwMajorVersion
,
shellVersion
.
dwMinorVersion
);
}
if
(
pDllGetVersion
)
{
shellVersion
.
cbSize
=
sizeof
(
shellVersion
);
pDllGetVersion
(
&
shellVersion
);
if
(
winetest_interactive
)
printf
(
"shell32 version is %d.%d
\n
"
,
shellVersion
.
dwMajorVersion
,
shellVersion
.
dwMinorVersion
);
}
#undef GET_PROC
}
#ifndef CSIDL_PROFILES
...
...
@@ -892,7 +889,6 @@ START_TEST(shellpath)
if
(
!
init
())
return
;
loadShell32
();
if
(
!
hShell32
)
return
;
if
(
myARGC
>=
3
)
doChild
(
myARGV
[
2
]);
...
...
dlls/shell32/tests/string.c
View file @
444a8e51
...
...
@@ -100,9 +100,7 @@ START_TEST(string)
{
CoInitialize
(
0
);
hShell32
=
LoadLibraryA
(
"shell32.dll"
);
if
(
!
hShell32
)
return
;
hShell32
=
GetModuleHandleA
(
"shell32.dll"
);
pStrRetToStrNAW
=
(
void
*
)
GetProcAddress
(
hShell32
,
(
LPSTR
)
96
);
if
(
pStrRetToStrNAW
)
...
...
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