The sample Winelib programs don't compile on my machine. I have a patch ready (see attachment) but I'm not sure I'm doing everything right so I thought I'd ask here before submitting it to wine-patches: * rpcrt4 is missing from the link list Actually I don't have a question for that one, it seems obvious. * Languages is undefined In many examples I see code like: #ifdef WINELIB Globals.lpszLanguage = Languages[Options.language].name; #else But I could not find 'Languages' defined anywhere (and neither could the compiler obviously). Where did it go? So I temporarily replaced '#ifdef WINELIB' by '#if 0' but... * WinMain's definition is inconsistent with that in winbase.h winbase.h is right. WinMain takes HINSTANCE parameters, not HANDLEs. I don't remember if that's a warning or an error. * Is it ok if I modify all the Makefiles to compile in STRICT mode? I prefer STRICT mode, types seem to be saner (not everything is an integer) even if it tends to require a few more casts here and there (for example when returning ERROR_INVALID_PARAMETER and an HKEY). In any case it allowed me to find that we were passing the wrong parameters to CreateWindow in clock/main.c (around l189) and 2/3 other buglets. * Are these applications 16bit applications or 32bit applications I thought that Winelib was 32bits only but these applications call methods like hmemcpy16, CreateCursorIconIndirect16, DumpIcon16 and WriteOutProfiles16. Sometimes this causes a warning (typically the prototype for hmemcpy16 is missing for instance). Should these calls be converted to their 32bit equivalent? (Note that I did not change anything for these in my patch) -- Francois Gouget [EMAIL PROTECTED] http://fgouget.free.fr/ "Only wimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it ;)" -- Linus Torvalds
Index: libtest/Makefile.in =================================================================== RCS file: /home/wine/wine/libtest/Makefile.in,v retrieving revision 1.14 diff -u -r1.14 Makefile.in --- libtest/Makefile.in 2000/06/08 04:52:12 1.14 +++ libtest/Makefile.in 2000/07/17 00:39:19 @@ -1,3 +1,4 @@ +DEFS = -DWINELIB -DSTRICT TOPSRCDIR = @top_srcdir@ TOPOBJDIR = .. SRCDIR = @srcdir@ @@ -49,7 +50,7 @@ $(CC) -o rolex $+ $(DLL_LINK) $(LIBS) vartest: vartest.o vartest.spec.o - $(CC) -o vartest $+ -L$(DLLDIR) -loleaut32 -lole32 $(DLL_LINK) $(LIBS) + $(CC) -o vartest $+ -L$(DLLDIR) -loleaut32 -lcomctl32 -lole32 -lrpcrt4 +$(DLL_LINK) $(LIBS) volinfo: volinfo.o volinfo.spec.o $(CC) -o volinfo $+ $(DLL_LINK) $(LIBS) Index: libtest/hello.c =================================================================== RCS file: /home/wine/wine/libtest/hello.c,v retrieving revision 1.2 diff -u -r1.2 hello.c --- libtest/hello.c 1999/04/03 13:50:08 1.2 +++ libtest/hello.c 2000/07/17 00:39:20 @@ -4,7 +4,7 @@ long FAR PASCAL WndProc(HWND, UINT, WPARAM, LPARAM); -int PASCAL WinMain (HANDLE hInstance, HANDLE hPrevInst, LPSTR lpszCmdLine, +int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpszCmdLine, int nCmdShow) { HWND hwnd; Index: libtest/hello2.c =================================================================== RCS file: /home/wine/wine/libtest/hello2.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 hello2.c --- libtest/hello2.c 1998/09/24 03:43:37 1.1.1.1 +++ libtest/hello2.c 2000/07/17 00:39:20 @@ -1,6 +1,6 @@ #include "windows.h" -int PASCAL WinMain (HANDLE inst, HANDLE prev, LPSTR cmdline, int show) +int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) { return MessageBox((HWND)0, (LPSTR)"Hello, hello!", Index: libtest/hello3.c =================================================================== RCS file: /home/wine/wine/libtest/hello3.c,v retrieving revision 1.3 diff -u -r1.3 hello3.c --- libtest/hello3.c 1999/04/03 13:52:04 1.3 +++ libtest/hello3.c 2000/07/17 00:39:20 @@ -82,7 +82,7 @@ return 0l; } -int PASCAL WinMain (HANDLE inst, HANDLE prev, LPSTR cmdline, int show) +int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) { MSG msg; WNDCLASS class; Index: libtest/hello4.c =================================================================== RCS file: /home/wine/wine/libtest/hello4.c,v retrieving revision 1.4 diff -u -r1.4 hello4.c --- libtest/hello4.c 2000/02/10 19:03:07 1.4 +++ libtest/hello4.c 2000/07/17 00:39:20 @@ -99,7 +99,7 @@ return 0l; } -int PASCAL WinMain (HANDLE inst, HANDLE prev, LPSTR cmdline, int show) +int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) { HWND wnd,wnd2; MSG msg; Index: libtest/hello5.c =================================================================== RCS file: /home/wine/wine/libtest/hello5.c,v retrieving revision 1.4 diff -u -r1.4 hello5.c --- libtest/hello5.c 2000/01/08 22:21:47 1.4 +++ libtest/hello5.c 2000/07/17 00:39:20 @@ -4,7 +4,7 @@ #include <stdio.h> #include <windows.h> -int PASCAL WinMain (HANDLE inst, HANDLE prev, LPSTR cmdline, int show) +int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) { SYSTEM_INFO si; void (CALLBACK *fnGetSystemInfo)(LPSYSTEM_INFO si); Index: libtest/new.c =================================================================== RCS file: /home/wine/wine/libtest/new.c,v retrieving revision 1.3 diff -u -r1.3 new.c --- libtest/new.c 1999/04/03 13:52:04 1.3 +++ libtest/new.c 2000/07/17 00:39:21 @@ -6,7 +6,7 @@ LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK ChildProc (HWND, UINT, WPARAM, LPARAM); -int PASCAL WinMain (HANDLE hInstance, HANDLE hPrevInstance, +int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdParam, int nCmdShow) { char szAppName[] = "ClassLook" ; Index: libtest/rolex.c =================================================================== RCS file: /home/wine/wine/libtest/rolex.c,v retrieving revision 1.2 diff -u -r1.2 rolex.c --- libtest/rolex.c 1999/04/03 13:52:04 1.2 +++ libtest/rolex.c 2000/07/17 00:39:21 @@ -220,7 +220,7 @@ } } -int PASCAL WinMain (HANDLE inst, HANDLE prev, LPSTR cmdline, int show) +int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) { WNDCLASS class; if(!prev) Index: libtest/vartest.c =================================================================== RCS file: /home/wine/wine/libtest/vartest.c,v retrieving revision 1.5 diff -u -r1.5 vartest.c --- libtest/vartest.c 2000/01/29 19:49:58 1.5 +++ libtest/vartest.c 2000/07/17 00:39:23 @@ -101,7 +101,7 @@ #endif -int PASCAL WinMain (HANDLE inst, HANDLE prev, LPSTR cmdline, int show) +int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) { VARIANTARG va; VARIANTARG vb; Index: programs/clock/Makefile.in =================================================================== RCS file: /home/wine/wine/programs/clock/Makefile.in,v retrieving revision 1.16 diff -u -r1.16 Makefile.in --- programs/clock/Makefile.in 2000/05/01 20:05:59 1.16 +++ programs/clock/Makefile.in 2000/07/17 00:39:23 @@ -1,11 +1,11 @@ -DEFS = -DWINELIB +DEFS = -DWINELIB -DSTRICT TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = none PROGRAMS = clock -IMPORTS = shell32 comdlg32 ole32 winspool.drv +IMPORTS = shell32 comdlg32 ole32 rpcrt4 winspool.drv WRCEXTRA = -s -p clock LICENSELANG = En Index: programs/clock/language.c =================================================================== RCS file: /home/wine/wine/programs/clock/language.c,v retrieving revision 1.4 diff -u -r1.4 language.c --- programs/clock/language.c 2000/03/19 21:49:49 1.4 +++ programs/clock/language.c 2000/07/17 00:39:24 @@ -150,7 +150,7 @@ if (Globals.hMainMenu) DestroyMenu(Globals.hMainMenu); Globals.hMainMenu = hMainMenu; -#ifdef WINELIB +#if 0 /* Update system menus */ for (i = 0; Languages[i].name && lstrcmp(szLanguage, Languages[i].name);) i++; if (Languages[i].name) Options.language = i; @@ -180,9 +180,9 @@ { CHAR szBuffer[MAX_PATHNAME_LEN]; - #ifdef WINELIB +#if 0 Globals.lpszLanguage = (LPSTR)Languages[Options.language].name; - #endif +#endif if (Globals.lpszLanguage == "En") { PROFILE_GetWineIniString("programs", "language", "En", szBuffer, Index: programs/clock/main.c =================================================================== RCS file: /home/wine/wine/programs/clock/main.c,v retrieving revision 1.6 diff -u -r1.6 main.c --- programs/clock/main.c 2000/01/29 22:07:03 1.6 +++ programs/clock/main.c 2000/07/17 00:39:24 @@ -189,7 +189,7 @@ * WinMain */ -int PASCAL WinMain (HANDLE hInstance, HANDLE prev, LPSTR cmdline, int show) +int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show) { MSG msg; WNDCLASS class; @@ -229,7 +229,7 @@ if (!RegisterClass (&class)) return FALSE; Globals.hMainWnd = CreateWindow (szClassName, szWinName, WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, 0, CW_USEDEFAULT, Globals.MaxX, Globals.MaxY, + CW_USEDEFAULT, CW_USEDEFAULT, Globals.MaxX, Globals.MaxY, 0, LoadMenu(Globals.hInstance, STRING_MENU_Xx), Globals.hInstance, 0); LANGUAGE_SelectByName(Globals.lpszLanguage); Index: programs/cmdlgtst/Makefile.in =================================================================== RCS file: /home/wine/wine/programs/cmdlgtst/Makefile.in,v retrieving revision 1.8 diff -u -r1.8 Makefile.in --- programs/cmdlgtst/Makefile.in 2000/04/28 14:50:54 1.8 +++ programs/cmdlgtst/Makefile.in 2000/07/17 00:39:24 @@ -1,4 +1,4 @@ -DEFS = -DWINELIB +DEFS = -DWINELIB -DSTRICT TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ Index: programs/control/Makefile.in =================================================================== RCS file: /home/wine/wine/programs/control/Makefile.in,v retrieving revision 1.7 diff -u -r1.7 Makefile.in --- programs/control/Makefile.in 2000/04/24 17:17:52 1.7 +++ programs/control/Makefile.in 2000/07/17 00:39:24 @@ -1,11 +1,11 @@ -DEFS = -DWINELIB +DEFS = -DWINELIB -DSTRICT TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = none PROGRAMS = control -IMPORTS = shell32 ole32 +IMPORTS = shell32 ole32 rpcrt4 C_SRCS = control.c Index: programs/notepad/Makefile.in =================================================================== RCS file: /home/wine/wine/programs/notepad/Makefile.in,v retrieving revision 1.16 diff -u -r1.16 Makefile.in --- programs/notepad/Makefile.in 2000/05/01 20:05:59 1.16 +++ programs/notepad/Makefile.in 2000/07/17 00:39:24 @@ -1,11 +1,11 @@ -DEFS = -DWINELIB +DEFS = -DWINELIB -DSTRICT TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = none PROGRAMS = notepad -IMPORTS = shell32 ole32 comdlg32 winspool.drv +IMPORTS = shell32 ole32 rpcrt4 comdlg32 winspool.drv WRCEXTRA = -s -p notepad LICENSELANG = En Index: programs/notepad/dialog.c =================================================================== RCS file: /home/wine/wine/programs/notepad/dialog.c,v retrieving revision 1.9 diff -u -r1.9 dialog.c --- programs/notepad/dialog.c 2000/03/24 20:40:42 1.9 +++ programs/notepad/dialog.c 2000/07/17 00:39:26 @@ -146,7 +146,7 @@ void DoOpenFile(LPCSTR szFileName) { - int hFile; + HFILE hFile; WORD nResult; /* Close any files and prompt to save changes */ Index: programs/notepad/language.c =================================================================== RCS file: /home/wine/wine/programs/notepad/language.c,v retrieving revision 1.5 diff -u -r1.5 language.c --- programs/notepad/language.c 1999/02/14 11:28:37 1.5 +++ programs/notepad/language.c 2000/07/17 00:39:26 @@ -128,7 +128,7 @@ if (Globals.hMainMenu) DestroyMenu(Globals.hMainMenu); Globals.hMainMenu = hMainMenu; -#ifdef WINELIB +#if 0 /* Update system menus */ for (i = 0; Languages[i].name && lstrcmp(lang, Languages[i].name);) i++; if (Languages[i].name) Options.language = i; @@ -145,9 +145,9 @@ VOID LANGUAGE_Init(VOID) { - #ifdef WINELIB +#if 0 Globals.lpszLanguage = Languages[Options.language].name; - #else +#else CHAR buffer[MAX_PATHNAME_LEN], *p; #ifndef LCC @@ -157,6 +157,6 @@ Globals.lpszLanguage = p = LocalLock(LocalAlloc(LMEM_FIXED, lstrlen(buffer)+1)); strcpy(p, buffer); /* hmemcpy(p, buffer, 1 + lstrlen(buffer)); */ - #endif +#endif } Index: programs/notepad/main.c =================================================================== RCS file: /home/wine/wine/programs/notepad/main.c,v retrieving revision 1.10 diff -u -r1.10 main.c --- programs/notepad/main.c 2000/03/19 21:49:49 1.10 +++ programs/notepad/main.c 2000/07/17 00:39:27 @@ -138,7 +138,7 @@ * WinMain */ -int PASCAL WinMain (HANDLE hInstance, HANDLE prev, LPSTR cmdline, int show) +int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show) { MSG msg; WNDCLASS class; Index: programs/osversioncheck/Makefile.in =================================================================== RCS file: /home/wine/wine/programs/osversioncheck/Makefile.in,v retrieving revision 1.5 diff -u -r1.5 Makefile.in --- programs/osversioncheck/Makefile.in 2000/04/24 17:17:52 1.5 +++ programs/osversioncheck/Makefile.in 2000/07/17 00:39:27 @@ -1,4 +1,4 @@ -DEFS = -DWINELIB +DEFS = -DWINELIB -DSTRICT TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ Index: programs/progman/Makefile.in =================================================================== RCS file: /home/wine/wine/programs/progman/Makefile.in,v retrieving revision 1.14 diff -u -r1.14 Makefile.in --- programs/progman/Makefile.in 2000/05/01 20:05:59 1.14 +++ programs/progman/Makefile.in 2000/07/17 00:39:27 @@ -1,11 +1,11 @@ -DEFS = -DWINELIB +DEFS = -DWINELIB -DSTRICT TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = none PROGRAMS = progman -IMPORTS = shell32 comdlg32 ole32 winspool.drv +IMPORTS = shell32 comdlg32 ole32 rpcrt4 winspool.drv WRCEXTRA = -s -p progman LICENSELANG = En Index: programs/progman/grpfile.c =================================================================== RCS file: /home/wine/wine/programs/progman/grpfile.c,v retrieving revision 1.3 diff -u -r1.3 grpfile.c --- programs/progman/grpfile.c 1999/02/26 11:11:32 1.3 +++ programs/progman/grpfile.c 2000/07/17 00:39:28 @@ -89,7 +89,7 @@ static BOOL GRPFILE_ReadFileToBuffer(LPCSTR path, HLOCAL *phBuffer, INT *piSize) { - INT len, size; + UINT len, size; LPSTR buffer; HLOCAL hBuffer, hNewBuffer; HFILE file; @@ -119,7 +119,7 @@ _lclose(file); - if (len == HFILE_ERROR) + if (len == (UINT)HFILE_ERROR) { LocalFree(hBuffer); return FALSE; @@ -563,7 +563,7 @@ PUT_SHORT(buffer, 30, 0x0000); /* unknown */ PUT_SHORT(buffer, 32, NumProg); - if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 34)) return FALSE; + if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 34)) return FALSE; /* Program table */ CurrProg = Progs; @@ -574,7 +574,7 @@ PROGRAM *program = LocalLock(hProgram); PUT_SHORT(buffer, 0, CurrProg); - if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 2)) + if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 2)) return FALSE; GRPFILE_CalculateSizes(program, &CurrProg, &CurrIcon); @@ -582,7 +582,7 @@ } /* Title */ - if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, lpszTitle, + if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, lpszTitle, lstrlen(lpszTitle) + 1)) return FALSE; @@ -616,10 +616,10 @@ ptr += lstrlen(CmdLine) + 1; PUT_SHORT(buffer, 22, ptr); - if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 24) || - HFILE_ERROR == GRPFILE_WriteWithChecksum(file, Name, lstrlen(Name) + 1) || - HFILE_ERROR == GRPFILE_WriteWithChecksum(file, CmdLine, lstrlen(CmdLine) + 1) || - HFILE_ERROR == GRPFILE_WriteWithChecksum(file, IconFile, lstrlen(IconFile) + 1)) + if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 24) || + (UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, Name, lstrlen(Name) + +1) || + (UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, CmdLine, +lstrlen(CmdLine) + 1) || + (UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, IconFile, +lstrlen(IconFile) + 1)) return FALSE; GRPFILE_CalculateSizes(program, &CurrProg, &CurrIcon); @@ -645,9 +645,9 @@ buffer[10] = iconinfo->bPlanes; buffer[11] = iconinfo->bBitsPerPixel; - if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 12) || - HFILE_ERROR == GRPFILE_WriteWithChecksum(file, AndBits, sizeAnd) || - HFILE_ERROR == GRPFILE_WriteWithChecksum(file, XorBits, sizeXor)) return FALSE; + if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 12) || + (UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, AndBits, sizeAnd) || + (UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, XorBits, sizeXor)) +return FALSE; hProgram = program->hNext; } @@ -660,7 +660,7 @@ PUT_SHORT(buffer, 4, 0x000a); buffer[6] = 'P', buffer[7] = 'M'; buffer[8] = 'C', buffer[9] = 'C'; - if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 10)) + if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 10)) return FALSE; seqnum = 0; @@ -676,8 +676,8 @@ PUT_SHORT(buffer, 0, 0x8101); PUT_SHORT(buffer, 2, seqnum); PUT_SHORT(buffer, 4, 7 + lstrlen(lpszWorkDir)); - if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 6) || - HFILE_ERROR == GRPFILE_WriteWithChecksum(file, lpszWorkDir, lstrlen(lpszWorkDir) + 1)) + if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 6) || + (UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, lpszWorkDir, +lstrlen(lpszWorkDir) + 1)) return FALSE; } @@ -688,7 +688,7 @@ PUT_SHORT(buffer, 2, seqnum); PUT_SHORT(buffer, 4, 8); PUT_SHORT(buffer, 6, program->nHotKey); - if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 8)) return FALSE; + if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 8)) +return FALSE; } /* Show command */ @@ -698,7 +698,7 @@ PUT_SHORT(buffer, 2, seqnum); PUT_SHORT(buffer, 4, 8); PUT_SHORT(buffer, 6, program->nCmdShow); - if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 8)) return FALSE; + if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 8)) +return FALSE; } seqnum++; @@ -709,7 +709,7 @@ PUT_SHORT(buffer, 0, 0xffff); PUT_SHORT(buffer, 2, 0xffff); PUT_SHORT(buffer, 4, 0x0000); - if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 6)) return FALSE; + if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 6)) return +FALSE; } checksum = GRPFILE_GetChecksum(); Index: programs/progman/main.c =================================================================== RCS file: /home/wine/wine/programs/progman/main.c,v retrieving revision 1.5 diff -u -r1.5 main.c --- programs/progman/main.c 2000/03/19 21:49:49 1.5 +++ programs/progman/main.c 2000/07/17 00:39:29 @@ -33,7 +33,7 @@ * WinMain */ -int PASCAL WinMain (HANDLE hInstance, HANDLE prev, LPSTR cmdline, int show) +int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show) { MSG msg; @@ -59,7 +59,7 @@ #endif /* Select Language */ -#ifdef WINELIB +#if 0 Globals.lpszLanguage = Languages[Options.language].name; #else Globals.lpszLanguage = "En"; Index: programs/progman/string.c =================================================================== RCS file: /home/wine/wine/programs/progman/string.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 string.c --- programs/progman/string.c 1998/09/24 03:43:38 1.1.1.1 +++ programs/progman/string.c 2000/07/17 00:39:29 @@ -70,7 +70,9 @@ CHAR caption[MAX_STRING_LEN]; CHAR item[MAX_STRING_LEN]; HMENU hMainMenu; +#if 0 HLOCAL hGroup; +#endif /* Select string table */ Globals.wStringTableOffset = num * 0x100; @@ -120,7 +122,7 @@ if (Globals.hMainMenu) DestroyMenu(Globals.hMainMenu); Globals.hMainMenu = hMainMenu; -#ifdef WINELIB +#if 0 /* Update system menus */ for (i = 0; Languages[i].name && lstrcmp(lang, Languages[i].name);) i++; if (Languages[i].name) Options.language = i; Index: programs/regapi/Makefile.in =================================================================== RCS file: /home/wine/wine/programs/regapi/Makefile.in,v retrieving revision 1.7 diff -u -r1.7 Makefile.in --- programs/regapi/Makefile.in 2000/04/24 17:17:52 1.7 +++ programs/regapi/Makefile.in 2000/07/17 00:39:29 @@ -1,4 +1,4 @@ -DEFS = -DWINELIB +DEFS = -DWINELIB -DSTRICT TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ Index: programs/regapi/regapi.c =================================================================== RCS file: /home/wine/wine/programs/regapi/regapi.c,v retrieving revision 1.8 diff -u -r1.8 regapi.c --- programs/regapi/regapi.c 2000/04/04 18:54:26 1.8 +++ programs/regapi/regapi.c 2000/07/17 00:39:32 @@ -142,7 +142,7 @@ /* * Generic prototyes */ -static HKEY getDataType(LPSTR *lpValue); +static DWORD getDataType(LPSTR *lpValue); static LPSTR getRegKeyName(LPSTR lpLine); static HKEY getRegClass(LPSTR lpLine); static LPSTR getArg(LPSTR arg); @@ -231,10 +231,10 @@ /****************************************************************************** * This function returns the HKEY associated with the data type encoded in the - * value. It modify the input parameter (key value) in order to skip this + * value. It modifies the input parameter (key value) in order to skip this * "now useless" data type information. */ -HKEY getDataType(LPSTR *lpValue) +DWORD getDataType(LPSTR *lpValue) { INT counter = 0; DWORD dwReturn = REG_SZ; @@ -285,7 +285,7 @@ /****************************************************************************** * Extracts from a [HKEY/some/key/path] type of line the key class (what - * starts after the '[' and end before the first '\' + * starts after the '[' and ends before the first '\' */ static HKEY getRegClass(LPSTR lpClass) { @@ -295,7 +295,7 @@ char lpClassCopy[KEY_MAX_LEN]; if (lpClass == NULL) - return ERROR_INVALID_PARAMETER; + return (HKEY)ERROR_INVALID_PARAMETER; strcpy(lpClassCopy, lpClass); @@ -314,7 +314,7 @@ else if (strcmp( classNameBeg, "HKEY_CURRENT_USER") == IDENTICAL ) return HKEY_CURRENT_USER; else - return ERROR_INVALID_PARAMETER; + return (HKEY)ERROR_INVALID_PARAMETER; } /****************************************************************************** @@ -593,8 +593,8 @@ /* Get the registry class */ currentKeyClass = getRegClass(stdInput); /* Sets global variable */ - if (currentKeyClass == ERROR_INVALID_PARAMETER) - return ERROR_INVALID_PARAMETER; + if (currentKeyClass == (HKEY)ERROR_INVALID_PARAMETER) + return (HRESULT)ERROR_INVALID_PARAMETER; /* Get the key name */ currentKeyName = getRegKeyName(stdInput); /* Sets global variable */ @@ -1002,7 +1002,7 @@ * It then read the STDIN lines by lines forwarding their processing * to the appropriate method. */ -int PASCAL WinMain (HANDLE inst, HANDLE prev, LPSTR cmdline, int show) +int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) { LPSTR token = NULL; /* current token analized */ LPSTR stdInput = NULL; /* line read from stdin */ Index: programs/regtest/Makefile.in =================================================================== RCS file: /home/wine/wine/programs/regtest/Makefile.in,v retrieving revision 1.8 diff -u -r1.8 Makefile.in --- programs/regtest/Makefile.in 2000/04/24 17:17:52 1.8 +++ programs/regtest/Makefile.in 2000/07/17 00:39:32 @@ -1,4 +1,4 @@ -DEFS = -DWINELIB +DEFS = -DWINELIB -DSTRICT TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ Index: programs/view/Makefile.in =================================================================== RCS file: /home/wine/wine/programs/view/Makefile.in,v retrieving revision 1.9 diff -u -r1.9 Makefile.in --- programs/view/Makefile.in 2000/04/28 14:50:54 1.9 +++ programs/view/Makefile.in 2000/07/17 00:39:32 @@ -1,4 +1,4 @@ -DEFS = -DWINELIB +DEFS = -DWINELIB -DSTRICT TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ Index: programs/wcmd/Makefile.in =================================================================== RCS file: /home/wine/wine/programs/wcmd/Makefile.in,v retrieving revision 1.6 diff -u -r1.6 Makefile.in --- programs/wcmd/Makefile.in 2000/04/24 17:17:52 1.6 +++ programs/wcmd/Makefile.in 2000/07/17 00:39:32 @@ -1,4 +1,4 @@ -DEFS = -DWINELIB +DEFS = -DWINELIB -DSTRICT TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ Index: programs/winemine/Makefile.in =================================================================== RCS file: /home/wine/wine/programs/winemine/Makefile.in,v retrieving revision 1.4 diff -u -r1.4 Makefile.in --- programs/winemine/Makefile.in 2000/05/01 20:05:59 1.4 +++ programs/winemine/Makefile.in 2000/07/17 00:39:32 @@ -1,4 +1,4 @@ -DEFS = -DWINELIB +DEFS = -DWINELIB -DSTRICT TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ Index: programs/winhelp/Makefile.in =================================================================== RCS file: /home/wine/wine/programs/winhelp/Makefile.in,v retrieving revision 1.15 diff -u -r1.15 Makefile.in --- programs/winhelp/Makefile.in 2000/05/01 20:05:59 1.15 +++ programs/winhelp/Makefile.in 2000/07/17 00:39:32 @@ -1,11 +1,11 @@ -DEFS = -DWINELIB +DEFS = -DWINELIB -DSTRICT TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = none PROGRAMS = winhelp hlp2sgml -IMPORTS = shell32 ole32 comdlg32 winspool.drv +IMPORTS = shell32 ole32 rpcrt4 comdlg32 winspool.drv WRCEXTRA = -s -p winhelp C_SRCS = \ Index: programs/winhelp/hlp2sgml.c =================================================================== RCS file: /home/wine/wine/programs/winhelp/hlp2sgml.c,v retrieving revision 1.3 diff -u -r1.3 hlp2sgml.c --- programs/winhelp/hlp2sgml.c 1999/02/26 11:11:33 1.3 +++ programs/winhelp/hlp2sgml.c 2000/07/17 00:39:33 @@ -255,7 +255,7 @@ HFILE WINAPI OpenFile( LPCSTR path, OFSTRUCT *ofs, UINT mode ) { file = *path ? fopen(path, "r") : stdin; - return file ? 1 : HFILE_ERROR; + return file ? (HFILE)1 : HFILE_ERROR; } HFILE WINAPI _lclose( HFILE hFile ) Index: programs/winhelp/winhelp.c =================================================================== RCS file: /home/wine/wine/programs/winhelp/winhelp.c,v retrieving revision 1.6 diff -u -r1.6 winhelp.c --- programs/winhelp/winhelp.c 2000/06/20 20:34:11 1.6 +++ programs/winhelp/winhelp.c 2000/07/17 00:39:35 @@ -37,7 +37,7 @@ * WinMain */ -int PASCAL WinMain (HANDLE hInstance, HANDLE prev, LPSTR cmdline, int show) +int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show) { LPCSTR opt_lang = "En"; CHAR lang[3]; @@ -78,7 +78,7 @@ } } -#ifdef WINELIB +#if 0 opt_lang = Languages[Options.language].name; #endif Index: programs/winver/Makefile.in =================================================================== RCS file: /home/wine/wine/programs/winver/Makefile.in,v retrieving revision 1.8 diff -u -r1.8 Makefile.in --- programs/winver/Makefile.in 2000/04/24 17:17:53 1.8 +++ programs/winver/Makefile.in 2000/07/17 00:39:35 @@ -1,11 +1,11 @@ -DEFS = -DWINELIB +DEFS = -DWINELIB -DSTRICT TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = none PROGRAMS = winver -IMPORTS = shell32 ole32 +IMPORTS = shell32 ole32 rpcrt4 C_SRCS = winver.c Index: programs/winver/winver.c =================================================================== RCS file: /home/wine/wine/programs/winver/winver.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 winver.c --- programs/winver/winver.c 1998/09/24 03:43:39 1.1.1.1 +++ programs/winver/winver.c 2000/07/17 00:39:35 @@ -8,7 +8,7 @@ #include "windows.h" #include "version.h" -int PASCAL WinMain (HANDLE inst, HANDLE prev, LPSTR cmdline, int show) +int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) { return ShellAbout((HWND)0, "WINE", WINE_RELEASE_INFO, 0); }