diff --git a/winpr/include/winpr/tchar.h b/winpr/include/winpr/tchar.h index 0f0402026..7390ed5f3 100644 --- a/winpr/include/winpr/tchar.h +++ b/winpr/include/winpr/tchar.h @@ -37,6 +37,7 @@ typedef CHAR TCHAR; #ifdef UNICODE #define _tprintf wprintf +#define _tcslen _wcslen #define _tcsdup _wcsdup #define _tcscmp wcscmp #define _tcscpy wcscpy @@ -47,6 +48,7 @@ typedef CHAR TCHAR; #define _stprintf_s swprintf_s #else #define _tprintf printf +#define _tcslen strlen #define _tcsdup _strdup #define _tcscmp strcmp #define _tcscpy strcpy diff --git a/winpr/libwinpr/wtsapi/wtsapi.c b/winpr/libwinpr/wtsapi/wtsapi.c index a76361e3e..03fd6da56 100644 --- a/winpr/libwinpr/wtsapi/wtsapi.c +++ b/winpr/libwinpr/wtsapi/wtsapi.c @@ -301,11 +301,11 @@ BOOL VirtualChannelIoctl(HANDLE hChannelHandle, ULONG IoControlCode) return FALSE; } - ntstatus = NtDeviceIoControlFile(hChannelHandle, 0, 0, 0, &ioStatusBlock, IoControlCode, 0, 0, 0, 0); + ntstatus = _NtDeviceIoControlFile(hChannelHandle, 0, 0, 0, &ioStatusBlock, IoControlCode, 0, 0, 0, 0); if (ntstatus == STATUS_PENDING) { - ntstatus = NtWaitForSingleObject(hChannelHandle, 0, 0); + ntstatus = _NtWaitForSingleObject(hChannelHandle, 0, 0); if (ntstatus >= 0) ntstatus = ioStatusBlock.status; @@ -314,14 +314,14 @@ BOOL VirtualChannelIoctl(HANDLE hChannelHandle, ULONG IoControlCode) if (ntstatus == STATUS_BUFFER_OVERFLOW) { ntstatus = STATUS_BUFFER_TOO_SMALL; - error = RtlNtStatusToDosError(ntstatus); + error = _RtlNtStatusToDosError(ntstatus); SetLastError(error); return FALSE; } if (ntstatus < 0) { - error = RtlNtStatusToDosError(ntstatus); + error = _RtlNtStatusToDosError(ntstatus); SetLastError(error); return FALSE; }