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
533b15d6
Commit
533b15d6
authored
Feb 06, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
Feb 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust/tests: Use GetModuleHandleA instead of LoadLibraryA.
parent
dc267e75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
17 deletions
+6
-17
crypt.c
dlls/wintrust/tests/crypt.c
+6
-17
No files found.
dlls/wintrust/tests/crypt.c
View file @
533b15d6
...
...
@@ -30,33 +30,25 @@ static char selfname[MAX_PATH];
static
CHAR
CURR_DIR
[
MAX_PATH
];
static
HMODULE
hWintrust
=
0
;
static
BOOL
(
WINAPI
*
pCryptCATAdminAcquireContext
)(
HCATADMIN
*
,
const
GUID
*
,
DWORD
);
static
BOOL
(
WINAPI
*
pCryptCATAdminReleaseContext
)(
HCATADMIN
,
DWORD
);
static
BOOL
(
WINAPI
*
pCryptCATAdminCalcHashFromFileHandle
)(
HANDLE
hFile
,
DWORD
*
,
BYTE
*
,
DWORD
);
static
void
InitFunctionPtrs
(
void
)
{
HMODULE
hWintrust
=
GetModuleHandleA
(
"wintrust.dll"
);
#define WINTRUST_GET_PROC(func) \
p ## func = (void*)GetProcAddress(hWintrust, #func); \
if(!p ## func) { \
trace("GetProcAddress(%s) failed\n", #func); \
}
static
BOOL
InitFunctionPtrs
(
void
)
{
hWintrust
=
LoadLibraryA
(
"wintrust.dll"
);
if
(
!
hWintrust
)
{
skip
(
"Could not load wintrust.dll
\n
"
);
return
FALSE
;
}
WINTRUST_GET_PROC
(
CryptCATAdminAcquireContext
)
WINTRUST_GET_PROC
(
CryptCATAdminReleaseContext
)
WINTRUST_GET_PROC
(
CryptCATAdminCalcHashFromFileHandle
)
return
TRUE
;
#undef WINTRUST_GET_PROC
}
static
void
test_context
(
void
)
...
...
@@ -290,8 +282,7 @@ START_TEST(crypt)
int
myARGC
;
char
**
myARGV
;
if
(
!
InitFunctionPtrs
())
return
;
InitFunctionPtrs
();
myARGC
=
winetest_get_mainargs
(
&
myARGV
);
strcpy
(
selfname
,
myARGV
[
0
]);
...
...
@@ -300,6 +291,4 @@ START_TEST(crypt)
test_context
();
test_calchash
();
FreeLibrary
(
hWintrust
);
}
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