win-capture: Open UWP named objects with helper functions
This detects whether the target process is a UWP process, and then uses the open_app_* functions for mutexes/events/mapping. Also slightly refactors named object open functions.
This commit is contained in:
@@ -34,13 +34,6 @@ static inline HANDLE create_event_plus_id(const wchar_t *name, DWORD id)
|
||||
return create_event(new_name);
|
||||
}
|
||||
|
||||
static inline HANDLE open_event_plus_id(const wchar_t *name, DWORD id)
|
||||
{
|
||||
wchar_t new_name[64];
|
||||
_snwprintf(new_name, 64, L"%s%lu", name, id);
|
||||
return open_event(new_name);
|
||||
}
|
||||
|
||||
static inline HANDLE create_mutex_plus_id(const wchar_t *name, DWORD id)
|
||||
{
|
||||
wchar_t new_name[64];
|
||||
@@ -48,13 +41,6 @@ static inline HANDLE create_mutex_plus_id(const wchar_t *name, DWORD id)
|
||||
return create_mutex(new_name);
|
||||
}
|
||||
|
||||
static inline HANDLE open_mutex_plus_id(const wchar_t *name, DWORD id)
|
||||
{
|
||||
wchar_t new_name[64];
|
||||
_snwprintf(new_name, 64, L"%s%lu", name, id);
|
||||
return open_mutex(new_name);
|
||||
}
|
||||
|
||||
static inline bool object_signalled(HANDLE event)
|
||||
{
|
||||
if (!event)
|
||||
|
Reference in New Issue
Block a user