Patch by Jonathon Wilson:

fix most of ReactOS to build with -Wall -Werror by default

svn path=/trunk/; revision=6645
This commit is contained in:
Thomas Bluemel 2003-11-14 17:13:36 +00:00
parent 52dd1df336
commit 1c3867a641
301 changed files with 1066 additions and 890 deletions

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 2003/07/24 15:51:58 rcampbell Exp $ # $Id: makefile,v 1.2 2003/11/14 17:13:14 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.6 2002/06/02 19:24:57 chorns Exp $ # $Id: Makefile,v 1.7 2003/11/14 17:13:14 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a user32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.9 2002/06/02 19:24:57 chorns Exp $ # $Id: makefile,v 1.10 2003/11/14 17:13:14 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -7,7 +7,7 @@ VOID CALLBACK TimerApcProc(
DWORD dwTimerLowValue, DWORD dwTimerLowValue,
DWORD dwTimerHighValue ) DWORD dwTimerHighValue )
{ {
printf("APC Callback %i\n", *(PDWORD)lpArg); printf("APC Callback %lu\n", *(PDWORD)lpArg);
} }
@ -49,4 +49,5 @@ int main()
CloseHandle( hTimer ); CloseHandle( hTimer );
return 0; return 0;
} }

View file

@ -12,6 +12,8 @@ TARGET_NAME = apc2
TARGET_SDKLIBS = ntdll.a kernel32.a TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_CFLAGS = -Wall -Werror
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.15 2002/06/02 19:24:57 chorns Exp $ # $Id: makefile,v 1.16 2003/11/14 17:13:14 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -12,6 +12,8 @@ TARGET_NAME = args
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,5 +1,4 @@
# $Id: makefile,v 1.5 2002/06/02 19:24:57 chorns Exp $ # $Id: makefile,v 1.6 2003/11/14 17:13:15 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
TARGET_NORC = yes TARGET_NORC = yes
@ -14,6 +13,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -24,7 +24,6 @@ thread_main2(LPVOID param)
int main (void) int main (void)
{ {
HANDLE hThread;
DWORD i=0; DWORD i=0;
DWORD id; DWORD id;

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.10 2002/06/02 19:24:57 chorns Exp $ # $Id: makefile,v 1.11 2003/11/14 17:13:15 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -12,6 +12,7 @@
#include <windows.h> #include <windows.h>
#include <string.h>
HINSTANCE HInst; HINSTANCE HInst;
const char* WndClassName = "GMainWnd"; const char* WndClassName = "GMainWnd";

View file

@ -13,6 +13,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -13,6 +13,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = buttontst.o TARGET_OBJECTS = buttontst.o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -15,7 +15,6 @@ HINSTANCE AppInstance = NULL;
LRESULT WmCreate( LRESULT WmCreate(
HWND Wnd) HWND Wnd)
{ {
UCHAR i;
DPRINT("WM_CREATE (enter)."); DPRINT("WM_CREATE (enter).");
DPRINT("test 1"); DPRINT("test 1");
CreateWindowEx(0, BUTTON_CLASS, "PushButton", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE, CreateWindowEx(0, BUTTON_CLASS, "PushButton", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE,

View file

@ -13,6 +13,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = buttontst2.o TARGET_OBJECTS = buttontst2.o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -27,7 +27,7 @@ WinMain(HINSTANCE hInstance,
wc.cbWndExtra = 0; wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0) if (RegisterClass(&wc) == 0)
{ {
fprintf(stderr, "RegisterClass failed (last error 0x%X)\n", fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
GetLastError()); GetLastError());
return(1); return(1);
} }
@ -45,7 +45,7 @@ WinMain(HINSTANCE hInstance,
NULL); NULL);
if (hWnd == NULL) if (hWnd == NULL)
{ {
fprintf(stderr, "CreateWindow failed (last error 0x%X)\n", fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError()); GetLastError());
return(1); return(1);
} }

View file

@ -11,6 +11,8 @@ TARGET_SDKLIBS = kernel32.a
TARGET_OBJECTS = capclock.o TARGET_OBJECTS = capclock.o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,4 +1,4 @@
/* $Id: capclock.c,v 1.2 2003/09/24 20:05:29 weiden Exp $ /* $Id: capclock.c,v 1.3 2003/11/14 17:13:16 weiden Exp $
* *
* DESCRIPTION: Simple Win32 Caption Clock * DESCRIPTION: Simple Win32 Caption Clock
* PROJECT : ReactOS (test applications) * PROJECT : ReactOS (test applications)
@ -7,6 +7,7 @@
* LICENSE : GNU GPL v2.0 * LICENSE : GNU GPL v2.0
*/ */
#include <windows.h> #include <windows.h>
#include <string.h>
UINT Timer = 1; UINT Timer = 1;

View file

@ -34,7 +34,7 @@ WinMain(HINSTANCE hInstance,
wc.cbWndExtra = 0; wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0) if (RegisterClass(&wc) == 0)
{ {
fprintf(stderr, "RegisterClass failed (last error 0x%X)\n", fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
GetLastError()); GetLastError());
return(1); return(1);
} }
@ -52,7 +52,7 @@ WinMain(HINSTANCE hInstance,
NULL); NULL);
if (hWnd == NULL) if (hWnd == NULL)
{ {
fprintf(stderr, "CreateWindow failed (last error 0x%X)\n", fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError()); GetLastError());
return(1); return(1);
} }

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 2003/10/15 18:28:54 weiden Exp $ # $Id: makefile,v 1.2 2003/11/14 17:13:16 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a ntdll.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,6 +1,6 @@
#include <windows.h> #include <windows.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
//HFONT tf; //HFONT tf;
LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
@ -26,7 +26,7 @@ WinMain(HINSTANCE hInstance,
wc.cbWndExtra = 0; wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0) if (RegisterClass(&wc) == 0)
{ {
fprintf(stderr, "RegisterClass failed (last error 0x%X)\n", fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
GetLastError()); GetLastError());
return(1); return(1);
} }
@ -44,7 +44,7 @@ WinMain(HINSTANCE hInstance,
NULL); NULL);
if (hWnd == NULL) if (hWnd == NULL)
{ {
fprintf(stderr, "CreateWindow failed (last error 0x%X)\n", fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError()); GetLastError());
return(1); return(1);
} }
@ -68,22 +68,19 @@ WinMain(HINSTANCE hInstance,
LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{ {
PAINTSTRUCT ps;
HDC hDC; HDC hDC;
RECT clr, wir;
char txt[100]; char txt[100];
switch(msg) switch(msg)
{ {
case WM_LBUTTONUP: case WM_LBUTTONUP:
{ {
ULONG x, y;
RECT Rect; RECT Rect;
GetWindowRect(hWnd, &Rect); GetWindowRect(hWnd, &Rect);
SendMessage(hWnd, WM_NCCALCSIZE, 0, (LPARAM)(&Rect)); SendMessage(hWnd, WM_NCCALCSIZE, 0, (LPARAM)(&Rect));
hDC = GetWindowDC(0); hDC = GetWindowDC(0);
Rectangle(hDC, Rect.left, Rect.top, Rect.right, Rect.bottom); Rectangle(hDC, Rect.left, Rect.top, Rect.right, Rect.bottom);
sprintf(txt, "Client coordinates: %d, %d, %d, %d\0", Rect.left, Rect.top, Rect.right, Rect.bottom); sprintf(txt, "Client coordinates: %lu, %lu, %lu, %lu", Rect.left, Rect.top, Rect.right, Rect.bottom);
TextOut(hDC, Rect.left + 1, Rect.top + 1, (LPCTSTR)txt, strlen(txt)); TextOut(hDC, Rect.left + 1, Rect.top + 1, (LPCTSTR)txt, strlen(txt));
ReleaseDC(0, hDC); ReleaseDC(0, hDC);
break; break;

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 2003/10/04 12:14:37 weiden Exp $ # $Id: makefile,v 1.2 2003/11/14 17:13:16 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -73,7 +73,7 @@ char AddString[] = "string added";
typedef void FunctionHandler(HWND,DWORD,WPARAM,LPARAM); typedef void FunctionHandler(HWND,DWORD,WPARAM,LPARAM);
typedef FunctionHandler* LPFUNCTIONHANDLER; typedef FunctionHandler* LPFUNCTIONHANDLER;
PrintTextXY(char* Text,int x,int y,int len, RECT rect) void PrintTextXY(char* Text,int x,int y,int len, RECT rect)
{ {
HDC hdc; HDC hdc;
hdc = GetDC (g_hwnd); hdc = GetDC (g_hwnd);
@ -141,61 +141,61 @@ struct
} }
Msg[] = Msg[] =
{ {
"CB_ADDSTRING",CB_ADDSTRING,0,(LPARAM)&AddString,&HandlePrintReturnHex, {"CB_ADDSTRING",CB_ADDSTRING,0,(LPARAM)&AddString,&HandlePrintReturnHex},
"CB_ADDSTRING - long",CB_ADDSTRING,0,(LPARAM)"very loooooooooong striiinnnnnnnnnggg",&HandlePrintReturnHex, {"CB_ADDSTRING - long",CB_ADDSTRING,0,(LPARAM)"very loooooooooong striiinnnnnnnnnggg",&HandlePrintReturnHex},
"CB_DELETESTRING",CB_DELETESTRING,2,0,&HandlePrintReturnHex, /* remember to catch WM_DELETEITEM*/ {"CB_DELETESTRING",CB_DELETESTRING,2,0,&HandlePrintReturnHex}, /* remember to catch WM_DELETEITEM*/
/* What a message, why M$ decided to implement his thing ? */ /* What a message, why M$ decided to implement his thing ? */
"CB_DIR - drives",CB_DIR,DDL_DRIVES, {"CB_DIR - drives",CB_DIR,DDL_DRIVES,
/* Hoping that most machines have this */ /* Hoping that most machines have this */
(LPARAM)"C:\\", (LPARAM)"C:\\",
&HandlePrintReturnHex, &HandlePrintReturnHex},
"CB_DIR - dirs",CB_DIR,DDL_DIRECTORY,(LPARAM)"C:\\*",&HandlePrintReturnHex, {"CB_DIR - dirs",CB_DIR,DDL_DIRECTORY,(LPARAM)"C:\\*",&HandlePrintReturnHex},
"CB_DIR - files",CB_DIR, {"CB_DIR - files",CB_DIR,
DDL_ARCHIVE | DDL_EXCLUSIVE | DDL_HIDDEN | DDL_READONLY | DDL_READWRITE | DDL_SYSTEM, DDL_ARCHIVE | DDL_EXCLUSIVE | DDL_HIDDEN | DDL_READONLY | DDL_READWRITE | DDL_SYSTEM,
(LPARAM)"C:\\*",&HandlePrintReturnHex, (LPARAM)"C:\\*",&HandlePrintReturnHex},
/* Do not forget WM_COMPAREITEM */ /* Do not forget WM_COMPAREITEM */
"CB_FINDSTRING",CB_FINDSTRING,1,(LPARAM)"str",&HandlePrintReturnHex, {"CB_FINDSTRING",CB_FINDSTRING,1,(LPARAM)"str",&HandlePrintReturnHex},
"CB_FINDSTRINGEXACT(-1)",CB_FINDSTRINGEXACT,-1,(LPARAM)&AddString,&HandlePrintReturnHex, {"CB_FINDSTRINGEXACT(-1)",CB_FINDSTRINGEXACT,-1,(LPARAM)&AddString,&HandlePrintReturnHex},
"CB_FINDSTRINGEXACT(2)",CB_FINDSTRINGEXACT,2,(LPARAM)&AddString,&HandlePrintReturnHex, {"CB_FINDSTRINGEXACT(2)",CB_FINDSTRINGEXACT,2,(LPARAM)&AddString,&HandlePrintReturnHex},
/* "CB_GETCOMBOBOXINFO",CB_GETCOMBOBOXINFO,0,0,&HandlePrintReturnHex, winXP & .net server remember to handle the struct */ /* "CB_GETCOMBOBOXINFO",CB_GETCOMBOBOXINFO,0,0,&HandlePrintReturnHex, winXP & .net server remember to handle the struct */
"CB_GETCOUNT",CB_GETCOUNT,0,0,&HandlePrintReturnHex, {"CB_GETCOUNT",CB_GETCOUNT,0,0,&HandlePrintReturnHex},
"CB_GETCURSEL",CB_GETCURSEL,0,0,&HandlePrintReturnHex, {"CB_GETCURSEL",CB_GETCURSEL,0,0,&HandlePrintReturnHex},
/* To implement "CB_GETEDITSEL - vars",CB_GETEDITSEL,,,&HandlePrintReturnHex, */ /* To implement "CB_GETEDITSEL - vars",CB_GETEDITSEL,,,&HandlePrintReturnHex, */
"CB_GETEXTENDEDUI",CB_GETEXTENDEDUI,0,0,&HandlePrintReturnHex, {"CB_GETEXTENDEDUI",CB_GETEXTENDEDUI,0,0,&HandlePrintReturnHex},
"CB_GETHORIZONTALEXTENT",CB_GETHORIZONTALEXTENT,0,0,&HandlePrintReturnHex, {"CB_GETHORIZONTALEXTENT",CB_GETHORIZONTALEXTENT,0,0,&HandlePrintReturnHex},
"CB_GETLBTEXT",CB_GETLBTEXT,1,(LPARAM)&TextBuffer[8],&HandlePrintReturnStr, {"CB_GETLBTEXT",CB_GETLBTEXT,1,(LPARAM)&TextBuffer[8],&HandlePrintReturnStr},
"CB_GETLBTEXTLEN",CB_GETLBTEXTLEN,1,0,&HandlePrintReturnHex, {"CB_GETLBTEXTLEN",CB_GETLBTEXTLEN,1,0,&HandlePrintReturnHex},
"CB_GETLOCALE",CB_GETLOCALE,0,0,&HandlePrintReturnHex, {"CB_GETLOCALE",CB_GETLOCALE,0,0,&HandlePrintReturnHex},
/* "CB_GETMINVISIBLE",CB_GETMINVISIBLE,0,0,&HandlePrintReturnHex, Included in Windows XP and Windows .NET Server. */ /* "CB_GETMINVISIBLE",CB_GETMINVISIBLE,0,0,&HandlePrintReturnHex, Included in Windows XP and Windows .NET Server. */
"CB_GETTOPINDEX",CB_GETTOPINDEX,0,0,&HandlePrintReturnHex, {"CB_GETTOPINDEX",CB_GETTOPINDEX,0,0,&HandlePrintReturnHex},
"CB_INITSTORAGE",CB_INITSTORAGE,10,200,&HandlePrintReturnHex, {"CB_INITSTORAGE",CB_INITSTORAGE,10,200,&HandlePrintReturnHex},
"CB_INSERTSTRING",CB_INSERTSTRING,2,(LPARAM)"inserted string",&HandlePrintReturnHex, {"CB_INSERTSTRING",CB_INSERTSTRING,2,(LPARAM)"inserted string",&HandlePrintReturnHex},
"CB_LIMITTEXT",CB_LIMITTEXT,10,0,&HandlePrintReturnHex, {"CB_LIMITTEXT",CB_LIMITTEXT,10,0,&HandlePrintReturnHex},
"CB_RESETCONTENT",CB_RESETCONTENT ,0,0,&HandlePrintReturnHex, {"CB_RESETCONTENT",CB_RESETCONTENT ,0,0,&HandlePrintReturnHex},
"CB_SELECTSTRING",CB_SELECTSTRING,2,(LPARAM)"str",&HandlePrintReturnHex, {"CB_SELECTSTRING",CB_SELECTSTRING,2,(LPARAM)"str",&HandlePrintReturnHex},
"CB_SETCURSEL",CB_SETCURSEL,1,0,&HandlePrintReturnHex, {"CB_SETCURSEL",CB_SETCURSEL,1,0,&HandlePrintReturnHex},
"CB_SETDROPPEDWIDTH",CB_SETDROPPEDWIDTH,250,0,&HandlePrintReturnHex, {"CB_SETDROPPEDWIDTH",CB_SETDROPPEDWIDTH,250,0,&HandlePrintReturnHex},
"CB_SETEXTENDEDUI - set",CB_SETEXTENDEDUI,TRUE,0,&HandlePrintReturnHex, {"CB_SETEXTENDEDUI - set",CB_SETEXTENDEDUI,TRUE,0,&HandlePrintReturnHex},
"CB_SETEXTENDEDUI - clear",CB_SETEXTENDEDUI,FALSE,0,&HandlePrintReturnHex, {"CB_SETEXTENDEDUI - clear",CB_SETEXTENDEDUI,FALSE,0,&HandlePrintReturnHex},
/* /*
* win2k have a small bug with this ^ , if you press F4 while it is cleared, * win2k have a small bug with this ^ , if you press F4 while it is cleared,
@ -204,30 +204,30 @@ Msg[] =
* to an arrow * to an arrow
*/ */
"CB_SETHORIZONTALEXTENT",CB_SETHORIZONTALEXTENT,500,0,&HandlePrintReturnHex, {"CB_SETHORIZONTALEXTENT",CB_SETHORIZONTALEXTENT,500,0,&HandlePrintReturnHex},
"CB_GETITEMDATA",CB_GETITEMDATA,1,0,&HandlePrintReturnHex, {"CB_GETITEMDATA",CB_GETITEMDATA,1,0,&HandlePrintReturnHex},
"CB_SETITEMDATA",CB_SETITEMDATA,1,0x791031,&HandlePrintReturnHex, {"CB_SETITEMDATA",CB_SETITEMDATA,1,0x791031,&HandlePrintReturnHex},
"CB_SETITEMHEIGHT",CB_SETITEMHEIGHT,-1,30,&HandlePrintReturnHex, {"CB_SETITEMHEIGHT",CB_SETITEMHEIGHT,-1,30,&HandlePrintReturnHex},
"CB_GETITEMHEIGHT",CB_GETITEMHEIGHT,2,0,&HandlePrintReturnHex, {"CB_GETITEMHEIGHT",CB_GETITEMHEIGHT,2,0,&HandlePrintReturnHex},
/* "CB_SETMINVISIBLE",CB_SETMINVISIBLE,4,0,&HandlePrintReturnHex, Included in Windows XP and Windows .NET Server */ /* "CB_SETMINVISIBLE",CB_SETMINVISIBLE,4,0,&HandlePrintReturnHex, Included in Windows XP and Windows .NET Server */
"CB_GETEDITSEL",CB_GETEDITSEL,(WPARAM)NULL,(LPARAM)NULL,&HandlePrintReturnHex, {"CB_GETEDITSEL",CB_GETEDITSEL,(WPARAM)NULL,(LPARAM)NULL,&HandlePrintReturnHex},
"CB_SETEDITSEL",CB_SETEDITSEL,0,0x00020005,&HandlePrintReturnHex, {"CB_SETEDITSEL",CB_SETEDITSEL,0,0x00020005,&HandlePrintReturnHex},
"CB_SETEDITSEL - clear",CB_SETEDITSEL,0,0xFFFFFFFF,&HandlePrintReturnHex, {"CB_SETEDITSEL - clear",CB_SETEDITSEL,0,0xFFFFFFFF,&HandlePrintReturnHex},
"CB_SETTOPINDEX",CB_SETTOPINDEX,3,0,&HandlePrintReturnHex, {"CB_SETTOPINDEX",CB_SETTOPINDEX,3,0,&HandlePrintReturnHex},
"CB_SHOWDROPDOWN - true",CB_SHOWDROPDOWN,TRUE,0,&HandlePrintReturnHex, {"CB_SHOWDROPDOWN - true",CB_SHOWDROPDOWN,TRUE,0,&HandlePrintReturnHex},
"CB_SHOWDROPDOWN - false",CB_SHOWDROPDOWN,FALSE,0,&HandlePrintReturnHex, {"CB_SHOWDROPDOWN - false",CB_SHOWDROPDOWN,FALSE,0,&HandlePrintReturnHex},
"CB_GETDROPPEDCONTROLRECT",CB_GETDROPPEDCONTROLRECT,0,(LPARAM)&rect,&HandlePrintRect, {"CB_GETDROPPEDCONTROLRECT",CB_GETDROPPEDCONTROLRECT,0,(LPARAM)&rect,&HandlePrintRect},
"CB_GETDROPPEDSTATE",CB_GETDROPPEDSTATE,0,0,&HandlePrintReturnHex, {"CB_GETDROPPEDSTATE",CB_GETDROPPEDSTATE,0,0,&HandlePrintReturnHex},
"CB_GETDROPPEDWIDTH",CB_GETDROPPEDWIDTH,0,0,&HandlePrintReturnHex, {"CB_GETDROPPEDWIDTH",CB_GETDROPPEDWIDTH,0,0,&HandlePrintReturnHex},
"WM_PASTE",WM_PASTE,0,0,&HandlePrintReturnHex, {"WM_PASTE",WM_PASTE,0,0,&HandlePrintReturnHex},
}; };
#define MAXMESSAGEBUTTONS 40 #define MAXMESSAGEBUTTONS 40
@ -238,23 +238,23 @@ struct
DWORD Code; /* Style Code */ DWORD Code; /* Style Code */
} }
Styles[] = { Styles[] = {
"WS_DISABLED",WS_DISABLED, {"WS_DISABLED",WS_DISABLED},
"CBS_AUTOHSCROLL",CBS_AUTOHSCROLL, {"CBS_AUTOHSCROLL",CBS_AUTOHSCROLL},
"CBS_DISABLENOSCROLL",CBS_DISABLENOSCROLL, {"CBS_DISABLENOSCROLL",CBS_DISABLENOSCROLL},
"CBS_DROPDOWN",CBS_DROPDOWN, {"CBS_DROPDOWN",CBS_DROPDOWN},
"CBS_DROPDOWNLIST",CBS_DROPDOWNLIST, {"CBS_DROPDOWNLIST",CBS_DROPDOWNLIST},
"CBS_HASSTRINGS",CBS_HASSTRINGS, {"CBS_HASSTRINGS",CBS_HASSTRINGS},
"CBS_LOWERCASE",CBS_LOWERCASE, {"CBS_LOWERCASE",CBS_LOWERCASE},
"CBS_NOINTEGRALHEIGHT",CBS_NOINTEGRALHEIGHT, {"CBS_NOINTEGRALHEIGHT",CBS_NOINTEGRALHEIGHT},
"CBS_OEMCONVERT",CBS_OEMCONVERT, {"CBS_OEMCONVERT",CBS_OEMCONVERT},
"CBS_OWNERDRAWFIXED",CBS_OWNERDRAWFIXED, {"CBS_OWNERDRAWFIXED",CBS_OWNERDRAWFIXED},
"CBS_OWNERDRAWVARIABLE",CBS_OWNERDRAWVARIABLE, {"CBS_OWNERDRAWVARIABLE",CBS_OWNERDRAWVARIABLE},
"CBS_SIMPLE",CBS_SIMPLE, {"CBS_SIMPLE",CBS_SIMPLE},
"CBS_SORT",CBS_SORT, {"CBS_SORT",CBS_SORT},
"CBS_UPPERCASE",CBS_UPPERCASE, {"CBS_UPPERCASE",CBS_UPPERCASE},
"CBS_DISABLENOSCROLL",CBS_DISABLENOSCROLL, {"CBS_DISABLENOSCROLL",CBS_DISABLENOSCROLL},
"WS_HSCROLL",WS_HSCROLL, {"WS_HSCROLL",WS_HSCROLL},
"WS_VSCROLL",WS_VSCROLL {"WS_VSCROLL",WS_VSCROLL}
}; };
/* The number of check buttons we have. /* The number of check buttons we have.

View file

@ -15,6 +15,9 @@ TARGET_OBJECTS = \
combotst.o \ combotst.o \
utils.o utils.o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.7 2002/06/02 19:24:57 chorns Exp $ # $Id: Makefile,v 1.8 2003/11/14 17:13:16 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -12,6 +12,8 @@ TARGET_NAME = consume
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.1 2002/12/27 23:54:33 gvg Exp $ # $Id: Makefile,v 1.2 2003/11/14 17:13:16 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -12,6 +12,8 @@ TARGET_NAME = copymove
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -4,6 +4,7 @@
#include <ctype.h> #include <ctype.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <tchar.h> #include <tchar.h>
#include <windows.h> #include <windows.h>
@ -54,20 +55,20 @@ CreateTestFile(LPCTSTR filename, DWORD attributes)
0); 0);
if (INVALID_HANDLE_VALUE == file) { if (INVALID_HANDLE_VALUE == file) {
fprintf(stderr, "CreateFile failed with code %d\n", GetLastError()); fprintf(stderr, "CreateFile failed with code %lu\n", GetLastError());
exit(1); exit(1);
} }
for(c = 0; c < sizeof(buffer); c++) { for(c = 0; c < sizeof(buffer); c++) {
buffer[c] = (char) c; buffer[c] = (char) c;
} }
if (! WriteFile(file, buffer, sizeof(buffer), &wrote, NULL)) { if (! WriteFile(file, buffer, sizeof(buffer), &wrote, NULL)) {
fprintf(stderr, "WriteFile failed with code %d\n", GetLastError()); fprintf(stderr, "WriteFile failed with code %lu\n", GetLastError());
exit(1); exit(1);
} }
CloseHandle(file); CloseHandle(file);
if (! SetFileAttributes(filename, attributes)) { if (! SetFileAttributes(filename, attributes)) {
fprintf(stderr, "SetFileAttributes failed with code %d\n", GetLastError()); fprintf(stderr, "SetFileAttributes failed with code %lu\n", GetLastError());
exit(1); exit(1);
} }
} }
@ -82,7 +83,7 @@ static void
CreateTestDir(LPCTSTR dirname) CreateTestDir(LPCTSTR dirname)
{ {
if (! CreateDirectory(dirname, NULL)) { if (! CreateDirectory(dirname, NULL)) {
fprintf(stderr, "CreateDirectory failed with code %d\n", GetLastError()); fprintf(stderr, "CreateDirectory failed with code %lu\n", GetLastError());
exit(1); exit(1);
} }
} }
@ -105,21 +106,21 @@ CheckTestFile(LPCTSTR filename, DWORD attributes)
0); 0);
if (INVALID_HANDLE_VALUE == file) { if (INVALID_HANDLE_VALUE == file) {
fprintf(stderr, "CreateFile failed with code %d\n", GetLastError()); fprintf(stderr, "CreateFile failed with code %lu\n", GetLastError());
exit(1); exit(1);
} }
if (! ReadFile(file, buffer, sizeof(buffer), &read, NULL)) { if (! ReadFile(file, buffer, sizeof(buffer), &read, NULL)) {
fprintf(stderr, "ReadFile failed with code %d\n", GetLastError()); fprintf(stderr, "ReadFile failed with code %lu\n", GetLastError());
exit(1); exit(1);
} }
if (read != sizeof(buffer)) { if (read != sizeof(buffer)) {
fprintf(stderr, "Trying to read %d bytes but got %d bytes\n", sizeof(buffer), read); fprintf(stderr, "Trying to read %u bytes but got %lu bytes\n", sizeof(buffer), read);
exit(1); exit(1);
} }
for(c = 0; c < sizeof(buffer); c++) { for(c = 0; c < sizeof(buffer); c++) {
if (buffer[c] != (char) c) { if (buffer[c] != (char) c) {
fprintf(stderr, "File contents changed at position %d\n", c); fprintf(stderr, "File contents changed at position %u\n", c);
exit(1); exit(1);
} }
} }
@ -128,11 +129,11 @@ CheckTestFile(LPCTSTR filename, DWORD attributes)
diskattr = GetFileAttributes(filename); diskattr = GetFileAttributes(filename);
if (INVALID_FILE_ATTRIBUTES == diskattr) { if (INVALID_FILE_ATTRIBUTES == diskattr) {
fprintf(stderr, "GetFileAttributes failed with code %d\n", GetLastError()); fprintf(stderr, "GetFileAttributes failed with code %lu\n", GetLastError());
exit(1); exit(1);
} }
if (diskattr != attributes) { if (diskattr != attributes) {
fprintf(stderr, "Attribute mismatch, expected 0x%08x found 0x%08x\n", attributes, diskattr); fprintf(stderr, "Attribute mismatch, expected 0x%08lx found 0x%08lx\n", attributes, diskattr);
exit(1); exit(1);
} }
} }
@ -149,7 +150,7 @@ main(int argc, char *argv[])
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE); CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE);
DeleteTestFile(_T("end.dat")); DeleteTestFile(_T("end.dat"));
if (! MoveFile(_T("begin.dat"), _T("end.dat"))) { if (! MoveFile(_T("begin.dat"), _T("end.dat"))) {
fprintf(stderr, "MoveFile failed with code %d\n", GetLastError()); fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError());
exit(1); exit(1);
} }
CheckTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE); CheckTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE);
@ -162,7 +163,7 @@ main(int argc, char *argv[])
fprintf(stderr, "MoveFile succeeded but shouldn't have\n"); fprintf(stderr, "MoveFile succeeded but shouldn't have\n");
exit(1); exit(1);
} else if (ERROR_FILE_NOT_FOUND != GetLastError()) { } else if (ERROR_FILE_NOT_FOUND != GetLastError()) {
fprintf(stderr, "MoveFile failed with unexpected code %d\n", GetLastError()); fprintf(stderr, "MoveFile failed with unexpected code %lu\n", GetLastError());
exit(1); exit(1);
} }
DeleteTestFile(_T("end.dat")); DeleteTestFile(_T("end.dat"));
@ -176,7 +177,7 @@ main(int argc, char *argv[])
fprintf(stderr, "MoveFile succeeded but shouldn't have\n"); fprintf(stderr, "MoveFile succeeded but shouldn't have\n");
exit(1); exit(1);
} else if (ERROR_ALREADY_EXISTS != GetLastError()) { } else if (ERROR_ALREADY_EXISTS != GetLastError()) {
fprintf(stderr, "MoveFile failed with unexpected code %d\n", GetLastError()); fprintf(stderr, "MoveFile failed with unexpected code %lu\n", GetLastError());
exit(1); exit(1);
} }
DeleteTestFile(_T("begin.dat")); DeleteTestFile(_T("begin.dat"));
@ -190,7 +191,7 @@ main(int argc, char *argv[])
CreateTestFile(_T("begin\\file.dat"), FILE_ATTRIBUTE_NORMAL); CreateTestFile(_T("begin\\file.dat"), FILE_ATTRIBUTE_NORMAL);
DeleteTestDir(_T("end")); DeleteTestDir(_T("end"));
if (! MoveFile(_T("begin"), _T("end"))) { if (! MoveFile(_T("begin"), _T("end"))) {
fprintf(stderr, "MoveFile failed with code %d\n", GetLastError()); fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError());
exit(1); exit(1);
} }
CheckTestFile(_T("end\\file.dat"), FILE_ATTRIBUTE_NORMAL); CheckTestFile(_T("end\\file.dat"), FILE_ATTRIBUTE_NORMAL);
@ -202,7 +203,7 @@ main(int argc, char *argv[])
CreateTestFile(_T("file.dat"), FILE_ATTRIBUTE_NORMAL); CreateTestFile(_T("file.dat"), FILE_ATTRIBUTE_NORMAL);
CreateTestDir(_T("end")); CreateTestDir(_T("end"));
if (! MoveFile(_T("file.dat"), _T("end\\file.dat"))) { if (! MoveFile(_T("file.dat"), _T("end\\file.dat"))) {
fprintf(stderr, "MoveFile failed with code %d\n", GetLastError()); fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError());
exit(1); exit(1);
} }
CheckTestFile(_T("end\\file.dat"), FILE_ATTRIBUTE_ARCHIVE); CheckTestFile(_T("end\\file.dat"), FILE_ATTRIBUTE_ARCHIVE);
@ -213,7 +214,7 @@ main(int argc, char *argv[])
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_READONLY); CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_READONLY);
DeleteTestFile(_T("end.dat")); DeleteTestFile(_T("end.dat"));
if (! MoveFile(_T("begin.dat"), _T("end.dat"))) { if (! MoveFile(_T("begin.dat"), _T("end.dat"))) {
fprintf(stderr, "MoveFile failed with code %d\n", GetLastError()); fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError());
exit(1); exit(1);
} }
CheckTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_READONLY); CheckTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_READONLY);
@ -225,7 +226,7 @@ main(int argc, char *argv[])
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE); CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE);
DeleteTestFile(otherfile); DeleteTestFile(otherfile);
if (! MoveFile(_T("begin.dat"), otherfile)) { if (! MoveFile(_T("begin.dat"), otherfile)) {
fprintf(stderr, "MoveFile failed with code %d\n", GetLastError()); fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError());
exit(1); exit(1);
} }
CheckTestFile(otherfile, FILE_ATTRIBUTE_ARCHIVE); CheckTestFile(otherfile, FILE_ATTRIBUTE_ARCHIVE);
@ -238,7 +239,7 @@ main(int argc, char *argv[])
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE); CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE);
CreateTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE); CreateTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE);
if (! MoveFileEx(_T("begin.dat"), _T("end.dat"), MOVEFILE_REPLACE_EXISTING)) { if (! MoveFileEx(_T("begin.dat"), _T("end.dat"), MOVEFILE_REPLACE_EXISTING)) {
fprintf(stderr, "MoveFileEx failed with code %d\n", GetLastError()); fprintf(stderr, "MoveFileEx failed with code %lu\n", GetLastError());
exit(1); exit(1);
} }
DeleteTestFile(_T("begin.dat")); DeleteTestFile(_T("begin.dat"));
@ -254,7 +255,7 @@ main(int argc, char *argv[])
exit(1); exit(1);
} else if (ERROR_ALREADY_EXISTS != GetLastError() && } else if (ERROR_ALREADY_EXISTS != GetLastError() &&
ERROR_ACCESS_DENIED != GetLastError()) { ERROR_ACCESS_DENIED != GetLastError()) {
fprintf(stderr, "MoveFileEx failed with unexpected code %d\n", GetLastError()); fprintf(stderr, "MoveFileEx failed with unexpected code %lu\n", GetLastError());
exit(1); exit(1);
} }
DeleteTestFile(_T("begin.dat")); DeleteTestFile(_T("begin.dat"));
@ -272,7 +273,7 @@ main(int argc, char *argv[])
fprintf(stderr, "MoveFileEx succeeded but shouldn't have\n"); fprintf(stderr, "MoveFileEx succeeded but shouldn't have\n");
exit(1); exit(1);
} else if (ERROR_NOT_SAME_DEVICE != GetLastError()) { } else if (ERROR_NOT_SAME_DEVICE != GetLastError()) {
fprintf(stderr, "MoveFileEx failed with unexpected code %d\n", GetLastError()); fprintf(stderr, "MoveFileEx failed with unexpected code %lu\n", GetLastError());
exit(1); exit(1);
} }
DeleteTestFile(otherfile); DeleteTestFile(otherfile);
@ -287,7 +288,7 @@ main(int argc, char *argv[])
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE); CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE);
DeleteTestFile(otherfile); DeleteTestFile(otherfile);
if (! MoveFileEx(_T("begin.dat"), otherfile, MOVEFILE_COPY_ALLOWED)) { if (! MoveFileEx(_T("begin.dat"), otherfile, MOVEFILE_COPY_ALLOWED)) {
fprintf(stderr, "MoveFileEx failed with code %d\n", GetLastError()); fprintf(stderr, "MoveFileEx failed with code %lu\n", GetLastError());
exit(1); exit(1);
} }
CheckTestFile(otherfile, FILE_ATTRIBUTE_ARCHIVE); CheckTestFile(otherfile, FILE_ATTRIBUTE_ARCHIVE);

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.6 2002/06/02 19:24:58 chorns Exp $ # $Id: Makefile,v 1.7 2003/11/14 17:13:16 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a user32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,7 +1,7 @@
/* $Id: count.c,v 1.1 2001/03/26 21:30:20 ea Exp $ /* $Id: count.c,v 1.2 2003/11/14 17:13:16 weiden Exp $
* *
*/ */
#include <stdlib.h> #include <stdio.h>
int n = 0; int n = 0;

View file

@ -48,7 +48,7 @@ WinMain(HINSTANCE hInstance,
wc.cbWndExtra = 0; wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0) if (RegisterClass(&wc) == 0)
{ {
fprintf(stderr, "RegisterClass failed (last error 0x%X)\n", fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
GetLastError()); GetLastError());
return(1); return(1);
} }
@ -66,7 +66,7 @@ WinMain(HINSTANCE hInstance,
NULL); NULL);
if (hWnd == NULL) if (hWnd == NULL)
{ {
fprintf(stderr, "CreateWindow failed (last error 0x%X)\n", fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError()); GetLastError());
return(1); return(1);
} }

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.2 2003/03/04 10:09:00 gvg Exp $ # $Id: makefile,v 1.3 2003/11/14 17:13:16 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -5,7 +5,7 @@ int main()
{ {
int i; int i;
printf("TickCountLow: %x\n", printf("TickCountLow: %lx\n",
SharedUserData->TickCountLow); SharedUserData->TickCountLow);
printf("Drives: "); printf("Drives: ");
for (i = 0; i < 26; i++) for (i = 0; i < 26; i++)
@ -48,4 +48,5 @@ int main()
} }
} }
printf("\n\n"); printf("\n\n");
return 0;
} }

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.6 2002/06/02 19:24:58 chorns Exp $ # $Id: makefile,v 1.7 2003/11/14 17:13:16 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -12,6 +12,8 @@ TARGET_NAME = dump_shared_data
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -62,6 +62,7 @@ char TextBuffer[BUFFERLEN]={'R','e','s','u','l','t',':',' '};
typedef void FunctionHandler(HWND,DWORD,WPARAM,LPARAM); typedef void FunctionHandler(HWND,DWORD,WPARAM,LPARAM);
typedef FunctionHandler* LPFUNCTIONHANDLER; typedef FunctionHandler* LPFUNCTIONHANDLER;
VOID
PrintTextXY(char* Text,int x,int y,int len) PrintTextXY(char* Text,int x,int y,int len)
{ {
HDC hdc; HDC hdc;
@ -185,60 +186,60 @@ struct
} }
Msg[] = Msg[] =
{ {
"EM_CANUNDO",EM_CANUNDO,0,0,&HandlePrintReturnHex, {"EM_CANUNDO",EM_CANUNDO,0,0,&HandlePrintReturnHex},
"EM_CHARFROMPOS",EM_CHARFROMPOS,(WPARAM)&point,0,&HandlePrintReturnHex, {"EM_CHARFROMPOS",EM_CHARFROMPOS,(WPARAM)&point,0,&HandlePrintReturnHex},
"EM_EMPTYUNDOBUFFER",EM_EMPTYUNDOBUFFER,0,0,&HandlePrintReturnHex, {"EM_EMPTYUNDOBUFFER",EM_EMPTYUNDOBUFFER,0,0,&HandlePrintReturnHex},
"EM_FMTLINES",EM_FMTLINES,TRUE,0,&HandlePrintReturnHex, {"EM_FMTLINES",EM_FMTLINES,TRUE,0,&HandlePrintReturnHex},
"EM_GETFIRSTVISIBLELINE",EM_GETFIRSTVISIBLELINE,0,0,&HandlePrintReturnHex, {"EM_GETFIRSTVISIBLELINE",EM_GETFIRSTVISIBLELINE,0,0,&HandlePrintReturnHex},
"EM_GETLIMITTEXT",EM_GETLIMITTEXT,0,0,&HandlePrintReturnHex, {"EM_GETLIMITTEXT",EM_GETLIMITTEXT,0,0,&HandlePrintReturnHex},
"EM_GETLINE",EM_GETLINE,2,(WPARAM)&TextBuffer[8],&HandlePrintReturnStr, {"EM_GETLINE",EM_GETLINE,2,(WPARAM)&TextBuffer[8],&HandlePrintReturnStr},
"EM_GETLINECOUNT",EM_GETLINECOUNT,0,0,&HandlePrintReturnHex, {"EM_GETLINECOUNT",EM_GETLINECOUNT,0,0,&HandlePrintReturnHex},
"EM_GETMARGINS",EM_GETMARGINS,0,0,&HandlePrintReturnHex, {"EM_GETMARGINS",EM_GETMARGINS,0,0,&HandlePrintReturnHex},
"EM_SETMARGINS",EM_SETMARGINS,EC_LEFTMARGIN,10,&HandlePrintReturnHex, {"EM_SETMARGINS",EM_SETMARGINS,EC_LEFTMARGIN,10,&HandlePrintReturnHex},
"EM_GETMODIFY",EM_GETMODIFY,0,0,&HandlePrintReturnHex, {"EM_GETMODIFY",EM_GETMODIFY,0,0,&HandlePrintReturnHex},
"EM_SETMODIFY",EM_SETMODIFY,TRUE,0,&HandlePrintReturnHex, {"EM_SETMODIFY",EM_SETMODIFY,TRUE,0,&HandlePrintReturnHex},
"EM_GETSEL",EM_GETSEL,(WPARAM)&StartP,(LPARAM)&EndP,&HandlePrintReturnHex, {"EM_GETSEL",EM_GETSEL,(WPARAM)&StartP,(LPARAM)&EndP,&HandlePrintReturnHex},
"EM_GETTHUMB",EM_GETTHUMB,0,0,&HandlePrintReturnHex, {"EM_GETTHUMB",EM_GETTHUMB,0,0,&HandlePrintReturnHex},
"EM_LIMITTEXT",EM_LIMITTEXT,10,0,&HandlePrintReturnHex, {"EM_LIMITTEXT",EM_LIMITTEXT,10,0,&HandlePrintReturnHex},
"EM_LINEFROMCHAR",EM_LINEFROMCHAR,-1,0,&HandlePrintReturnHex, {"EM_LINEFROMCHAR",EM_LINEFROMCHAR,-1,0,&HandlePrintReturnHex},
"EM_POSFROMCHAR",EM_POSFROMCHAR,10,0,&HandlePrintReturnHex, {"EM_POSFROMCHAR",EM_POSFROMCHAR,10,0,&HandlePrintReturnHex},
"EM_LINEINDEX",EM_LINEINDEX,2,0,&HandlePrintReturnHex, {"EM_LINEINDEX",EM_LINEINDEX,2,0,&HandlePrintReturnHex},
"EM_LINELENGTH",EM_LINELENGTH,-1,0,&HandlePrintReturnHex, {"EM_LINELENGTH",EM_LINELENGTH,-1,0,&HandlePrintReturnHex},
"EM_GETWORDBREAKPROC",EM_GETWORDBREAKPROC,0,0,&HandlePrintReturnHex, {"EM_GETWORDBREAKPROC",EM_GETWORDBREAKPROC,0,0,&HandlePrintReturnHex},
"EM_REPLACESEL",EM_REPLACESEL,TRUE,(LPARAM)&ReplaceTextStr,&HandlePrintReturnHex, {"EM_REPLACESEL",EM_REPLACESEL,TRUE,(LPARAM)&ReplaceTextStr,&HandlePrintReturnHex},
"EM_LINESCROLL",EM_LINESCROLL,5,1,&HandlePrintReturnHex, {"EM_LINESCROLL",EM_LINESCROLL,5,1,&HandlePrintReturnHex},
"EM_SCROLL",EM_SCROLL,SB_LINEDOWN,0,&HandlePrintReturnHex, {"EM_SCROLL",EM_SCROLL,SB_LINEDOWN,0,&HandlePrintReturnHex},
"EM_SCROLLCARET",EM_SCROLLCARET,0,0,&HandlePrintReturnHex, {"EM_SCROLLCARET",EM_SCROLLCARET,0,0,&HandlePrintReturnHex},
"EM_SETHANDLE",EM_SETHANDLE,0,0,&HandleSetHandlePrintHex, {"EM_SETHANDLE",EM_SETHANDLE,0,0,&HandleSetHandlePrintHex},
"EM_GETHANDLE",EM_GETHANDLE,0,0,&HandlePrintReturnHex, {"EM_GETHANDLE",EM_GETHANDLE,0,0,&HandlePrintReturnHex},
"EM_GETPASSWORDCHAR",EM_GETPASSWORDCHAR,0,0,&HandlePrintPasswdChar, {"EM_GETPASSWORDCHAR",EM_GETPASSWORDCHAR,0,0,&HandlePrintPasswdChar},
"EM_SETPASSWORDCHAR - clear",EM_SETPASSWORDCHAR,0,0,&HandlePrintReturnHex, {"EM_SETPASSWORDCHAR - clear",EM_SETPASSWORDCHAR,0,0,&HandlePrintReturnHex},
"EM_SETPASSWORDCHAR - x",EM_SETPASSWORDCHAR,'x',0,&HandlePrintReturnHex, {"EM_SETPASSWORDCHAR - x",EM_SETPASSWORDCHAR,'x',0,&HandlePrintReturnHex},
"EM_SETREADONLY - set",EM_SETREADONLY,TRUE,0,&HandlePrintReturnHex, {"EM_SETREADONLY - set",EM_SETREADONLY,TRUE,0,&HandlePrintReturnHex},
"EM_SETREADONLY - clear",EM_SETREADONLY,FALSE,0,&HandlePrintReturnHex, {"EM_SETREADONLY - clear",EM_SETREADONLY,FALSE,0,&HandlePrintReturnHex},
"EM_GETRECT",EM_GETRECT,0,(LPARAM)&rect2,&HandlePrintRect, {"EM_GETRECT",EM_GETRECT,0,(LPARAM)&rect2,&HandlePrintRect},
"EM_SETRECT",EM_SETRECT,0,(LPARAM)&rect,&HandlePrintReturnHex, {"EM_SETRECT",EM_SETRECT,0,(LPARAM)&rect,&HandlePrintReturnHex},
"EM_SETRECTNP",EM_SETRECTNP,0,(LPARAM)&rect,&HandlePrintReturnHex, {"EM_SETRECTNP",EM_SETRECTNP,0,(LPARAM)&rect,&HandlePrintReturnHex},
"EM_SETSEL",EM_SETSEL,1,3,&HandlePrintReturnHex, {"EM_SETSEL",EM_SETSEL,1,3,&HandlePrintReturnHex},
"EM_SETSEL - all",EM_SETSEL,0,-1,&HandlePrintReturnHex, {"EM_SETSEL - all",EM_SETSEL,0,-1,&HandlePrintReturnHex},
"EM_SETSEL - remove",EM_SETSEL,-1,0,&HandlePrintReturnHex, {"EM_SETSEL - remove",EM_SETSEL,-1,0,&HandlePrintReturnHex},
"EM_UNDO",EM_UNDO,0,0,&HandlePrintReturnHex, {"EM_UNDO",EM_UNDO,0,0,&HandlePrintReturnHex},
"WM_UNDO",WM_UNDO,0,0,&HandlePrintReturnHex, {"WM_UNDO",WM_UNDO,0,0,&HandlePrintReturnHex},
"WM_PASTE",WM_PASTE,0,0,&HandlePrintReturnHex, {"WM_PASTE",WM_PASTE,0,0,&HandlePrintReturnHex},
"WM_CUT",WM_CUT,0,0,&HandlePrintReturnHex, {"WM_CUT",WM_CUT,0,0,&HandlePrintReturnHex},
"WM_COPY",WM_COPY,0,0,&HandlePrintReturnHex {"WM_COPY",WM_COPY,0,0,&HandlePrintReturnHex}
}; };
@ -575,7 +576,6 @@ WndProc ( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
return DefWindowProc ( hwnd, msg, wParam, lParam ); return DefWindowProc ( hwnd, msg, wParam, lParam );
} }
HWND HWND
RegisterAndCreateWindow (HINSTANCE hInst, RegisterAndCreateWindow (HINSTANCE hInst,
const char* className, const char* className,

View file

@ -15,6 +15,8 @@ TARGET_OBJECTS = \
edittest.o \ edittest.o \
utils.o utils.o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -39,7 +39,7 @@ WinMain(HINSTANCE hInstance,
wc.cbWndExtra = 0; wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0) if (RegisterClass(&wc) == 0)
{ {
_ftprintf ( stderr, _T("RegisterClass failed (last error 0x%X)\n"), _ftprintf ( stderr, _T("RegisterClass failed (last error 0x%lX)\n"),
GetLastError()); GetLastError());
return(1); return(1);
} }
@ -57,7 +57,7 @@ WinMain(HINSTANCE hInstance,
NULL); NULL);
if (hWnd == NULL) if (hWnd == NULL)
{ {
_ftprintf ( stderr, _T("CreateWindow failed (last error 0x%X)\n"), _ftprintf ( stderr, _T("CreateWindow failed (last error 0x%lX)\n"),
GetLastError()); GetLastError());
return(1); return(1);
} }

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 2003/07/25 19:13:14 royce Exp $ # $Id: makefile,v 1.2 2003/11/14 17:13:16 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.7 2002/06/02 19:24:58 chorns Exp $ # $Id: makefile,v 1.8 2003/11/14 17:13:16 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -20,18 +20,18 @@ HANDLE MakeEventPair()
InitializeObjectAttributes(&Attributes, NULL, 0, NULL, NULL); InitializeObjectAttributes(&Attributes, NULL, 0, NULL, NULL);
Status = NtCreateEventPair(&EventPair, STANDARD_RIGHTS_ALL, &Attributes); Status = NtCreateEventPair(&EventPair, STANDARD_RIGHTS_ALL, &Attributes);
printf("Status %08x creating eventpair\n", Status); printf("Status %08lx creating eventpair\n", Status);
return EventPair; return EventPair;
} }
DWORD __stdcall threadfunc(void* eventpair) DWORD __stdcall threadfunc(void* eventpair)
{ {
printf("Thread: Set eventpair status %08x\n", NtSetInformationThread(NtCurrentThread(), ThreadEventPair, &eventpair, sizeof(HANDLE))); printf("Thread: Set eventpair status %08lx\n", NtSetInformationThread(NtCurrentThread(), ThreadEventPair, &eventpair, sizeof(HANDLE)));
Sleep(2500); Sleep(2500);
printf("Thread: Setting low and waiting high...\n"); printf("Thread: Setting low and waiting high...\n");
printf("Thread: status = %08x\n", NtSetLowWaitHighThread()); printf("Thread: status = %08lx\n", NtSetLowWaitHighThread());
printf("Thread: status = %08x\n", NtSetHighWaitLowThread()); printf("Thread: status = %08lx\n", NtSetHighWaitLowThread());
printf("Thread: Terminating...\n"); printf("Thread: Terminating...\n");
return 0; return 0;
} }
@ -41,7 +41,7 @@ int main(int ac, char **av)
DWORD id; DWORD id;
HANDLE EventPair, Thread; HANDLE EventPair, Thread;
printf("Main: NtSetLowWaitHighThread is at %08x\n", NtSetLowWaitHighThread); printf("Main: NtSetLowWaitHighThread is at %08lx\n", NtSetLowWaitHighThread());
EventPair = MakeEventPair(); EventPair = MakeEventPair();
@ -50,13 +50,13 @@ int main(int ac, char **av)
return 0; return 0;
} }
printf("Main: EventPair = %08x\n", EventPair); printf("Main: EventPair = %08lx\n", (DWORD)EventPair);
Thread = CreateThread(0, 0, threadfunc, EventPair, 0, &id); Thread = CreateThread(0, 0, threadfunc, EventPair, 0, &id);
printf("Main: ThreadId for new thread is %08x\n", id); printf("Main: ThreadId for new thread is %08lx\n", id);
printf("Main: Setting high and waiting low\n"); printf("Main: Setting high and waiting low\n");
printf("Main: status = %08x\n", NtSetHighWaitLowEventPair(EventPair)); printf("Main: status = %08lx\n", NtSetHighWaitLowEventPair(EventPair));
Sleep(2500); Sleep(2500);
printf("Main: status = %08x\n", NtSetLowWaitHighEventPair(EventPair)); printf("Main: status = %08lx\n", NtSetLowWaitHighEventPair(EventPair));
NtClose(EventPair); NtClose(EventPair);
/* WaitForSingleObject(Thread, INFINITE); FIXME: Waiting on thread handle causes double spinlock acquisition (and subsequent crash) in PsUnblockThread - ntoskrnl/ps/thread.c */ /* WaitForSingleObject(Thread, INFINITE); FIXME: Waiting on thread handle causes double spinlock acquisition (and subsequent crash) in PsUnblockThread - ntoskrnl/ps/thread.c */
NtClose(Thread); NtClose(Thread);

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 2003/09/10 06:12:21 vizzini Exp $ # $Id: makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = ntdll.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.8 2002/06/02 19:24:58 chorns Exp $ # $Id: Makefile,v 1.9 2003/11/14 17:13:17 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -12,6 +12,8 @@ TARGET_NAME = file
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -23,7 +23,7 @@ int main( void )
if (file == INVALID_HANDLE_VALUE) if (file == INVALID_HANDLE_VALUE)
{ {
printf("Error opening file (Status %x)\n", GetLastError()); printf("Error opening file (Status %lx)\n", GetLastError());
return 1; return 1;
} }
for( c = 0; c < sizeof( buffer ); c++ ) for( c = 0; c < sizeof( buffer ); c++ )
@ -31,14 +31,14 @@ int main( void )
printf("Writing file\n"); printf("Writing file\n");
if (WriteFile( file, buffer, 4096, &wrote, NULL) == FALSE) if (WriteFile( file, buffer, 4096, &wrote, NULL) == FALSE)
{ {
printf("Error writing file (Status %x)\n", GetLastError()); printf("Error writing file (Status %lx)\n", GetLastError());
exit(2); exit(2);
} }
printf("Reading file\n"); printf("Reading file\n");
SetFilePointer( file, 0, 0, FILE_BEGIN ); SetFilePointer( file, 0, 0, FILE_BEGIN );
if (ReadFile( file, buffer, 4096, &wrote, NULL) == FALSE) if (ReadFile( file, buffer, 4096, &wrote, NULL) == FALSE)
{ {
printf("Error reading file (Status %x)\n", GetLastError()); printf("Error reading file (Status %lx)\n", GetLastError());
exit(3); exit(3);
} }
for( c = 0; c < sizeof( buffer ); c++ ) for( c = 0; c < sizeof( buffer ); c++ )

