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
0da601fa
Commit
0da601fa
authored
Nov 03, 2006
by
Andrew Talbot
Committed by
Alexandre Julliard
Nov 06, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msacm32: Cast-qual warnings fix.
parent
3f9a168f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
driver.c
dlls/msacm32/driver.c
+20
-13
No files found.
dlls/msacm32/driver.c
View file @
0da601fa
...
...
@@ -402,6 +402,8 @@ LRESULT WINAPI acmDriverMessage(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARA
PWINE_ACMDRIVERID
padid
;
LRESULT
lResult
;
LPDRVCONFIGINFO
pConfigInfo
=
NULL
;
LPWSTR
section_name
=
NULL
;
LPWSTR
alias_name
=
NULL
;
/* Check whether handle is an HACMDRIVERID */
padid
=
MSACM_GetDriverID
((
HACMDRIVERID
)
had
);
...
...
@@ -434,16 +436,19 @@ LRESULT WINAPI acmDriverMessage(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARA
ERR
(
"OOM while supplying DRVCONFIGINFO for DRV_CONFIGURE, using NULL
\n
"
);
}
else
{
static
const
WCHAR
drivers32
[]
=
{
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
's'
,
'3'
,
'2'
,
'\0'
};
pConfigInfo
->
dwDCISize
=
iStructSize
;
pConfigInfo
->
lpszDCISectionName
=
HeapAlloc
(
MSACM_hHeap
,
0
,
(
strlenW
(
drivers32
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
pConfigInfo
->
lpszDCISectionName
)
strcpyW
((
WCHAR
*
)
pConfigInfo
->
lpszDCISectionName
,
drivers32
);
pConfigInfo
->
lpszDCIAliasName
=
HeapAlloc
(
MSACM_hHeap
,
0
,
(
strlenW
(
pAlias
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
pConfigInfo
->
lpszDCIAliasName
)
strcpyW
((
WCHAR
*
)
pConfigInfo
->
lpszDCIAliasName
,
pAlias
);
section_name
=
HeapAlloc
(
MSACM_hHeap
,
0
,
(
strlenW
(
drivers32
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
section_name
)
strcpyW
(
section_name
,
drivers32
);
pConfigInfo
->
lpszDCISectionName
=
section_name
;
alias_name
=
HeapAlloc
(
MSACM_hHeap
,
0
,
(
strlenW
(
pAlias
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
alias_name
)
strcpyW
(
alias_name
,
pAlias
);
pConfigInfo
->
lpszDCIAliasName
=
alias_name
;
if
(
pConfigInfo
->
lpszDCISectionName
==
NULL
||
pConfigInfo
->
lpszDCIAliasName
==
NULL
)
{
HeapFree
(
MSACM_hHeap
,
0
,
(
void
*
)
pConfigInfo
->
lpszDCIAliasN
ame
);
HeapFree
(
MSACM_hHeap
,
0
,
(
void
*
)
pConfigInfo
->
lpszDCISectionN
ame
);
HeapFree
(
MSACM_hHeap
,
0
,
alias_n
ame
);
HeapFree
(
MSACM_hHeap
,
0
,
section_n
ame
);
HeapFree
(
MSACM_hHeap
,
0
,
pConfigInfo
);
pConfigInfo
=
NULL
;
ERR
(
"OOM while supplying DRVCONFIGINFO for DRV_CONFIGURE, using NULL
\n
"
);
...
...
@@ -471,8 +476,8 @@ LRESULT WINAPI acmDriverMessage(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARA
lResult
=
MSACM_Message
(
had
,
uMsg
,
lParam1
,
lParam2
);
}
if
(
pConfigInfo
)
{
HeapFree
(
MSACM_hHeap
,
0
,
(
void
*
)
pConfigInfo
->
lpszDCIAliasN
ame
);
HeapFree
(
MSACM_hHeap
,
0
,
(
void
*
)
pConfigInfo
->
lpszDCISectionN
ame
);
HeapFree
(
MSACM_hHeap
,
0
,
alias_n
ame
);
HeapFree
(
MSACM_hHeap
,
0
,
section_n
ame
);
HeapFree
(
MSACM_hHeap
,
0
,
pConfigInfo
);
}
return
lResult
;
...
...
@@ -523,6 +528,7 @@ MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpe
{
ACMDRVOPENDESCW
adod
;
int
len
;
LPWSTR
section_name
;
/* this is not an externally added driver... need to actually load it */
if
(
!
padid
->
pszDriverAlias
)
...
...
@@ -538,14 +544,15 @@ MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpe
adod
.
dwFlags
=
fdwOpen
;
adod
.
dwError
=
0
;
len
=
strlen
(
"Drivers32"
)
+
1
;
adod
.
pszSectionName
=
HeapAlloc
(
MSACM_hHeap
,
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
"Drivers32"
,
-
1
,
(
LPWSTR
)
adod
.
pszSectionName
,
len
);
section_name
=
HeapAlloc
(
MSACM_hHeap
,
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
"Drivers32"
,
-
1
,
section_name
,
len
);
adod
.
pszSectionName
=
section_name
;
adod
.
pszAliasName
=
padid
->
pszDriverAlias
;
adod
.
dnDevNode
=
0
;
pad
->
hDrvr
=
OpenDriver
(
padid
->
pszDriverAlias
,
NULL
,
(
DWORD
)
&
adod
);
HeapFree
(
MSACM_hHeap
,
0
,
(
LPWSTR
)
adod
.
pszSectionN
ame
);
HeapFree
(
MSACM_hHeap
,
0
,
section_n
ame
);
if
(
!
pad
->
hDrvr
)
{
ret
=
adod
.
dwError
;
...
...
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