summaryrefslogtreecommitdiffstats
path: root/osdep/windows_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'osdep/windows_utils.h')
-rw-r--r--osdep/windows_utils.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/osdep/windows_utils.h b/osdep/windows_utils.h
index a20a558709..c3fc72aefe 100644
--- a/osdep/windows_utils.h
+++ b/osdep/windows_utils.h
@@ -19,6 +19,7 @@
#define MP_WINDOWS_UTILS_H_
#include <windows.h>
+#include <stdbool.h>
// Conditionally release a COM interface and set the pointer to NULL
#define SAFE_RELEASE(u) \
@@ -30,4 +31,23 @@ char *mp_HRESULT_to_str_buf(char *buf, size_t buf_size, HRESULT hr);
#define mp_HRESULT_to_str(hr) mp_HRESULT_to_str_buf((char[256]){0}, 256, (hr))
#define mp_LastError_to_str() mp_HRESULT_to_str(HRESULT_FROM_WIN32(GetLastError()))
+struct w32_create_anon_pipe_opts {
+ DWORD server_flags;
+ DWORD server_mode;
+ bool server_inheritable;
+ DWORD out_buf_size;
+ DWORD in_buf_size;
+
+ DWORD client_flags;
+ DWORD client_mode;
+ bool client_inheritable;
+};
+
+bool mp_w32_create_anon_pipe(HANDLE *server, HANDLE *client,
+ struct w32_create_anon_pipe_opts *opts);
+
+// Returns the target of the shell link in talloc memory if the path is a
+// resolvable shell link, otherwise returns NULL.
+wchar_t *mp_w32_get_shell_link_target(wchar_t *path);
+
#endif