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
3d678afc
Commit
3d678afc
authored
Jan 26, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dynamically load version.dll in MMDRV_GetDescription32.
parent
8c7f7e4d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
lolvldrv.c
dlls/winmm/lolvldrv.c
+17
-5
No files found.
dlls/winmm/lolvldrv.c
View file @
3d678afc
...
...
@@ -123,17 +123,28 @@ static BOOL MMDRV_GetDescription32(const char* fname, char* buf, int buflen)
DWORD
dw
;
BOOL
ret
=
FALSE
;
UINT
u
;
FARPROC
pGetFileVersionInfoSizeA
;
FARPROC
pGetFileVersionInfoA
;
FARPROC
pVerQueryValueA
;
HMODULE
hmodule
=
0
;
#define E(_x) do {TRACE _x;goto theEnd;} while(0)
if
(
OpenFile
(
fname
,
&
ofs
,
OF_EXIST
)
==
HFILE_ERROR
)
E
((
"Can't find file %s
\n
"
,
fname
));
/* should load version.dll */
if
(
!
(
dw
=
GetFileVersionInfoSizeA
(
ofs
.
szPathName
,
&
h
)))
E
((
"Can't get FVIS
\n
"
));
if
(
!
(
hmodule
=
LoadLibraryA
(
"version.dll"
)))
goto
theEnd
;
if
(
!
(
pGetFileVersionInfoSizeA
=
GetProcAddress
(
hmodule
,
"GetFileVersionInfoSizeA"
)))
goto
theEnd
;
if
(
!
(
pGetFileVersionInfoA
=
GetProcAddress
(
hmodule
,
"GetFileVersionInfoA"
)))
goto
theEnd
;
if
(
!
(
pVerQueryValueA
=
GetProcAddress
(
hmodule
,
"pVerQueryValueA"
)))
goto
theEnd
;
if
(
!
(
dw
=
pGetFileVersionInfoSizeA
(
ofs
.
szPathName
,
&
h
)))
E
((
"Can't get FVIS
\n
"
));
if
(
!
(
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dw
)))
E
((
"OOM
\n
"
));
if
(
!
GetFileVersionInfoA
(
ofs
.
szPathName
,
h
,
dw
,
ptr
))
E
((
"Can't get FVI
\n
"
));
if
(
!
p
GetFileVersionInfoA
(
ofs
.
szPathName
,
h
,
dw
,
ptr
))
E
((
"Can't get FVI
\n
"
));
#define A(_x) if (VerQueryValueA(ptr, "\\StringFileInfo\\040904B0\\" #_x, &val, &u)) \
#define A(_x) if (
p
VerQueryValueA(ptr, "\\StringFileInfo\\040904B0\\" #_x, &val, &u)) \
TRACE(#_x " => %s\n", (LPSTR)val); else TRACE(#_x " @\n")
A
(
CompanyName
);
...
...
@@ -150,13 +161,14 @@ static BOOL MMDRV_GetDescription32(const char* fname, char* buf, int buflen)
A
(
SpecialBuild
);
#undef A
if
(
!
VerQueryValueA
(
ptr
,
"
\\
StringFileInfo
\\
040904B0
\\
ProductName"
,
&
val
,
&
u
))
E
((
"Can't get product name
\n
"
));
if
(
!
p
VerQueryValueA
(
ptr
,
"
\\
StringFileInfo
\\
040904B0
\\
ProductName"
,
&
val
,
&
u
))
E
((
"Can't get product name
\n
"
));
lstrcpynA
(
buf
,
val
,
buflen
);
#undef E
ret
=
TRUE
;
theEnd:
HeapFree
(
GetProcessHeap
(),
0
,
ptr
);
if
(
hmodule
)
FreeLibrary
(
hmodule
);
return
ret
;
}
...
...
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