OpenFile has a filpath limit of 128. Use _lopen which calls through to CreateFile which doesn't have this limit.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48832 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=27324
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/winmm/mmio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/winmm/mmio.c b/dlls/winmm/mmio.c index 6f14301975..30adcd0f22 100644 --- a/dlls/winmm/mmio.c +++ b/dlls/winmm/mmio.c @@ -76,8 +76,7 @@ static LRESULT CALLBACK mmioDosIOProc(LPMMIOINFO lpmmioinfo, UINT uMessage,
/* if filename NULL, assume open file handle in adwInfo[0] */ if (szFileName) { - OFSTRUCT ofs; - lpmmioinfo->adwInfo[0] = OpenFile(szFileName, &ofs, lpmmioinfo->dwFlags & 0xFFFF); + lpmmioinfo->adwInfo[0] = _lopen(szFileName, lpmmioinfo->dwFlags); } if (lpmmioinfo->adwInfo[0] == HFILE_ERROR) ret = MMIOERR_FILENOTFOUND;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=68384
Your paranoid android.
=== debiant (32 bit report) ===
winmm: mmio.c:947: Test failed: mmioOpen failed mmio.c:951: Test failed: mmioCreateChunk failed 106 mmio.c:954: Test failed: chunk_info[0].dwDataOffset = 13 mmio.c:959: Test failed: mmioCreateChunk failed 106 mmio.c:962: Test failed: chunk_info[1].dwDataOffset = 13 mmio.c:967: Test failed: mmioWrite failed 106 mmio.c:970: Test failed: mmioGetInfo failed 5 mmio.c:975: Test failed: mmioAdvance failed 5 mmio.c:976: Test failed: info.lBufOffset = 33 mmio.c:982: Test failed: mmioAdvance failed 5 mmio.c:983: Test failed: info.lBufOffset = 33 mmio.c:989: Test failed: mmioSetInfo failed 5 mmio.c:996: Test failed: mmioClose failed 5 mmio.c:999: Test failed: CreateFile failed mmio.c:1000: Test failed: ReadFile failed mmio.c:1002: Test failed: created file is incorrect wave.c:1656: Test failed: Can't open temp_file wave.c:1661: Test failed: mmioCreateChunk failed, got 262 wave.c:1666: Test failed: mmioCreateChunk failed, got 262 wave.c:1668: Test failed: mmioWrite failed, got -1 wave.c:1674: Test failed: mmioCreateChunk failed, got 262 wave.c:1677: Test failed: mmioWrite failed, got -1 wave.c:1686: Test failed: mmioClose failed, got 5 wave.c:1710: Test failed: PlaySound failed, got 0 wave.c:1714: Test failed: PlaySound failed, got 0 wave.c:1722: Test failed: PlaySound failed, got 0
=== debiant (32 bit Chinese:China report) ===
winmm: mmio.c:947: Test failed: mmioOpen failed mmio.c:951: Test failed: mmioCreateChunk failed 106 mmio.c:954: Test failed: chunk_info[0].dwDataOffset = 13 mmio.c:959: Test failed: mmioCreateChunk failed 106 mmio.c:962: Test failed: chunk_info[1].dwDataOffset = 13 mmio.c:967: Test failed: mmioWrite failed 106 mmio.c:970: Test failed: mmioGetInfo failed 5 mmio.c:975: Test failed: mmioAdvance failed 5 mmio.c:976: Test failed: info.lBufOffset = 33 mmio.c:982: Test failed: mmioAdvance failed 5 mmio.c:983: Test failed: info.lBufOffset = 33 mmio.c:989: Test failed: mmioSetInfo failed 5 mmio.c:996: Test failed: mmioClose failed 5 mmio.c:999: Test failed: CreateFile failed mmio.c:1000: Test failed: ReadFile failed mmio.c:1002: Test failed: created file is incorrect wave.c:1656: Test failed: Can't open temp_file wave.c:1661: Test failed: mmioCreateChunk failed, got 262 wave.c:1666: Test failed: mmioCreateChunk failed, got 262 wave.c:1668: Test failed: mmioWrite failed, got -1 wave.c:1674: Test failed: mmioCreateChunk failed, got 262 wave.c:1677: Test failed: mmioWrite failed, got -1 wave.c:1686: Test failed: mmioClose failed, got 5 wave.c:1710: Test failed: PlaySound failed, got 0 wave.c:1714: Test failed: PlaySound failed, got 0 wave.c:1722: Test failed: PlaySound failed, got 0
=== debiant (32 bit WoW report) ===
winmm: mmio.c:947: Test failed: mmioOpen failed mmio.c:951: Test failed: mmioCreateChunk failed 106 mmio.c:954: Test failed: chunk_info[0].dwDataOffset = 13 mmio.c:959: Test failed: mmioCreateChunk failed 106 mmio.c:962: Test failed: chunk_info[1].dwDataOffset = 13 mmio.c:967: Test failed: mmioWrite failed 106 mmio.c:970: Test failed: mmioGetInfo failed 5 mmio.c:975: Test failed: mmioAdvance failed 5 mmio.c:976: Test failed: info.lBufOffset = 33 mmio.c:982: Test failed: mmioAdvance failed 5 mmio.c:983: Test failed: info.lBufOffset = 33 mmio.c:989: Test failed: mmioSetInfo failed 5 mmio.c:996: Test failed: mmioClose failed 5 mmio.c:999: Test failed: CreateFile failed mmio.c:1000: Test failed: ReadFile failed mmio.c:1002: Test failed: created file is incorrect wave.c:1656: Test failed: Can't open temp_file wave.c:1661: Test failed: mmioCreateChunk failed, got 262 wave.c:1666: Test failed: mmioCreateChunk failed, got 262 wave.c:1668: Test failed: mmioWrite failed, got -1 wave.c:1674: Test failed: mmioCreateChunk failed, got 262 wave.c:1677: Test failed: mmioWrite failed, got -1 wave.c:1686: Test failed: mmioClose failed, got 5 wave.c:1710: Test failed: PlaySound failed, got 0 wave.c:1714: Test failed: PlaySound failed, got 0 wave.c:1722: Test failed: PlaySound failed, got 0
=== debiant (64 bit WoW report) ===
winmm: mmio.c:947: Test failed: mmioOpen failed mmio.c:951: Test failed: mmioCreateChunk failed 106 mmio.c:954: Test failed: chunk_info[0].dwDataOffset = 13 mmio.c:959: Test failed: mmioCreateChunk failed 106 mmio.c:962: Test failed: chunk_info[1].dwDataOffset = 13 mmio.c:967: Test failed: mmioWrite failed 106 mmio.c:970: Test failed: mmioGetInfo failed 5 mmio.c:975: Test failed: mmioAdvance failed 5 mmio.c:976: Test failed: info.lBufOffset = 33 mmio.c:982: Test failed: mmioAdvance failed 5 mmio.c:983: Test failed: info.lBufOffset = 33 mmio.c:989: Test failed: mmioSetInfo failed 5 mmio.c:996: Test failed: mmioClose failed 5 mmio.c:999: Test failed: CreateFile failed mmio.c:1000: Test failed: ReadFile failed mmio.c:1002: Test failed: created file is incorrect wave.c:1656: Test failed: Can't open temp_file wave.c:1661: Test failed: mmioCreateChunk failed, got 262 wave.c:1666: Test failed: mmioCreateChunk failed, got 262 wave.c:1668: Test failed: mmioWrite failed, got -1 wave.c:1674: Test failed: mmioCreateChunk failed, got 262 wave.c:1677: Test failed: mmioWrite failed, got -1 wave.c:1686: Test failed: mmioClose failed, got 5 wave.c:1710: Test failed: PlaySound failed, got 0 wave.c:1714: Test failed: PlaySound failed, got 0 wave.c:1722: Test failed: PlaySound failed, got 0