diff --git a/src/common/platform/platform.hpp b/src/common/platform/platform.hpp index f26dc677..6e8dff89 100644 --- a/src/common/platform/platform.hpp +++ b/src/common/platform/platform.hpp @@ -25,6 +25,7 @@ #include "registry.hpp" #include "network.hpp" #include "threading.hpp" +#include "window.hpp" #if defined(__GNUC__) || defined(__clang__) #pragma GCC diagnostic pop diff --git a/src/common/platform/window.hpp b/src/common/platform/window.hpp new file mode 100644 index 00000000..26a67d55 --- /dev/null +++ b/src/common/platform/window.hpp @@ -0,0 +1,40 @@ +#pragma once + +using pointer = uint64_t; + +#ifndef OS_WINDOWS +typedef struct tagPOINT +{ + LONG x; + LONG y; +} POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT; +#endif + +using wparam = pointer; +using lparam = pointer; +using lresult = pointer; + +typedef struct _LARGE_STRING +{ + ULONG Length; + ULONG MaximumLength : 31; + ULONG bAnsi : 1; + pointer Buffer; +} LARGE_STRING; + +using hwnd = pointer; +using hmenu = pointer; +using hinstance = pointer; + +struct msg +{ + hwnd hwnd; + UINT message; + wparam wParam; + lparam lParam; + DWORD time; + POINT pt; +#ifdef _MAC + DWORD lPrivate; +#endif +}; diff --git a/src/windows-emulator/syscalls.cpp b/src/windows-emulator/syscalls.cpp index 6b1e39f8..e3203b3b 100644 --- a/src/windows-emulator/syscalls.cpp +++ b/src/windows-emulator/syscalls.cpp @@ -718,18 +718,51 @@ namespace syscalls return STATUS_NOT_SUPPORTED; } - NTSTATUS handle_NtUserCreateWindowEx() + hwnd handle_NtUserCreateWindowEx(const syscall_context& c, const DWORD ex_style, + const emulator_object class_name, + const emulator_object cls_version, + const emulator_object window_name, const DWORD style, const int x, + const int y, const int width, const int height, const hwnd parent, + const hmenu menu, const hinstance instance, const pointer l_param, + const DWORD flags, const pointer acbi_buffer) { + (void)c; + (void)ex_style; + (void)class_name; + (void)cls_version; + (void)window_name; + (void)style; + (void)x; + (void)y; + (void)width; + (void)height; + (void)parent; + (void)menu; + (void)instance; + (void)l_param; + (void)flags; + (void)acbi_buffer; + return STATUS_NOT_SUPPORTED; } - NTSTATUS handle_NtUserShowWindow() + NTSTATUS handle_NtUserShowWindow(const syscall_context& c, const hwnd hwnd, const LONG cmd_show) { + (void)c; + (void)hwnd; + (void)cmd_show; return STATUS_NOT_SUPPORTED; } - NTSTATUS handle_NtUserGetMessage() + NTSTATUS handle_NtUserGetMessage(const syscall_context& c, const emulator_object message, const hwnd hwnd, + const UINT msg_filter_min, const UINT msg_filter_max) { + (void)c; + (void)message; + (void)hwnd; + (void)msg_filter_min; + (void)msg_filter_max; + return STATUS_NOT_SUPPORTED; } }