From 247beff1b3b7d741860d5ae1ac8effcc0ed3829e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Thu, 22 May 2014 13:50:01 -0400 Subject: [PATCH] winpr: fix test compilation on Windows --- .../libwinpr/wnd/test/TestWndCreateWindowEx.c | 1 + winpr/libwinpr/wnd/test/TestWndWmCopyData.c | 1 + .../test/TestWtsApiQuerySessionInformation.c | 25 ++++++++++--------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/winpr/libwinpr/wnd/test/TestWndCreateWindowEx.c b/winpr/libwinpr/wnd/test/TestWndCreateWindowEx.c index 375dc3745..c9898ac64 100644 --- a/winpr/libwinpr/wnd/test/TestWndCreateWindowEx.c +++ b/winpr/libwinpr/wnd/test/TestWndCreateWindowEx.c @@ -1,6 +1,7 @@ #include #include +#include #include #include diff --git a/winpr/libwinpr/wnd/test/TestWndWmCopyData.c b/winpr/libwinpr/wnd/test/TestWndWmCopyData.c index 303c32cdb..ab075356f 100644 --- a/winpr/libwinpr/wnd/test/TestWndWmCopyData.c +++ b/winpr/libwinpr/wnd/test/TestWndWmCopyData.c @@ -1,6 +1,7 @@ #include #include +#include #include static LRESULT CALLBACK TestWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) diff --git a/winpr/libwinpr/wtsapi/test/TestWtsApiQuerySessionInformation.c b/winpr/libwinpr/wtsapi/test/TestWtsApiQuerySessionInformation.c index 8b9f63ebe..7212869ea 100644 --- a/winpr/libwinpr/wtsapi/test/TestWtsApiQuerySessionInformation.c +++ b/winpr/libwinpr/wtsapi/test/TestWtsApiQuerySessionInformation.c @@ -31,8 +31,6 @@ int TestWtsApiQuerySessionInformation(int argc, char* argv[]) for (index = 0; index < count; index++) { - pBuffer = NULL; - bytesReturned = 0; char* Username; char* Domain; char* ClientName; @@ -44,6 +42,9 @@ int TestWtsApiQuerySessionInformation(int argc, char* argv[]) PWTS_CLIENT_ADDRESS ClientAddress; WTS_CONNECTSTATE_CLASS ConnectState; + pBuffer = NULL; + bytesReturned = 0; + sessionId = pSessionInfo[index].SessionId; printf("[%d] SessionId: %d State: %d\n", (int) index, @@ -52,7 +53,7 @@ int TestWtsApiQuerySessionInformation(int argc, char* argv[]) /* WTSUserName */ - bSuccess = WTSQuerySessionInformation(hServer, sessionId, WTSUserName, &pBuffer, &bytesReturned); + bSuccess = WTSQuerySessionInformationA(hServer, sessionId, WTSUserName, &pBuffer, &bytesReturned); if (!bSuccess) { @@ -65,7 +66,7 @@ int TestWtsApiQuerySessionInformation(int argc, char* argv[]) /* WTSDomainName */ - bSuccess = WTSQuerySessionInformation(hServer, sessionId, WTSDomainName, &pBuffer, &bytesReturned); + bSuccess = WTSQuerySessionInformationA(hServer, sessionId, WTSDomainName, &pBuffer, &bytesReturned); if (!bSuccess) { @@ -78,7 +79,7 @@ int TestWtsApiQuerySessionInformation(int argc, char* argv[]) /* WTSConnectState */ - bSuccess = WTSQuerySessionInformation(hServer, sessionId, WTSConnectState, &pBuffer, &bytesReturned); + bSuccess = WTSQuerySessionInformationA(hServer, sessionId, WTSConnectState, &pBuffer, &bytesReturned); if (!bSuccess) { @@ -91,7 +92,7 @@ int TestWtsApiQuerySessionInformation(int argc, char* argv[]) /* WTSClientBuildNumber */ - bSuccess = WTSQuerySessionInformation(hServer, sessionId, WTSClientBuildNumber, &pBuffer, &bytesReturned); + bSuccess = WTSQuerySessionInformationA(hServer, sessionId, WTSClientBuildNumber, &pBuffer, &bytesReturned); if (!bSuccess) { @@ -104,7 +105,7 @@ int TestWtsApiQuerySessionInformation(int argc, char* argv[]) /* WTSClientName */ - bSuccess = WTSQuerySessionInformation(hServer, sessionId, WTSClientName, &pBuffer, &bytesReturned); + bSuccess = WTSQuerySessionInformationA(hServer, sessionId, WTSClientName, &pBuffer, &bytesReturned); if (!bSuccess) { @@ -117,7 +118,7 @@ int TestWtsApiQuerySessionInformation(int argc, char* argv[]) /* WTSClientProductId */ - bSuccess = WTSQuerySessionInformation(hServer, sessionId, WTSClientProductId, &pBuffer, &bytesReturned); + bSuccess = WTSQuerySessionInformationA(hServer, sessionId, WTSClientProductId, &pBuffer, &bytesReturned); if (!bSuccess) { @@ -130,7 +131,7 @@ int TestWtsApiQuerySessionInformation(int argc, char* argv[]) /* WTSClientHardwareId */ - bSuccess = WTSQuerySessionInformation(hServer, sessionId, WTSClientHardwareId, &pBuffer, &bytesReturned); + bSuccess = WTSQuerySessionInformationA(hServer, sessionId, WTSClientHardwareId, &pBuffer, &bytesReturned); if (!bSuccess) { @@ -143,7 +144,7 @@ int TestWtsApiQuerySessionInformation(int argc, char* argv[]) /* WTSClientAddress */ - bSuccess = WTSQuerySessionInformation(hServer, sessionId, WTSClientAddress, &pBuffer, &bytesReturned); + bSuccess = WTSQuerySessionInformationA(hServer, sessionId, WTSClientAddress, &pBuffer, &bytesReturned); if (!bSuccess) { @@ -157,7 +158,7 @@ int TestWtsApiQuerySessionInformation(int argc, char* argv[]) /* WTSClientDisplay */ - bSuccess = WTSQuerySessionInformation(hServer, sessionId, WTSClientDisplay, &pBuffer, &bytesReturned); + bSuccess = WTSQuerySessionInformationA(hServer, sessionId, WTSClientDisplay, &pBuffer, &bytesReturned); if (!bSuccess) { @@ -172,7 +173,7 @@ int TestWtsApiQuerySessionInformation(int argc, char* argv[]) /* WTSClientProtocolType */ - bSuccess = WTSQuerySessionInformation(hServer, sessionId, WTSClientProtocolType, &pBuffer, &bytesReturned); + bSuccess = WTSQuerySessionInformationA(hServer, sessionId, WTSClientProtocolType, &pBuffer, &bytesReturned); if (!bSuccess) {