View file

@ -4,6 +4,9 @@
*/ */
#include <windows.h> #include <windows.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
extern BOOL STDCALL GdiDllInitialize(HANDLE hInstance, DWORD Event, LPVOID Reserved); extern BOOL STDCALL GdiDllInitialize(HANDLE hInstance, DWORD Event, LPVOID Reserved);
@ -159,13 +162,13 @@ void DumpRgnData( HRGN hRgn )
printf("GetRegionData( hRgn, size, rgnData ) returned 0\n"); printf("GetRegionData( hRgn, size, rgnData ) returned 0\n");
return; return;
} }
printf("Bounds: left=%d top=%d right=%d bottom=%d, count: %d, type: %i\n\n", printf("Bounds: left=%lu top=%lu right=%lu bottom=%lu, count: %lu, type: %lu\n\n",
rgnData->rdh.rcBound.left, rgnData->rdh.rcBound.top, rgnData->rdh.rcBound.right, rgnData->rdh.rcBound.bottom, rgnData->rdh.rcBound.left, rgnData->rdh.rcBound.top, rgnData->rdh.rcBound.right, rgnData->rdh.rcBound.bottom,
rgnData->rdh.nCount, rgnData->rdh.iType); rgnData->rdh.nCount, rgnData->rdh.iType);
printf("Rects:\t i \t left \t top \t right \t bottom\n"); printf("Rects:\t i \t left \t top \t right \t bottom\n");
for ( i = 0; i < rgnData->rdh.nCount; i++ ) { for ( i = 0; i < rgnData->rdh.nCount; i++ ) {
PRECT pr = (PRECT) rgnData->Buffer + i; PRECT pr = (PRECT) rgnData->Buffer + i;
printf("\t %d \t %d \t %d \t %d \t %d\n", i, pr->left, pr->top, pr->right, pr->bottom ); printf("\t %d \t %lu \t %lu \t %lu \t %lu\n", i, pr->left, pr->top, pr->right, pr->bottom );
} }
printf("\n"); printf("\n");
} }
@ -186,7 +189,7 @@ void rgntest( void )
printf("Failed GetRgnBox( hRgn1, &Rect )\n"); printf("Failed GetRgnBox( hRgn1, &Rect )\n");
return; return;
} }
printf("GetRgnBox( hRgn1, &Rect ): i=%d, left=%d top=%d right=%d bottom=%d\n\n", printf("GetRgnBox( hRgn1, &Rect ): i=%d, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom ); i, Rect.left, Rect.top, Rect.right, Rect.bottom );
DumpRgnData( hRgn1 ); DumpRgnData( hRgn1 );
@ -201,7 +204,7 @@ void rgntest( void )
printf("Failed GetRgnBox( hRgn2, &Rect )\n"); printf("Failed GetRgnBox( hRgn2, &Rect )\n");
return; return;
} }
printf("GetRgnBox( hRgn2, &Rect ): i=%d, left=%d top=%d right=%d bottom=%d\n\n", printf("GetRgnBox( hRgn2, &Rect ): i=%d, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom ); i, Rect.left, Rect.top, Rect.right, Rect.bottom );
DumpRgnData( hRgn2 ); DumpRgnData( hRgn2 );
@ -224,7 +227,7 @@ void rgntest( void )
printf("Failed GetRgnBox( hRgn1, &Rect )\n"); printf("Failed GetRgnBox( hRgn1, &Rect )\n");
return; return;
} }
printf("After offset\nGetRgnBox( hRgn1, &Rect ): i=%d, left=%d top=%d right=%d bottom=%d\n\n", printf("After offset\nGetRgnBox( hRgn1, &Rect ): i=%d, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom ); i, Rect.left, Rect.top, Rect.right, Rect.bottom );
if( EqualRgn( hRgn1, hRgn2 ) == TRUE ){ if( EqualRgn( hRgn1, hRgn2 ) == TRUE ){
@ -244,13 +247,13 @@ void rgntest( void )
printf("Failed GetRgnBox( hRgn1, &Rect )\n"); printf("Failed GetRgnBox( hRgn1, &Rect )\n");
return; return;
} }
printf("after SetRectRgn(hRgn1, 10, 11, 110, 111 ):\n i=%d, left=%d top=%d right=%d bottom=%d\n\n", printf("after SetRectRgn(hRgn1, 10, 11, 110, 111 ):\n i=%d, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom ); i, Rect.left, Rect.top, Rect.right, Rect.bottom );
hRgn3 = CreateRectRgn( 1, 1, 1, 1); hRgn3 = CreateRectRgn( 1, 1, 1, 1);
i = CombineRgn( hRgn3, hRgn1, hRgn2, RGN_AND ); i = CombineRgn( hRgn3, hRgn1, hRgn2, RGN_AND );
if( i==ERROR ){ if( i==ERROR ){
printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_AND ). LastError: %d\n", GetLastError); printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_AND ). LastError: %lu\n", GetLastError());
return; return;
} }
@ -258,13 +261,13 @@ void rgntest( void )
printf("Failed GetRgnBox( hRgn1, &Rect )\n"); printf("Failed GetRgnBox( hRgn1, &Rect )\n");
return; return;
} }
printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_AND ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%d top=%d right=%d bottom=%d\n\n", printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_AND ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom ); i, Rect.left, Rect.top, Rect.right, Rect.bottom );
DumpRgnData( hRgn3 ); DumpRgnData( hRgn3 );
i = CombineRgn( hRgn3, hRgn1, hRgn2, RGN_OR ); i = CombineRgn( hRgn3, hRgn1, hRgn2, RGN_OR );
if( i==ERROR ){ if( i==ERROR ){
printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_OR ). LastError: %d\n", GetLastError); printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_OR ). LastError: %lu\n", GetLastError());
return; return;
} }
@ -272,13 +275,13 @@ void rgntest( void )
printf("Failed GetRgnBox( hRgn1, &Rect )\n"); printf("Failed GetRgnBox( hRgn1, &Rect )\n");
return; return;
} }
printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_OR ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%d top=%d right=%d bottom=%d\n\n", printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_OR ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom ); i, Rect.left, Rect.top, Rect.right, Rect.bottom );
DumpRgnData( hRgn3 ); DumpRgnData( hRgn3 );
i = CombineRgn( hRgn3, hRgn1, hRgn2, RGN_DIFF ); i = CombineRgn( hRgn3, hRgn1, hRgn2, RGN_DIFF );
if( i==ERROR ){ if( i==ERROR ){
printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_DIFF ). LastError: %d\n", GetLastError); printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_DIFF ). LastError: %lu\n", GetLastError());
return; return;
} }
@ -286,13 +289,13 @@ void rgntest( void )
printf("Failed GetRgnBox( hRgn1, &Rect )\n"); printf("Failed GetRgnBox( hRgn1, &Rect )\n");
return; return;
} }
printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_DIFF ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%d top=%d right=%d bottom=%d\n\n", printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_DIFF ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom ); i, Rect.left, Rect.top, Rect.right, Rect.bottom );
DumpRgnData( hRgn3 ); DumpRgnData( hRgn3 );
i = CombineRgn( hRgn3, hRgn1, hRgn2, RGN_XOR ); i = CombineRgn( hRgn3, hRgn1, hRgn2, RGN_XOR );
if( i==ERROR ){ if( i==ERROR ){
printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_XOR ). LastError: %d\n", GetLastError); printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_XOR ). LastError: %lu\n", GetLastError());
return; return;
} }
@ -300,13 +303,13 @@ void rgntest( void )
printf("Failed GetRgnBox( hRgn3, &Rect )\n"); printf("Failed GetRgnBox( hRgn3, &Rect )\n");
return; return;
} }
printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_XOR ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%d top=%d right=%d bottom=%d\n\n", printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_XOR ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom ); i, Rect.left, Rect.top, Rect.right, Rect.bottom );
DumpRgnData( hRgn3 ); DumpRgnData( hRgn3 );
i = CombineRgn( hRgn1, hRgn3, hRgn2, RGN_COPY ); i = CombineRgn( hRgn1, hRgn3, hRgn2, RGN_COPY );
if( i==ERROR ){ if( i==ERROR ){
printf("Fail: CombineRgn( hRgn1, hRgn3, hRgn2, RGN_COPY ). LastError: %d\n", GetLastError); printf("Fail: CombineRgn( hRgn1, hRgn3, hRgn2, RGN_COPY ). LastError: %lu\n", GetLastError());
return; return;
} }
@ -314,7 +317,7 @@ void rgntest( void )
printf("Failed GetRgnBox( hRgn1, &Rect )\n"); printf("Failed GetRgnBox( hRgn1, &Rect )\n");
return; return;
} }
printf("After CombineRgn( hRgn1, hRgn3, hRgn2, RGN_COPY ): \nGetRgnBox( hRgn1, &Rect ): CR_i=%d, left=%d top=%d right=%d bottom=%d\n\n", printf("After CombineRgn( hRgn1, hRgn3, hRgn2, RGN_COPY ): \nGetRgnBox( hRgn1, &Rect ): CR_i=%u, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom ); i, Rect.left, Rect.top, Rect.right, Rect.bottom );
DumpRgnData( hRgn1 ); DumpRgnData( hRgn1 );

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.8 2002/06/02 19:24:58 chorns Exp $ # $Id: makefile,v 1.9 2003/11/14 17:13:17 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.1 2003/10/13 15:05:59 weiden Exp $ # $Id: Makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -12,6 +12,8 @@ TARGET_NAME = global_mem
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -7,6 +7,7 @@
*/ */
#include <windows.h> #include <windows.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
/* /*
** All output is line wrapped to fit a 80 column screen. ** All output is line wrapped to fit a 80 column screen.
@ -141,7 +142,7 @@ void OUTPUT_Result(TEST_STATUS status)
void OUTPUT_HexDword(DWORD dw) void OUTPUT_HexDword(DWORD dw)
{ {
char buffer[32]; char buffer[32];
sprintf(buffer, "0x%X",dw); sprintf(buffer, "0x%lX",dw);
OUTPUT_Line(buffer); OUTPUT_Line(buffer);
} }
@ -172,7 +173,7 @@ void OutputErrorCode()
{ {
char buffer[256]; char buffer[256];
sprintf(buffer,"GetLastError() returned %d", GetLastError()); sprintf(buffer,"GetLastError() returned %lu", GetLastError());
OUTPUT_Line(buffer); OUTPUT_Line(buffer);
} }
@ -260,7 +261,6 @@ TEST_STATUS TestGlobalLockNUnlock(UINT allocFlags)
{ {
HGLOBAL hMem = 0; HGLOBAL hMem = 0;
LPVOID pMem = 0; LPVOID pMem = 0;
LONG errorCode = 0;
TEST_STATUS subtest = SKIPPED; TEST_STATUS subtest = SKIPPED;
TEST_STATUS result = FAILED; TEST_STATUS result = FAILED;
@ -627,7 +627,7 @@ TEST_STATUS TestGlobalFlagsMoveable()
OUTPUT_Line("Testing for a lock of 0"); OUTPUT_Line("Testing for a lock of 0");
uFlags = GlobalFlags(hMem); uFlags = GlobalFlags(hMem);
if ((GMEM_LOCKCOUNT & uFlags == 0)) /*no locks*/ if (((GMEM_LOCKCOUNT & uFlags) == 0)) /*no locks*/
{ {
result = TEST_CombineStatus(result, PASSED); result = TEST_CombineStatus(result, PASSED);
} }
@ -643,7 +643,7 @@ TEST_STATUS TestGlobalFlagsMoveable()
OUTPUT_Line("Testing after a lock"); OUTPUT_Line("Testing after a lock");
OUTPUT_Line("Testing for a lock of 1"); OUTPUT_Line("Testing for a lock of 1");
uFlags = GlobalFlags(hMem); uFlags = GlobalFlags(hMem);
if ((GMEM_LOCKCOUNT & uFlags == 1)) /*no locks*/ if (((GMEM_LOCKCOUNT & uFlags) == 1)) /*no locks*/
{ {
result = TEST_CombineStatus(result, PASSED); result = TEST_CombineStatus(result, PASSED);
} }
@ -657,7 +657,7 @@ TEST_STATUS TestGlobalFlagsMoveable()
OUTPUT_Line("Testing after an unlock"); OUTPUT_Line("Testing after an unlock");
OUTPUT_Line("Testing for a lock of 0"); OUTPUT_Line("Testing for a lock of 0");
uFlags = GlobalFlags(hMem); uFlags = GlobalFlags(hMem);
if ((GMEM_LOCKCOUNT & uFlags == 0)) /*no locks*/ if (((GMEM_LOCKCOUNT & uFlags) == 0)) /*no locks*/
{ {
result = TEST_CombineStatus(result, PASSED); result = TEST_CombineStatus(result, PASSED);
} }
@ -725,7 +725,7 @@ TEST_STATUS TestGlobalFlagsFixed()
OUTPUT_Line("Testing initial allocation"); OUTPUT_Line("Testing initial allocation");
OUTPUT_Line("Testing for non-discarded and lock of 0"); OUTPUT_Line("Testing for non-discarded and lock of 0");
uFlags = GlobalFlags(hMem); uFlags = GlobalFlags(hMem);
if ((GMEM_LOCKCOUNT & uFlags == 0) && /*no locks*/ if (((GMEM_LOCKCOUNT & uFlags) == 0) && /*no locks*/
(((uFlags >> 8) & 0xff) == 0 )) /*not discarded*/ (((uFlags >> 8) & 0xff) == 0 )) /*not discarded*/
{ {
result = TEST_CombineStatus(result, PASSED); result = TEST_CombineStatus(result, PASSED);
@ -741,7 +741,7 @@ TEST_STATUS TestGlobalFlagsFixed()
OUTPUT_Line("Testing after a lock"); OUTPUT_Line("Testing after a lock");
OUTPUT_Line("Testing for non-discarded and lock of 0"); OUTPUT_Line("Testing for non-discarded and lock of 0");
uFlags = GlobalFlags(hMem); uFlags = GlobalFlags(hMem);
if ((GMEM_LOCKCOUNT & uFlags == 0) && /*no locks*/ if (((GMEM_LOCKCOUNT & uFlags) == 0) && /*no locks*/
(((uFlags >> 8) & 0xff) == 0 )) /*not discarded*/ (((uFlags >> 8) & 0xff) == 0 )) /*not discarded*/
{ {
result = TEST_CombineStatus(result, PASSED); result = TEST_CombineStatus(result, PASSED);

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.16 2002/06/02 19:24:59 chorns Exp $ # $Id: makefile,v 1.17 2003/11/14 17:13:17 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -12,6 +12,8 @@ TARGET_NAME = hello
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -113,7 +113,7 @@ void DeleteKeyTest(void)
void EnumerateKeyTest(void) void EnumerateKeyTest(void)
{ {
HKEY hKey = NULL, hKey1; HKEY hKey = NULL;
OBJECT_ATTRIBUTES ObjectAttributes; OBJECT_ATTRIBUTES ObjectAttributes;
NTSTATUS Status; NTSTATUS Status;
UNICODE_STRING KeyName; UNICODE_STRING KeyName;
@ -304,7 +304,6 @@ void DeleteValueTest(void)
void EnumerateValueTest(void) void EnumerateValueTest(void)
{ {
KEY_VALUE_FULL_INFORMATION KeyValueInformation[5]; KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
KEY_BASIC_INFORMATION KeyInformation[5];
OBJECT_ATTRIBUTES ObjectAttributes; OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName; UNICODE_STRING KeyName;
ULONG Index,Length,i; ULONG Index,Length,i;
@ -375,7 +374,6 @@ void test1(void)
UNICODE_STRING KeyName = UNICODE_STRING_INITIALIZER(L"\\Registry\\Machine\\Software"); UNICODE_STRING KeyName = UNICODE_STRING_INITIALIZER(L"\\Registry\\Machine\\Software");
ULONG Index,Length,i; ULONG Index,Length,i;
KEY_BASIC_INFORMATION KeyInformation[5]; KEY_BASIC_INFORMATION KeyInformation[5];
KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
#if 0 #if 0
dprintf("NtOpenKey \\Registry : "); dprintf("NtOpenKey \\Registry : ");
@ -494,12 +492,10 @@ void test1(void)
void test3(void) void test3(void)
{ {
HKEY hKey,hKey1; HKEY hKey;
OBJECT_ATTRIBUTES ObjectAttributes; OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName,ValueName; UNICODE_STRING KeyName;
NTSTATUS Status; NTSTATUS Status;
KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
ULONG Index,Length,i;
char Buffer[10]; char Buffer[10];
DWORD Result; DWORD Result;
dprintf("NtCreateKey non volatile: \n"); dprintf("NtCreateKey non volatile: \n");
@ -791,14 +787,10 @@ void test4(void)
void test5(void) void test5(void)
{ {
HKEY hKey,hKey1; HKEY hKey;
OBJECT_ATTRIBUTES ObjectAttributes; OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName,ValueName; UNICODE_STRING KeyName;
NTSTATUS Status; NTSTATUS Status;
KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
ULONG Index,Length,i;
char Buffer[10];
DWORD Result;
dprintf("NtOpenKey : \n"); dprintf("NtOpenKey : \n");
dprintf(" \\Registry\\Machine\\Software\\reactos : "); dprintf(" \\Registry\\Machine\\Software\\reactos : ");
@ -823,9 +815,7 @@ void test6(void)
UNICODE_STRING KeyName,ValueName; UNICODE_STRING KeyName,ValueName;
NTSTATUS Status; NTSTATUS Status;
KEY_VALUE_FULL_INFORMATION KeyValueInformation[5]; KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
ULONG Index,Length,i; ULONG Length,i;
char Buffer[10];
DWORD Result;
dprintf("Create target key\n"); dprintf("Create target key\n");
dprintf(" Key: \\Registry\\Machine\\SOFTWARE\\Reactos\n"); dprintf(" Key: \\Registry\\Machine\\SOFTWARE\\Reactos\n");

View file

@ -1,5 +1,5 @@
# #
# $Id: makefile,v 1.1 2003/02/09 18:26:36 ekohl Exp $ # $Id: makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -15,6 +15,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,5 +1,6 @@
#include <windows.h> #include <windows.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
//HFONT tf; //HFONT tf;
LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
@ -26,7 +27,7 @@ WinMain(HINSTANCE hInstance,
wc.cbWndExtra = 0; wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0) if (RegisterClass(&wc) == 0)
{ {
fprintf(stderr, "RegisterClass failed (last error 0x%X)\n", fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
GetLastError()); GetLastError());
return(1); return(1);
} }
@ -44,7 +45,7 @@ WinMain(HINSTANCE hInstance,
NULL); NULL);
if (hWnd == NULL) if (hWnd == NULL)
{ {
fprintf(stderr, "CreateWindow failed (last error 0x%X)\n", fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError()); GetLastError());
return(1); return(1);
} }
@ -73,8 +74,6 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{ {
PAINTSTRUCT ps; PAINTSTRUCT ps;
HDC hDC; HDC hDC;
RECT clr, wir;
char spr[100], sir[100];
switch(msg) switch(msg)
{ {

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 2003/11/11 22:17:18 weiden Exp $ # $Id: makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a ntdll.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,5 +1,7 @@
#include <windows.h> #include <windows.h>
#include "resource.h" #include "resource.h"
#include <string.h>
#include <stdio.h>
#ifndef GetCursorInfo #ifndef GetCursorInfo
#define _GetCursorInfo #define _GetCursorInfo
@ -100,8 +102,6 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
HDC hMemDC; HDC hMemDC;
CURSORINFO cursorinfo; CURSORINFO cursorinfo;
ICONINFO iconinfo; ICONINFO iconinfo;
HBITMAP hMaskBitmap;
HBITMAP hColorBitmap;
BITMAP bmp; BITMAP bmp;
RECT rc; RECT rc;
CHAR str[20]; CHAR str[20];
@ -162,7 +162,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
GetIconInfo(cursorinfo.hCursor, &iconinfo); GetIconInfo(cursorinfo.hCursor, &iconinfo);
TextOut(hDC, 15, 365, titleDrwIco, strlen(titleDrwIco)); TextOut(hDC, 15, 365, titleDrwIco, strlen(titleDrwIco));
sprintf(str, "Hotspot: %d; %d", iconinfo.xHotspot, iconinfo.yHotspot); sprintf(str, "Hotspot: %ld; %ld", iconinfo.xHotspot, iconinfo.yHotspot);
TextOut(hDC, 15, 380, str, strlen(str)); TextOut(hDC, 15, 380, str, strlen(str));
if(iconinfo.hbmMask) if(iconinfo.hbmMask)

View file

@ -12,6 +12,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a gdi32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -6,6 +6,8 @@
//#include <winioctl.h> //#include <winioctl.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <wchar.h>
void HexDump(char *buffer, ULONG size) void HexDump(char *buffer, ULONG size)
@ -138,7 +140,6 @@ int main (int argc, char *argv[])
{ {
HANDLE hDisk; HANDLE hDisk;
DWORD dwRead; DWORD dwRead;
DWORD i;
char *Buffer; char *Buffer;
CHAR Filename[80]; CHAR Filename[80];
LARGE_INTEGER FilePosition; LARGE_INTEGER FilePosition;

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.2 2002/06/02 19:24:59 chorns Exp $ # $Id: makefile,v 1.3 2003/11/14 17:13:17 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -16,6 +16,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -25,7 +25,7 @@ WinMain(HINSTANCE hInstance,
wc.cbWndExtra = 0; wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0) if (RegisterClass(&wc) == 0)
{ {
fprintf(stderr, "RegisterClass failed (last error 0x%X)\n", fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
GetLastError()); GetLastError());
return(1); return(1);
} }
@ -43,7 +43,7 @@ WinMain(HINSTANCE hInstance,
NULL); NULL);
if (hWnd == NULL) if (hWnd == NULL)
{ {
fprintf(stderr, "CreateWindow failed (last error 0x%X)\n", fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError()); GetLastError());
return(1); return(1);
} }
@ -121,9 +121,8 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{ {
PAINTSTRUCT ps; PAINTSTRUCT ps;
HDC hDC; HDC hDC;
RECT clr, wir; RECT clr;
HRGN ClipRgn, ExcludeRgn; HRGN ClipRgn, ExcludeRgn;
char spr[100], sir[100];
RECT Rect; RECT Rect;
switch(msg) switch(msg)

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 2003/07/14 09:47:47 gvg Exp $ # $Id: makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -27,7 +27,7 @@ WinMain(HINSTANCE hInstance,
wc.cbWndExtra = 0; wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0) if (RegisterClass(&wc) == 0)
{ {
fprintf(stderr, "RegisterClass failed (last error 0x%X)\n", fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
GetLastError()); GetLastError());
return(1); return(1);
} }
@ -45,7 +45,7 @@ WinMain(HINSTANCE hInstance,
NULL); NULL);
if (hWnd == NULL) if (hWnd == NULL)
{ {
fprintf(stderr, "CreateWindow failed (last error 0x%X)\n", fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError()); GetLastError());
return(1); return(1);
} }
@ -143,7 +143,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
PAINTSTRUCT ps; PAINTSTRUCT ps;
HDC hDC; HDC hDC;
RECT clr; RECT clr;
HBRUSH hbr, hbrold; HBRUSH hbr;
switch(msg) switch(msg)
{ {

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 2003/08/08 21:53:04 royce Exp $ # $Id: makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.1 2003/01/25 15:46:52 hbirr Exp $ # $Id: Makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a user32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -15,7 +15,7 @@ BOOL Slock(DWORD start,DWORD len)
stat = LockFileEx(hFile,LOCKFILE_FAIL_IMMEDIATELY,0,len,0,&overl) ; stat = LockFileEx(hFile,LOCKFILE_FAIL_IMMEDIATELY,0,len,0,&overl) ;
printf("Slock %i-%i %s\n",start,start+len,stat!=0 ? "OK" : "FAILED"); printf("Slock %li-%li %s\n",start,start+len,stat!=0 ? "OK" : "FAILED");
return stat; return stat;
} }
@ -32,7 +32,7 @@ BOOL Xlock(DWORD start,DWORD len)
stat = LockFileEx(hFile,LOCKFILE_EXCLUSIVE_LOCK|LOCKFILE_FAIL_IMMEDIATELY,0,len,0,&overl); stat = LockFileEx(hFile,LOCKFILE_EXCLUSIVE_LOCK|LOCKFILE_FAIL_IMMEDIATELY,0,len,0,&overl);
printf("Xlock %i-%i %s\n",start,start+len,stat!=0 ? "OK" : "FAILED"); printf("Xlock %li-%li %s\n",start,start+len,stat!=0 ? "OK" : "FAILED");
return stat; return stat;
@ -48,7 +48,7 @@ BOOL unlock(DWORD start,DWORD len)
overl.hEvent = 0; overl.hEvent = 0;
stat = UnlockFileEx(hFile,0,len,0,&overl) ; stat = UnlockFileEx(hFile,0,len,0,&overl) ;
printf("unlock %i-%i %s\n",start,start+len,stat!=0 ? "OK" : "FAILED"); printf("unlock %li-%li %s\n",start,start+len,stat!=0 ? "OK" : "FAILED");
return stat; return stat;
} }

View file

@ -10,7 +10,7 @@ CLT_OBJECTS= lpcclt.o
PROGS= lpcsrv.exe lpcclt.exe PROGS= lpcsrv.exe lpcclt.exe
BASE_CFLAGS = -I$(PATH_TO_TOP)/include BASE_CFLAGS = -I$(PATH_TO_TOP)/include -Wall -Werror
LIBS = $(SDK_PATH_LIB)/kernel32.a \ LIBS = $(SDK_PATH_LIB)/kernel32.a \
$(SDK_PATH_LIB)/ntdll.a $(SDK_PATH_LIB)/ntdll.a

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 2003/10/31 20:26:14 arty Exp $ # $Id: makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a ntdll.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,5 +1,7 @@
#include <stdio.h> #include <stdio.h>
#include <windows.h> #include <windows.h>
#include <stdlib.h>
#include <string.h>
/* This tests the ability of the target win32 to create an anonymous file /* This tests the ability of the target win32 to create an anonymous file
* mapping, create a mapping view with MapViewOfFile, and then realize the * mapping, create a mapping view with MapViewOfFile, and then realize the
@ -11,10 +13,10 @@ int main( int argc, char **argv ) {
void *file_map; void *file_map;
int *x; int *x;
fprintf( stderr, "%d: Starting\n", GetCurrentProcessId() ); fprintf( stderr, "%lu: Starting\n", GetCurrentProcessId() );
if( argc == 2 ) { if( argc == 2 ) {
file_map = atoi(argv[1]); file_map = (void *)atoi(argv[1]);
} else { } else {
file_map = CreateFileMapping( INVALID_HANDLE_VALUE, file_map = CreateFileMapping( INVALID_HANDLE_VALUE,
NULL, NULL,
@ -23,14 +25,14 @@ int main( int argc, char **argv ) {
if( !SetHandleInformation( file_map, if( !SetHandleInformation( file_map,
HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT,
HANDLE_FLAG_INHERIT ) ) { HANDLE_FLAG_INHERIT ) ) {
fprintf( stderr, "%d: Could not make handle inheritable.\n", fprintf( stderr, "%lu: Could not make handle inheritable.\n",
GetCurrentProcessId() ); GetCurrentProcessId() );
return 100; return 100;
} }
} }
if( !file_map ) { if( !file_map ) {
fprintf( stderr, "%d: Could not create anonymous file map.\n", fprintf( stderr, "%lu: Could not create anonymous file map.\n",
GetCurrentProcessId() ); GetCurrentProcessId() );
return 1; return 1;
} }
@ -42,13 +44,13 @@ int main( int argc, char **argv ) {
0x1000 ); 0x1000 );
if( !file_view ) { if( !file_view ) {
fprintf( stderr, "%d: Could not map view of file.\n", fprintf( stderr, "%lu: Could not map view of file.\n",
GetCurrentProcessId() ); GetCurrentProcessId() );
return 2; return 2;
} }
if( !VirtualAlloc( file_view, 0x1000, MEM_COMMIT, PAGE_READWRITE ) ) { if( !VirtualAlloc( file_view, 0x1000, MEM_COMMIT, PAGE_READWRITE ) ) {
fprintf( stderr, "%d: VirtualAlloc failed to realize the page.\n", fprintf( stderr, "%lu: VirtualAlloc failed to realize the page.\n",
GetCurrentProcessId() ); GetCurrentProcessId() );
return 3; return 3;
} }
@ -57,8 +59,8 @@ int main( int argc, char **argv ) {
x[0] = 0x12345678; x[0] = 0x12345678;
if( x[0] != 0x12345678 ) { if( x[0] != 0x12345678 ) {
fprintf( stderr, "%d: Can't write to the memory (%08x != 0x12345678)\n", fprintf( stderr, "%lu: Can't write to the memory (%08x != 0x12345678)\n",
GetCurrentProcessId() ); GetCurrentProcessId(), x[0] );
return 4; return 4;
} }
@ -73,13 +75,13 @@ int main( int argc, char **argv ) {
sprintf(cmdline,"%s %d", argv[0], (int)file_map); sprintf(cmdline,"%s %d", argv[0], (int)file_map);
if( !CreateProcess(NULL, cmdline, NULL, NULL, TRUE, 0, NULL, NULL, if( !CreateProcess(NULL, cmdline, NULL, NULL, TRUE, 0, NULL, NULL,
&si, &pi ) ) { &si, &pi ) ) {
fprintf( stderr, "%d: Could not create child process.\n", fprintf( stderr, "%lu: Could not create child process.\n",
GetCurrentProcessId() ); GetCurrentProcessId() );
return 5; return 5;
} }
if( WaitForSingleObject( pi.hThread, INFINITE ) != WAIT_OBJECT_0 ) { if( WaitForSingleObject( pi.hThread, INFINITE ) != WAIT_OBJECT_0 ) {
fprintf( stderr, "%d: Failed to wait for child process to terminate.\n", fprintf( stderr, "%lu: Failed to wait for child process to terminate.\n",
GetCurrentProcessId() ); GetCurrentProcessId() );
return 6; return 6;
} }

View file

@ -13,6 +13,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 2002/09/25 01:09:49 sedwards Exp $ # $Id: makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -12,6 +12,8 @@ TARGET_NAME = mktime
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -25,4 +25,5 @@ int main(void)
(void)puts(daybuf); (void)puts(daybuf);
} }
return 0; return 0;
} }

View file

@ -10,7 +10,7 @@ CLT_OBJECTS = msclient.o
PROGS = msserver.exe msclient.exe PROGS = msserver.exe msclient.exe
BASE_CFLAGS = -I$(PATH_TO_TOP)/include BASE_CFLAGS = -I$(PATH_TO_TOP)/include -Wall -Werror
LIBS = $(SDK_PATH_LIB)/kernel32.a \ LIBS = $(SDK_PATH_LIB)/kernel32.a \
$(SDK_PATH_LIB)/ntdll.a $(SDK_PATH_LIB)/ntdll.a

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 2003/05/26 10:51:20 rcampbell Exp $ # $Id: makefile,v 1.2 2003/11/14 17:13:18 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -28,7 +28,7 @@ WinMain(HINSTANCE hInstance,
wc.cbWndExtra = 0; wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0) if (RegisterClass(&wc) == 0)
{ {
fprintf(stderr, "RegisterClass failed (last error 0x%X)\n", fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
GetLastError()); GetLastError());
return(1); return(1);
} }
@ -71,7 +71,7 @@ WinMain(HINSTANCE hInstance,
if (! hWnd1 || ! hWnd2 || ! hWndChild) if (! hWnd1 || ! hWnd2 || ! hWndChild)
{ {
fprintf(stderr, "CreateWindow failed (last error 0x%X)\n", fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError()); GetLastError());
return(1); return(1);
} }

View file

@ -1,5 +1,5 @@
# #
# $Id: makefile,v 1.2 2002/06/02 19:24:59 chorns Exp $ # $Id: makefile,v 1.3 2003/11/14 17:13:18 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -15,6 +15,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -10,7 +10,7 @@ CLT_OBJECTS = npclient.o
PROGS = npserver.exe npclient.exe PROGS = npserver.exe npclient.exe
BASE_CFLAGS = -I$(PATH_TO_TOP)/include BASE_CFLAGS = -I$(PATH_TO_TOP)/include -Wall -Werror
LIBS = $(SDK_PATH_LIB)/kernel32.a LIBS = $(SDK_PATH_LIB)/kernel32.a

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 2003/10/31 21:41:32 arty Exp $ # $Id: makefile,v 1.2 2003/11/14 17:13:18 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a ntdll.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,5 +1,7 @@
#include <stdio.h> #include <stdio.h>
#include <windows.h> #include <windows.h>
#include <stdlib.h>
#include <string.h>
/* This tests the ability of the target win32 to duplicate a process handle, /* This tests the ability of the target win32 to duplicate a process handle,
* spawn a child, and have the child dup it's own handle back into the parent * spawn a child, and have the child dup it's own handle back into the parent
@ -10,10 +12,10 @@ int main( int argc, char **argv ) {
HANDLE h_process; HANDLE h_process;
HANDLE h_process_in_parent; HANDLE h_process_in_parent;
fprintf( stderr, "%d: Starting\n", GetCurrentProcessId() ); fprintf( stderr, "%lu: Starting\n", GetCurrentProcessId() );
if( argc == 2 ) { if( argc == 2 ) {
h_process = atoi(argv[1]); h_process = (HANDLE)atoi(argv[1]);
} else { } else {
if( !DuplicateHandle( GetCurrentProcess(), if( !DuplicateHandle( GetCurrentProcess(),
GetCurrentProcess(), GetCurrentProcess(),
@ -22,7 +24,7 @@ int main( int argc, char **argv ) {
0, 0,
TRUE, TRUE,
DUPLICATE_SAME_ACCESS) ) { DUPLICATE_SAME_ACCESS) ) {
fprintf( stderr, "%d: Could not duplicate my own process handle.\n", fprintf( stderr, "%lu: Could not duplicate my own process handle.\n",
GetCurrentProcessId() ); GetCurrentProcessId() );
return 101; return 101;
} }
@ -36,16 +38,16 @@ int main( int argc, char **argv ) {
memset( &si, 0, sizeof( si ) ); memset( &si, 0, sizeof( si ) );
memset( &pi, 0, sizeof( pi ) ); memset( &pi, 0, sizeof( pi ) );
sprintf( cmdline, "%s %d", argv[0], h_process ); sprintf( cmdline, "%s %lu", argv[0], (DWORD)h_process );
if( !CreateProcess(NULL, cmdline, NULL, NULL, TRUE, 0, NULL, NULL, if( !CreateProcess(NULL, cmdline, NULL, NULL, TRUE, 0, NULL, NULL,
&si, &pi ) ) { &si, &pi ) ) {
fprintf( stderr, "%d: Could not create child process.\n", fprintf( stderr, "%lu: Could not create child process.\n",
GetCurrentProcessId() ); GetCurrentProcessId() );
return 5; return 5;
} }
if( WaitForSingleObject( pi.hThread, INFINITE ) != WAIT_OBJECT_0 ) { if( WaitForSingleObject( pi.hThread, INFINITE ) != WAIT_OBJECT_0 ) {
fprintf( stderr, "%d: Failed to wait for child process to terminate.\n", fprintf( stderr, "%lu: Failed to wait for child process to terminate.\n",
GetCurrentProcessId() ); GetCurrentProcessId() );
return 6; return 6;
} }
@ -57,7 +59,7 @@ int main( int argc, char **argv ) {
0, 0,
TRUE, TRUE,
DUPLICATE_SAME_ACCESS) ) { DUPLICATE_SAME_ACCESS) ) {
fprintf( stderr, "%d: Could not duplicate my handle into the parent.\n", fprintf( stderr, "%lu: Could not duplicate my handle into the parent.\n",
GetCurrentProcessId() ); GetCurrentProcessId() );
return 102; return 102;
} }

View file

@ -1,4 +1,3 @@
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
TARGET_NORC = yes TARGET_NORC = yes
@ -13,6 +12,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = pal.o TARGET_OBJECTS = pal.o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -9,9 +9,9 @@ TARGET_NAME = patblt
TARGET_NORC = yes TARGET_NORC = yes
TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -Werror -Wall
TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -Wall -Werror
TARGET_SDKLIBS = \ TARGET_SDKLIBS = \
kernel32.a \ kernel32.a \

View file

@ -9,7 +9,7 @@ TARGET_APPTYPE = console
TARGET_NAME = pipe TARGET_NAME = pipe
TARGET_CFLAGS = -DSTANDALONE TARGET_CFLAGS = -DSTANDALONE -Wall -Werror
TARGET_SDKLIBS = ntdll.a kernel32.a TARGET_SDKLIBS = ntdll.a kernel32.a

View file

@ -22,6 +22,7 @@
#include <stdio.h> #include <stdio.h>
#include <time.h> #include <time.h>
#include <assert.h> #include <assert.h>
#include <string.h>
#ifndef STANDALONE #ifndef STANDALONE
#include "wine/test.h" #include "wine/test.h"
@ -588,6 +589,7 @@ void test_DisconnectNamedPipe(void)
} }
int
START_TEST(pipe) START_TEST(pipe)
{ {
msg("test 1 of 4:\n"); msg("test 1 of 4:\n");
@ -599,4 +601,5 @@ START_TEST(pipe)
msg("test 4 of 4:\n"); msg("test 4 of 4:\n");
test_CreateNamedPipe(); test_CreateNamedPipe();
msg("all tests done\n"); msg("all tests done\n");
return 0;
} }

View file

@ -14,9 +14,9 @@ TARGET_NAME = primitives
TARGET_NORC = yes TARGET_NORC = yes
TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -Wall -Werror
TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -Wall -Werror
TARGET_SDKLIBS = \ TARGET_SDKLIBS = \
kernel32.a \ kernel32.a \

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.8 2002/06/02 19:25:00 chorns Exp $ # $Id: Makefile,v 1.9 2003/11/14 17:13:19 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -15,9 +15,9 @@ int main(int argc, char* argv[])
Teb = (PTEB)x; Teb = (PTEB)x;
printf("StackBase: 0x%08lX\n", Teb->Tib.StackBase); printf("StackBase: 0x%08lX\n", (DWORD)Teb->Tib.StackBase);
printf("StackLimit: 0x%08lX\n", Teb->Tib.StackLimit); printf("StackLimit: 0x%08lX\n", (DWORD)Teb->Tib.StackLimit);
printf("DeallocationStack: 0x%08lX\n", Teb->DeallocationStack); printf("DeallocationStack: 0x%08lX\n", (DWORD)Teb->DeallocationStack);
return(0); return(0);
} }

View file

@ -18,6 +18,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a
TARGET_OBJECTS = $(TARGET_NAME).o regcmds.o regproc.o main.o TARGET_OBJECTS = $(TARGET_NAME).o regcmds.o regproc.o main.o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,5 +1,5 @@
# #
# $Id: makefile,v 1.7 2002/06/02 19:25:00 chorns Exp $ # $Id: makefile,v 1.8 2003/11/14 17:13:19 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -15,6 +15,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -584,14 +584,10 @@ void test4(void)
void test5(void) void test5(void)
{ {
HKEY hKey,hKey1; HKEY hKey;
OBJECT_ATTRIBUTES ObjectAttributes; OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName,ValueName; UNICODE_STRING KeyName;
NTSTATUS Status; NTSTATUS Status;
KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
ULONG Index,Length,i;
char Buffer[10];
DWORD Result;
dprintf("NtOpenKey : \n"); dprintf("NtOpenKey : \n");
dprintf(" \\Registry\\Machine\\Software\\reactos : "); dprintf(" \\Registry\\Machine\\Software\\reactos : ");
@ -616,9 +612,7 @@ void test6(void)
UNICODE_STRING KeyName,ValueName; UNICODE_STRING KeyName,ValueName;
NTSTATUS Status; NTSTATUS Status;
KEY_VALUE_FULL_INFORMATION KeyValueInformation[5]; KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
ULONG Index,Length,i; ULONG Length,i;
char Buffer[10];
DWORD Result;
dprintf("Create target key\n"); dprintf("Create target key\n");
dprintf(" Key: \\Registry\\Machine\\SOFTWARE\\Reactos\n"); dprintf(" Key: \\Registry\\Machine\\SOFTWARE\\Reactos\n");

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.3 2002/06/02 19:25:00 chorns Exp $ # $Id: Makefile,v 1.4 2003/11/14 17:13:20 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -12,6 +12,8 @@ TARGET_NAME = sectest
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -1,71 +1,73 @@
/* $Id: sectest.c,v 1.4 2002/09/08 10:22:01 chorns Exp $ */ /* $Id: sectest.c,v 1.5 2003/11/14 17:13:20 weiden Exp $ */
#define UNICODE #define UNICODE
#define _UNICODE #define _UNICODE
#include <windows.h> #include <windows.h>
#include <stdio.h>
int main(int argc, char* argv[]) #include <string.h>
{
HANDLE hFile; int main(int argc, char* argv[])
HANDLE Section; {
PVOID BaseAddress; HANDLE hFile;
HANDLE Section;
printf("Section Test\n"); PVOID BaseAddress;
hFile = CreateFile(_T("sectest.txt"), printf("Section Test\n");
GENERIC_READ | GENERIC_WRITE,
0, hFile = CreateFile(_T("sectest.txt"),
NULL, GENERIC_READ | GENERIC_WRITE,
CREATE_ALWAYS, 0,
0, NULL,
0); CREATE_ALWAYS,
if (hFile == INVALID_HANDLE_VALUE) 0,
{ 0);
printf("Failed to create file (err=%d)", GetLastError()); if (hFile == INVALID_HANDLE_VALUE)
return 1; {
} printf("Failed to create file (err=%ld)", GetLastError());
return 1;
Section = CreateFileMapping(hFile, }
NULL,
PAGE_READWRITE, Section = CreateFileMapping(hFile,
0, NULL,
4096, PAGE_READWRITE,
NULL); 0,
if (Section == NULL) 4096,
{ NULL);
printf("Failed to create section (err=%d)", GetLastError()); if (Section == NULL)
return 1; {
} printf("Failed to create section (err=%ld)", GetLastError());
return 1;
printf("Mapping view of section\n"); }
BaseAddress = MapViewOfFile(Section,
FILE_MAP_ALL_ACCESS, printf("Mapping view of section\n");
0, BaseAddress = MapViewOfFile(Section,
0, FILE_MAP_ALL_ACCESS,
4096); 0,
printf("BaseAddress %x\n", (UINT) BaseAddress); 0,
if (BaseAddress == NULL) 4096);
{ printf("BaseAddress %x\n", (UINT) BaseAddress);
printf("Failed to map section (%d)\n", GetLastError()); if (BaseAddress == NULL)
return 1; {
} printf("Failed to map section (%ld)\n", GetLastError());
return 1;
printf("Clearing section\n"); }
FillMemory(BaseAddress, 4096, ' ');
printf("Copying test data to section\n"); printf("Clearing section\n");
strcpy(BaseAddress, "test data"); FillMemory(BaseAddress, 4096, ' ');
printf("Copying test data to section\n");
if (!UnmapViewOfFile(BaseAddress)) strcpy(BaseAddress, "test data");
{
printf("Failed to unmap view of file (%d)\n", GetLastError()); if (!UnmapViewOfFile(BaseAddress))
return 1; {
} printf("Failed to unmap view of file (%ld)\n", GetLastError());
return 1;
if (!CloseHandle(hFile)) }
{
printf("Failed to close file (%d)\n", GetLastError()); if (!CloseHandle(hFile))
return 1; {
} printf("Failed to close file (%ld)\n", GetLastError());
return 1;
return 0; }
}
return 0;
}

View file

@ -15,6 +15,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -11,7 +11,6 @@ int main(int argc, char *argv[])
CHAR rxBuffer[BUFSIZE]; CHAR rxBuffer[BUFSIZE];
DWORD dwBaud = 9600; DWORD dwBaud = 9600;
DWORD dwNumWritten; DWORD dwNumWritten;
DWORD dwNumRead;
DWORD dwErrors; DWORD dwErrors;
DCB dcb; DCB dcb;
BOOL bResult; BOOL bResult;
@ -40,20 +39,20 @@ int main(int argc, char *argv[])
NULL); // no template NULL); // no template
if (hPort == (HANDLE)-1) { if (hPort == (HANDLE)-1) {
printf("ERROR: CreateFile() failed with result: %lx\n", hPort); printf("ERROR: CreateFile() failed with result: %lx\n", (DWORD)hPort);
return 1; return 1;
} }
printf("CreateFile() returned: %lx\n", hPort); printf("CreateFile() returned: %lx\n", (DWORD)hPort);
printf("Fiddling with DTR and RTS control lines...\n"); printf("Fiddling with DTR and RTS control lines...\n");
for (i = 0; i < 100; i++) { for (i = 0; i < 100; i++) {
bResult = EscapeCommFunction(hPort, SETDTR); bResult = EscapeCommFunction(hPort, SETDTR);
if (!bResult) { if (!bResult) {
printf("WARNING: EscapeCommFunction(SETDTR) failed: %lx\n", bResult); printf("WARNING: EscapeCommFunction(SETDTR) failed: %lx\n", (DWORD)bResult);
} }
bResult = EscapeCommFunction(hPort, SETRTS); bResult = EscapeCommFunction(hPort, SETRTS);
if (!bResult) { if (!bResult) {
printf("WARNING: EscapeCommFunction(SETRTS) failed: %lx\n", bResult); printf("WARNING: EscapeCommFunction(SETRTS) failed: %lx\n", (DWORD)bResult);
} }
for (j = 0; j < 1000; j++) { for (j = 0; j < 1000; j++) {
k *= j; k *= j;
@ -70,17 +69,17 @@ int main(int argc, char *argv[])
*/ */
bResult = EscapeCommFunction(hPort, CLRDTR); bResult = EscapeCommFunction(hPort, CLRDTR);
if (!bResult) { if (!bResult) {
printf("WARNING: EscapeCommFunction(CLRDTR) failed: %lx\n", bResult); printf("WARNING: EscapeCommFunction(CLRDTR) failed: %lx\n", (DWORD)bResult);
} }
bResult = EscapeCommFunction(hPort, CLRRTS); bResult = EscapeCommFunction(hPort, CLRRTS);
if (!bResult) { if (!bResult) {
printf("WARNING: EscapeCommFunction(CLRRTS) failed: %lx\n", bResult); printf("WARNING: EscapeCommFunction(CLRRTS) failed: %lx\n", (DWORD)bResult);
} }
} }
printf("Getting the default line characteristics...\n"); printf("Getting the default line characteristics...\n");
dcb.DCBlength = sizeof(DCB); dcb.DCBlength = sizeof(DCB);
if (!GetCommState(hPort, &dcb)) { if (!GetCommState(hPort, &dcb)) {
printf("ERROR: failed to get the dcb: %d\n", GetLastError()); printf("ERROR: failed to get the dcb: %ld\n", GetLastError());
return 2; return 2;
} }
printf("Setting the line characteristics to 9600,8,N,1\n"); printf("Setting the line characteristics to 9600,8,N,1\n");
@ -91,7 +90,7 @@ int main(int argc, char *argv[])
bResult = SetCommState(hPort, &dcb); bResult = SetCommState(hPort, &dcb);
if (!bResult) { if (!bResult) {
printf("ERROR: failed to set the comm state: %lx\n", bResult); printf("ERROR: failed to set the comm state: %lx\n", (DWORD)bResult);
return 3; return 3;
} }
for (i = 0; i < BUFSIZE; i++) { for (i = 0; i < BUFSIZE; i++) {
@ -103,28 +102,28 @@ int main(int argc, char *argv[])
printf("Writting transmit buffer to the serial port\n"); printf("Writting transmit buffer to the serial port\n");
bResult = WriteFile(hPort, txBuffer, BUFSIZE, &dwNumWritten, NULL); bResult = WriteFile(hPort, txBuffer, BUFSIZE, &dwNumWritten, NULL);
if (!bResult) { if (!bResult) {
printf("ERROR: failed to write to the serial port: %lx\n", bResult); printf("ERROR: failed to write to the serial port: %lx\n", (DWORD)bResult);
return 4; return 4;
} }
printf("WriteFile() returned: %lx, byteswritten: %lx\n", bResult, dwNumWritten); printf("WriteFile() returned: %lx, byteswritten: %lx\n", (DWORD)bResult, dwNumWritten);
#if 0 #if 0
printf("Attempting to read %d bytes from the serial port\n", BUFSIZE); printf("Attempting to read %d bytes from the serial port\n", BUFSIZE);
bResult = ReadFile(hPort, rxBuffer, BUFSIZE, &dwNumRead, NULL); bResult = ReadFile(hPort, rxBuffer, BUFSIZE, &dwNumRead, NULL);
if (!bResult) { if (!bResult) {
printf("ERROR: failed to read from the serial port: %lx\n", bResult); printf("ERROR: failed to read from the serial port: %lx\n", (DWORD)bResult);
return 5; return 5;
} }
printf("ReadFile() returned: %lx, bytesread: %lx\n", bResult, dwNumRead); printf("ReadFile() returned: %lx, bytesread: %lx\n", (DWORD)bResult, dwNumRead);
for (i = 0; i < BUFSIZE; i++) { for (i = 0; i < BUFSIZE; i++) {
printf(" %d ",rxBuffer[i]); printf(" %d ",rxBuffer[i]);
} }
#endif #endif
printf("Attempting to close the serial port\n"); printf("Attempting to close the serial port\n");
bResult = ClearCommError(hPort, &dwErrors, NULL); bResult = ClearCommError(hPort, &dwErrors, NULL);
printf("ClearCommError returned: %lx, dwErrors: %lx\n", bResult, dwErrors); printf("ClearCommError returned: %lx, dwErrors: %lx\n", (DWORD)bResult, dwErrors);
bResult = CloseHandle(hPort); bResult = CloseHandle(hPort);
if (!bResult) { if (!bResult) {
printf("ERROR: failed to close the serial port: %lx\n", bResult); printf("ERROR: failed to close the serial port: %lx\n", (DWORD)bResult);
return 6; return 6;
} }
printf("Finished\n"); printf("Finished\n");

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.2 2003/08/15 18:51:31 royce Exp $ # $Id: makefile,v 1.3 2003/11/14 17:13:20 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -16,6 +16,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -10,7 +10,7 @@ CLT_OBJECTS= shmclt.o
PROGS= shmsrv.exe shmclt.exe PROGS= shmsrv.exe shmclt.exe
BASE_CFLAGS = -I$(PATH_TO_TOP)/include BASE_CFLAGS = -I$(PATH_TO_TOP)/include -Werror -Wall
LIBS = $(SDK_PATH_LIB)/kernel32.a \ LIBS = $(SDK_PATH_LIB)/kernel32.a \
$(SDK_PATH_LIB)/ntdll.a $(SDK_PATH_LIB)/ntdll.a

View file

@ -1,4 +1,3 @@
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
TARGET_NORC = yes TARGET_NORC = yes
@ -13,6 +12,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -13,6 +13,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -9,9 +9,9 @@ TARGET_NAME = stretchblt
TARGET_NORC = yes TARGET_NORC = yes
TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -Wall -Werror
TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -Wall -Werror
TARGET_SDKLIBS = \ TARGET_SDKLIBS = \
kernel32.a \ kernel32.a \

View file

@ -20,6 +20,8 @@ HWND HListBox = NULL;
const int ID_LISTBOX = 101; const int ID_LISTBOX = 101;
HINSTANCE HInst; HINSTANCE HInst;
HINSTANCE HPrevInst;
TCHAR *cmdline;
const char* WndClassName = "GMainWnd"; const char* WndClassName = "GMainWnd";
LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
LPARAM LParam); LPARAM LParam);
@ -29,6 +31,8 @@ int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance,
LPTSTR lpCmdLine, int nCmdShow) LPTSTR lpCmdLine, int nCmdShow)
{ {
HInst = HInstance; HInst = HInstance;
HPrevInst = HPrevInstance;
cmdline = lpCmdLine;
WNDCLASS wc; WNDCLASS wc;
memset(&wc, 0, sizeof(WNDCLASS)); memset(&wc, 0, sizeof(WNDCLASS));

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 2003/11/08 22:10:15 gvg Exp $ # $Id: makefile,v 1.2 2003/11/14 17:13:20 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,7 +14,7 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS += -D_DISABLE_TIDENTS TARGET_CFLAGS += -D_DISABLE_TIDENTS -Werror -Wall
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.1 2003/07/20 12:17:19 dwelch Exp $ # $Id: Makefile,v 1.2 2003/11/14 17:13:20 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -12,6 +12,8 @@ TARGET_NAME = suspend
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -3,6 +3,7 @@
#define NTOS_MODE_USER #define NTOS_MODE_USER
#include <ntos.h> #include <ntos.h>
#include <windows.h> #include <windows.h>
#include <stdio.h>
#define DBG #define DBG
#define NDEBUG #define NDEBUG
@ -58,11 +59,11 @@ main(int argc, char *argv[])
for(;;) for(;;)
{ {
printf("%x ", z); printf("%lx ", z);
Sleep(100);x++; Sleep(100);x++;
if(x>100 && GetThreadContext(thread, &context)) if(x>100 && GetThreadContext(thread, &context))
{ {
printf("EIP: %x\n", context.Eip); printf("EIP: %lx\n", context.Eip);
printf("Calling resumethread ... \n"); printf("Calling resumethread ... \n");
ResumeThread(thread); ResumeThread(thread);
} }

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 2002/06/17 06:01:17 sedwards Exp $ # $Id: makefile,v 1.2 2003/11/14 17:13:21 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a ws2_32.a
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -12,6 +12,8 @@
#include <winsock2.h> #include <winsock2.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <io.h>
#undef ERROR #undef ERROR
#define SUCCESS 0 #define SUCCESS 0

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.1 2003/07/21 21:44:28 dwelch Exp $ # $Id: Makefile,v 1.2 2003/11/14 17:13:21 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -12,6 +12,8 @@ TARGET_NAME = terminate
TARGET_OBJECTS = $(TARGET_NAME).o TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/helper.mk

View file

@ -3,6 +3,7 @@
#define NTOS_MODE_USER #define NTOS_MODE_USER
#include <ntos.h> #include <ntos.h>
#include <windows.h> #include <windows.h>
#include <stdio.h>
#define DBG #define DBG
#define NDEBUG #define NDEBUG

Some files were not shown because too many files have changed in this diff Show more