https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bb9a5f6046fd387598920…
commit bb9a5f6046fd3875989203618a569874cd97546f
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sun Jan 20 15:58:32 2019 +0100
Commit: GitHub <noreply(a)github.com>
CommitDate: Sun Jan 20 15:58:32 2019 +0100
[ROSTESTS] Fix 64bit issues (#1261)
---
.../applications/net/tditest/tditest/tditest.c | 8 +++----
.../rostests/apitests/advapi32/ServiceNetwork.c | 4 ++--
modules/rostests/apitests/gdi32/CreateDIBitmap.c | 28 ++++++++++++----------
modules/rostests/apitests/gdi32/DPtoLP.c | 6 +++--
modules/rostests/apitests/gdi32/ExtCreatePen.c | 2 +-
modules/rostests/apitests/gdi32/GetDIBits.c | 6 ++---
modules/rostests/apitests/gdi32/GetObject.c | 12 ++++++----
modules/rostests/apitests/gdi32/RealizePalette.c | 4 ++--
.../rostests/apitests/msgina/ShellDimScreen.cpp | 23 +++++++++---------
modules/rostests/apitests/shell32/CMyComputer.cpp | 4 +++-
.../apitests/shell32/CUserNotification.cpp | 2 +-
modules/rostests/apitests/shell32/menu.cpp | 4 ++--
.../apitests/spoolss/MarshallDownStructuresArray.c | 10 ++++----
.../apitests/spoolss/MarshallUpStructuresArray.c | 6 +++--
modules/rostests/apitests/user32/CreateWindowEx.c | 2 +-
.../apitests/user32/GetUserObjectInformation.c | 22 ++++++++---------
.../rostests/apitests/user32/PrivateExtractIcons.c | 6 ++---
.../rostests/apitests/user32/SendMessageTimeout.c | 4 ++--
.../apitests/user32/SystemParametersInfo.c | 10 ++++----
modules/rostests/tests/mmixer_test/test.c | 8 +++----
modules/rostests/winetests/CMakeLists.txt | 4 ++++
modules/rostests/winetests/ntdll/CMakeLists.txt | 5 ++--
modules/rostests/winetests/ntdll/testlist.c | 2 ++
23 files changed, 101 insertions(+), 81 deletions(-)
diff --git a/modules/rosapps/applications/net/tditest/tditest/tditest.c
b/modules/rosapps/applications/net/tditest/tditest/tditest.c
index 38ab0d7a85..f6f8caceb0 100644
--- a/modules/rosapps/applications/net/tditest/tditest/tditest.c
+++ b/modules/rosapps/applications/net/tditest/tditest/tditest.c
@@ -442,7 +442,7 @@ NTSTATUS TdiQueryAddress(
if (SnmpInfo.NumAddr != 1)
{
/* Skip loopback address */
- *Address = DN2H(((PIPADDR_ENTRY)((ULONG)IpAddress +
sizeof(IPADDR_ENTRY)))->Addr);
+ *Address = DN2H(((PIPADDR_ENTRY)((PUCHAR)IpAddress +
sizeof(IPADDR_ENTRY)))->Addr);
}
else
{
@@ -507,7 +507,7 @@ NTSTATUS TdiSendDatagram(
RtlZeroMemory(ConnectInfo, sizeof(TDI_CONNECTION_INFORMATION) + sizeof(TA_IP_ADDRESS));
ConnectInfo->RemoteAddressLength = sizeof(TA_IP_ADDRESS);
- ConnectInfo->RemoteAddress = (PUCHAR) ((ULONG)ConnectInfo +
sizeof(TDI_CONNECTION_INFORMATION));
+ ConnectInfo->RemoteAddress = ((PUCHAR)ConnectInfo +
sizeof(TDI_CONNECTION_INFORMATION));
TA = (PTA_IP_ADDRESS)(ConnectInfo->RemoteAddress);
TA->TAAddressCount = 1;
@@ -630,9 +630,9 @@ NTSTATUS TdiReceiveDatagram(
ReceiveInfo->RemoteAddressLength = 0;
ReceiveInfo->RemoteAddress = NULL;
- ReturnInfo = (PTDI_CONNECTION_INFORMATION) ((ULONG)ReceiveInfo +
sizeof(TDI_CONNECTION_INFORMATION));
+ ReturnInfo = (PTDI_CONNECTION_INFORMATION) ((PUCHAR)ReceiveInfo +
sizeof(TDI_CONNECTION_INFORMATION));
ReturnInfo->RemoteAddressLength = sizeof(TA_IP_ADDRESS);
- ReturnInfo->RemoteAddress = (PUCHAR) ((ULONG)ReturnInfo +
sizeof(TDI_CONNECTION_INFORMATION));
+ ReturnInfo->RemoteAddress = ((PUCHAR)ReturnInfo +
sizeof(TDI_CONNECTION_INFORMATION));
ReturnAddress = (PTA_IP_ADDRESS)(ReturnInfo->RemoteAddress);
ReturnAddress->TAAddressCount = 1;
diff --git a/modules/rostests/apitests/advapi32/ServiceNetwork.c
b/modules/rostests/apitests/advapi32/ServiceNetwork.c
index 6b5a5676ac..f71105bc9b 100644
--- a/modules/rostests/apitests/advapi32/ServiceNetwork.c
+++ b/modules/rostests/apitests/advapi32/ServiceNetwork.c
@@ -288,8 +288,8 @@ service_main(DWORD dwArgc, LPWSTR* lpszArgv)
goto quit;
}
- test_tcp(lpszArgv[0], (DWORD)Teb->SubProcessTag);
- test_udp(lpszArgv[0], (DWORD)Teb->SubProcessTag);
+ test_tcp(lpszArgv[0], PtrToUlong(Teb->SubProcessTag));
+ test_udp(lpszArgv[0], PtrToUlong(Teb->SubProcessTag));
WSACleanup();
quit:
diff --git a/modules/rostests/apitests/gdi32/CreateDIBitmap.c
b/modules/rostests/apitests/gdi32/CreateDIBitmap.c
index 1e302618d5..f8faf5b7d5 100644
--- a/modules/rostests/apitests/gdi32/CreateDIBitmap.c
+++ b/modules/rostests/apitests/gdi32/CreateDIBitmap.c
@@ -11,6 +11,8 @@
#define CBM_CREATDIB 2
+#define INVALID_POINTER ((PVOID)(ULONG_PTR)0xC0000000C0000000ULL)
+
BOOL
GetExpected(
DWORD *pdwError,
@@ -39,14 +41,14 @@ GetExpected(
{
if (!lpbmih)
{
- if (!lpbInit || (lpbInit == (PVOID)0xC0000000)) return FALSE;
+ if (!lpbInit || (lpbInit == INVALID_POINTER)) return FALSE;
}
else
{
if (lpbInit)
{
- if (lpbInit == (PVOID)0xC0000000) return FALSE;
- if (!lpbmi || (lpbmi == (PVOID)0xC0000000)) return FALSE;
+ if (lpbInit == INVALID_POINTER) return FALSE;
+ if (!lpbmi || (lpbmi == INVALID_POINTER)) return FALSE;
if (lpbmi->bmiHeader.biSize == 0) return FALSE;
if (fuUsage == 2) return FALSE;
}
@@ -64,10 +66,10 @@ GetExpected(
if (fdwInit & CBM_INIT)
{
- if (!lpbInit || (lpbInit == (PVOID)0xC0000000)) return FALSE;
+ if (!lpbInit || (lpbInit == INVALID_POINTER)) return FALSE;
}
- if ((!lpbmi) || (lpbmi == (PVOID)0xc0000000) || (lpbmi->bmiHeader.biSize ==
0))
+ if ((!lpbmi) || (lpbmi == INVALID_POINTER) || (lpbmi->bmiHeader.biSize == 0))
{
return FALSE;
}
@@ -76,7 +78,7 @@ GetExpected(
{
if ((lpbmih == NULL) ||
- (lpbmih == (PVOID)0xC0000000) ||
+ (lpbmih == INVALID_POINTER) ||
(lpbmih->biSize == 0))
{
return FALSE;
@@ -89,7 +91,7 @@ GetExpected(
}
- if (lpbmi == (PVOID)0xc0000000) return FALSE;
+ if (lpbmi == INVALID_POINTER) return FALSE;
}
return TRUE;
@@ -119,7 +121,7 @@ Test_CreateDIBitmap_Params(void)
hbmp = CreateDIBitmap(hdc, &bmi.bmiHeader, CBM_INIT, NULL, NULL,
DIB_PAL_COLORS);
ok(hbmp != 0, "\n");
- hbmp = CreateDIBitmap(hdc, &bmi.bmiHeader, 0, (PVOID)0xc0000000, &bmi,
DIB_PAL_COLORS);
+ hbmp = CreateDIBitmap(hdc, &bmi.bmiHeader, 0, INVALID_POINTER, &bmi,
DIB_PAL_COLORS);
ok(hbmp != 0, "\n");
hbmp = CreateDIBitmap(NULL, &bmi.bmiHeader, CBM_INIT, NULL, &bmi,
DIB_PAL_COLORS);
@@ -152,14 +154,14 @@ Test_CreateDIBitmap_Params(void)
ok_err(0xbadbad00);
SetLastError(0xbadbad00);
- hbmp = CreateDIBitmap(hdc, &bmi.bmiHeader, CBM_INIT, (PVOID)0xc0000000, &bmi,
DIB_PAL_COLORS);
+ hbmp = CreateDIBitmap(hdc, &bmi.bmiHeader, CBM_INIT, INVALID_POINTER, &bmi,
DIB_PAL_COLORS);
ok(hbmp == 0, "\n");
ok_err(0xbadbad00);
SetLastError(0xbadbad00);
_SEH2_TRY
{
- hbmp = CreateDIBitmap(hdc, &bmi.bmiHeader, 0, ajBits, (PVOID)0xc0000000,
DIB_PAL_COLORS);
+ hbmp = CreateDIBitmap(hdc, &bmi.bmiHeader, 0, ajBits, INVALID_POINTER,
DIB_PAL_COLORS);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
@@ -188,10 +190,10 @@ Test_CreateDIBitmap_Params(void)
{
ULONG i1, i2, i3, i4, i5, i6;
HDC ahdc[3] = {0, hdc, (HDC)-1};
- PBITMAPINFOHEADER apbih[4] = {NULL, &bmi.bmiHeader, &bmiBroken.bmiHeader,
(PVOID)0xC0000000};
+ PBITMAPINFOHEADER apbih[4] = {NULL, &bmi.bmiHeader, &bmiBroken.bmiHeader,
INVALID_POINTER};
ULONG afInitf[12] = {0, 1, 2, 3, CBM_INIT, 4, 5, 6, 7, 8, 0x10, 0x20};
- PVOID apvBits[3] = {NULL, ajBits, (PVOID)0xc0000000};
- PBITMAPINFO apbmi[4] = {NULL, &bmi, &bmiBroken, (PVOID)0xC0000000};
+ PVOID apvBits[3] = {NULL, ajBits, INVALID_POINTER};
+ PBITMAPINFO apbmi[4] = {NULL, &bmi, &bmiBroken, INVALID_POINTER};
ULONG aiUsage[5] = {0, 1, 2, 3, 23};
DWORD dwExpError;
BOOL bExpSuccess;
diff --git a/modules/rostests/apitests/gdi32/DPtoLP.c
b/modules/rostests/apitests/gdi32/DPtoLP.c
index dd2a6f9900..d06b3754a7 100644
--- a/modules/rostests/apitests/gdi32/DPtoLP.c
+++ b/modules/rostests/apitests/gdi32/DPtoLP.c
@@ -7,6 +7,8 @@
#include "precomp.h"
+#define INVALID_POINTER ((PVOID)(ULONG_PTR)0xdeadbeefdeadbeefULL)
+
void Test_DPtoLP_Params()
{
HDC hdc;
@@ -24,7 +26,7 @@ void Test_DPtoLP_Params()
ok_int(DPtoLP(NULL, NULL, -1), 1);
ok_err(ERROR_SUCCESS);
- ok_int(DPtoLP(NULL, (PVOID)0x80000000, -1), 1);
+ ok_int(DPtoLP(NULL, INVALID_POINTER, -1), 1);
ok_err(ERROR_SUCCESS);
ok_int(DPtoLP(NULL, NULL, 2), 0);
@@ -53,7 +55,7 @@ void Test_DPtoLP_Params()
hdc = GetDC(0);
SetLastError(ERROR_SUCCESS);
- ok_int(DPtoLP(hdc, (PVOID)0x80000000, 2), 1);
+ ok_int(DPtoLP(hdc, INVALID_POINTER, 2), 1);
ok_err(ERROR_SUCCESS);
diff --git a/modules/rostests/apitests/gdi32/ExtCreatePen.c
b/modules/rostests/apitests/gdi32/ExtCreatePen.c
index c8370bd5cb..d565ad9306 100644
--- a/modules/rostests/apitests/gdi32/ExtCreatePen.c
+++ b/modules/rostests/apitests/gdi32/ExtCreatePen.c
@@ -173,7 +173,7 @@ void Test_ExtCreatePen_Params()
ok(pelp->elpWidth == 0, "Wrong elpWidth, expected 0, got %lu\n",
pelp->elpWidth);
ok(pelp->elpBrushStyle == BS_SOLID, "Wrong elpBrushStyle, expected BS_SOLID,
got 0x%x\n", pelp->elpBrushStyle);
ok(pelp->elpColor == 0, "Wrong elpColor, expected 0, got 0x%lx\n",
pelp->elpColor);
- ok(pelp->elpHatch == 0, "Wrong elpHatch, expected 0, got 0x%p\n",
(PVOID)pelp->elpColor);
+ ok(pelp->elpHatch == 0, "Wrong elpHatch, expected 0, got 0x%lx\n",
pelp->elpHatch);
ok(pelp->elpNumEntries == 0, "Wrong elpNumEntries, expected %u got
%lu\n", 0, pelp->elpNumEntries);
/* Test PS_NULL with styles */
diff --git a/modules/rostests/apitests/gdi32/GetDIBits.c
b/modules/rostests/apitests/gdi32/GetDIBits.c
index 3b13adadbd..f06b11fe2d 100644
--- a/modules/rostests/apitests/gdi32/GetDIBits.c
+++ b/modules/rostests/apitests/gdi32/GetDIBits.c
@@ -360,13 +360,13 @@ void Test_GetDIBits()
ok_int(GetDIBits(hdcScreen, hbmp, 0, 5, NULL, pbi, DIB_RGB_COLORS), 1);
ok_int(pbi->bmiHeader.biPlanes, 1);
SetLastError(0xdeadbabe);
- ok_int(GetDIBits((HDC)0xff00ff00, hbmp, 0, 5, NULL, pbi, DIB_RGB_COLORS), 0);
+ ok_int(GetDIBits((HDC)UlongToHandle(0xff00ff00), hbmp, 0, 5, NULL, pbi,
DIB_RGB_COLORS), 0);
ok_err(0x57);
SetLastError(0xdeadbabe);
- ok_int(GetDIBits(hdcScreen, (HBITMAP)0xff00ff00, 0, 5, NULL, pbi, DIB_RGB_COLORS),
0);
+ ok_int(GetDIBits(hdcScreen, (HBITMAP)UlongToHandle(0xff00ff00), 0, 5, NULL, pbi,
DIB_RGB_COLORS), 0);
ok_err(0xdeadbabe);
SetLastError(0xdeadbabe);
- ok_int(GetDIBits((HDC)0xff00ff00, (HBITMAP)0xff00ff00, 0, 5, NULL, pbi,
DIB_RGB_COLORS), 0);
+ ok_int(GetDIBits((HDC)UlongToHandle(0xff00ff00), (HBITMAP)UlongToHandle(0xff00ff00),
0, 5, NULL, pbi, DIB_RGB_COLORS), 0);
ok_err(0x57);
SetLastError(0xdeadbabe);
ok_int(GetDIBits(NULL, hbmp, 0, 5, NULL, pbi, DIB_RGB_COLORS), 0);
diff --git a/modules/rostests/apitests/gdi32/GetObject.c
b/modules/rostests/apitests/gdi32/GetObject.c
index a11241ea20..f9f24bda03 100644
--- a/modules/rostests/apitests/gdi32/GetObject.c
+++ b/modules/rostests/apitests/gdi32/GetObject.c
@@ -7,6 +7,8 @@
#include "precomp.h"
+#define INVALID_POINTER ((PVOID)(ULONG_PTR)0xdeadbeefdeadbeefULL)
+
void
Test_General(void)
{
@@ -124,21 +126,21 @@ Test_General(void)
/* Test invalid buffer */
SetLastError(0xbadbad00);
- ok(GetObjectA(GetStockObject(WHITE_BRUSH), sizeof(LOGBRUSH), (PVOID)0xc0000000) == 0,
"\n");
+ ok(GetObjectA(GetStockObject(WHITE_BRUSH), sizeof(LOGBRUSH), INVALID_POINTER) == 0,
"\n");
ok((GetLastError() == 0xbadbad00) || (GetLastError() == ERROR_NOACCESS), "wrong
error: %ld\n", GetLastError());
SetLastError(0xbadbad00);
- ok(GetObjectW(GetStockObject(BLACK_PEN), sizeof(LOGPEN), (PVOID)0xc0000000) == 0,
"\n");
+ ok(GetObjectW(GetStockObject(BLACK_PEN), sizeof(LOGPEN), INVALID_POINTER) == 0,
"\n");
ok((GetLastError() == 0xbadbad00) || (GetLastError() == ERROR_NOACCESS), "wrong
error: %ld\n", GetLastError());
SetLastError(0xbadbad00);
- ok(GetObjectW(GetStockObject(21), sizeof(BITMAP), (PVOID)0xc0000000) == 0,
"\n");
+ ok(GetObjectW(GetStockObject(21), sizeof(BITMAP), INVALID_POINTER) == 0,
"\n");
ok((GetLastError() == 0xbadbad00) || (GetLastError() == ERROR_NOACCESS), "wrong
error: %ld\n", GetLastError());
SetLastError(0xbadbad00);
- ok(GetObjectW(GetStockObject(SYSTEM_FONT), sizeof(LOGFONT), (PVOID)0xc0000000) == 0,
"\n");
+ ok(GetObjectW(GetStockObject(SYSTEM_FONT), sizeof(LOGFONT), INVALID_POINTER) == 0,
"\n");
ok(GetLastError() == 0xbadbad00, "wrong error: %ld\n", GetLastError());
SetLastError(ERROR_SUCCESS);
_SEH2_TRY
{
- ret = GetObjectA(GetStockObject(SYSTEM_FONT), sizeof(LOGFONT),
(PVOID)0xc0000000);
+ ret = GetObjectA(GetStockObject(SYSTEM_FONT), sizeof(LOGFONT), INVALID_POINTER);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
diff --git a/modules/rostests/apitests/gdi32/RealizePalette.c
b/modules/rostests/apitests/gdi32/RealizePalette.c
index d3c20c0b26..d97dc5430f 100644
--- a/modules/rostests/apitests/gdi32/RealizePalette.c
+++ b/modules/rostests/apitests/gdi32/RealizePalette.c
@@ -13,8 +13,8 @@ START_TEST(RealizePalette)
{
InitStuff();
ok_int(RealizePalette(NULL), GDI_ERROR);
- ok_int(RealizePalette((HDC)0xdeadc0de), GDI_ERROR);
- ok_int(RealizePalette((HDC)0x00010001), 0);
+ ok_int(RealizePalette((HDC)UlongToHandle(0xdeadc0de)), GDI_ERROR);
+ ok_int(RealizePalette((HDC)UlongToHandle(0x00010001)), 0);
ok_int(RealizePalette(ghdcDIB32), 0);
}
diff --git a/modules/rostests/apitests/msgina/ShellDimScreen.cpp
b/modules/rostests/apitests/msgina/ShellDimScreen.cpp
index d1ecdcb6fb..da4618cdaa 100644
--- a/modules/rostests/apitests/msgina/ShellDimScreen.cpp
+++ b/modules/rostests/apitests/msgina/ShellDimScreen.cpp
@@ -14,6 +14,7 @@
// stolen from com_apitest.h
DEFINE_GUID(CLSID_FadeTask, 0x7EB5FBE4, 0x2100, 0x49E6, 0x85, 0x93, 0x17,
0xE1, 0x30, 0x12, 0x2F, 0x91);
+#define INVALID_POINTER ((PVOID)(ULONG_PTR)0xdeadbeefdeadbeefULL)
typedef HRESULT (__stdcall *tShellDimScreen) (IUnknown** Unknown, HWND* hWindow);
@@ -21,8 +22,8 @@ tShellDimScreen ShellDimScreen;
static void Test_Dim()
{
- IUnknown* unk = (IUnknown*)0xdeadbeef;
- HWND wnd = (HWND)0xdeadbeef;
+ IUnknown* unk = (IUnknown*)INVALID_POINTER;
+ HWND wnd = (HWND)INVALID_POINTER;
ULONG count;
HRESULT hr = ShellDimScreen(NULL, NULL);
@@ -30,24 +31,24 @@ static void Test_Dim()
hr = ShellDimScreen(&unk, &wnd);
ok_hex(hr, S_OK);
- ok(unk != ((IUnknown*)0xdeadbeef), "Expected a valid object\n");
- ok(wnd != ((HWND)0xdeadbeef), "Expected a valid window ptr\n");
+ ok(unk != INVALID_POINTER, "Expected a valid object\n");
+ ok(wnd != INVALID_POINTER, "Expected a valid window ptr\n");
ok(IsWindow(wnd), "Expected a valid window\n");
ok(IsWindowVisible(wnd), "Expected the window to be visible\n");
- if (unk != ((IUnknown*)0xdeadbeef) && unk)
+ if (unk != ((IUnknown*)INVALID_POINTER) && unk)
{
count = unk->Release();
ok(count == 0, "Expected count to be 0, was: %lu\n", count);
ok(!IsWindow(wnd), "Expected the window to be destroyed\n");
}
- unk = (IUnknown*)0xdeadbeef;
- wnd = (HWND)0xdeadbeef;
+ unk = (IUnknown*)INVALID_POINTER;
+ wnd = (HWND)INVALID_POINTER;
hr = ShellDimScreen(&unk, &wnd);
ok_hex(hr, S_OK);
- ok(unk != ((IUnknown*)0xdeadbeef), "Expected a valid object\n");
- ok(wnd != ((HWND)0xdeadbeef), "Expected a valid window ptr\n");
+ ok(unk != ((IUnknown*)INVALID_POINTER), "Expected a valid object\n");
+ ok(wnd != ((HWND)INVALID_POINTER), "Expected a valid window ptr\n");
ok(IsWindow(wnd), "Expected a valid window\n");
ok(IsWindowVisible(wnd), "Expected the window to be visible\n");
char classname[100] = {0};
@@ -60,7 +61,7 @@ static void Test_Dim()
style = GetWindowLong(wnd, GWL_EXSTYLE);
ok(style == WS_EX_TOPMOST, "Expected exstyle to be %x, was %lx\n",
WS_EX_TOPMOST, style);
- if (unk != ((IUnknown*)0xdeadbeef) && unk)
+ if (unk != ((IUnknown*)INVALID_POINTER) && unk)
{
count = unk->AddRef();
ok(count == 2, "Expected count to be 2, was: %lu\n", count);
@@ -92,7 +93,7 @@ static void Test_Dim()
ok((rc.right - rc.left) == GetSystemMetrics(SM_CXVIRTUALSCREEN), "Expected
rc.left to be %u, was %lu\n", GetSystemMetrics(SM_CXVIRTUALSCREEN), (rc.right -
rc.left));
ok((rc.bottom - rc.top) == GetSystemMetrics(SM_CYVIRTUALSCREEN), "Expected
rc.top to be %u, was %lu\n", GetSystemMetrics(SM_CYVIRTUALSCREEN), (rc.bottom -
rc.top));
- if (unk != ((IUnknown*)0xdeadbeef) && unk)
+ if (unk != ((IUnknown*)INVALID_POINTER) && unk)
{
count = unk->Release();
ok(count == 0, "Expected count to be 0, was: %lu\n", count);
diff --git a/modules/rostests/apitests/shell32/CMyComputer.cpp
b/modules/rostests/apitests/shell32/CMyComputer.cpp
index 712cf4dcd0..85f04fc738 100644
--- a/modules/rostests/apitests/shell32/CMyComputer.cpp
+++ b/modules/rostests/apitests/shell32/CMyComputer.cpp
@@ -11,6 +11,8 @@
#include <debug.h>
#include <shellutils.h>
+#define INVALID_POINTER ((PVOID)(ULONG_PTR)0xdeadbeefdeadbeefULL)
+
static
VOID
TestShellFolder(
@@ -55,7 +57,7 @@ VOID TestInitialize(_In_ IShellFolder2 *psf2)
hr = ppf2->Initialize(NULL);
ok(hr == S_OK, "hr = %lx\n", hr);
- hr = ppf2->Initialize((LPCITEMIDLIST)0xdeaddead);
+ hr = ppf2->Initialize((LPCITEMIDLIST)INVALID_POINTER);
ok(hr == S_OK, "hr = %lx\n", hr);
//crashes in xp
diff --git a/modules/rostests/apitests/shell32/CUserNotification.cpp
b/modules/rostests/apitests/shell32/CUserNotification.cpp
index ec40f42584..1cb3dff45e 100644
--- a/modules/rostests/apitests/shell32/CUserNotification.cpp
+++ b/modules/rostests/apitests/shell32/CUserNotification.cpp
@@ -88,7 +88,7 @@ TestNotification(void)
}
/* Set an invalid icon for the notification icon */
- hr = pUserNotif->SetIconInfo((HICON)0xdeadbeef, L"Tooltip text");
+ hr = pUserNotif->SetIconInfo((HICON)UlongToHandle(0xdeadbeef), L"Tooltip
text");
ok_hr(hr, S_OK);
#if 0
diff --git a/modules/rostests/apitests/shell32/menu.cpp
b/modules/rostests/apitests/shell32/menu.cpp
index b10fef0013..49efa1e7d0 100644
--- a/modules/rostests/apitests/shell32/menu.cpp
+++ b/modules/rostests/apitests/shell32/menu.cpp
@@ -120,7 +120,7 @@ void test_CShellMenu_params()
hResult = shellMenu->SetMenu(hmenu, NULL, 0);
test_S_OK(hResult, "SetMenu failed");
- hwndToolbar = (HWND)0xdeadbeef;
+ hwndToolbar = (HWND)UlongToPtr(0xdeadbeef);
hResult = dockingMenu->GetWindow(&hwndToolbar);
test_S_OK(hResult, "GetWindow failed");
ok (hwndToolbar == NULL, "Expected NULL window\n");
@@ -144,7 +144,7 @@ void test_CShellMenu_params()
hResult = shellMenu->SetShellFolder(NULL, NULL, 0, 0);
test_HRES(hResult, E_INVALIDARG, "SetShellFolder should fail");
- hwndToolbar = (HWND)0xdeadbeef;
+ hwndToolbar = (HWND)UlongToHandle(0xdeadbeef);
hResult = dockingMenu->GetWindow(&hwndToolbar);
test_S_OK(hResult, "GetWindow failed");
ok (hwndToolbar == NULL, "Expected NULL window\n");
diff --git a/modules/rostests/apitests/spoolss/MarshallDownStructuresArray.c
b/modules/rostests/apitests/spoolss/MarshallDownStructuresArray.c
index e4033b0ac4..7f37a11709 100644
--- a/modules/rostests/apitests/spoolss/MarshallDownStructuresArray.c
+++ b/modules/rostests/apitests/spoolss/MarshallDownStructuresArray.c
@@ -18,6 +18,8 @@
#include <marshalling/marshalling.h>
#include <marshalling/ports.h>
+#define INVALID_POINTER ((PVOID)(ULONG_PTR)0xdeadbeefdeadbeefULL)
+
START_TEST(MarshallDownStructuresArray)
{
const DWORD cElements = 2;
@@ -49,11 +51,11 @@ START_TEST(MarshallDownStructuresArray)
// This is triggered by both pStructuresArray and pInfo.
SetLastError(0xDEADBEEF);
- ok(!MarshallDownStructuresArray((PVOID)0xDEADDEAD, 1, NULL, 0, FALSE),
"MarshallDownStructuresArray returns TRUE!\n");
+ ok(!MarshallDownStructuresArray(INVALID_POINTER, 1, NULL, 0, FALSE),
"MarshallDownStructuresArray returns TRUE!\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError returns
%lu!\n", GetLastError());
SetLastError(0xDEADBEEF);
- ok(!MarshallDownStructuresArray(NULL, 1, (const MARSHALLING_INFO*)0xDEADDEAD, 0,
FALSE), "MarshallDownStructuresArray returns TRUE!\n");
+ ok(!MarshallDownStructuresArray(NULL, 1, (const MARSHALLING_INFO*)INVALID_POINTER, 0,
FALSE), "MarshallDownStructuresArray returns TRUE!\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError returns
%lu!\n", GetLastError());
// Now create two PORT_INFO_2W structures.
@@ -99,13 +101,13 @@ START_TEST(MarshallDownStructuresArray)
// Due to the implementation of PackStrings, (&pPortInfo2[0])->pPortName
contains the highest offset.
// Show that MarshallUpStructuresArray checks the offsets and bails out with
ERROR_INVALID_DATA if cbSize <= highest offset.
SetLastError(0xDEADBEEF);
- ok(!MarshallUpStructuresArray((DWORD)(&pPortInfo2[0])->pPortName,
pPortInfo2Test, cElements, pPortInfoMarshalling[2]->pInfo,
pPortInfoMarshalling[2]->cbStructureSize, TRUE), "MarshallUpStructuresArray
returns TRUE!\n");
+ ok(!MarshallUpStructuresArray((DWORD_PTR)(&pPortInfo2[0])->pPortName,
pPortInfo2Test, cElements, pPortInfoMarshalling[2]->pInfo,
pPortInfoMarshalling[2]->cbStructureSize, TRUE), "MarshallUpStructuresArray
returns TRUE!\n");
ok(GetLastError() == ERROR_INVALID_DATA, "GetLastError returns %lu!\n",
GetLastError());
// It works with cbSize > highest offset.
// In real world cases, we would use cbPortInfo2Size for cbSize.
SetLastError(0xDEADBEEF);
- ok(MarshallUpStructuresArray((DWORD)(&pPortInfo2[0])->pPortName + 1,
pPortInfo2, cElements, pPortInfoMarshalling[2]->pInfo,
pPortInfoMarshalling[2]->cbStructureSize, TRUE), "MarshallUpStructuresArray
returns FALSE!\n");
+ ok(MarshallUpStructuresArray((DWORD_PTR)(&pPortInfo2[0])->pPortName + 1,
pPortInfo2, cElements, pPortInfoMarshalling[2]->pInfo,
pPortInfoMarshalling[2]->cbStructureSize, TRUE), "MarshallUpStructuresArray
returns FALSE!\n");
ok(GetLastError() == 0xDEADBEEF, "GetLastError returns %lu!\n",
GetLastError());
// pPortInfo2 should now be identical to the copy again.
diff --git a/modules/rostests/apitests/spoolss/MarshallUpStructuresArray.c
b/modules/rostests/apitests/spoolss/MarshallUpStructuresArray.c
index d47c8b21dd..17515c0b62 100644
--- a/modules/rostests/apitests/spoolss/MarshallUpStructuresArray.c
+++ b/modules/rostests/apitests/spoolss/MarshallUpStructuresArray.c
@@ -12,6 +12,8 @@
#include <winbase.h>
#include <marshalling/marshalling.h>
+#define INVALID_POINTER ((PVOID)(ULONG_PTR)0xdeadbeefdeadbeefULL)
+
START_TEST(MarshallUpStructuresArray)
{
// Setting cElements to zero should yield success.
@@ -26,11 +28,11 @@ START_TEST(MarshallUpStructuresArray)
// This is triggered by both pStructuresArray and pInfo.
SetLastError(0xDEADBEEF);
- ok(!MarshallUpStructuresArray(0, (PVOID)0xDEADDEAD, 1, NULL, 0, FALSE),
"MarshallUpStructuresArray returns TRUE!\n");
+ ok(!MarshallUpStructuresArray(0, INVALID_POINTER, 1, NULL, 0, FALSE),
"MarshallUpStructuresArray returns TRUE!\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError returns
%lu!\n", GetLastError());
SetLastError(0xDEADBEEF);
- ok(!MarshallUpStructuresArray(0, NULL, 1, (const MARSHALLING_INFO*)0xDEADDEAD, 0,
FALSE), "MarshallUpStructuresArray returns TRUE!\n");
+ ok(!MarshallUpStructuresArray(0, NULL, 1, (const MARSHALLING_INFO*)INVALID_POINTER,
0, FALSE), "MarshallUpStructuresArray returns TRUE!\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError returns
%lu!\n", GetLastError());
// More testing is conducted in the MarshallDownStructuresArray test.
diff --git a/modules/rostests/apitests/user32/CreateWindowEx.c
b/modules/rostests/apitests/user32/CreateWindowEx.c
index 24ac64d26f..068dbc5208 100644
--- a/modules/rostests/apitests/user32/CreateWindowEx.c
+++ b/modules/rostests/apitests/user32/CreateWindowEx.c
@@ -805,7 +805,7 @@ static LRESULT CALLBACK MSGTestProcMDI2(HWND hWnd, UINT message,
WPARAM wParam,
mcs.style = WS_MAXIMIZE;
hchild = (HWND) SendMessage (g_hwndMDIClient, WM_MDICREATE, 0,
- (LONG)(LPMDICREATESTRUCT) &mcs);
+ (LPARAM)&mcs);
ok(hchild == g_ChildWindow, "We are testing with %p instead of %p\n",
g_ChildWindow, hchild);
}
diff --git a/modules/rostests/apitests/user32/GetUserObjectInformation.c
b/modules/rostests/apitests/user32/GetUserObjectInformation.c
index 31ad447288..71c441fc85 100644
--- a/modules/rostests/apitests/user32/GetUserObjectInformation.c
+++ b/modules/rostests/apitests/user32/GetUserObjectInformation.c
@@ -121,11 +121,11 @@ FreeGuarded(
#define TestUserObjectInfoWithString(Handle, Index, Buffer, BufferSize, String) do
\
{
\
BOOLEAN _Check;
\
- ULONG SizeOfString = wcslen(String) * sizeof(WCHAR) + sizeof(UNICODE_NULL);
\
+ SIZE_T SizeOfString = wcslen(String) * sizeof(WCHAR) + sizeof(UNICODE_NULL);
\
TestUserObjectInfo(Handle, Index, NULL, 0,
FALSE, ERROR_INSUFFICIENT_BUFFER, SizeOfString); \
- TestUserObjectInfo(Handle, Index, (PVOID)1, 0,
FALSE, ERROR_INSUFFICIENT_BUFFER, SizeOfString); \
+ TestUserObjectInfo(Handle, Index, UlongToPtr(1), 0,
FALSE, ERROR_INSUFFICIENT_BUFFER, SizeOfString); \
TestUserObjectInfo(Handle, Index, NULL, 1,
FALSE, ERROR_NOACCESS, NOTSET); \
- TestUserObjectInfo(Handle, Index, (PVOID)1, 1,
FALSE, ERROR_NOACCESS, NOTSET); \
+ TestUserObjectInfo(Handle, Index, UlongToPtr(1), 1,
FALSE, ERROR_NOACCESS, NOTSET); \
RtlFillMemory(Buffer, BufferSize, 0x55);
\
TestUserObjectInfo(Handle, Index, Buffer, SizeOfString - 2,
FALSE, ERROR_INSUFFICIENT_BUFFER, SizeOfString); \
_Check = CheckBuffer(Buffer, BufferSize, 0x55);
\
@@ -168,21 +168,21 @@ TestGetUserObjectInfoW(void)
TestUserObjectInfo(NULL, 5, NULL, 0,
FALSE, ERROR_INVALID_HANDLE, 0);
TestUserObjectInfo(NULL, UOI_FLAGS, NULL, 0,
FALSE, ERROR_INVALID_HANDLE, 0);
- TestUserObjectInfo(NULL, UOI_FLAGS, (PVOID)1, 0,
FALSE, ERROR_INVALID_HANDLE, 0);
+ TestUserObjectInfo(NULL, UOI_FLAGS, UlongToPtr(1), 0,
FALSE, ERROR_INVALID_HANDLE, 0);
TestUserObjectInfo(NULL, UOI_FLAGS, NULL, 1,
FALSE, ERROR_NOACCESS, NOTSET);
- TestUserObjectInfo(NULL, UOI_FLAGS, (PVOID)1, 1,
FALSE, ERROR_NOACCESS, NOTSET);
+ TestUserObjectInfo(NULL, UOI_FLAGS, UlongToPtr(1), 1,
FALSE, ERROR_NOACCESS, NOTSET);
TestUserObjectInfo(NULL, UOI_FLAGS, &UserObjectFlags, sizeof(UserObjectFlags),
FALSE, ERROR_INVALID_HANDLE, 0);
TestUserObjectInfo(NULL, UOI_TYPE, NULL, 0,
FALSE, ERROR_INVALID_HANDLE, 0);
- TestUserObjectInfo(NULL, UOI_TYPE, (PVOID)1, 0,
FALSE, ERROR_INVALID_HANDLE, 0);
+ TestUserObjectInfo(NULL, UOI_TYPE, UlongToPtr(1), 0,
FALSE, ERROR_INVALID_HANDLE, 0);
TestUserObjectInfo(NULL, UOI_TYPE, NULL, 1,
FALSE, ERROR_NOACCESS, NOTSET);
- TestUserObjectInfo(NULL, UOI_TYPE, (PVOID)1, 1,
FALSE, ERROR_NOACCESS, NOTSET);
+ TestUserObjectInfo(NULL, UOI_TYPE, UlongToPtr(1), 1,
FALSE, ERROR_NOACCESS, NOTSET);
TestUserObjectInfo(NULL, UOI_TYPE, Buffer, BufferSize,
FALSE, ERROR_INVALID_HANDLE, 0);
TestUserObjectInfo(NULL, UOI_NAME, NULL, 0,
FALSE, ERROR_INVALID_HANDLE, 0);
- TestUserObjectInfo(NULL, UOI_NAME, (PVOID)1, 0,
FALSE, ERROR_INVALID_HANDLE, 0);
+ TestUserObjectInfo(NULL, UOI_NAME, UlongToPtr(1), 0,
FALSE, ERROR_INVALID_HANDLE, 0);
TestUserObjectInfo(NULL, UOI_NAME, NULL, 1,
FALSE, ERROR_NOACCESS, NOTSET);
- TestUserObjectInfo(NULL, UOI_NAME, (PVOID)1, 1,
FALSE, ERROR_NOACCESS, NOTSET);
+ TestUserObjectInfo(NULL, UOI_NAME, UlongToPtr(1), 1,
FALSE, ERROR_NOACCESS, NOTSET);
TestUserObjectInfo(NULL, UOI_NAME, Buffer, BufferSize,
FALSE, ERROR_INVALID_HANDLE, 0);
Desktop = GetThreadDesktop(GetCurrentThreadId());
@@ -203,9 +203,9 @@ TestGetUserObjectInfoW(void)
TestUserObjectInfo(Desktop, 5, NULL, 0,
FALSE, ERROR_INVALID_PARAMETER, 0);
TestUserObjectInfo(Desktop, UOI_FLAGS, NULL, 0,
FALSE, ERROR_INSUFFICIENT_BUFFER, sizeof(USEROBJECTFLAGS));
- TestUserObjectInfo(Desktop, UOI_FLAGS, (PVOID)1, 0,
FALSE, ERROR_INSUFFICIENT_BUFFER, sizeof(USEROBJECTFLAGS));
+ TestUserObjectInfo(Desktop, UOI_FLAGS, UlongToPtr(1), 0,
FALSE, ERROR_INSUFFICIENT_BUFFER, sizeof(USEROBJECTFLAGS));
TestUserObjectInfo(Desktop, UOI_FLAGS, NULL, 1,
FALSE, ERROR_NOACCESS, NOTSET);
- TestUserObjectInfo(Desktop, UOI_FLAGS, (PVOID)1, 1,
FALSE, ERROR_NOACCESS, NOTSET);
+ TestUserObjectInfo(Desktop, UOI_FLAGS, UlongToPtr(1), 1,
FALSE, ERROR_NOACCESS, NOTSET);
TestUserObjectInfo(Desktop, UOI_FLAGS, &UserObjectFlags, sizeof(UserObjectFlags),
TRUE, 0xdeadbeef, sizeof(USEROBJECTFLAGS));
TestUserObjectInfoWithString(Desktop, UOI_TYPE, Buffer, BufferSize,
L"Desktop");
diff --git a/modules/rostests/apitests/user32/PrivateExtractIcons.c
b/modules/rostests/apitests/user32/PrivateExtractIcons.c
index b2b3ef33de..339e3923ac 100644
--- a/modules/rostests/apitests/user32/PrivateExtractIcons.c
+++ b/modules/rostests/apitests/user32/PrivateExtractIcons.c
@@ -36,16 +36,16 @@ START_TEST(PrivateExtractIcons)
for (i = 0; i < _countof(IconTests); ++i)
{
/* Always test extraction of the FIRST icon (index 0) */
- ahIcon = (HICON)0xdeadbeef;
+ ahIcon = (HICON)UlongToHandle(0xdeadbeef);
aIconId = 0xdeadbeef;
cIcons = PrivateExtractIconsW(IconTests[i].FilePath, 0, 16, 16, &ahIcon,
&aIconId, 1, 0);
ok(cIcons == IconTests[i].cIcons, "PrivateExtractIconsW(%u): got %u,
expected %u\n", i, cIcons, IconTests[i].cIcons);
- ok(ahIcon != (HICON)0xdeadbeef, "PrivateExtractIconsW(%u): icon not
set\n", i);
+ ok(ahIcon != (HICON)UlongToHandle(0xdeadbeef), "PrivateExtractIconsW(%u):
icon not set\n", i);
ok((IconTests[i].bhIconValid && ahIcon) || (!IconTests[i].bhIconValid
&& !ahIcon),
"PrivateExtractIconsW(%u): icon expected to be %s, but got
0x%p\n",
i, IconTests[i].bhIconValid ? "valid" : "not valid",
ahIcon);
ok(aIconId != 0xdeadbeef, "PrivateExtractIconsW(%u): id not set\n",
i);
- if (ahIcon && ahIcon != (HICON)0xdeadbeef)
+ if (ahIcon && ahIcon != (HICON)UlongToHandle(0xdeadbeef))
DestroyIcon(ahIcon);
}
}
diff --git a/modules/rostests/apitests/user32/SendMessageTimeout.c
b/modules/rostests/apitests/user32/SendMessageTimeout.c
index e633168732..858d9384cc 100644
--- a/modules/rostests/apitests/user32/SendMessageTimeout.c
+++ b/modules/rostests/apitests/user32/SendMessageTimeout.c
@@ -193,8 +193,8 @@ TestRecursiveInterThreadMessages(
BOOL Ret;
DWORD ExitCode;
- Parameter = (PVOID)((KillThread1 ? KILL_THREAD1_FLAG : 0) |
- (KillThread2 ? KILL_THREAD2_FLAG : 0));
+ Parameter = UlongToPtr((KillThread1 ? KILL_THREAD1_FLAG : 0) |
+ (KillThread2 ? KILL_THREAD2_FLAG : 0));
hThread1 = CreateThread(NULL, 0, Thread1, Parameter, CREATE_SUSPENDED,
&dwThread1);
hThread2 = CreateThread(NULL, 0, Thread2, Parameter, CREATE_SUSPENDED,
&dwThread2);
diff --git a/modules/rostests/apitests/user32/SystemParametersInfo.c
b/modules/rostests/apitests/user32/SystemParametersInfo.c
index 64330bc79b..9872909474 100644
--- a/modules/rostests/apitests/user32/SystemParametersInfo.c
+++ b/modules/rostests/apitests/user32/SystemParametersInfo.c
@@ -140,34 +140,34 @@ static void Test_MouseSpeed()
ok(ulMouseSpeed >= 1 && ulMouseSpeed <=20, "Wrong mouse speed
(%d)\n", (int)ulMouseSpeed);
temp = 1;
- ret = SystemParametersInfo(SPI_SETMOUSESPEED, 0, (PVOID)temp, SPIF_SENDCHANGE |
SPIF_UPDATEINIFILE);
+ ret = SystemParametersInfo(SPI_SETMOUSESPEED, 0, UlongToPtr(temp), SPIF_SENDCHANGE |
SPIF_UPDATEINIFILE);
ok(ret, "SystemParametersInfo failed\n");
ret = SystemParametersInfo(SPI_GETMOUSESPEED, 0, &temp, 0);
ok(ret, "SystemParametersInfo failed\n");
ok(temp == 1, "SPI_GETMOUSESPEED did not get value set by SPI_SETMOUSESPEED (%d
instead of 1)\n", (int)temp);
temp = 20;
- ret = SystemParametersInfo(SPI_SETMOUSESPEED, 0, (PVOID)temp, SPIF_SENDCHANGE |
SPIF_UPDATEINIFILE);
+ ret = SystemParametersInfo(SPI_SETMOUSESPEED, 0, UlongToPtr(temp), SPIF_SENDCHANGE |
SPIF_UPDATEINIFILE);
ok(ret, "SystemParametersInfo failed\n");
ret = SystemParametersInfo(SPI_GETMOUSESPEED, 0, &temp, 0);
ok(ret, "SystemParametersInfo failed\n");
ok(temp == 20, "SPI_GETMOUSESPEED did not get value set by SPI_SETMOUSESPEED (%d
instead of 20)\n", (int)temp);
temp = 21;
- ret = SystemParametersInfo(SPI_SETMOUSESPEED, 0, (PVOID)temp, SPIF_SENDCHANGE |
SPIF_UPDATEINIFILE);
+ ret = SystemParametersInfo(SPI_SETMOUSESPEED, 0, UlongToPtr(temp), SPIF_SENDCHANGE |
SPIF_UPDATEINIFILE);
ok(!ret, "expected SystemParametersInfo to fail\n");
ret = SystemParametersInfo(SPI_GETMOUSESPEED, 0, &temp, 0);
ok(ret, "SystemParametersInfo failed\n");
ok(temp == 20, "SPI_GETMOUSESPEED got unexpected value (%d instead of
20)\n", (int)temp);
temp = 0;
- ret = SystemParametersInfo(SPI_SETMOUSESPEED, 0, (PVOID)temp, SPIF_SENDCHANGE |
SPIF_UPDATEINIFILE);
+ ret = SystemParametersInfo(SPI_SETMOUSESPEED, 0, UlongToPtr(temp), SPIF_SENDCHANGE |
SPIF_UPDATEINIFILE);
ok(!ret, "expected SystemParametersInfo to fail\n");
ret = SystemParametersInfo(SPI_GETMOUSESPEED, 0, &temp, 0);
ok(ret, "SystemParametersInfo failed\n");
ok(temp == 20, "SPI_GETMOUSESPEED got unexpected value (%d instead of
20)\n", (int)temp);
- ret = SystemParametersInfo(SPI_SETMOUSESPEED, 0, (PVOID)ulMouseSpeed, SPIF_SENDCHANGE
| SPIF_UPDATEINIFILE);
+ ret = SystemParametersInfo(SPI_SETMOUSESPEED, 0, UlongToPtr(ulMouseSpeed),
SPIF_SENDCHANGE | SPIF_UPDATEINIFILE);
ok(ret, "SystemParametersInfo failed\n");
}
diff --git a/modules/rostests/tests/mmixer_test/test.c
b/modules/rostests/tests/mmixer_test/test.c
index 6aaf1bd9ca..b44feeba94 100644
--- a/modules/rostests/tests/mmixer_test/test.c
+++ b/modules/rostests/tests/mmixer_test/test.c
@@ -100,7 +100,7 @@ printMixerLine(LPMIXERLINEW MixerLine, IN ULONG MixerIndex)
MixerLineControls.cbmxctrl= sizeof(MIXERCONTROLW);
MixerLineControls.pamxctrl = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
MixerLineControls.cControls * sizeof(MIXERCONTROLW));
- Result = mixerGetLineControlsW((HMIXEROBJ)MixerIndex, &MixerLineControls,
MIXER_GETLINECONTROLSF_ALL | MIXER_OBJECTF_MIXER);
+ Result = mixerGetLineControlsW((HMIXEROBJ)UlongToHandle(MixerIndex),
&MixerLineControls, MIXER_GETLINECONTROLSF_ALL | MIXER_OBJECTF_MIXER);
printf("Result %u\n", Result);
@@ -136,7 +136,7 @@ printMixerLine(LPMIXERLINEW MixerLine, IN ULONG MixerIndex)
MixerControlDetails.dwControlID =
MixerLineControls.pamxctrl[Index].dwControlID;
MixerControlDetails.paDetails = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
MixerControlDetails.cbDetails * MixerControlDetails.cChannels *
MixerControlDetails.cMultipleItems);
- Result = mixerGetControlDetailsW((HMIXEROBJ)MixerIndex,
&MixerControlDetails, MIXER_GETCONTROLDETAILSF_LISTTEXT | MIXER_OBJECTF_MIXER);
+ Result = mixerGetControlDetailsW((HMIXEROBJ)UlongToHandle(MixerIndex),
&MixerControlDetails, MIXER_GETCONTROLDETAILSF_LISTTEXT | MIXER_OBJECTF_MIXER);
printf("Result %x\n", Result);
ListText = (LPMIXERCONTROLDETAILS_LISTTEXTW)MixerControlDetails.paDetails;
@@ -190,7 +190,7 @@ test();
DstMixerLine.dwDestination = DestinationIndex;
DstMixerLine.cbStruct = sizeof(DstMixerLine);
- Result = mixerGetLineInfoW((HMIXEROBJ)MixerIndex, &DstMixerLine,
MIXER_GETLINEINFOF_DESTINATION | MIXER_OBJECTF_MIXER);
+ Result = mixerGetLineInfoW((HMIXEROBJ)UlongToHandle(MixerIndex),
&DstMixerLine, MIXER_GETLINEINFOF_DESTINATION | MIXER_OBJECTF_MIXER);
printf("\n");
printf("Destination Index %lu\n", DestinationIndex);
printMixerLine(&DstMixerLine, MixerIndex);
@@ -201,7 +201,7 @@ test();
SrcLine.dwSource = SrcIndex;
SrcLine.cbStruct = sizeof(SrcLine);
- Result = mixerGetLineInfoW((HMIXEROBJ)MixerIndex, &SrcLine,
MIXER_GETLINEINFOF_SOURCE | MIXER_OBJECTF_MIXER);
+ Result = mixerGetLineInfoW((HMIXEROBJ)UlongToHandle(MixerIndex),
&SrcLine, MIXER_GETLINEINFOF_SOURCE | MIXER_OBJECTF_MIXER);
if (Result == MMSYSERR_NOERROR)
{
diff --git a/modules/rostests/winetests/CMakeLists.txt
b/modules/rostests/winetests/CMakeLists.txt
index 959db2b927..0e70ccb1cc 100644
--- a/modules/rostests/winetests/CMakeLists.txt
+++ b/modules/rostests/winetests/CMakeLists.txt
@@ -1,6 +1,10 @@
add_definitions(-D__ROS_LONG64__)
+if (MSVC AND ARCH STREQUAL "amd64")
+ add_compile_flags("/wd4312")
+endif()
+
add_subdirectory(advapi32)
add_subdirectory(advpack)
add_subdirectory(amstream)
diff --git a/modules/rostests/winetests/ntdll/CMakeLists.txt
b/modules/rostests/winetests/ntdll/CMakeLists.txt
index 7baff0b38e..c0e90fe99d 100644
--- a/modules/rostests/winetests/ntdll/CMakeLists.txt
+++ b/modules/rostests/winetests/ntdll/CMakeLists.txt
@@ -8,7 +8,6 @@ list(APPEND SOURCE
directory.c
env.c
error.c
- exception.c
file.c
info.c
large_int.c
@@ -26,7 +25,9 @@ list(APPEND SOURCE
precomp.h)
if(ARCH STREQUAL "i386")
- list(APPEND SOURCE generated.c)
+ list(APPEND SOURCE
+ exception.c
+ generated.c)
endif()
add_executable(ntdll_winetest ${SOURCE} testlist.c)
diff --git a/modules/rostests/winetests/ntdll/testlist.c
b/modules/rostests/winetests/ntdll/testlist.c
index 989040c562..fb64074ac4 100644
--- a/modules/rostests/winetests/ntdll/testlist.c
+++ b/modules/rostests/winetests/ntdll/testlist.c
@@ -32,7 +32,9 @@ const struct test winetest_testlist[] =
{ "directory", func_directory },
{ "env", func_env },
{ "error", func_error },
+#ifdef _M_IX86
{ "exception", func_exception },
+#endif
{ "file", func_file },
#ifdef _M_IX86
{ "generated", func_generated },