Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
August 2019
- 66 participants
- 1339 messages
[PATCH v4 4/6] winex11.drv: Do not set clipping_cursor when clip window map state changes
by Rémi Bernon
This flag should only indicate a successful call to XGrabPointer. If not
then we could assume we have ownership of the pointer when we don't.
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/winex11.drv/event.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index 59ab4ce4ce3..90f139dd0fa 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -986,7 +986,6 @@ static BOOL X11DRV_MapNotify( HWND hwnd, XEvent *event )
if (event->xany.window == x11drv_thread_data()->clip_window)
{
- clipping_cursor = TRUE;
return TRUE;
}
if (!(data = get_win_data( hwnd ))) return FALSE;
@@ -1007,8 +1006,6 @@ static BOOL X11DRV_MapNotify( HWND hwnd, XEvent *event )
*/
static BOOL X11DRV_UnmapNotify( HWND hwnd, XEvent *event )
{
- if (event->xany.window == x11drv_thread_data()->clip_window)
- clipping_cursor = FALSE;
return TRUE;
}
--
2.23.0.rc1
Aug. 30, 2019
[PATCH v4 3/6] winex11.drv: Retry last ClipCursor when grab is released
by Rémi Bernon
As we ignore these NotifyGrab / NotifyUngrab w.r.t focus decisions,
some applications are unaware of mouse grabs being lost and sometimes
cursor clipping is lost. We have to keep the last clip rectangle and
restore it when grab is released.
This has been squashed with the foreground window check from
Zhiyi Zhang <zzhang(a)codeweavers.com> to fix an issue that happens when
switching from a fullscreen window - because there's some additional
focus events involved - but in general, if the window that is getting
focus cannot be activated:
When FocusIn/NotifyWhileGrabbed is received, SetForegroundWindow is not
called if the window cannot be activated. When the FocusIn/NotifyUngrab
event arrives for the same window, we have to check the foreground
window before restoring cursor clipping rectangle.
For reference, the event sequence when pressing Alt-Tab - for WMs that
grab the keyboard - is the following:
1. FocusOut/NotifyGrab, when WM grabs the keyboard.
2. FocusOut/NotifyWhileGrabbed, while WM switches windows, this calls
SetForegroundWindow(GetDesktopWindow()).
The event sequence for normal windows ends here, but for fullscreen
windows, there may be these additional events:
3. FocusIn/NotifyWhileGrabbed, which may not change Wine foreground
window if it cannot be activated.
4. FocusIn/NotifyUnGrab, when WM releases the keyboard while switching
windows, this is ignored but it should not retry to grab the cursor,
because window is not foreground.
5. FocusOut/NotifyNormal, when WM finishes switching the windows.
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/winex11.drv/event.c | 8 ++++++++
dlls/winex11.drv/mouse.c | 24 ++++++++++++++++++++++++
dlls/winex11.drv/x11drv.h | 1 +
3 files changed, 33 insertions(+)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index 447aa5000ca..59ab4ce4ce3 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -788,6 +788,7 @@ static BOOL X11DRV_FocusIn( HWND hwnd, XEvent *xev )
break;
case NotifyUngrab:
keyboard_grabbed = FALSE;
+ retry_grab_clipping_window();
return TRUE; /* ignore wm specific NotifyUngrab / NotifyGrab events w.r.t focus */
}
@@ -888,6 +889,13 @@ static BOOL X11DRV_FocusOut( HWND hwnd, XEvent *xev )
break;
case NotifyGrab:
keyboard_grabbed = TRUE;
+
+ /* This will do nothing due to keyboard_grabbed == TRUE, but it
+ * will save the current clipping rect so we can restore it on
+ * FocusIn with NotifyUngrab mode.
+ */
+ retry_grab_clipping_window();
+
return TRUE; /* ignore wm specific NotifyUngrab / NotifyGrab events w.r.t focus */
}
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index a268cd9b341..97e2935103f 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -125,6 +125,9 @@ XContext cursor_context = 0;
static HWND cursor_window;
static HCURSOR last_cursor;
static DWORD last_cursor_change;
+static RECT last_clip_rect;
+static HWND last_clip_foreground_window;
+static BOOL last_clip_refused;
static RECT clip_rect;
static Cursor create_cursor( HANDLE handle );
@@ -395,8 +398,15 @@ static BOOL grab_clipping_window( const RECT *clip )
if (keyboard_grabbed)
{
WARN( "refusing to clip to %s\n", wine_dbgstr_rect(clip) );
+ last_clip_refused = TRUE;
+ last_clip_foreground_window = GetForegroundWindow();
+ last_clip_rect = *clip;
return FALSE;
}
+ else
+ {
+ last_clip_refused = FALSE;
+ }
/* enable XInput2 unless we are already clipping */
if (!data->clip_hwnd) enable_xinput2();
@@ -470,6 +480,20 @@ void reset_clipping_window(void)
ClipCursor( NULL ); /* make sure the clip rectangle is reset too */
}
+/***********************************************************************
+ * retry_grab_clipping_window
+ *
+ * Restore the current clip rectangle or retry the last one if it has
+ * been refused because of an active keyboard grab.
+ */
+void retry_grab_clipping_window(void)
+{
+ if (clipping_cursor)
+ ClipCursor( &clip_rect );
+ else if (last_clip_refused && GetForegroundWindow() == last_clip_foreground_window)
+ ClipCursor( &last_clip_rect );
+}
+
BOOL CDECL X11DRV_ClipCursor( const RECT *clip );
/***********************************************************************
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 8418caea0c0..d4e476facb2 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -624,6 +624,7 @@ extern void sync_window_cursor( Window window ) DECLSPEC_HIDDEN;
extern LRESULT clip_cursor_notify( HWND hwnd, HWND new_clip_hwnd ) DECLSPEC_HIDDEN;
extern void ungrab_clipping_window(void) DECLSPEC_HIDDEN;
extern void reset_clipping_window(void) DECLSPEC_HIDDEN;
+extern void retry_grab_clipping_window(void) DECLSPEC_HIDDEN;
extern BOOL clip_fullscreen_window( HWND hwnd, BOOL reset ) DECLSPEC_HIDDEN;
extern void move_resize_window( HWND hwnd, int dir ) DECLSPEC_HIDDEN;
extern void X11DRV_InitKeyboard( Display *display ) DECLSPEC_HIDDEN;
--
2.23.0.rc1
Aug. 30, 2019
[PATCH v4 2/6] winex11.drv: Only grab or warp the cursor when keyboard isn't grabbed
by Rémi Bernon
When the window manager has taken a keyboard grab, it may be going to
move the window itself, so the application should not move the cursor
at the same time.
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/winex11.drv/event.c | 9 +++++++++
dlls/winex11.drv/mouse.c | 12 ++++++++++++
dlls/winex11.drv/x11drv.h | 1 +
3 files changed, 22 insertions(+)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index ff4cbb2157c..447aa5000ca 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -155,6 +155,9 @@ static const char * event_names[MAX_EVENT_HANDLERS] =
"SelectionNotify", "ColormapNotify", "ClientMessage", "MappingNotify", "GenericEvent"
};
+/* is someone else grabbing the keyboard, for example the WM, when manipulating the window */
+BOOL keyboard_grabbed = FALSE;
+
int xinput2_opcode = 0;
/* return the name of an X event */
@@ -778,10 +781,13 @@ static BOOL X11DRV_FocusIn( HWND hwnd, XEvent *xev )
WARN( "unexpected FocusIn event with NotifyGrab mode\n" );
break;
case NotifyWhileGrabbed:
+ keyboard_grabbed = TRUE;
break;
case NotifyNormal:
+ keyboard_grabbed = FALSE;
break;
case NotifyUngrab:
+ keyboard_grabbed = FALSE;
return TRUE; /* ignore wm specific NotifyUngrab / NotifyGrab events w.r.t focus */
}
@@ -875,10 +881,13 @@ static BOOL X11DRV_FocusOut( HWND hwnd, XEvent *xev )
WARN( "unexpected FocusOut event with NotifyUngrab mode\n" );
break;
case NotifyNormal:
+ keyboard_grabbed = FALSE;
break;
case NotifyWhileGrabbed:
+ keyboard_grabbed = TRUE;
break;
case NotifyGrab:
+ keyboard_grabbed = TRUE;
return TRUE; /* ignore wm specific NotifyUngrab / NotifyGrab events w.r.t focus */
}
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index f737a306a56..a268cd9b341 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -392,6 +392,12 @@ static BOOL grab_clipping_window( const RECT *clip )
GetModuleHandleW(0), NULL )))
return TRUE;
+ if (keyboard_grabbed)
+ {
+ WARN( "refusing to clip to %s\n", wine_dbgstr_rect(clip) );
+ return FALSE;
+ }
+
/* enable XInput2 unless we are already clipping */
if (!data->clip_hwnd) enable_xinput2();
@@ -1430,6 +1436,12 @@ BOOL CDECL X11DRV_SetCursorPos( INT x, INT y )
struct x11drv_thread_data *data = x11drv_init_thread_data();
POINT pos = virtual_screen_to_root( x, y );
+ if (keyboard_grabbed)
+ {
+ WARN( "refusing to warp to %u, %u\n", pos.x, pos.y );
+ return FALSE;
+ }
+
XWarpPointer( data->display, root_window, root_window, 0, 0, 0, 0, pos.x, pos.y );
data->warp_serial = NextRequest( data->display );
XNoOp( data->display );
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 0d3695bdcf8..8418caea0c0 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -382,6 +382,7 @@ extern Colormap default_colormap DECLSPEC_HIDDEN;
extern XPixmapFormatValues **pixmap_formats DECLSPEC_HIDDEN;
extern Window root_window DECLSPEC_HIDDEN;
extern BOOL clipping_cursor DECLSPEC_HIDDEN;
+extern BOOL keyboard_grabbed DECLSPEC_HIDDEN;
extern unsigned int screen_bpp DECLSPEC_HIDDEN;
extern BOOL use_xkb DECLSPEC_HIDDEN;
extern BOOL usexrandr DECLSPEC_HIDDEN;
--
2.23.0.rc1
Aug. 30, 2019
[PATCH v4 1/6] winex11.drv: Do not react to keyboard grab focus events
by Rémi Bernon
Several window managers are sending FocusOut with NotifyGrab mode
then FocusOut with NotifyWhileGrabbed mode when a window focus is lost,
as a consequence of grabbing the keyboard input before changing window
focus.
This is the case during alt-tab, but keyboard can also be grabbed when
bringing activity view or clicking on the title bar. In this cases
NotifyWhileGrabbed events aren't sent until the window really loses
foreground.
In the same manner, when focus is restored, they usually send FocusIn
with NotifyWhileGrabbed mode followed by FocusIn with NotifyUngrab mode
when the keyboard grab is released.
When bringing activity view back and forth, or clicking on the title
bar, only NotifyUngrab event will be sent.
In order to be consistent across WM and to help simplifying focus
handling, just ignore focus events related to keyboard grabs.
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/winex11.drv/event.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index edeae7caff0..ff4cbb2157c 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -772,6 +772,19 @@ static BOOL X11DRV_FocusIn( HWND hwnd, XEvent *xev )
if (event->detail == NotifyPointer) return FALSE;
if (hwnd == GetDesktopWindow()) return FALSE;
+ switch (event->mode)
+ {
+ case NotifyGrab:
+ WARN( "unexpected FocusIn event with NotifyGrab mode\n" );
+ break;
+ case NotifyWhileGrabbed:
+ break;
+ case NotifyNormal:
+ break;
+ case NotifyUngrab:
+ return TRUE; /* ignore wm specific NotifyUngrab / NotifyGrab events w.r.t focus */
+ }
+
if ((xic = X11DRV_get_ic( hwnd ))) XSetICFocus( xic );
if (use_take_focus)
{
@@ -855,6 +868,20 @@ static BOOL X11DRV_FocusOut( HWND hwnd, XEvent *xev )
return TRUE;
}
if (!hwnd) return FALSE;
+
+ switch (event->mode)
+ {
+ case NotifyUngrab:
+ WARN( "unexpected FocusOut event with NotifyUngrab mode\n" );
+ break;
+ case NotifyNormal:
+ break;
+ case NotifyWhileGrabbed:
+ break;
+ case NotifyGrab:
+ return TRUE; /* ignore wm specific NotifyUngrab / NotifyGrab events w.r.t focus */
+ }
+
focus_out( event->display, hwnd );
return TRUE;
}
--
2.23.0.rc1
Aug. 30, 2019
[PATCH v4 0/6] winex11.drv: Fix several cursor and focus issues
by Rémi Bernon
Resending these here after iterating a bit in background for further
discussion.
I squashed a fix from Zhiyi Zhang <zzhang(a)codeweavers.com> in PATCH 3/6.
Rémi Bernon (6):
winex11.drv: Do not react to keyboard grab focus events
winex11.drv: Only grab or warp the cursor when keyboard isn't grabbed
winex11.drv: Retry last ClipCursor when grab is released
winex11.drv: Do not set clipping_cursor when clip window map state
changes
winex11.drv: Explicitly call XUngrabPointer when clipping is released
winex11.drv: Only call XWarpPointer if we can get exclusive pointer
grab
dlls/winex11.drv/event.c | 47 +++++++++++++++++++++++++++++++++---
dlls/winex11.drv/mouse.c | 50 +++++++++++++++++++++++++++++++++++++++
dlls/winex11.drv/x11drv.h | 2 ++
3 files changed, 96 insertions(+), 3 deletions(-)
--
2.23.0.rc1
Aug. 30, 2019
[PATCH 4/4] localspl: Unload monitor in DeleteMonitor.
by Dmitry Timoshkov
Some print monitors are very sensitive to loads/unloads being done
in a quick succession like AddMonitor() does, and that even leads to
crashes because the monitor I have here creates a thread on load and
when the thread starts - the monitor dll is already unloaded.
A solution to this is moving the monitor unloading to DeleteMonitor.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/localspl/provider.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/localspl/provider.c b/dlls/localspl/provider.c
index 2b3f9bac6e..4f373392ae 100644
--- a/dlls/localspl/provider.c
+++ b/dlls/localspl/provider.c
@@ -1572,8 +1572,6 @@ static BOOL WINAPI fpAddMonitor(LPWSTR pName, DWORD Level, LPBYTE pMonitors)
if ((pm = monitor_load(mi2w->pName, mi2w->pDLLName)) == NULL)
res = FALSE;
- monitor_unload(pm);
-
RegCloseKey(hentry);
if (!res)
@@ -1890,6 +1888,7 @@ static BOOL WINAPI fpConfigurePort(LPWSTR pName, HWND hWnd, LPWSTR pPortName)
static BOOL WINAPI fpDeleteMonitor(LPWSTR pName, LPWSTR pEnvironment, LPWSTR pMonitorName)
{
+ monitor_t *pm;
HKEY hroot = NULL;
LONG lres;
@@ -1910,6 +1909,18 @@ static BOOL WINAPI fpDeleteMonitor(LPWSTR pName, LPWSTR pEnvironment, LPWSTR pMo
return FALSE;
}
+ /* Unload the monitor if it's loaded */
+ EnterCriticalSection(&monitor_handles_cs);
+ LIST_FOR_EACH_ENTRY(pm, &monitor_handles, monitor_t, entry)
+ {
+ if (pm->name && !lstrcmpW(pMonitorName, pm->name))
+ {
+ monitor_unload(pm);
+ break;
+ }
+ }
+ LeaveCriticalSection(&monitor_handles_cs);
+
if(RegCreateKeyW(HKEY_LOCAL_MACHINE, monitorsW, &hroot) != ERROR_SUCCESS) {
ERR("unable to create key %s\n", debugstr_w(monitorsW));
return FALSE;
--
2.20.1
Aug. 30, 2019
[PATCH 3/4] localspl: Add support for monitors providing the MONITOR2 interface.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/localspl/provider.c | 149 +++++++++++++++++++++++++++++----------
1 file changed, 111 insertions(+), 38 deletions(-)
diff --git a/dlls/localspl/provider.c b/dlls/localspl/provider.c
index 8e5e3428d5..2b3f9bac6e 100644
--- a/dlls/localspl/provider.c
+++ b/dlls/localspl/provider.c
@@ -66,9 +66,9 @@ typedef struct {
LPWSTR dllname;
PMONITORUI monitorUI;
LPMONITOR monitor;
+ LPMONITOR2 monitor2;
HMODULE hdll;
DWORD refcount;
- DWORD dwMonitorSize;
} monitor_t;
typedef struct {
@@ -327,6 +327,10 @@ static void monitor_unload(monitor_t * pm)
if (pm->refcount == 0) {
list_remove(&pm->entry);
+
+ if (pm->monitor2 && pm->monitor2->pfnShutdown)
+ pm->monitor2->pfnShutdown(0);
+
FreeLibrary(pm->hdll);
heap_free(pm->name);
heap_free(pm->dllname);
@@ -378,6 +382,7 @@ static monitor_t * monitor_load(LPCWSTR name, LPWSTR dllname)
monitor_t * cursor;
LPWSTR regroot = NULL;
LPWSTR driver = dllname;
+ HKEY hroot = 0;
TRACE("(%s, %s)\n", debugstr_w(name), debugstr_w(dllname));
/* Is the Monitor already loaded? */
@@ -402,7 +407,6 @@ static monitor_t * monitor_load(LPCWSTR name, LPWSTR dllname)
if (pm->name == NULL) {
/* Load the monitor */
- LPMONITOREX pmonitorEx;
DWORD len;
if (name) {
@@ -413,19 +417,19 @@ static monitor_t * monitor_load(LPCWSTR name, LPWSTR dllname)
if (regroot) {
lstrcpyW(regroot, monitorsW);
lstrcatW(regroot, name);
- /* Get the Driver from the Registry */
- if (driver == NULL) {
- HKEY hroot;
- DWORD namesize;
- if (RegOpenKeyW(HKEY_LOCAL_MACHINE, regroot, &hroot) == ERROR_SUCCESS) {
+ if (RegOpenKeyW(HKEY_LOCAL_MACHINE, regroot, &hroot) == ERROR_SUCCESS) {
+ /* Get the Driver from the Registry */
+ if (driver == NULL) {
+ DWORD namesize;
if (RegQueryValueExW(hroot, driverW, NULL, NULL, NULL,
&namesize) == ERROR_SUCCESS) {
driver = heap_alloc(namesize);
RegQueryValueExW(hroot, driverW, NULL, NULL, (LPBYTE) driver, &namesize) ;
}
- RegCloseKey(hroot);
}
}
+ else
+ WARN("%s not found\n", debugstr_w(regroot));
}
pm->name = strdupW(name);
@@ -471,26 +475,30 @@ static monitor_t * monitor_load(LPCWSTR name, LPWSTR dllname)
}
}
- if (pInitializePrintMonitor && regroot) {
- pmonitorEx = pInitializePrintMonitor(regroot);
- TRACE("%p: LPMONITOREX from %s,InitializePrintMonitor(%s)\n",
- pmonitorEx, debugstr_w(driver), debugstr_w(regroot));
+ if (pInitializePrintMonitor2 && hroot) {
+ MONITORINIT init;
+ HANDLE hmon;
- if (pmonitorEx) {
- pm->dwMonitorSize = pmonitorEx->dwMonitorSize;
- pm->monitor = &(pmonitorEx->Monitor);
- }
- }
+ memset(&init, 0, sizeof(init));
+ init.cbSize = sizeof(init);
+ init.hckRegistryRoot = hroot;
+ init.bLocal = TRUE;
- if (pm->monitor) {
- TRACE("0x%08x: dwMonitorSize (%d)\n", pm->dwMonitorSize, pm->dwMonitorSize);
+ pm->monitor2 = pInitializePrintMonitor2(&init, &hmon);
+ TRACE("%p: MONITOR2 from %s,InitializePrintMonitor2(%s)\n",
+ pm->monitor2, debugstr_w(driver), debugstr_w(regroot));
+ }
+ else if (pInitializePrintMonitor && regroot) {
+ MONITOREX *pmonitorEx;
+ pmonitorEx = pInitializePrintMonitor(regroot);
+ TRACE("%p: LPMONITOREX from %s,InitializePrintMonitor(%s)\n",
+ pm->monitor, debugstr_w(driver), debugstr_w(regroot));
+ if (pmonitorEx)
+ pm->monitor = &pmonitorEx->Monitor;
}
- if (!pm->monitor && regroot) {
- if (pInitializePrintMonitor2 != NULL) {
- FIXME("%s,InitializePrintMonitor2 not implemented\n", debugstr_w(driver));
- }
+ if (!pm->monitor && !pm->monitor2 && regroot) {
if (pInitializeMonitorEx != NULL) {
FIXME("%s,InitializeMonitorEx not implemented\n", debugstr_w(driver));
}
@@ -498,7 +506,7 @@ static monitor_t * monitor_load(LPCWSTR name, LPWSTR dllname)
FIXME("%s,InitializeMonitor not implemented\n", debugstr_w(driver));
}
}
- if (!pm->monitor && !pm->monitorUI) {
+ if (!pm->monitor && !pm->monitor2 && !pm->monitorUI) {
monitor_unload(pm);
SetLastError(ERROR_PROC_NOT_FOUND);
pm = NULL;
@@ -511,6 +519,7 @@ cleanup:
}
LeaveCriticalSection(&monitor_handles_cs);
if (driver != dllname) heap_free(driver);
+ if (hroot) RegCloseKey(hroot);
heap_free(regroot);
TRACE("=> %p\n", pm);
return pm;
@@ -577,6 +586,18 @@ static monitor_t * monitor_loadui(monitor_t * pm)
}
/* query the userinterface-dllname from the Portmonitor */
+ if (pm->monitor2 && pm->monitor2->pfnXcvDataPort) {
+ res = pm->monitor2->pfnXcvOpenPort(0, emptyW, SERVER_ACCESS_ADMINISTER, &hXcv);
+ TRACE("got %u with %p\n", res, hXcv);
+ if (res) {
+ res = pm->monitor2->pfnXcvDataPort(hXcv, monitorUIW, NULL, 0, (BYTE *) buffer, sizeof(buffer), &len);
+ TRACE("got %u with %s\n", res, debugstr_w(buffer));
+ if (res == ERROR_SUCCESS) pui = monitor_load(NULL, buffer);
+ pm->monitor2->pfnXcvClosePort(hXcv);
+ }
+ return pui;
+ }
+
if ((pm->monitor) && (pm->monitor->pfnXcvDataPort)) {
/* building (",XcvMonitor %s",pm->name) not needed yet */
res = pm->monitor->pfnXcvOpenPort(emptyW, SERVER_ACCESS_ADMINISTER, &hXcv);
@@ -921,7 +942,6 @@ static DWORD get_ports_from_all_monitors(DWORD level, LPBYTE pPorts, DWORD cbBuf
DWORD numentries;
DWORD entrysize;
-
TRACE("(%d, %p, %d, %p)\n", level, pPorts, cbBuf, lpreturned);
entrysize = (level == 1) ? sizeof(PORT_INFO_1W) : sizeof(PORT_INFO_2W);
@@ -934,16 +954,23 @@ static DWORD get_ports_from_all_monitors(DWORD level, LPBYTE pPorts, DWORD cbBuf
LIST_FOR_EACH_ENTRY(pm, &monitor_handles, monitor_t, entry)
{
- if ((pm->monitor) && (pm->monitor->pfnEnumPorts)) {
+ BOOL (WINAPI *pEnumPorts)(LPWSTR,DWORD,LPBYTE,DWORD,LPDWORD,LPDWORD) = NULL;
+
+ if (pm->monitor2)
+ pEnumPorts = pm->monitor2->pfnEnumPorts;
+ else if (pm->monitor)
+ pEnumPorts = pm->monitor->pfnEnumPorts;
+
+ if (pEnumPorts) {
pi_needed = 0;
pi_returned = 0;
- res = pm->monitor->pfnEnumPorts(NULL, level, pi_buffer, pi_allocated, &pi_needed, &pi_returned);
+ res = pEnumPorts(NULL, level, pi_buffer, pi_allocated, &pi_needed, &pi_returned);
if (!res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER)) {
/* Do not use heap_realloc (we do not need the old data in the buffer) */
heap_free(pi_buffer);
pi_buffer = heap_alloc(pi_needed);
pi_allocated = (pi_buffer) ? pi_needed : 0;
- res = pm->monitor->pfnEnumPorts(NULL, level, pi_buffer, pi_allocated, &pi_needed, &pi_returned);
+ res = pEnumPorts(NULL, level, pi_buffer, pi_allocated, &pi_needed, &pi_returned);
}
TRACE("(%s) got %d with %d (need %d byte for %d entries)\n",
debugstr_w(pm->name), res, GetLastError(), pi_needed, pi_returned);
@@ -1144,7 +1171,12 @@ static HMODULE driver_load(const printenv_t * env, LPWSTR dllname)
static VOID printer_free(printer_t * printer)
{
if (printer->hXcv)
- printer->pm->monitor->pfnXcvClosePort(printer->hXcv);
+ {
+ if (printer->pm->monitor2)
+ printer->pm->monitor2->pfnXcvClosePort(printer->hXcv);
+ else if (printer->pm->monitor)
+ printer->pm->monitor->pfnXcvClosePort(printer->hXcv);
+ }
monitor_unload(printer->pm);
@@ -1224,11 +1256,14 @@ static HANDLE printer_alloc_handle(LPCWSTR name, LPPRINTER_DEFAULTSW pDefault)
}
if (printer->pm) {
- if ((printer->pm->monitor) && (printer->pm->monitor->pfnXcvOpenPort)) {
+ if (printer->pm->monitor2 && printer->pm->monitor2->pfnXcvOpenPort)
+ printer->pm->monitor2->pfnXcvOpenPort(0, &printername[len],
+ pDefault ? pDefault->DesiredAccess : 0,
+ &printer->hXcv);
+ else if (printer->pm->monitor && printer->pm->monitor->pfnXcvOpenPort)
printer->pm->monitor->pfnXcvOpenPort(&printername[len],
- pDefault ? pDefault->DesiredAccess : 0,
- &printer->hXcv);
- }
+ pDefault ? pDefault->DesiredAccess : 0,
+ &printer->hXcv);
if (printer->hXcv == NULL) {
printer_free(printer);
SetLastError(ERROR_INVALID_PARAMETER);
@@ -1587,7 +1622,13 @@ static BOOL WINAPI fpAddPort(LPWSTR pName, HWND hWnd, LPWSTR pMonitorName)
}
pm = monitor_load(pMonitorName, NULL);
- if (pm && pm->monitor && pm->monitor->pfnAddPort) {
+ if (!pm) return FALSE;
+
+ if (pm->monitor2 && pm->monitor2->pfnAddPort) {
+ res = pm->monitor2->pfnAddPort(pName, hWnd, pMonitorName);
+ TRACE("got %d with %u (%s)\n", res, GetLastError(), debugstr_w(pm->dllname));
+ }
+ else if (pm->monitor && pm->monitor->pfnAddPort) {
res = pm->monitor->pfnAddPort(pName, hWnd, pMonitorName);
TRACE("got %d with %u (%s)\n", res, GetLastError(), debugstr_w(pm->dllname));
}
@@ -1664,7 +1705,15 @@ static BOOL WINAPI fpAddPortEx(LPWSTR pName, DWORD level, LPBYTE pBuffer, LPWSTR
/* load the Monitor */
pm = monitor_load(pMonitorName, NULL);
- if (pm && pm->monitor && pm->monitor->pfnAddPortEx) {
+ if (!pm) return FALSE;
+
+ if (pm->monitor2 && pm->monitor2->pfnAddPortEx)
+ {
+ res = pm->monitor2->pfnAddPortEx(pName, level, pBuffer, pMonitorName);
+ TRACE("got %d with %u (%s)\n", res, GetLastError(), debugstr_w(pm->dllname));
+ }
+ else if (pm->monitor && pm->monitor->pfnAddPortEx)
+ {
res = pm->monitor->pfnAddPortEx(pName, level, pBuffer, pMonitorName);
TRACE("got %d with %u (%s)\n", res, GetLastError(), debugstr_w(pm->dllname));
}
@@ -1778,7 +1827,17 @@ static BOOL WINAPI fpConfigurePort(LPWSTR pName, HWND hWnd, LPWSTR pPortName)
}
pm = monitor_load_by_port(pPortName);
- if (pm && pm->monitor && pm->monitor->pfnConfigurePort) {
+ if (!pm) return FALSE;
+
+ if (pm->monitor2 && pm->monitor2->pfnConfigurePort)
+ {
+ TRACE("use %s for %s (monitor %p: %s)\n", debugstr_w(pm->name),
+ debugstr_w(pPortName), pm, debugstr_w(pm->dllname));
+ res = pm->monitor2->pfnConfigurePort(pName, hWnd, pPortName);
+ TRACE("got %d with %u\n", res, GetLastError());
+ }
+ else if (pm->monitor && pm->monitor->pfnConfigurePort)
+ {
TRACE("use %s for %s (monitor %p: %s)\n", debugstr_w(pm->name),
debugstr_w(pPortName), pm, debugstr_w(pm->dllname));
res = pm->monitor->pfnConfigurePort(pName, hWnd, pPortName);
@@ -1908,7 +1967,17 @@ static BOOL WINAPI fpDeletePort(LPWSTR pName, HWND hWnd, LPWSTR pPortName)
}
pm = monitor_load_by_port(pPortName);
- if (pm && pm->monitor && pm->monitor->pfnDeletePort) {
+ if (!pm) return FALSE;
+
+ if (pm->monitor2 && pm->monitor2->pfnDeletePort)
+ {
+ TRACE("use %s for %s (monitor %p: %s)\n", debugstr_w(pm->name),
+ debugstr_w(pPortName), pm, debugstr_w(pm->dllname));
+ res = pm->monitor2->pfnDeletePort(pName, hWnd, pPortName);
+ TRACE("got %d with %u\n", res, GetLastError());
+ }
+ else if (pm->monitor && pm->monitor->pfnDeletePort)
+ {
TRACE("use %s for %s (monitor %p: %s)\n", debugstr_w(pm->name),
debugstr_w(pPortName), pm, debugstr_w(pm->dllname));
res = pm->monitor->pfnDeletePort(pName, hWnd, pPortName);
@@ -2338,7 +2407,11 @@ static BOOL WINAPI fpXcvData(HANDLE hXcv, LPCWSTR pszDataName, PBYTE pInputData,
*pcbOutputNeeded = 0;
- *pdwStatus = printer->pm->monitor->pfnXcvDataPort(printer->hXcv, pszDataName,
+ if (printer->pm->monitor2)
+ *pdwStatus = printer->pm->monitor2->pfnXcvDataPort(printer->hXcv, pszDataName,
+ pInputData, cbInputData, pOutputData, cbOutputData, pcbOutputNeeded);
+ else if (printer->pm->monitor)
+ *pdwStatus = printer->pm->monitor->pfnXcvDataPort(printer->hXcv, pszDataName,
pInputData, cbInputData, pOutputData, cbOutputData, pcbOutputNeeded);
return TRUE;
--
2.20.1
Aug. 30, 2019
[PATCH 2/4] localspl: AddMonitor should create registry entry for a monitor before initializing it.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/localspl/provider.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/dlls/localspl/provider.c b/dlls/localspl/provider.c
index ccd19811cf..8e5e3428d5 100644
--- a/dlls/localspl/provider.c
+++ b/dlls/localspl/provider.c
@@ -1499,12 +1499,6 @@ static BOOL WINAPI fpAddMonitor(LPWSTR pName, DWORD Level, LPBYTE pMonitors)
return FALSE;
}
- /* Load and initialize the monitor. SetLastError() is called on failure */
- if ((pm = monitor_load(mi2w->pName, mi2w->pDLLName)) == NULL) {
- return FALSE;
- }
- monitor_unload(pm);
-
SetLastError(ERROR_SUCCESS); /* Monitor installer depends on this */
if (RegCreateKeyW(HKEY_LOCAL_MACHINE, monitorsW, &hroot) != ERROR_SUCCESS) {
@@ -1538,7 +1532,17 @@ static BOOL WINAPI fpAddMonitor(LPWSTR pName, DWORD Level, LPBYTE pMonitors)
res = (RegSetValueExW(hentry, driverW, 0, REG_SZ,
(LPBYTE) mi2w->pDLLName, len) == ERROR_SUCCESS);
}
+
+ /* Load and initialize the monitor. SetLastError() is called on failure */
+ if ((pm = monitor_load(mi2w->pName, mi2w->pDLLName)) == NULL)
+ res = FALSE;
+
+ monitor_unload(pm);
+
RegCloseKey(hentry);
+
+ if (!res)
+ RegDeleteKeyW(hroot, mi2w->pName);
}
RegCloseKey(hroot);
--
2.20.1
Aug. 30, 2019
[PATCH 1/4] localspl: Remove useless NULL checks from AddMonitor trace.
by Dmitry Timoshkov
AddMonitor dereferences pMonitors later without any checks.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/localspl/provider.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/localspl/provider.c b/dlls/localspl/provider.c
index cb31b194ae..ccd19811cf 100644
--- a/dlls/localspl/provider.c
+++ b/dlls/localspl/provider.c
@@ -1475,9 +1475,7 @@ static BOOL WINAPI fpAddMonitor(LPWSTR pName, DWORD Level, LPBYTE pMonitors)
mi2w = (LPMONITOR_INFO_2W) pMonitors;
TRACE("(%s, %d, %p): %s %s %s\n", debugstr_w(pName), Level, pMonitors,
- debugstr_w(mi2w ? mi2w->pName : NULL),
- debugstr_w(mi2w ? mi2w->pEnvironment : NULL),
- debugstr_w(mi2w ? mi2w->pDLLName : NULL));
+ debugstr_w(mi2w->pName), debugstr_w(mi2w->pEnvironment), debugstr_w(mi2w->pDLLName));
if (copy_servername_from_name(pName, NULL)) {
FIXME("server %s not supported\n", debugstr_w(pName));
--
2.20.1
Aug. 30, 2019
[PATCH v2 5/5] amstream: Get rid of the IAMMultiMediaStreamImpl typedef.
by Zebediah Figura
From: Zebediah Figura <zfigura(a)codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/amstream/multimedia.c | 52 +++++++++++++++++++-------------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/dlls/amstream/multimedia.c b/dlls/amstream/multimedia.c
index 003d2b47a64..47753512810 100644
--- a/dlls/amstream/multimedia.c
+++ b/dlls/amstream/multimedia.c
@@ -30,7 +30,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(amstream);
-typedef struct {
+struct multimedia_stream
+{
IAMMultiMediaStream IAMMultiMediaStream_iface;
LONG ref;
IGraphBuilder* pFilterGraph;
@@ -42,18 +43,18 @@ typedef struct {
IAMMediaStream **pStreams;
STREAM_TYPE StreamType;
OAEVENT event;
-} IAMMultiMediaStreamImpl;
+};
-static inline IAMMultiMediaStreamImpl *impl_from_IAMMultiMediaStream(IAMMultiMediaStream *iface)
+static inline struct multimedia_stream *impl_from_IAMMultiMediaStream(IAMMultiMediaStream *iface)
{
- return CONTAINING_RECORD(iface, IAMMultiMediaStreamImpl, IAMMultiMediaStream_iface);
+ return CONTAINING_RECORD(iface, struct multimedia_stream, IAMMultiMediaStream_iface);
}
static const struct IAMMultiMediaStreamVtbl AM_Vtbl;
HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj)
{
- IAMMultiMediaStreamImpl *object;
+ struct multimedia_stream *object;
HRESULT hr;
TRACE("(%p,%p)\n", pUnkOuter, ppObj);
@@ -61,8 +62,7 @@ HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj)
if( pUnkOuter )
return CLASS_E_NOAGGREGATION;
- object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IAMMultiMediaStreamImpl));
- if (!object)
+ if (!(object = heap_alloc_zero(sizeof(*object))))
return E_OUTOFMEMORY;
object->IAMMultiMediaStream_iface.lpVtbl = &AM_Vtbl;
@@ -84,7 +84,7 @@ HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj)
/*** IUnknown methods ***/
static HRESULT WINAPI IAMMultiMediaStreamImpl_QueryInterface(IAMMultiMediaStream* iface, REFIID riid, void** ppvObject)
{
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
@@ -104,7 +104,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_QueryInterface(IAMMultiMediaStream
static ULONG WINAPI IAMMultiMediaStreamImpl_AddRef(IAMMultiMediaStream* iface)
{
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
TRACE("(%p/%p)\n", iface, This);
@@ -113,7 +113,7 @@ static ULONG WINAPI IAMMultiMediaStreamImpl_AddRef(IAMMultiMediaStream* iface)
static ULONG WINAPI IAMMultiMediaStreamImpl_Release(IAMMultiMediaStream* iface)
{
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
ULONG ref = InterlockedDecrement(&This->ref);
ULONG i;
@@ -142,7 +142,7 @@ static ULONG WINAPI IAMMultiMediaStreamImpl_Release(IAMMultiMediaStream* iface)
/*** IMultiMediaStream methods ***/
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetInformation(IAMMultiMediaStream* iface, DWORD* pdwFlags, STREAM_TYPE* pStreamType)
{
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pdwFlags, pStreamType);
@@ -151,7 +151,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetInformation(IAMMultiMediaStream
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetMediaStream(IAMMultiMediaStream* iface, REFMSPID idPurpose, IMediaStream** ppMediaStream)
{
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
MSPID PurposeId;
unsigned int i;
@@ -173,7 +173,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetMediaStream(IAMMultiMediaStream
static HRESULT WINAPI IAMMultiMediaStreamImpl_EnumMediaStreams(IAMMultiMediaStream* iface, LONG Index, IMediaStream** ppMediaStream)
{
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%d,%p) stub!\n", This, iface, Index, ppMediaStream);
@@ -182,7 +182,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_EnumMediaStreams(IAMMultiMediaStre
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetState(IAMMultiMediaStream* iface, STREAM_STATE* pCurrentState)
{
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pCurrentState);
@@ -191,7 +191,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetState(IAMMultiMediaStream* ifac
static HRESULT WINAPI IAMMultiMediaStreamImpl_SetState(IAMMultiMediaStream* iface, STREAM_STATE new_state)
{
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
HRESULT hr = E_INVALIDARG;
TRACE("(%p/%p)->(%u)\n", This, iface, new_state);
@@ -206,7 +206,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_SetState(IAMMultiMediaStream* ifac
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetTime(IAMMultiMediaStream* iface, STREAM_TIME* pCurrentTime)
{
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pCurrentTime);
@@ -215,7 +215,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetTime(IAMMultiMediaStream* iface
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetDuration(IAMMultiMediaStream* iface, STREAM_TIME* pDuration)
{
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pDuration);
@@ -224,7 +224,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetDuration(IAMMultiMediaStream* i
static HRESULT WINAPI IAMMultiMediaStreamImpl_Seek(IAMMultiMediaStream* iface, STREAM_TIME seek_time)
{
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
TRACE("(%p/%p)->(%s)\n", This, iface, wine_dbgstr_longlong(seek_time));
@@ -233,7 +233,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Seek(IAMMultiMediaStream* iface, S
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetEndOfStream(IAMMultiMediaStream* iface, HANDLE* phEOS)
{
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%p) stub!\n", This, iface, phEOS);
@@ -244,7 +244,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetEndOfStream(IAMMultiMediaStream
static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* iface, STREAM_TYPE StreamType, DWORD dwFlags, IGraphBuilder* pFilterGraph)
{
static const WCHAR filternameW[] = {'M','e','d','i','a','S','t','r','e','a','m','F','i','l','t','e','r',0};
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
HRESULT hr = S_OK;
TRACE("(%p/%p)->(%x,%x,%p)\n", This, iface, (DWORD)StreamType, dwFlags, pFilterGraph);
@@ -298,7 +298,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* if
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilterGraph(IAMMultiMediaStream* iface, IGraphBuilder** ppGraphBuilder)
{
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
TRACE("(%p/%p)->(%p)\n", This, iface, ppGraphBuilder);
@@ -315,7 +315,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilterGraph(IAMMultiMediaStream
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilter(IAMMultiMediaStream *iface, IMediaStreamFilter **filter)
{
- IAMMultiMediaStreamImpl *mmstream = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *mmstream = impl_from_IAMMultiMediaStream(iface);
TRACE("mmstream %p, filter %p.\n", mmstream, filter);
@@ -330,7 +330,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilter(IAMMultiMediaStream *ifa
static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream* iface, IUnknown* stream_object, const MSPID* PurposeId,
DWORD dwFlags, IMediaStream** ppNewStream)
{
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
HRESULT hr;
IAMMediaStream* pStream;
IAMMediaStream** pNewStreams;
@@ -398,7 +398,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream
static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile(IAMMultiMediaStream* iface, LPCWSTR filename, DWORD flags)
{
static const WCHAR sourceW[] = {'S','o','u','r','c','e',0};
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
HRESULT ret = S_OK;
IBaseFilter *BaseFilter = NULL;
IEnumPins *EnumPins = NULL;
@@ -442,7 +442,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile(IAMMultiMediaStream* ifac
static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenMoniker(IAMMultiMediaStream* iface, IBindCtx* pCtx, IMoniker* pMoniker, DWORD dwFlags)
{
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%p,%p,%x) stub!\n", This, iface, pCtx, pMoniker, dwFlags);
@@ -451,7 +451,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenMoniker(IAMMultiMediaStream* i
static HRESULT WINAPI IAMMultiMediaStreamImpl_Render(IAMMultiMediaStream* iface, DWORD dwFlags)
{
- IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface);
+ struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%x) partial stub!\n", This, iface, dwFlags);
--
2.22.0
Aug. 30, 2019