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
69e612c5
Commit
69e612c5
authored
Oct 03, 2020
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mciavi32: Use wide-char string literals.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1d17d8d4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
17 deletions
+8
-17
info.c
dlls/mciavi32/info.c
+3
-6
mciavi.c
dlls/mciavi32/mciavi.c
+1
-2
wnd.c
dlls/mciavi32/wnd.c
+4
-9
No files found.
dlls/mciavi32/info.c
View file @
69e612c5
...
@@ -190,8 +190,6 @@ DWORD MCIAVI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_INFO_PARMSW lpParms)
...
@@ -190,8 +190,6 @@ DWORD MCIAVI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_INFO_PARMSW lpParms)
LPCWSTR
str
=
0
;
LPCWSTR
str
=
0
;
WINE_MCIAVI
*
wma
=
MCIAVI_mciGetOpenDev
(
wDevID
);
WINE_MCIAVI
*
wma
=
MCIAVI_mciGetOpenDev
(
wDevID
);
DWORD
ret
=
0
;
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
)
if
(
lpParms
==
NULL
||
lpParms
->
lpstrReturn
==
NULL
)
return
MCIERR_NULL_PARAMETER_BLOCK
;
return
MCIERR_NULL_PARAMETER_BLOCK
;
...
@@ -203,9 +201,9 @@ DWORD MCIAVI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_INFO_PARMSW lpParms)
...
@@ -203,9 +201,9 @@ DWORD MCIAVI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_INFO_PARMSW lpParms)
EnterCriticalSection
(
&
wma
->
cs
);
EnterCriticalSection
(
&
wma
->
cs
);
if
(
dwFlags
&
MCI_INFO_PRODUCT
)
if
(
dwFlags
&
MCI_INFO_PRODUCT
)
str
=
wszAviPlayer
;
str
=
L"Wine's AVI player"
;
else
if
(
dwFlags
&
MCI_INFO_VERSION
)
else
if
(
dwFlags
&
MCI_INFO_VERSION
)
str
=
wszVersion
;
str
=
L"1.1"
;
else
if
(
dwFlags
&
MCI_INFO_FILE
)
else
if
(
dwFlags
&
MCI_INFO_FILE
)
str
=
wma
->
lpFileName
;
str
=
wma
->
lpFileName
;
else
{
else
{
...
@@ -213,9 +211,8 @@ DWORD MCIAVI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_INFO_PARMSW lpParms)
...
@@ -213,9 +211,8 @@ DWORD MCIAVI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_INFO_PARMSW lpParms)
ret
=
MCIERR_UNRECOGNIZED_COMMAND
;
ret
=
MCIERR_UNRECOGNIZED_COMMAND
;
}
}
if
(
!
ret
)
{
if
(
!
ret
)
{
WCHAR
zero
=
0
;
/* Only mciwave, mciseq and mcicda set dwRetSize (since NT). */
/* 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
);
LeaveCriticalSection
(
&
wma
->
cs
);
return
ret
;
return
ret
;
...
...
dlls/mciavi32/mciavi.c
View file @
69e612c5
...
@@ -71,7 +71,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
...
@@ -71,7 +71,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
static
DWORD
MCIAVI_drvOpen
(
LPCWSTR
str
,
LPMCI_OPEN_DRIVER_PARMSW
modp
)
static
DWORD
MCIAVI_drvOpen
(
LPCWSTR
str
,
LPMCI_OPEN_DRIVER_PARMSW
modp
)
{
{
WINE_MCIAVI
*
wma
;
WINE_MCIAVI
*
wma
;
static
const
WCHAR
mciAviWStr
[]
=
{
'M'
,
'C'
,
'I'
,
'A'
,
'V'
,
'I'
,
0
};
TRACE
(
"%s, %p
\n
"
,
debugstr_w
(
str
),
modp
);
TRACE
(
"%s, %p
\n
"
,
debugstr_w
(
str
),
modp
);
...
@@ -88,7 +87,7 @@ static DWORD MCIAVI_drvOpen(LPCWSTR str, LPMCI_OPEN_DRIVER_PARMSW 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
->
cs
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": WINE_MCIAVI.cs"
);
wma
->
hStopEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
wma
->
hStopEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
wma
->
wDevID
=
modp
->
wDeviceID
;
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
;
wma
->
dwStatus
=
MCI_MODE_NOT_READY
;
modp
->
wCustomCommandTable
=
wma
->
wCommandTable
;
modp
->
wCustomCommandTable
=
wma
->
wCommandTable
;
modp
->
wType
=
MCI_DEVTYPE_DIGITAL_VIDEO
;
modp
->
wType
=
MCI_DEVTYPE_DIGITAL_VIDEO
;
...
...
dlls/mciavi32/wnd.c
View file @
69e612c5
...
@@ -25,8 +25,6 @@
...
@@ -25,8 +25,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mciavi
);
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
)
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
);
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
...
@@ -87,7 +85,7 @@ static LRESULT WINAPI MCIAVI_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPA
BOOL
MCIAVI_UnregisterClass
(
void
)
BOOL
MCIAVI_UnregisterClass
(
void
)
{
{
return
UnregisterClassW
(
mciaviW
,
MCIAVI_hInstance
);
return
UnregisterClassW
(
L"MCIAVI"
,
MCIAVI_hInstance
);
}
}
BOOL
MCIAVI_RegisterClass
(
void
)
BOOL
MCIAVI_RegisterClass
(
void
)
...
@@ -101,7 +99,7 @@ BOOL MCIAVI_RegisterClass(void)
...
@@ -101,7 +99,7 @@ BOOL MCIAVI_RegisterClass(void)
wndClass
.
hInstance
=
MCIAVI_hInstance
;
wndClass
.
hInstance
=
MCIAVI_hInstance
;
wndClass
.
hCursor
=
LoadCursorW
(
0
,
(
LPCWSTR
)
IDC_ARROW
);
wndClass
.
hCursor
=
LoadCursorW
(
0
,
(
LPCWSTR
)
IDC_ARROW
);
wndClass
.
hbrBackground
=
(
HBRUSH
)(
COLOR_3DFACE
+
1
);
wndClass
.
hbrBackground
=
(
HBRUSH
)(
COLOR_3DFACE
+
1
);
wndClass
.
lpszClassName
=
mciaviW
;
wndClass
.
lpszClassName
=
L"MCIAVI"
;
if
(
RegisterClassW
(
&
wndClass
))
return
TRUE
;
if
(
RegisterClassW
(
&
wndClass
))
return
TRUE
;
if
(
GetLastError
()
==
ERROR_CLASS_ALREADY_EXISTS
)
return
TRUE
;
if
(
GetLastError
()
==
ERROR_CLASS_ALREADY_EXISTS
)
return
TRUE
;
...
@@ -111,7 +109,6 @@ BOOL MCIAVI_RegisterClass(void)
...
@@ -111,7 +109,6 @@ BOOL MCIAVI_RegisterClass(void)
BOOL
MCIAVI_CreateWindow
(
WINE_MCIAVI
*
wma
,
DWORD
dwFlags
,
LPMCI_DGV_OPEN_PARMSW
lpParms
)
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
;
HWND
hParent
=
0
;
DWORD
dwStyle
=
WS_OVERLAPPEDWINDOW
;
DWORD
dwStyle
=
WS_OVERLAPPEDWINDOW
;
RECT
rc
;
RECT
rc
;
...
@@ -135,10 +132,8 @@ BOOL MCIAVI_CreateWindow(WINE_MCIAVI* wma, DWORD dwFlags, LPMCI_DGV_OPEN_PARM
...
@@ -135,10 +132,8 @@ BOOL MCIAVI_CreateWindow(WINE_MCIAVI* wma, DWORD dwFlags, LPMCI_DGV_OPEN_PARM
rc
.
left
=
rc
.
top
=
CW_USEDEFAULT
;
rc
.
left
=
rc
.
top
=
CW_USEDEFAULT
;
}
}
wma
->
hWnd
=
CreateWindowW
(
mciaviW
,
captionW
,
wma
->
hWnd
=
CreateWindowW
(
L"MCIAVI"
,
L"Wine MCI-AVI player"
,
dwStyle
,
rc
.
left
,
rc
.
top
,
dwStyle
,
rc
.
left
,
rc
.
top
,
rc
.
right
,
rc
.
bottom
,
hParent
,
0
,
MCIAVI_hInstance
,
rc
.
right
,
rc
.
bottom
,
hParent
,
0
,
MCIAVI_hInstance
,
ULongToPtr
(
wma
->
wDevID
));
ULongToPtr
(
wma
->
wDevID
));
wma
->
hWndPaint
=
wma
->
hWnd
;
wma
->
hWndPaint
=
wma
->
hWnd
;
...
...
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