diff --git a/winpr/libwinpr/io/io.c b/winpr/libwinpr/io/io.c index 2aa5881d2..cac97e9e9 100644 --- a/winpr/libwinpr/io/io.c +++ b/winpr/libwinpr/io/io.c @@ -199,6 +199,13 @@ BOOL CancelSynchronousIo(HANDLE hThread) #ifdef _UWP +#include +#include + +#include "../log.h" + +#define TAG WINPR_TAG("io") + BOOL GetOverlappedResult(HANDLE hFile, LPOVERLAPPED lpOverlapped, LPDWORD lpNumberOfBytesTransferred, BOOL bWait) { return GetOverlappedResultEx(hFile, lpOverlapped, lpNumberOfBytesTransferred, bWait ? INFINITE : 0, TRUE); diff --git a/winpr/libwinpr/path/shell.c b/winpr/libwinpr/path/shell.c index adf73e7ae..3ed11ce46 100644 --- a/winpr/libwinpr/path/shell.c +++ b/winpr/libwinpr/path/shell.c @@ -450,7 +450,9 @@ char* GetCombinedPath(const char* basePath, const char* subPath) BOOL PathMakePathA(LPCSTR path, LPSECURITY_ATTRIBUTES lpAttributes) { -#ifdef _WIN32 +#if defined(_UWP) + return FALSE; +#elif defined(_WIN32) return (SHCreateDirectoryExA(NULL, path, lpAttributes) == ERROR_SUCCESS); #else const char delim = PathGetSeparatorA(PATH_STYLE_NATIVE); diff --git a/winpr/libwinpr/wtsapi/wtsapi_win32.c b/winpr/libwinpr/wtsapi/wtsapi_win32.c index 2a2556bd8..300a9642c 100644 --- a/winpr/libwinpr/wtsapi/wtsapi_win32.c +++ b/winpr/libwinpr/wtsapi/wtsapi_win32.c @@ -89,17 +89,29 @@ BOOL WINAPI Win32_WTSVirtualChannelClose(HANDLE hChannel); static void *_wts_malloc(size_t size) { +#ifdef _UWP + return malloc(size); +#else return (PVOID)LocalAlloc(LMEM_FIXED, size); +#endif } static void *_wts_calloc(size_t nmemb, size_t size) { +#ifdef _UWP + return calloc(nmemb, size); +#else return (PVOID)LocalAlloc(LMEM_FIXED | LMEM_ZEROINIT, nmemb * size); +#endif } static void _wts_free(void* ptr) { +#ifdef _UWP + free(ptr); +#else LocalFree((HLOCAL)ptr); +#endif } BOOL Win32_WTSVirtualChannelReadAsync(WTSAPI_CHANNEL* pChannel)