Bruno Jesus : msvfw32: Trace only what matters in MCIWNDM_GETDEVICE.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Sep 10 08:07:53 CDT 2015
Module: wine
Branch: master
Commit: 19d73d284745b3f24844ed5967f18ee2a9993f2f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=19d73d284745b3f24844ed5967f18ee2a9993f2f
Author: Bruno Jesus <00cpxxx at gmail.com>
Date: Thu Sep 10 00:48:05 2015 +0800
msvfw32: Trace only what matters in MCIWNDM_GETDEVICE.
---
dlls/msvfw32/mciwnd.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/msvfw32/mciwnd.c b/dlls/msvfw32/mciwnd.c
index e561b14..fc49973 100644
--- a/dlls/msvfw32/mciwnd.c
+++ b/dlls/msvfw32/mciwnd.c
@@ -1070,27 +1070,33 @@ end_of_mci_open:
case MCIWNDM_GETDEVICEA:
{
+ int len = 0;
+ char *str = (char *)lParam;
MCI_SYSINFO_PARMSA mci_sysinfo;
- mci_sysinfo.lpstrReturn = (LPSTR)lParam;
+ mci_sysinfo.lpstrReturn = str;
mci_sysinfo.dwRetSize = wParam;
mwi->lasterror = mciSendCommandA(mwi->mci, MCI_SYSINFO,
MCI_SYSINFO_INSTALLNAME,
(DWORD_PTR)&mci_sysinfo);
- TRACE("MCIWNDM_GETDEVICEA: %s\n", debugstr_an((LPSTR)lParam, wParam));
+ while(len < wParam && str[len]) len++;
+ TRACE("MCIWNDM_GETDEVICEA: %s\n", debugstr_an(str, len));
return 0;
}
case MCIWNDM_GETDEVICEW:
{
+ int len = 0;
+ WCHAR *str = (WCHAR *)lParam;
MCI_SYSINFO_PARMSW mci_sysinfo;
- mci_sysinfo.lpstrReturn = (LPWSTR)lParam;
+ mci_sysinfo.lpstrReturn = str;
mci_sysinfo.dwRetSize = wParam;
mwi->lasterror = mciSendCommandW(mwi->mci, MCI_SYSINFO,
MCI_SYSINFO_INSTALLNAME,
(DWORD_PTR)&mci_sysinfo);
- TRACE("MCIWNDM_GETDEVICEW: %s\n", debugstr_wn((LPWSTR)lParam, wParam));
+ while(len < wParam && str[len]) len++;
+ TRACE("MCIWNDM_GETDEVICEW: %s\n", debugstr_wn(str, len));
return 0;
}
More information about the wine-cvs
mailing list