mciavi32: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1d17d8d471
commit
69e612c512
|
@ -190,8 +190,6 @@ DWORD MCIAVI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_INFO_PARMSW lpParms)
|
|||
LPCWSTR str = 0;
|
||||
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
||||
DWORD ret = 0;
|
||||
static const WCHAR wszAviPlayer[] = {'W','i','n','e','\'','s',' ','A','V','I',' ','p','l','a','y','e','r',0};
|
||||
static const WCHAR wszVersion[] = {'1','.','1',0};
|
||||
|
||||
if (lpParms == NULL || lpParms->lpstrReturn == NULL)
|
||||
return MCIERR_NULL_PARAMETER_BLOCK;
|
||||
|
@ -203,9 +201,9 @@ DWORD MCIAVI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_INFO_PARMSW lpParms)
|
|||
EnterCriticalSection(&wma->cs);
|
||||
|
||||
if (dwFlags & MCI_INFO_PRODUCT)
|
||||
str = wszAviPlayer;
|
||||
str = L"Wine's AVI player";
|
||||
else if (dwFlags & MCI_INFO_VERSION)
|
||||
str = wszVersion;
|
||||
str = L"1.1";
|
||||
else if (dwFlags & MCI_INFO_FILE)
|
||||
str = wma->lpFileName;
|
||||
else {
|
||||
|
@ -213,9 +211,8 @@ DWORD MCIAVI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_INFO_PARMSW lpParms)
|
|||
ret = MCIERR_UNRECOGNIZED_COMMAND;
|
||||
}
|
||||
if (!ret) {
|
||||
WCHAR zero = 0;
|
||||
/* Only mciwave, mciseq and mcicda set dwRetSize (since NT). */
|
||||
lstrcpynW(lpParms->lpstrReturn, str ? str : &zero, lpParms->dwRetSize);
|
||||
lstrcpynW(lpParms->lpstrReturn, str ? str : L"", lpParms->dwRetSize);
|
||||
}
|
||||
LeaveCriticalSection(&wma->cs);
|
||||
return ret;
|
||||
|
|
|
@ -71,7 +71,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
|||
static DWORD MCIAVI_drvOpen(LPCWSTR str, LPMCI_OPEN_DRIVER_PARMSW modp)
|
||||
{
|
||||
WINE_MCIAVI* wma;
|
||||
static const WCHAR mciAviWStr[] = {'M','C','I','A','V','I',0};
|
||||
|
||||
TRACE("%s, %p\n", debugstr_w(str), modp);
|
||||
|
||||
|
@ -88,7 +87,7 @@ static DWORD MCIAVI_drvOpen(LPCWSTR str, LPMCI_OPEN_DRIVER_PARMSW modp)
|
|||
wma->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": WINE_MCIAVI.cs");
|
||||
wma->hStopEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
|
||||
wma->wDevID = modp->wDeviceID;
|
||||
wma->wCommandTable = mciLoadCommandResource(MCIAVI_hInstance, mciAviWStr, 0);
|
||||
wma->wCommandTable = mciLoadCommandResource(MCIAVI_hInstance, L"MCIAVI", 0);
|
||||
wma->dwStatus = MCI_MODE_NOT_READY;
|
||||
modp->wCustomCommandTable = wma->wCommandTable;
|
||||
modp->wType = MCI_DEVTYPE_DIGITAL_VIDEO;
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(mciavi);
|
||||
|
||||
static const WCHAR mciaviW[] = {'M','C','I','A','V','I',0};
|
||||
|
||||
static LRESULT WINAPI MCIAVI_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", hWnd, uMsg, wParam, lParam);
|
||||
|
@ -87,7 +85,7 @@ static LRESULT WINAPI MCIAVI_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPA
|
|||
|
||||
BOOL MCIAVI_UnregisterClass(void)
|
||||
{
|
||||
return UnregisterClassW(mciaviW, MCIAVI_hInstance);
|
||||
return UnregisterClassW(L"MCIAVI", MCIAVI_hInstance);
|
||||
}
|
||||
|
||||
BOOL MCIAVI_RegisterClass(void)
|
||||
|
@ -101,7 +99,7 @@ BOOL MCIAVI_RegisterClass(void)
|
|||
wndClass.hInstance = MCIAVI_hInstance;
|
||||
wndClass.hCursor = LoadCursorW(0, (LPCWSTR)IDC_ARROW);
|
||||
wndClass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
|
||||
wndClass.lpszClassName = mciaviW;
|
||||
wndClass.lpszClassName = L"MCIAVI";
|
||||
|
||||
if (RegisterClassW(&wndClass)) return TRUE;
|
||||
if (GetLastError() == ERROR_CLASS_ALREADY_EXISTS) return TRUE;
|
||||
|
@ -111,7 +109,6 @@ BOOL MCIAVI_RegisterClass(void)
|
|||
|
||||
BOOL MCIAVI_CreateWindow(WINE_MCIAVI* wma, DWORD dwFlags, LPMCI_DGV_OPEN_PARMSW lpParms)
|
||||
{
|
||||
static const WCHAR captionW[] = {'W','i','n','e',' ','M','C','I','-','A','V','I',' ','p','l','a','y','e','r',0};
|
||||
HWND hParent = 0;
|
||||
DWORD dwStyle = WS_OVERLAPPEDWINDOW;
|
||||
RECT rc;
|
||||
|
@ -135,10 +132,8 @@ BOOL MCIAVI_CreateWindow(WINE_MCIAVI* wma, DWORD dwFlags, LPMCI_DGV_OPEN_PARM
|
|||
rc.left = rc.top = CW_USEDEFAULT;
|
||||
}
|
||||
|
||||
wma->hWnd = CreateWindowW(mciaviW, captionW,
|
||||
dwStyle, rc.left, rc.top,
|
||||
rc.right, rc.bottom,
|
||||
hParent, 0, MCIAVI_hInstance,
|
||||
wma->hWnd = CreateWindowW(L"MCIAVI", L"Wine MCI-AVI player", dwStyle, rc.left, rc.top,
|
||||
rc.right, rc.bottom, hParent, 0, MCIAVI_hInstance,
|
||||
ULongToPtr(wma->wDevID));
|
||||
wma->hWndPaint = wma->hWnd;
|
||||
|
||||
|
|
Loading…
Reference in New Issue