Author: sginsberg
Date: Mon Aug 3 18:59:43 2009
New Revision: 42365
URL:
http://svn.reactos.org/svn/reactos?rev=42365&view=rev
Log:
- Fix some msvc issues in rostests
Modified:
trunk/rostests/apitests/gdi32api/tests/GetCurrentObject.c
trunk/rostests/apitests/gdi32api/tests/GetObject.c
trunk/rostests/apitests/w32knapi/ntgdi/NtGdiCreateDIBSection.c
trunk/rostests/apitests/w32knapi/ntuser/NtUserSystemParametersInfo.c
trunk/rostests/dibtests/bltrop/bltrop.c
trunk/rostests/drivers/kmtest/deviface_test.c
trunk/rostests/drivers/kmtest/ntos_ex.c
trunk/rostests/tests/DxHalTest/main.c
trunk/rostests/tests/Imagelistviewer/main.c
trunk/rostests/tests/global_mem/global_mem.c
trunk/rostests/tests/miditest/miditest.c
trunk/rostests/tests/winhello/winhello.c
Modified: trunk/rostests/apitests/gdi32api/tests/GetCurrentObject.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/G…
==============================================================================
--- trunk/rostests/apitests/gdi32api/tests/GetCurrentObject.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/gdi32api/tests/GetCurrentObject.c [iso-8859-1] Mon Aug 3
18:59:43 2009
@@ -4,6 +4,7 @@
{
HWND hWnd;
HDC hDC;
+ HBITMAP hBmp;
/* Create a window */
hWnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW |
WS_VISIBLE,
@@ -70,7 +71,6 @@
/* Default bitmap */
SetLastError(ERROR_SUCCESS);
- HBITMAP hBmp;
hBmp = GetCurrentObject(hDC, OBJ_BITMAP);
RTEST(GDI_HANDLE_GET_TYPE(hBmp) == GDI_OBJECT_TYPE_BITMAP);
RTEST(GetLastError() == ERROR_SUCCESS);
Modified: trunk/rostests/apitests/gdi32api/tests/GetObject.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/G…
==============================================================================
--- trunk/rostests/apitests/gdi32api/tests/GetObject.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/gdi32api/tests/GetObject.c [iso-8859-1] Mon Aug 3 18:59:43
2009
@@ -103,9 +103,10 @@
BITMAP bitmap;
DIBSECTION dibsection;
PVOID pData;
+ HDC hDC;
FillMemory(&dibsection, sizeof(DIBSECTION), 0x77);
- HDC hDC = GetDC(0);
+ hDC = GetDC(0);
hBitmap = CreateDIBSection(hDC, &bmi, DIB_RGB_COLORS, &pData, NULL, 0);
ASSERT(hBitmap);
Modified: trunk/rostests/apitests/w32knapi/ntgdi/NtGdiCreateDIBSection.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/ntgdi/N…
==============================================================================
--- trunk/rostests/apitests/w32knapi/ntgdi/NtGdiCreateDIBSection.c [iso-8859-1]
(original)
+++ trunk/rostests/apitests/w32knapi/ntgdi/NtGdiCreateDIBSection.c [iso-8859-1] Mon Aug 3
18:59:43 2009
@@ -45,6 +45,10 @@
PBITMAPINFOHEADER pbih = (PBITMAPINFOHEADER)&bmi.bmiHeader;
PBITMAPV4HEADER pbV4h = (PBITMAPV4HEADER)&bmi.bmiHeader;
PBITMAPV5HEADER pbV5h = (PBITMAPV5HEADER)&bmi.bmiHeader;
+
+ HANDLE hSection;
+ NTSTATUS Status;
+ LARGE_INTEGER MaximumSize;
hDC = GetDC(0);
pbih->biSize = sizeof(BITMAPINFOHEADER);
@@ -441,10 +445,6 @@
if (hbmp) DeleteObject(hbmp);
/* Test section */
- HANDLE hSection;
- NTSTATUS Status;
- LARGE_INTEGER MaximumSize;
-
MaximumSize.QuadPart = 4096;
Status = ZwCreateSection(&hSection,
SECTION_ALL_ACCESS,
Modified: trunk/rostests/apitests/w32knapi/ntuser/NtUserSystemParametersInfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/ntuser/…
==============================================================================
--- trunk/rostests/apitests/w32knapi/ntuser/NtUserSystemParametersInfo.c [iso-8859-1]
(original)
+++ trunk/rostests/apitests/w32knapi/ntuser/NtUserSystemParametersInfo.c [iso-8859-1] Mon
Aug 3 18:59:43 2009
@@ -66,6 +66,7 @@
// UINT uint;
DWORD data[1000];
UINT i, uint;
+ ACCESSTIMEOUT ato;
#if 1
/* Test normal */
SetLastError(ERROR_SUCCESS);
@@ -78,7 +79,6 @@
TEST(GetLastError() == ERROR_INVALID_PARAMETER);
/* Test wrong cbSize member */
- ACCESSTIMEOUT ato;
ato.cbSize = 1;
SetLastError(ERROR_SUCCESS);
TEST(NtUserSystemParametersInfo(SPI_GETACCESSTIMEOUT, 0, &ato, 0) == FALSE);
Modified: trunk/rostests/dibtests/bltrop/bltrop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/dibtests/bltrop/bltrop.c?…
==============================================================================
--- trunk/rostests/dibtests/bltrop/bltrop.c [iso-8859-1] (original)
+++ trunk/rostests/dibtests/bltrop/bltrop.c [iso-8859-1] Mon Aug 3 18:59:43 2009
@@ -30,6 +30,7 @@
HDC hdc, hdcMem;
BITMAP bitmap;
HBRUSH brush, brush2;
+ INT l;
hdc = BeginPaint(hWnd, &ps);
hdcMem = CreateCompatibleDC(hdc);
@@ -42,7 +43,7 @@
PatBlt(hdc, 30, 0, 4*bitmap.bmWidth*2, 4*bitmap.bmHeight, PATCOPY);
/* hatched brushes */
- INT l = 66;
+ l = 66;
brush = CreateHatchBrush(HS_DIAGCROSS, RGB(255,0,0));
SelectObject(hdc, brush);
PatBlt(hdc, 0, 0, 30, l, PATCOPY);
Modified: trunk/rostests/drivers/kmtest/deviface_test.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/drivers/kmtest/deviface_t…
==============================================================================
--- trunk/rostests/drivers/kmtest/deviface_test.c [iso-8859-1] (original)
+++ trunk/rostests/drivers/kmtest/deviface_test.c [iso-8859-1] Mon Aug 3 18:59:43 2009
@@ -31,8 +31,8 @@
/* PRIVATE FUNCTIONS **********************************************************/
-NTSTATUS NTAPI
-(*IoGetDeviceInterfaces_Func)(
+NTSTATUS
+(NTAPI *IoGetDeviceInterfaces_Func)(
IN CONST GUID *InterfaceClassGuid,
IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL,
IN ULONG Flags,
Modified: trunk/rostests/drivers/kmtest/ntos_ex.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/drivers/kmtest/ntos_ex.c?…
==============================================================================
--- trunk/rostests/drivers/kmtest/ntos_ex.c [iso-8859-1] (original)
+++ trunk/rostests/drivers/kmtest/ntos_ex.c [iso-8859-1] Mon Aug 3 18:59:43 2009
@@ -39,8 +39,8 @@
IN LONG TimerHighValue)
{
+ ULONG *ApcCount = (ULONG *)TimerContext;
DPRINT("Timer Apc called!\n");
- ULONG *ApcCount = (ULONG *)TimerContext;
(*ApcCount)++;
}
Modified: trunk/rostests/tests/DxHalTest/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/DxHalTest/main.c?re…
==============================================================================
--- trunk/rostests/tests/DxHalTest/main.c [iso-8859-1] (original)
+++ trunk/rostests/tests/DxHalTest/main.c [iso-8859-1] Mon Aug 3 18:59:43 2009
@@ -70,6 +70,26 @@
int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
LPSTR lpCmdLine, int nCmdShow)
{
+ /* HAL Startup process */
+ DEVMODE devmode;
+ HBITMAP hbmp;
+ const UINT bmiSize = sizeof(BITMAPINFOHEADER) + 0x10;
+ UCHAR *pbmiData;
+ BITMAPINFO *pbmi;
+
+ DWORD *pMasks;
+ //BOOL newmode = FALSE;
+ //DWORD Status; /* for create surface */
+ UINT i;
+ UINT j;
+ UINT cSurfaces;
+
+ DDHAL_CANCREATESURFACEDATA mDdCanCreateSurface;
+ DDHAL_UPDATEOVERLAYDATA mDdUpdateOverlay;
+ DDRAWI_DDRAWSURFACE_LCL *pDDSurface;
+ DDHAL_CREATESURFACEDATA mDdCreateSurface;
+
+
/* get the functions we need */
// DD_GETDRIVERINFODATA drv;
HMODULE lib = LoadLibrary("gdi32.dll");
@@ -77,20 +97,6 @@
DdQueryDirectDrawObject = (BOOL (APIENTRY*)(LPDDRAWI_DIRECTDRAW_GBL,
LPDDHALINFO,LPDDHAL_DDCALLBACKS,LPDDHAL_DDSURFACECALLBACKS,LPDDHAL_DDPALETTECALLBACKS,LPD3DHAL_CALLBACKS,LPD3DHAL_GLOBALDRIVERDATA,LPDDHAL_DDEXEBUFCALLBACKS,LPDDSURFACEDESC,LPDWORD,LPVIDMEM))GetProcAddress(lib,
"GdiEntry2");
DdAttachSurface = (BOOL (APIENTRY*)(LPDDRAWI_DDRAWSURFACE_LCL,
LPDDRAWI_DDRAWSURFACE_LCL))GetProcAddress(lib, "GdiEntry11");
DdResetVisrgn = (BOOL (APIENTRY*)(LPDDRAWI_DDRAWSURFACE_LCL,
HWND))GetProcAddress(lib, "GdiEntry6");
-
- /* HAL Startup process */
- DEVMODE devmode;
- HBITMAP hbmp;
- const UINT bmiSize = sizeof(BITMAPINFOHEADER) + 0x10;
- UCHAR *pbmiData;
- BITMAPINFO *pbmi;
-
- DWORD *pMasks;
- //BOOL newmode = FALSE;
- //DWORD Status; /* for create surface */
- UINT i;
- UINT j;
-
printf("This apps showing how to start up directx draw/d3d interface and some other
as well\n");
printf("This code have been releae to some close applactons with my premtions, if
any company\n");
@@ -364,7 +370,7 @@
mddsdPrimary.dwFlags = DDSD_CAPS;
mddsdPrimary.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY |
DDSCAPS_VISIBLE;
- DDHAL_CANCREATESURFACEDATA mDdCanCreateSurface;
+ mDdCanCreateSurface;
mDdCanCreateSurface.lpDD = &mDDrawGlobal;
mDdCanCreateSurface.CanCreateSurface = mCallbacks.HALDD.CanCreateSurface;
mDdCanCreateSurface.bIsDifferentPixelFormat = FALSE; //isDifferentPixelFormat;
@@ -405,7 +411,7 @@
mpPrimaryLocals[0] = &mPrimaryLocal;
- DDHAL_CREATESURFACEDATA mDdCreateSurface;
+ mDdCreateSurface;
mDdCreateSurface.lpDD = &mDDrawGlobal;
mDdCreateSurface.CreateSurface = mCallbacks.HALDD.CreateSurface;
mDdCreateSurface.lpDDSurfaceDesc = &mddsdPrimary;//pDDSD;
@@ -500,7 +506,7 @@
mOverlayGlobal.ddpfSurface = mddsdOverlay.ddpfPixelFormat;
// setup front- and backbuffer surfaces
- UINT cSurfaces = mddsdOverlay.dwBackBufferCount + 1;
+ cSurfaces = mddsdOverlay.dwBackBufferCount + 1;
for ( i = 0; i < cSurfaces; i++)
{
memset(&mOverlayMore[i], 0, sizeof(DDRAWI_DDRAWSURFACE_MORE));
@@ -565,7 +571,7 @@
}
- DDHAL_UPDATEOVERLAYDATA mDdUpdateOverlay;
+ mDdUpdateOverlay;
mDdUpdateOverlay.lpDD = &mDDrawGlobal;
mDdUpdateOverlay.UpdateOverlay = mCallbacks.HALDDSurface.UpdateOverlay;
mDdUpdateOverlay.lpDDDestSurface = mpPrimaryLocals[0];
@@ -607,7 +613,7 @@
/* blt */
- DDRAWI_DDRAWSURFACE_LCL *pDDSurface = mpPrimaryLocals[0];
+ pDDSurface = mpPrimaryLocals[0];
if (!DdResetVisrgn(pDDSurface, NULL))
{
Modified: trunk/rostests/tests/Imagelistviewer/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/Imagelistviewer/mai…
==============================================================================
--- trunk/rostests/tests/Imagelistviewer/main.c [iso-8859-1] (original)
+++ trunk/rostests/tests/Imagelistviewer/main.c [iso-8859-1] Mon Aug 3 18:59:43 2009
@@ -1,6 +1,7 @@
#include <windows.h>
#include <setupapi.h>
#include <tchar.h>
+#include <stdlib.h> // FIXME-DONTCOMMIT: Why is this needed?
#include "resource.h"
typedef BOOL (WINAPI * SH_GIL_PROC)(HIMAGELIST *phLarge, HIMAGELIST *phSmall);
Modified: trunk/rostests/tests/global_mem/global_mem.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/global_mem/global_m…
==============================================================================
--- trunk/rostests/tests/global_mem/global_mem.c [iso-8859-1] (original)
+++ trunk/rostests/tests/global_mem/global_mem.c [iso-8859-1] Mon Aug 3 18:59:43 2009
@@ -597,8 +597,8 @@
*/
TEST_STATUS TestGlobalReAlloc()
{
+ TEST_STATUS result = SKIPPED;
OUTPUT_Banner("Testing GlobalReAlloc()");
- TEST_STATUS result = SKIPPED;
result = TEST_CombineStatus(result, TestGlobalReAllocFixed());
result = TEST_CombineStatus(result, TestGlobalReAllocMovable());
@@ -767,8 +767,8 @@
*/
TEST_STATUS TestGlobalFlags()
{
+ TEST_STATUS result = SKIPPED;
OUTPUT_Banner("Testing GlobalFlags()");
- TEST_STATUS result = SKIPPED;
result = TEST_CombineStatus(result, TestGlobalFlagsFixed());
result = TEST_CombineStatus(result, TestGlobalFlagsMoveable());
Modified: trunk/rostests/tests/miditest/miditest.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/miditest/miditest.c…
==============================================================================
--- trunk/rostests/tests/miditest/miditest.c [iso-8859-1] (original)
+++ trunk/rostests/tests/miditest/miditest.c [iso-8859-1] Mon Aug 3 18:59:43 2009
@@ -22,6 +22,9 @@
int c;
+ HMIDIOUT Handle = NULL;
+ UINT Result;
+
printf("MIDI output devices: %d\n", outs);
for (c = 0; c < outs; c ++)
@@ -32,8 +35,7 @@
printf("Opening MIDI output #0\n");
- HMIDIOUT Handle = NULL;
- UINT Result = midiOutOpen(&Handle, 0, 0, 0, CALLBACK_NULL);
+ Result = midiOutOpen(&Handle, 0, 0, 0, CALLBACK_NULL);
printf("Result == %d Handle == %d\n", Result, (int)Handle);
// play something:
Modified: trunk/rostests/tests/winhello/winhello.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/winhello/winhello.c…
==============================================================================
--- trunk/rostests/tests/winhello/winhello.c [iso-8859-1] (original)
+++ trunk/rostests/tests/winhello/winhello.c [iso-8859-1] Mon Aug 3 18:59:43 2009
@@ -110,7 +110,7 @@
{
PAINTSTRUCT ps; /* Also used during window drawing */
HDC hDC; /* A device context used for drawing */
- RECT rc, clr, wir; /* A rectangle used during drawing */
+ RECT rc = {0,0,0,0}, clr, wir; /* A rectangle used during drawing */
char spr[100], sir[100];
static HBRUSH hbrWhite=NULL, hbrGray=NULL, hbrBlack=NULL, hbrRed=NULL, hbrBlue=NULL,
hbrYellow=NULL;
@@ -123,9 +123,8 @@
case WM_CHAR:
{
-
- hDC = GetDC(hWnd);
TCHAR text[2];
+ hDC = GetDC(hWnd);
text[0] = (TCHAR)wParam;
text[1] = _T('\0');
@@ -170,10 +169,9 @@
case WM_KEYDOWN:
{
-
- hDC = GetDC(hWnd);
RECT Rect;
TCHAR text[2];
+ hDC = GetDC(hWnd);
text[0] = (TCHAR)wParam;
text[1] = _T('\0');
@@ -201,10 +199,9 @@
case WM_KEYUP:
{
-
- hDC = GetDC(hWnd);
RECT Rect;
TCHAR text[2];
+ hDC = GetDC(hWnd);
text[0] = (TCHAR)wParam;
text[1] = _T('\0');
@@ -594,6 +591,8 @@
case WM_CREATE:
{
+ SCROLLINFO si;
+ TEXTMETRIC tm;
/* Register a Ctrl+Alt+C hotkey*/
RegisterHotKey(hWnd, CTRLC, MOD_CONTROL, VK_C);
RegisterHotKey(hWnd, ALTF1, MOD_CONTROL | MOD_ALT, VK_F1);
@@ -605,7 +604,6 @@
hbrBlue = CreateSolidBrush ( RGB(0x00, 0x00, 0xFF));
hbrYellow = CreateSolidBrush ( RGB(0xFF, 0xFF, 0x00));
- SCROLLINFO si;
si.cbSize = sizeof(si);
si.fMask = SIF_ALL;
si.nMin = 0;
@@ -619,7 +617,6 @@
/* The window is being created. Create our button
* window now. */
- TEXTMETRIC tm;
/* First we use the system fixed font size to choose
* a nice button size. */