Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
790f4523
Commit
790f4523
authored
Feb 27, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Feb 28, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advpack: Factor out the API loading of advpack tests.
parent
c109e2a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
13 deletions
+19
-13
advpack.c
dlls/advpack/tests/advpack.c
+19
-13
No files found.
dlls/advpack/tests/advpack.c
View file @
790f4523
...
...
@@ -28,10 +28,27 @@
#define TEST_STRING1 "\\Application Name"
#define TEST_STRING2 "%49001%\\Application Name"
static
HRESULT
(
WINAPI
*
pGetVersionFromFile
)(
LPSTR
,
LPDWORD
,
LPDWORD
,
BOOL
);
static
HRESULT
(
WINAPI
*
pDelNode
)(
LPCSTR
,
DWORD
);
static
HRESULT
(
WINAPI
*
pGetVersionFromFile
)(
LPSTR
,
LPDWORD
,
LPDWORD
,
BOOL
);
static
HRESULT
(
WINAPI
*
pTranslateInfString
)(
LPSTR
,
LPSTR
,
LPSTR
,
LPSTR
,
LPSTR
,
DWORD
,
LPDWORD
,
LPVOID
);
static
BOOL
init_function_pointers
(
void
)
{
HMODULE
hAdvPack
=
LoadLibraryA
(
"advpack.dll"
);
if
(
!
hAdvPack
)
return
FALSE
;
pDelNode
=
(
void
*
)
GetProcAddress
(
hAdvPack
,
"DelNode"
);
pGetVersionFromFile
=
(
void
*
)
GetProcAddress
(
hAdvPack
,
"GetVersionFromFile"
);
pTranslateInfString
=
(
void
*
)
GetProcAddress
(
hAdvPack
,
"TranslateInfString"
);
if
(
!
pDelNode
||
!
pGetVersionFromFile
||
!
pTranslateInfString
)
return
FALSE
;
return
TRUE
;
}
static
void
version_test
(
void
)
{
HRESULT
hr
;
...
...
@@ -256,21 +273,10 @@ static void translateinfstring_test()
START_TEST
(
advpack
)
{
HMODULE
hdll
;
hdll
=
LoadLibraryA
(
"advpack.dll"
);
if
(
!
hdll
)
return
;
pGetVersionFromFile
=
(
void
*
)
GetProcAddress
(
hdll
,
"GetVersionFromFile"
);
pDelNode
=
(
void
*
)
GetProcAddress
(
hdll
,
"DelNode"
);
pTranslateInfString
=
(
void
*
)
GetProcAddress
(
hdll
,
"TranslateInfString"
);
if
(
!
pGetVersionFromFile
||
!
pDelNode
||
!
pTranslateInfString
)
if
(
!
init_function_pointers
())
return
;
version_test
();
delnode_test
();
translateinfstring_test
();
FreeLibrary
(
hdll
);
}
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