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
9aa8960f
Commit
9aa8960f
authored
Nov 14, 1999
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 14, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The adwInfo[0] field was no longer used on mmioOpen (may contain file
handle).
parent
76cc171f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
40 deletions
+36
-40
mmio.c
dlls/winmm/mmio.c
+36
-40
No files found.
dlls/winmm/mmio.c
View file @
9aa8960f
...
...
@@ -250,9 +250,7 @@ static LRESULT mmioMemIOProc(LPMMIOINFO16 lpmmioinfo, UINT16 uMessage, LPARAM lP
/**************************************************************************
* MMIO_Open [internal]
*/
static
HMMIO16
MMIO_Open
(
LPSTR
szFileName
,
FOURCC
fccIOProc
,
LPMMIOPROC16
pIOProc
,
HPSTR
pchBuffer
,
LONG
cchBuffer
,
DWORD
dwOpenFlags
,
LPUINT
lpRet
,
int
use16
)
static
HMMIO16
MMIO_Open
(
LPSTR
szFileName
,
MMIOINFO
*
refmminfo
,
DWORD
dwOpenFlags
,
int
use16
)
{
LPMMIOINFO16
lpmminfo
;
HMMIO16
hmmio
;
...
...
@@ -275,43 +273,45 @@ static HMMIO16 MMIO_Open(LPSTR szFileName, FOURCC fccIOProc, LPMMIOPROC16 pIOPro
memset
(
lpmminfo
,
0
,
sizeof
(
MMIOINFO16
));
/* assume DOS file if not otherwise specified */
if
(
fccIOProc
==
0
&&
pIOProc
==
NULL
)
{
if
(
refmminfo
->
fccIOProc
==
0
&&
refmminfo
->
pIOProc
==
NULL
)
{
lpmminfo
->
fccIOProc
=
FOURCC_DOS
;
lpmminfo
->
pIOProc
=
(
LPMMIOPROC16
)
mmioDosIOProc
;
}
/* if just the four character code is present, look up IO proc */
else
if
(
pIOProc
==
NULL
)
{
else
if
(
refmminfo
->
pIOProc
==
NULL
)
{
lpmminfo
->
fccIOProc
=
fccIOProc
;
lpmminfo
->
pIOProc
=
mmioInstallIOProc16
(
fccIOProc
,
NULL
,
MMIO_FINDPROC
);
lpmminfo
->
fccIOProc
=
refmminfo
->
fccIOProc
;
lpmminfo
->
pIOProc
=
mmioInstallIOProc16
(
refmminfo
->
fccIOProc
,
NULL
,
MMIO_FINDPROC
);
}
/* if IO proc specified, use it and specified four character code */
else
{
lpmminfo
->
fccIOProc
=
fccIOProc
;
lpmminfo
->
pIOProc
=
pIOProc
;
lpmminfo
->
fccIOProc
=
refmminfo
->
fccIOProc
;
lpmminfo
->
pIOProc
=
(
LPMMIOPROC16
)
refmminfo
->
pIOProc
;
}
if
(
dwOpenFlags
&
MMIO_ALLOCBUF
)
{
if
((
*
lp
Ret
=
mmioSetBuffer16
(
hmmio
,
NULL
,
MMIO_DEFAULTBUFFER
,
0
)))
{
if
((
refmminfo
->
wError
Ret
=
mmioSetBuffer16
(
hmmio
,
NULL
,
MMIO_DEFAULTBUFFER
,
0
)))
{
return
0
;
}
}
else
if
(
lpmminfo
->
fccIOProc
==
FOURCC_MEM
)
{
if
((
*
lpRet
=
mmioSetBuffer16
(
hmmio
,
pchBuffer
,
cchBuffer
,
0
)))
{
if
((
refmminfo
->
wErrorRet
=
mmioSetBuffer16
(
hmmio
,
refmminfo
->
pchBuffer
,
refmminfo
->
cchBuffer
,
0
)))
{
return
0
;
}
}
/* see mmioDosIOProc for that one */
lpmminfo
->
adwInfo
[
0
]
=
refmminfo
->
adwInfo
[
0
];
lpmminfo
->
dwFlags
=
dwOpenFlags
;
lpmminfo
->
hmmio
=
hmmio
;
/* call IO proc to actually open file */
*
lp
Ret
=
(
UINT16
)
mmioSendMessage
(
hmmio
,
MMIOM_OPEN
,
(
LPARAM
)
szFileName
,
(
LPARAM
)
use16
);
refmminfo
->
wError
Ret
=
(
UINT16
)
mmioSendMessage
(
hmmio
,
MMIOM_OPEN
,
(
LPARAM
)
szFileName
,
(
LPARAM
)
use16
);
GlobalUnlock16
(
hmmio
);
if
(
*
lp
Ret
!=
0
)
{
if
(
refmminfo
->
wError
Ret
!=
0
)
{
GlobalFree16
(
hmmio
);
return
0
;
}
...
...
@@ -322,22 +322,12 @@ static HMMIO16 MMIO_Open(LPSTR szFileName, FOURCC fccIOProc, LPMMIOPROC16 pIOPro
/**************************************************************************
* mmioOpenW [WINMM.123]
*/
HMMIO
WINAPI
mmioOpenW
(
LPWSTR
szFileName
,
MMIOINFO
*
lpmmioinfo
,
HMMIO
WINAPI
mmioOpenW
(
LPWSTR
szFileName
,
MMIOINFO
*
lpmmioinfo
,
DWORD
dwOpenFlags
)
{
LPSTR
szFn
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
szFileName
);
HMMIO
ret
;
if
(
lpmmioinfo
)
{
ret
=
MMIO_Open
(
szFn
,
lpmmioinfo
->
fccIOProc
,
(
LPMMIOPROC16
)
lpmmioinfo
->
pIOProc
,
lpmmioinfo
->
pchBuffer
,
lpmmioinfo
->
cchBuffer
,
dwOpenFlags
,
&
lpmmioinfo
->
wErrorRet
,
FALSE
);
}
else
{
UINT
res
;
ret
=
MMIO_Open
(
szFn
,
0
,
NULL
,
NULL
,
0
,
dwOpenFlags
,
&
res
,
FALSE
);
}
HMMIO
ret
=
mmioOpenA
(
szFn
,
lpmmioinfo
,
dwOpenFlags
);
HeapFree
(
GetProcessHeap
(),
0
,
szFn
);
return
ret
;
}
...
...
@@ -349,15 +339,18 @@ HMMIO WINAPI mmioOpenA(LPSTR szFileName, MMIOINFO* lpmmioinfo,
DWORD
dwOpenFlags
)
{
HMMIO
ret
;
UINT
res
;
if
(
lpmmioinfo
)
{
ret
=
MMIO_Open
(
szFileName
,
lpmmioinfo
->
fccIOProc
,
(
LPMMIOPROC16
)
lpmmioinfo
->
pIOProc
,
lpmmioinfo
->
pchBuffer
,
lpmmioinfo
->
cchBuffer
,
dwOpenFlags
,
&
lpmmioinfo
->
wErrorRet
,
FALSE
);
ret
=
MMIO_Open
(
szFileName
,
lpmmioinfo
,
dwOpenFlags
,
FALSE
);
}
else
{
ret
=
MMIO_Open
(
szFileName
,
0
,
NULL
,
NULL
,
0
,
dwOpenFlags
,
&
res
,
FALSE
);
MMIOINFO
mmioinfo
;
mmioinfo
.
fccIOProc
=
0
;
mmioinfo
.
pIOProc
=
NULL
;
mmioinfo
.
pchBuffer
=
NULL
;
mmioinfo
.
cchBuffer
=
0
;
ret
=
MMIO_Open
(
szFileName
,
&
mmioinfo
,
dwOpenFlags
,
FALSE
);
}
return
ret
;
}
...
...
@@ -368,16 +361,19 @@ HMMIO WINAPI mmioOpenA(LPSTR szFileName, MMIOINFO* lpmmioinfo,
HMMIO16
WINAPI
mmioOpen16
(
LPSTR
szFileName
,
MMIOINFO16
*
lpmmioinfo
,
DWORD
dwOpenFlags
)
{
HMMIO
ret
;
UINT
res
;
HMMIO
ret
;
MMIOINFO
mmio
;
if
(
lpmmioinfo
)
{
ret
=
MMIO_Open
(
szFileName
,
lpmmioinfo
->
fccIOProc
,
lpmmioinfo
->
pIOProc
,
PTR_SEG_TO_LIN
(
lpmmioinfo
->
pchBuffer
),
lpmmioinfo
->
cchBuffer
,
dwOpenFlags
,
&
res
,
FALSE
);
lpmmioinfo
->
wErrorRet
=
res
;
mmio
.
fccIOProc
=
lpmmioinfo
->
fccIOProc
;
mmio
.
pIOProc
=
(
LPMMIOPROC
)
lpmmioinfo
->
pIOProc
;
mmio
.
pchBuffer
=
PTR_SEG_TO_LIN
(
lpmmioinfo
->
pchBuffer
);
mmio
.
cchBuffer
=
lpmmioinfo
->
cchBuffer
;
mmio
.
adwInfo
[
0
]
=
lpmmioinfo
->
adwInfo
[
0
];
ret
=
MMIO_Open
(
szFileName
,
&
mmio
,
dwOpenFlags
,
FALSE
);
lpmmioinfo
->
wErrorRet
=
mmio
.
wErrorRet
;
}
else
{
ret
=
MMIO_Open
(
szFileName
,
0
,
NULL
,
NULL
,
0
,
dwOpenFlags
,
&
res
,
TRUE
);
return
mmioOpenA
(
szFileName
,
NULL
,
dwOpenFlags
);
}
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