winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1207 discussions
Start a n
N
ew thread
Alexandre Julliard : winedos: Don't import kernel 16-bit version functions.
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: 3b3112cb4dc46b847467c512b33d30179521b18e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3b3112cb4dc46b847467c512b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 7 18:05:22 2009 +0200 winedos: Don't import kernel 16-bit version functions. --- dlls/winedos/int2f.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 54 insertions(+), 2 deletions(-) diff --git a/dlls/winedos/int2f.c b/dlls/winedos/int2f.c index c5b620f..d5353ab 100644 --- a/dlls/winedos/int2f.c +++ b/dlls/winedos/int2f.c @@ -63,6 +63,58 @@ typedef struct static void do_int2f_16( CONTEXT86 *context ); static void MSCDEX_Handler( CONTEXT86 *context ); +/*********************************************************************** + * GetVersion (KERNEL.3) + * + * FIXME: Duplicated from kernel since it's a 16-bit function. + */ +DWORD WINAPI GetVersion16(void) +{ + static WORD dosver, winver; + + if (!dosver) /* not determined yet */ + { + RTL_OSVERSIONINFOEXW info; + + info.dwOSVersionInfoSize = sizeof(info); + if (RtlGetVersion( &info )) return 0; + + if (info.dwMajorVersion <= 3) + winver = MAKEWORD( info.dwMajorVersion, info.dwMinorVersion ); + else + winver = MAKEWORD( 3, 95 ); + + switch(info.dwPlatformId) + { + case VER_PLATFORM_WIN32s: + switch(MAKELONG( info.dwMinorVersion, info.dwMajorVersion )) + { + case 0x0200: + dosver = 0x0303; /* DOS 3.3 for Windows 2.0 */ + break; + case 0x0300: + dosver = 0x0500; /* DOS 5.0 for Windows 3.0 */ + break; + default: + dosver = 0x0616; /* DOS 6.22 for Windows 3.1 and later */ + break; + } + break; + case VER_PLATFORM_WIN32_WINDOWS: + /* DOS 8.0 for WinME, 7.0 for Win95/98 */ + if (info.dwMinorVersion >= 90) dosver = 0x0800; + else dosver = 0x0700; + break; + case VER_PLATFORM_WIN32_NT: + dosver = 0x0500; /* always DOS 5.0 for NT */ + break; + } + TRACE( "DOS %d.%02d Win %d.%02d\n", + HIBYTE(dosver), LOBYTE(dosver), LOBYTE(winver), HIBYTE(winver) ); + } + return MAKELONG( winver, dosver ); +} + /********************************************************************** * DOSVM_Int2fHandler (WINEDOS16.147) * @@ -327,13 +379,13 @@ static void do_int2f_16( CONTEXT86 *context ) switch(LOBYTE(context->Eax)) { case 0x00: /* Windows enhanced mode installation check */ - SET_AX( context, (GetWinFlags16() & WF_ENHANCED) ? LOWORD(GetVersion16()) : 0 ); + SET_AX( context, LOWORD(GetVersion16()) ); break; case 0x0a: /* Get Windows version and type */ SET_AX( context, 0 ); SET_BX( context, (LOWORD(GetVersion16()) << 8) | (LOWORD(GetVersion16()) >> 8) ); - SET_CX( context, (GetWinFlags16() & WF_ENHANCED) ? 3 : 2 ); + SET_CX( context, 3 ); break; case 0x0b: /* Identify Windows-aware TSRs */
1
0
0
0
Alexandre Julliard : kernel32: Move the 16-bit PE module functions to kernel16.c.
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: 4496f281d865e700e78e02c7e297484b738539a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4496f281d865e700e78e02c7e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 7 17:27:28 2009 +0200 kernel32: Move the 16-bit PE module functions to kernel16.c. --- dlls/kernel32/kernel16.c | 33 +++++++++++++++++++++++++++++++++ dlls/kernel32/krnl386.exe.spec | 6 +++--- dlls/kernel32/module.c | 23 ----------------------- 3 files changed, 36 insertions(+), 26 deletions(-) diff --git a/dlls/kernel32/kernel16.c b/dlls/kernel32/kernel16.c index 6d72c01..61767ac 100644 --- a/dlls/kernel32/kernel16.c +++ b/dlls/kernel32/kernel16.c @@ -276,6 +276,15 @@ VOID WINAPI VWin32_EventSet(HANDLE event) } /*********************************************************************** + * GetProcAddress32 (KERNEL.453) + */ +FARPROC WINAPI GetProcAddress32_16( HMODULE hModule, LPCSTR function ) +{ + /* FIXME: we used to disable snoop when returning proc for Win16 subsystem */ + return GetProcAddress( hModule, function ); +} + +/*********************************************************************** * CreateW32Event (KERNEL.457) */ HANDLE WINAPI CreateW32Event( BOOL manual_reset, BOOL initial_state ) @@ -377,6 +386,30 @@ DWORD WINAPI MapProcessHandle( HANDLE hProcess ) } /*********************************************************************** + * FreeLibrary32 (KERNEL.486) + */ +BOOL WINAPI FreeLibrary32_16( HINSTANCE module ) +{ + return FreeLibrary( module ); +} + +/*********************************************************************** + * GetModuleFileName32 (KERNEL.487) + */ +DWORD WINAPI GetModuleFileName32_16( HMODULE module, LPSTR buffer, DWORD size ) +{ + return GetModuleFileNameA( module, buffer, size ); +} + +/*********************************************************************** + * GetModuleHandle32 (KERNEL.488) + */ +HMODULE WINAPI GetModuleHandle32_16(LPCSTR module) +{ + return GetModuleHandleA( module ); +} + +/*********************************************************************** * RegisterServiceProcess (KERNEL.491) */ DWORD WINAPI RegisterServiceProcess16( DWORD dwProcessId, DWORD dwType ) diff --git a/dlls/kernel32/krnl386.exe.spec b/dlls/kernel32/krnl386.exe.spec index 10c1b76..b43c874 100644 --- a/dlls/kernel32/krnl386.exe.spec +++ b/dlls/kernel32/krnl386.exe.spec @@ -388,9 +388,9 @@ 483 pascal MapProcessHandle(long) MapProcessHandle 484 pascal SetProcessDword(long s_word long) SetProcessDword 485 pascal GetProcessDword(long s_word) GetProcessDword -486 pascal FreeLibrary32(long) FreeLibrary -487 pascal GetModuleFileName32(long str word) GetModuleFileNameA -488 pascal GetModuleHandle32(str) GetModuleHandleA +486 pascal FreeLibrary32(long) FreeLibrary32_16 +487 pascal GetModuleFileName32(long str word) GetModuleFileName32_16 +488 pascal GetModuleHandle32(str) GetModuleHandle32_16 489 stub KERNEL_489 # VWin32_BoostWithDecay 490 pascal -ret16 KERNEL_490(word) KERNEL_490 491 pascal RegisterServiceProcess(long long) RegisterServiceProcess16 diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c index ddb8fe2..dee3725 100644 --- a/dlls/kernel32/module.c +++ b/dlls/kernel32/module.c @@ -562,7 +562,6 @@ BOOL WINAPI GetModuleHandleExW( DWORD flags, LPCWSTR name, HMODULE *module ) /*********************************************************************** * GetModuleHandleA (KERNEL32.@) - * GetModuleHandle32 (KERNEL.488) * * Get the handle of a dll loaded into the process address space. * @@ -597,7 +596,6 @@ HMODULE WINAPI GetModuleHandleW(LPCWSTR module) /*********************************************************************** * GetModuleFileNameA (KERNEL32.@) - * GetModuleFileName32 (KERNEL.487) * * Get the file name of a loaded module from its handle. * @@ -996,7 +994,6 @@ HMODULE WINAPI LoadLibraryW(LPCWSTR libnameW) /*********************************************************************** * FreeLibrary (KERNEL32.@) - * FreeLibrary32 (KERNEL.486) * * Free a dll loaded into the process address space. * @@ -1070,26 +1067,6 @@ FARPROC WINAPI GetProcAddress( HMODULE hModule, LPCSTR function ) } /*********************************************************************** - * GetProcAddress32 (KERNEL.453) - * - * Find the address of an exported symbol in a loaded dll. - * - * PARAMS - * hModule [I] Handle to the dll returned by LoadLibraryA(). - * function [I] Name of the symbol, or an integer ordinal number < 16384 - * - * RETURNS - * Success: A pointer to the symbol in the process address space. - * Failure: NULL. Use GetLastError() to determine the cause. - */ -FARPROC WINAPI GetProcAddress32_16( HMODULE hModule, LPCSTR function ) -{ - /* FIXME: we used to disable snoop when returning proc for Win16 subsystem */ - return GetProcAddress( hModule, function ); -} - - -/*********************************************************************** * DelayLoadFailureHook (KERNEL32.@) */ FARPROC WINAPI DelayLoadFailureHook( LPCSTR name, LPCSTR function )
1
0
0
0
Alexandre Julliard : kernel32: Move the 16-bit handle functions to kernel16 .c.
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: 6404817de492e61d94c1f5b1817810d39f3a3e8d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6404817de492e61d94c1f5b18…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 7 17:26:24 2009 +0200 kernel32: Move the 16-bit handle functions to kernel16.c. --- dlls/kernel32/kernel16.c | 16 ++++++++++++++++ dlls/kernel32/krnl386.exe.spec | 4 ++-- dlls/kernel32/process.c | 2 -- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/dlls/kernel32/kernel16.c b/dlls/kernel32/kernel16.c index 3c260f1..6d72c01 100644 --- a/dlls/kernel32/kernel16.c +++ b/dlls/kernel32/kernel16.c @@ -353,6 +353,22 @@ DWORD WINAPI GetCurrentProcessId16(void) } /********************************************************************* + * CloseW32Handle (KERNEL.474) + */ +BOOL WINAPI CloseW32Handle( HANDLE handle ) +{ + return CloseHandle( handle ); +} + +/*********************************************************************** + * ConvertToGlobalHandle (KERNEL.476) + */ +HANDLE WINAPI ConvertToGlobalHandle16( HANDLE handle ) +{ + return ConvertToGlobalHandle( handle ); +} + +/********************************************************************* * MapProcessHandle (KERNEL.483) */ DWORD WINAPI MapProcessHandle( HANDLE hProcess ) diff --git a/dlls/kernel32/krnl386.exe.spec b/dlls/kernel32/krnl386.exe.spec index 6d169da..10c1b76 100644 --- a/dlls/kernel32/krnl386.exe.spec +++ b/dlls/kernel32/krnl386.exe.spec @@ -376,9 +376,9 @@ 471 pascal GetCurrentProcessId() GetCurrentProcessId16 472 pascal -register MapHInstLS() MapHInstLS16 473 pascal -register MapHInstSL() MapHInstSL16 -474 pascal CloseW32Handle(long) CloseHandle +474 pascal CloseW32Handle(long) CloseW32Handle 475 pascal -ret16 GetTEBSelectorFS() GetTEBSelectorFS16 -476 pascal ConvertToGlobalHandle(long) ConvertToGlobalHandle +476 pascal ConvertToGlobalHandle(long) ConvertToGlobalHandle16 477 stub WOAFullScreen 478 stub WOATerminateProcess 479 pascal KERNEL_479(long) VWin32_EventSet # ??? diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 1d52b8f..4d8f2f7 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -2722,7 +2722,6 @@ DWORD WINAPI GetProcessId( HANDLE hProcess ) /********************************************************************* - * CloseW32Handle (KERNEL.474) * CloseHandle (KERNEL32.@) * * Closes a handle. @@ -2830,7 +2829,6 @@ BOOL WINAPI DuplicateHandle( HANDLE source_process, HANDLE source, /*********************************************************************** - * ConvertToGlobalHandle (KERNEL.476) * ConvertToGlobalHandle (KERNEL32.@) */ HANDLE WINAPI ConvertToGlobalHandle(HANDLE hSrc)
1
0
0
0
Alexandre Julliard : kernel32: Move the 16-bit thread and process functions to kernel16.c.
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: b6e0b3428d7d2263bf8ab921fe056dc5aaa8f771 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b6e0b3428d7d2263bf8ab921f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 7 17:24:52 2009 +0200 kernel32: Move the 16-bit thread and process functions to kernel16.c. --- dlls/kernel32/kernel16.c | 59 ++++++++++++++++++++++++++++++++++++++++ dlls/kernel32/krnl386.exe.spec | 8 +++--- dlls/kernel32/process.c | 13 --------- dlls/kernel32/thread.c | 22 --------------- 4 files changed, 63 insertions(+), 39 deletions(-) diff --git a/dlls/kernel32/kernel16.c b/dlls/kernel32/kernel16.c index 5c3aed0..3c260f1 100644 --- a/dlls/kernel32/kernel16.c +++ b/dlls/kernel32/kernel16.c @@ -327,6 +327,48 @@ DWORD WINAPI WaitForMultipleObjects16( DWORD count, const HANDLE *handles, } /*********************************************************************** + * GetCurrentThreadId (KERNEL.462) + */ +DWORD WINAPI GetCurrentThreadId16(void) +{ + return GetCurrentThreadId(); +} + +/*********************************************************************** + * ExitProcess (KERNEL.466) + */ +void WINAPI ExitProcess16( WORD status ) +{ + DWORD count; + ReleaseThunkLock( &count ); + ExitProcess( status ); +} + +/*********************************************************************** + * GetCurrentProcessId (KERNEL.471) + */ +DWORD WINAPI GetCurrentProcessId16(void) +{ + return GetCurrentProcessId(); +} + +/********************************************************************* + * MapProcessHandle (KERNEL.483) + */ +DWORD WINAPI MapProcessHandle( HANDLE hProcess ) +{ + return GetProcessId( hProcess ); +} + +/*********************************************************************** + * RegisterServiceProcess (KERNEL.491) + */ +DWORD WINAPI RegisterServiceProcess16( DWORD dwProcessId, DWORD dwType ) +{ + return 1; /* success */ +} + +/*********************************************************************** * WaitForMultipleObjectsEx (KERNEL.495) */ DWORD WINAPI WaitForMultipleObjectsEx16( DWORD count, const HANDLE *handles, @@ -340,6 +382,23 @@ DWORD WINAPI WaitForMultipleObjectsEx16( DWORD count, const HANDLE *handles, return retval; } +/********************************************************************** + * VWin32_BoostThreadGroup (KERNEL.535) + */ +VOID WINAPI VWin32_BoostThreadGroup( DWORD threadId, INT boost ) +{ + FIXME("(0x%08x,%d): stub\n", threadId, boost); +} + + +/********************************************************************** + * VWin32_BoostThreadStatic (KERNEL.536) + */ +VOID WINAPI VWin32_BoostThreadStatic( DWORD threadId, INT boost ) +{ + FIXME("(0x%08x,%d): stub\n", threadId, boost); +} + /*********************************************************************** * EnableDos (KERNEL.41) * DisableDos (KERNEL.42) diff --git a/dlls/kernel32/krnl386.exe.spec b/dlls/kernel32/krnl386.exe.spec index 446c830..6d169da 100644 --- a/dlls/kernel32/krnl386.exe.spec +++ b/dlls/kernel32/krnl386.exe.spec @@ -364,7 +364,7 @@ 459 pascal ResetW32Event(long) ResetW32Event 460 pascal WaitForSingleObject(long long) WaitForSingleObject16 461 pascal WaitForMultipleObjects(long ptr long long) WaitForMultipleObjects16 -462 pascal GetCurrentThreadId() GetCurrentThreadId +462 pascal GetCurrentThreadId() GetCurrentThreadId16 463 pascal SetThreadQueue(long word) SetThreadQueue16 464 pascal GetThreadQueue(long) GetThreadQueue16 465 stub NukeProcess @@ -373,7 +373,7 @@ 468 stub WOASpawnConApp 469 stub WOAGimmeTitle 470 stub WOADestroyConsole -471 pascal GetCurrentProcessId() GetCurrentProcessId +471 pascal GetCurrentProcessId() GetCurrentProcessId16 472 pascal -register MapHInstLS() MapHInstLS16 473 pascal -register MapHInstSL() MapHInstSL16 474 pascal CloseW32Handle(long) CloseHandle @@ -385,7 +385,7 @@ 480 pascal -ret16 _EnterWin16Lock() _EnterWin16Lock 481 pascal -ret16 _LeaveWin16Lock() _LeaveWin16Lock 482 pascal LoadSystemLibrary32(str) LoadLibrary32_16 # FIXME! -483 pascal MapProcessHandle(long) GetProcessId +483 pascal MapProcessHandle(long) MapProcessHandle 484 pascal SetProcessDword(long s_word long) SetProcessDword 485 pascal GetProcessDword(long s_word) GetProcessDword 486 pascal FreeLibrary32(long) FreeLibrary @@ -393,7 +393,7 @@ 488 pascal GetModuleHandle32(str) GetModuleHandleA 489 stub KERNEL_489 # VWin32_BoostWithDecay 490 pascal -ret16 KERNEL_490(word) KERNEL_490 -491 pascal RegisterServiceProcess(long long) RegisterServiceProcess +491 pascal RegisterServiceProcess(long long) RegisterServiceProcess16 492 stub WOAAbort 493 pascal -ret16 UTInit(long long long long) UTInit16 494 stub KERNEL_494 diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index bf9bab4..1d52b8f 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -2648,17 +2648,6 @@ void WINAPI SetProcessDword( DWORD dwProcessID, INT offset, DWORD value ) } -/*********************************************************************** - * ExitProcess (KERNEL.466) - */ -void WINAPI ExitProcess16( WORD status ) -{ - DWORD count; - ReleaseThunkLock( &count ); - ExitProcess( status ); -} - - /********************************************************************* * OpenProcess (KERNEL32.@) * @@ -2703,7 +2692,6 @@ HANDLE WINAPI OpenProcess( DWORD access, BOOL inherit, DWORD id ) /********************************************************************* - * MapProcessHandle (KERNEL.483) * GetProcessId (KERNEL32.@) * * Gets the a unique identifier of a process. @@ -3296,7 +3284,6 @@ BOOL WINAPI ProcessIdToSessionId( DWORD procid, DWORD *sessionid_ptr ) /*********************************************************************** - * RegisterServiceProcess (KERNEL.491) * RegisterServiceProcess (KERNEL32.@) * * A service process calls this function to ensure that it continues to run diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c index db95841..17339ca 100644 --- a/dlls/kernel32/thread.c +++ b/dlls/kernel32/thread.c @@ -554,24 +554,6 @@ DWORD WINAPI GetThreadId(HANDLE Thread) } -/********************************************************************** - * VWin32_BoostThreadGroup [KERNEL.535] - */ -VOID WINAPI VWin32_BoostThreadGroup( DWORD threadId, INT boost ) -{ - FIXME("(0x%08x,%d): stub\n", threadId, boost); -} - - -/********************************************************************** - * VWin32_BoostThreadStatic [KERNEL.536] - */ -VOID WINAPI VWin32_BoostThreadStatic( DWORD threadId, INT boost ) -{ - FIXME("(0x%08x,%d): stub\n", threadId, boost); -} - - /*********************************************************************** * GetCurrentThread [KERNEL32.@] Gets pseudohandle for current thread * @@ -604,14 +586,12 @@ __ASM_STDCALL_FUNC( SetLastError, 4, __ASM_STDCALL_FUNC( GetLastError, 0, ".byte 0x64\n\tmovl 0x34,%eax\n\tret" ) /*********************************************************************** - * GetCurrentProcessId (KERNEL.471) * GetCurrentProcessId (KERNEL32.@) */ /* DWORD WINAPI GetCurrentProcessId(void) */ __ASM_STDCALL_FUNC( GetCurrentProcessId, 0, ".byte 0x64\n\tmovl 0x20,%eax\n\tret" ) /*********************************************************************** - * GetCurrentThreadId (KERNEL.462) * GetCurrentThreadId (KERNEL32.@) */ /* DWORD WINAPI GetCurrentThreadId(void) */ @@ -646,7 +626,6 @@ DWORD WINAPI GetLastError(void) } /*********************************************************************** - * GetCurrentProcessId (KERNEL.471) * GetCurrentProcessId (KERNEL32.@) * * Get the current process identifier. @@ -660,7 +639,6 @@ DWORD WINAPI GetCurrentProcessId(void) } /*********************************************************************** - * GetCurrentThreadId (KERNEL.462) * GetCurrentThreadId (KERNEL32.@) * * Get the current thread identifier.
1
0
0
0
Alexandre Julliard : kernel32: Move the 16-bit debugger functions to kernel16.c.
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: 79cb7798f95e296675fae816b7eb5174f82711d2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79cb7798f95e296675fae816b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 7 17:23:06 2009 +0200 kernel32: Move the 16-bit debugger functions to kernel16.c. --- dlls/kernel32/debugger.c | 48 ---------------------------------------------- dlls/kernel32/kernel16.c | 23 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 48 deletions(-) diff --git a/dlls/kernel32/debugger.c b/dlls/kernel32/debugger.c index 50a7428..d732d8b 100644 --- a/dlls/kernel32/debugger.c +++ b/dlls/kernel32/debugger.c @@ -22,7 +22,6 @@ #include <string.h> #include "winerror.h" -#include "wine/winbase16.h" #include "wine/server.h" #include "kernel_private.h" #include "wine/debug.h" @@ -358,23 +357,6 @@ void WINAPI OutputDebugStringW( LPCWSTR str ) /*********************************************************************** - * OutputDebugString (KERNEL.115) - * - * Output by a 16 bit application of an ascii string to a debugger (if attached) - * and program log. - * - * PARAMS - * str [I] The message to be logged and given to the debugger. - * - * RETURNS - */ -void WINAPI OutputDebugString16( LPCSTR str ) -{ - OutputDebugStringA( str ); -} - - -/*********************************************************************** * DebugBreak (KERNEL32.@) * * Raises an exception so that a debugger (if attached) @@ -421,36 +403,6 @@ BOOL WINAPI DebugBreakProcess(HANDLE hProc) /*********************************************************************** - * DebugBreak (KERNEL.203) - * - * Raises an exception in a 16 bit application so that a debugger (if attached) - * can take some action. - * - * PARAMS - * - * RETURNS - * - * BUGS - * - * Only 386 compatible processors implemented. - */ -void WINAPI DebugBreak16( - CONTEXT86 *context) /* [in/out] A pointer to the 386 compatible processor state. */ -{ -#ifdef __i386__ - EXCEPTION_RECORD rec; - - rec.ExceptionCode = EXCEPTION_BREAKPOINT; - rec.ExceptionFlags = 0; - rec.ExceptionRecord = NULL; - rec.ExceptionAddress = (LPVOID)context->Eip; - rec.NumberParameters = 0; - NtRaiseException( &rec, context, TRUE ); -#endif /* defined(__i386__) */ -} - - -/*********************************************************************** * IsDebuggerPresent (KERNEL32.@) * * Allows a process to determine if there is a debugger attached. diff --git a/dlls/kernel32/kernel16.c b/dlls/kernel32/kernel16.c index 70e87ea..5c3aed0 100644 --- a/dlls/kernel32/kernel16.c +++ b/dlls/kernel32/kernel16.c @@ -175,6 +175,29 @@ INT16 WINAPI lstrlen16( LPCSTR str ) } /*********************************************************************** + * OutputDebugString (KERNEL.115) + */ +void WINAPI OutputDebugString16( LPCSTR str ) +{ + OutputDebugStringA( str ); +} + +/*********************************************************************** + * DebugBreak (KERNEL.203) + */ +void WINAPI DebugBreak16( CONTEXT *context ) +{ + EXCEPTION_RECORD rec; + + rec.ExceptionCode = EXCEPTION_BREAKPOINT; + rec.ExceptionFlags = 0; + rec.ExceptionRecord = NULL; + rec.ExceptionAddress = (LPVOID)context->Eip; + rec.NumberParameters = 0; + NtRaiseException( &rec, context, TRUE ); +} + +/*********************************************************************** * hmemcpy (KERNEL.348) */ void WINAPI hmemcpy16( LPVOID dst, LPCVOID src, LONG count )
1
0
0
0
Alexandre Julliard : kernel32: Move the 16-bit synchronization functions to kernel16.c.
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: c57fd07d27fc7bbafc84928a638d3a7242c96b81 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c57fd07d27fc7bbafc84928a6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 7 17:19:21 2009 +0200 kernel32: Move the 16-bit synchronization functions to kernel16.c. --- dlls/kernel32/kernel16.c | 103 ++++++++++++++++++++++++++++++++++++++++ dlls/kernel32/krnl386.exe.spec | 6 +- dlls/kernel32/sync.c | 100 -------------------------------------- 3 files changed, 106 insertions(+), 103 deletions(-) diff --git a/dlls/kernel32/kernel16.c b/dlls/kernel32/kernel16.c index 795baab..70e87ea 100644 --- a/dlls/kernel32/kernel16.c +++ b/dlls/kernel32/kernel16.c @@ -215,6 +215,109 @@ INT16 WINAPI UnicodeToAnsi16( LPCWSTR src, LPSTR dst, INT16 codepage ) } /*********************************************************************** + * VWin32_EventCreate (KERNEL.442) + */ +HANDLE WINAPI VWin32_EventCreate(VOID) +{ + HANDLE hEvent = CreateEventW( NULL, FALSE, 0, NULL ); + return ConvertToGlobalHandle( hEvent ); +} + +/*********************************************************************** + * VWin32_EventDestroy (KERNEL.443) + */ +VOID WINAPI VWin32_EventDestroy(HANDLE event) +{ + CloseHandle( event ); +} + +/*********************************************************************** + * VWin32_EventWait (KERNEL.450) + */ +VOID WINAPI VWin32_EventWait(HANDLE event) +{ + DWORD mutex_count; + + ReleaseThunkLock( &mutex_count ); + WaitForSingleObject( event, INFINITE ); + RestoreThunkLock( mutex_count ); +} + +/*********************************************************************** + * VWin32_EventSet (KERNEL.451) + * KERNEL_479 (KERNEL.479) + */ +VOID WINAPI VWin32_EventSet(HANDLE event) +{ + SetEvent( event ); +} + +/*********************************************************************** + * CreateW32Event (KERNEL.457) + */ +HANDLE WINAPI CreateW32Event( BOOL manual_reset, BOOL initial_state ) +{ + return CreateEventW( NULL, manual_reset, initial_state, NULL ); +} + +/*********************************************************************** + * SetW32Event (KERNEL.458) + */ +BOOL WINAPI SetW32Event( HANDLE handle ) +{ + return SetEvent( handle ); +} + +/*********************************************************************** + * ResetW32Event (KERNEL.459) + */ +BOOL WINAPI ResetW32Event( HANDLE handle ) +{ + return ResetEvent( handle ); +} + +/*********************************************************************** + * WaitForSingleObject (KERNEL.460) + */ +DWORD WINAPI WaitForSingleObject16( HANDLE handle, DWORD timeout ) +{ + DWORD retval, mutex_count; + + ReleaseThunkLock( &mutex_count ); + retval = WaitForSingleObject( handle, timeout ); + RestoreThunkLock( mutex_count ); + return retval; +} + +/*********************************************************************** + * WaitForMultipleObjects (KERNEL.461) + */ +DWORD WINAPI WaitForMultipleObjects16( DWORD count, const HANDLE *handles, + BOOL wait_all, DWORD timeout ) +{ + DWORD retval, mutex_count; + + ReleaseThunkLock( &mutex_count ); + retval = WaitForMultipleObjectsEx( count, handles, wait_all, timeout, FALSE ); + RestoreThunkLock( mutex_count ); + return retval; +} + +/*********************************************************************** + * WaitForMultipleObjectsEx (KERNEL.495) + */ +DWORD WINAPI WaitForMultipleObjectsEx16( DWORD count, const HANDLE *handles, + BOOL wait_all, DWORD timeout, BOOL alertable ) +{ + DWORD retval, mutex_count; + + ReleaseThunkLock( &mutex_count ); + retval = WaitForMultipleObjectsEx( count, handles, wait_all, timeout, alertable ); + RestoreThunkLock( mutex_count ); + return retval; +} + +/*********************************************************************** * EnableDos (KERNEL.41) * DisableDos (KERNEL.42) * GetLastDiskChange (KERNEL.98) diff --git a/dlls/kernel32/krnl386.exe.spec b/dlls/kernel32/krnl386.exe.spec index 09d42f1..446c830 100644 --- a/dlls/kernel32/krnl386.exe.spec +++ b/dlls/kernel32/krnl386.exe.spec @@ -359,9 +359,9 @@ 454 equate __FLATCS 0 # initialized by BUILTIN_Init() 455 equate __FLATDS 0 # initialized by BUILTIN_Init() 456 pascal DefResourceHandler(word word word) NE_DefResourceHandler -457 pascal CreateW32Event(long long) WIN16_CreateEvent -458 pascal SetW32Event(long) SetEvent -459 pascal ResetW32Event(long) ResetEvent +457 pascal CreateW32Event(long long) CreateW32Event +458 pascal SetW32Event(long) SetW32Event +459 pascal ResetW32Event(long) ResetW32Event 460 pascal WaitForSingleObject(long long) WaitForSingleObject16 461 pascal WaitForMultipleObjects(long ptr long long) WaitForMultipleObjects16 462 pascal GetCurrentThreadId() GetCurrentThreadId diff --git a/dlls/kernel32/sync.c b/dlls/kernel32/sync.c index e45f1bc..be73c98 100644 --- a/dlls/kernel32/sync.c +++ b/dlls/kernel32/sync.c @@ -43,7 +43,6 @@ #include "ddk/wdm.h" #include "wine/unicode.h" -#include "wine/winbase16.h" #include "kernel_private.h" #include "wine/debug.h" @@ -202,47 +201,6 @@ DWORD WINAPI WaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, /*********************************************************************** - * WaitForSingleObject (KERNEL.460) - */ -DWORD WINAPI WaitForSingleObject16( HANDLE handle, DWORD timeout ) -{ - DWORD retval, mutex_count; - - ReleaseThunkLock( &mutex_count ); - retval = WaitForSingleObject( handle, timeout ); - RestoreThunkLock( mutex_count ); - return retval; -} - -/*********************************************************************** - * WaitForMultipleObjects (KERNEL.461) - */ -DWORD WINAPI WaitForMultipleObjects16( DWORD count, const HANDLE *handles, - BOOL wait_all, DWORD timeout ) -{ - DWORD retval, mutex_count; - - ReleaseThunkLock( &mutex_count ); - retval = WaitForMultipleObjectsEx( count, handles, wait_all, timeout, FALSE ); - RestoreThunkLock( mutex_count ); - return retval; -} - -/*********************************************************************** - * WaitForMultipleObjectsEx (KERNEL.495) - */ -DWORD WINAPI WaitForMultipleObjectsEx16( DWORD count, const HANDLE *handles, - BOOL wait_all, DWORD timeout, BOOL alertable ) -{ - DWORD retval, mutex_count; - - ReleaseThunkLock( &mutex_count ); - retval = WaitForMultipleObjectsEx( count, handles, wait_all, timeout, alertable ); - RestoreThunkLock( mutex_count ); - return retval; -} - -/*********************************************************************** * RegisterWaitForSingleObject (KERNEL32.@) */ BOOL WINAPI RegisterWaitForSingleObject(PHANDLE phNewWaitObject, HANDLE hObject, @@ -542,15 +500,6 @@ HANDLE WINAPI CreateEventExW( SECURITY_ATTRIBUTES *sa, LPCWSTR name, DWORD flags /*********************************************************************** - * CreateW32Event (KERNEL.457) - */ -HANDLE WINAPI WIN16_CreateEvent( BOOL manual_reset, BOOL initial_state ) -{ - return CreateEventW( NULL, manual_reset, initial_state, NULL ); -} - - -/*********************************************************************** * OpenEventA (KERNEL32.@) */ HANDLE WINAPI OpenEventA( DWORD access, BOOL inherit, LPCSTR name ) @@ -616,7 +565,6 @@ BOOL WINAPI PulseEvent( HANDLE handle ) /*********************************************************************** - * SetW32Event (KERNEL.458) * SetEvent (KERNEL32.@) */ BOOL WINAPI SetEvent( HANDLE handle ) @@ -630,7 +578,6 @@ BOOL WINAPI SetEvent( HANDLE handle ) /*********************************************************************** - * ResetW32Event (KERNEL.459) * ResetEvent (KERNEL32.@) */ BOOL WINAPI ResetEvent( HANDLE handle ) @@ -644,53 +591,6 @@ BOOL WINAPI ResetEvent( HANDLE handle ) /*********************************************************************** - * NOTE: The Win95 VWin32_Event routines given below are really low-level - * routines implemented directly by VWin32. The user-mode libraries - * implement Win32 synchronisation routines on top of these low-level - * primitives. We do it the other way around here :-) - */ - -/*********************************************************************** - * VWin32_EventCreate (KERNEL.442) - */ -HANDLE WINAPI VWin32_EventCreate(VOID) -{ - HANDLE hEvent = CreateEventW( NULL, FALSE, 0, NULL ); - return ConvertToGlobalHandle( hEvent ); -} - -/*********************************************************************** - * VWin32_EventDestroy (KERNEL.443) - */ -VOID WINAPI VWin32_EventDestroy(HANDLE event) -{ - CloseHandle( event ); -} - -/*********************************************************************** - * VWin32_EventWait (KERNEL.450) - */ -VOID WINAPI VWin32_EventWait(HANDLE event) -{ - DWORD mutex_count; - - ReleaseThunkLock( &mutex_count ); - WaitForSingleObject( event, INFINITE ); - RestoreThunkLock( mutex_count ); -} - -/*********************************************************************** - * VWin32_EventSet (KERNEL.451) - * KERNEL_479 (KERNEL.479) - */ -VOID WINAPI VWin32_EventSet(HANDLE event) -{ - SetEvent( event ); -} - - - -/*********************************************************************** * CreateMutexA (KERNEL32.@) */ HANDLE WINAPI CreateMutexA( SECURITY_ATTRIBUTES *sa, BOOL owner, LPCSTR name )
1
0
0
0
Alexandre Julliard : kernel32: Move the 16-bit error functions to error16.c .
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: fe2c157fe9ef92a735978e3d73af04aac237f82a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fe2c157fe9ef92a735978e3d7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 7 17:17:00 2009 +0200 kernel32: Move the 16-bit error functions to error16.c. --- dlls/kernel32/error16.c | 18 ++++++++++++++++++ dlls/kernel32/krnl386.exe.spec | 4 ++-- dlls/kernel32/thread.c | 4 ---- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/dlls/kernel32/error16.c b/dlls/kernel32/error16.c index ce8935d..48b38df 100644 --- a/dlls/kernel32/error16.c +++ b/dlls/kernel32/error16.c @@ -243,6 +243,24 @@ static const char *GetParamErrorString(UINT16 uErr) { /*********************************************************************** + * SetLastError (KERNEL.147) + */ +void WINAPI SetLastError16( DWORD error ) +{ + SetLastError( error ); +} + + +/*********************************************************************** + * GetLastError (KERNEL.148) + */ +DWORD WINAPI GetLastError16(void) +{ + return GetLastError(); +} + + +/*********************************************************************** * LogError (KERNEL.324) */ VOID WINAPI LogError16(UINT16 uErr, LPVOID lpvInfo) diff --git a/dlls/kernel32/krnl386.exe.spec b/dlls/kernel32/krnl386.exe.spec index 8b91b5d..09d42f1 100644 --- a/dlls/kernel32/krnl386.exe.spec +++ b/dlls/kernel32/krnl386.exe.spec @@ -148,8 +148,8 @@ 144 pascal -ret16 CreateDirectory(ptr ptr) CreateDirectory16 145 pascal -ret16 RemoveDirectory(ptr) RemoveDirectory16 146 pascal -ret16 DeleteFile(ptr) DeleteFile16 -147 pascal -ret16 SetLastError(long) SetLastError -148 pascal GetLastError() GetLastError +147 pascal -ret16 SetLastError(long) SetLastError16 +148 pascal GetLastError() GetLastError16 149 pascal -ret16 GetVersionEx(ptr) GetVersionEx16 150 pascal -ret16 DirectedYield(word) DirectedYield16 151 stub WinOldApCall diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c index 3115a60..db95841 100644 --- a/dlls/kernel32/thread.c +++ b/dlls/kernel32/thread.c @@ -588,7 +588,6 @@ HANDLE WINAPI GetCurrentThread(void) #ifdef __i386__ /*********************************************************************** - * SetLastError (KERNEL.147) * SetLastError (KERNEL32.@) */ /* void WINAPI SetLastError( DWORD error ); */ @@ -599,7 +598,6 @@ __ASM_STDCALL_FUNC( SetLastError, 4, "ret $4" ) /*********************************************************************** - * GetLastError (KERNEL.148) * GetLastError (KERNEL32.@) */ /* DWORD WINAPI GetLastError(void); */ @@ -622,7 +620,6 @@ __ASM_STDCALL_FUNC( GetCurrentThreadId, 0, ".byte 0x64\n\tmovl 0x24,%eax\n\tret" #else /* __i386__ */ /********************************************************************** - * SetLastError (KERNEL.147) * SetLastError (KERNEL32.@) * * Sets the last-error code. @@ -636,7 +633,6 @@ void WINAPI SetLastError( DWORD error ) /* [in] Per-thread error code */ } /********************************************************************** - * GetLastError (KERNEL.148) * GetLastError (KERNEL32.@) * * Get the last-error code.
1
0
0
0
Alexandre Julliard : kernel32: Move the 16-bit string functions to kernel16 .c.
by Alexandre Julliard
08 Oct '09
08 Oct '09
Module: wine Branch: master Commit: 3b1186de5aeabd261e70dab8b78a730030075ca1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3b1186de5aeabd261e70dab8b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 7 17:14:10 2009 +0200 kernel32: Move the 16-bit string functions to kernel16.c. --- dlls/kernel32/kernel16.c | 129 +++++++++++++++++++++++++++++++++++++++++ dlls/kernel32/string.c | 145 ---------------------------------------------- 2 files changed, 129 insertions(+), 145 deletions(-) diff --git a/dlls/kernel32/kernel16.c b/dlls/kernel32/kernel16.c index c5683db..795baab 100644 --- a/dlls/kernel32/kernel16.c +++ b/dlls/kernel32/kernel16.c @@ -86,6 +86,135 @@ BOOL WINAPI KERNEL_DllEntryPoint( DWORD reasion, HINSTANCE16 inst, WORD ds, } /*********************************************************************** + * Reserved1 (KERNEL.77) + */ +SEGPTR WINAPI KERNEL_AnsiNext16(SEGPTR current) +{ + return (*(char *)MapSL(current)) ? current + 1 : current; +} + +/*********************************************************************** + * Reserved2(KERNEL.78) + */ +SEGPTR WINAPI KERNEL_AnsiPrev16( SEGPTR start, SEGPTR current ) +{ + return (current==start)?start:current-1; +} + +/*********************************************************************** + * Reserved3 (KERNEL.79) + */ +SEGPTR WINAPI KERNEL_AnsiUpper16( SEGPTR strOrChar ) +{ + /* uppercase only one char if strOrChar < 0x10000 */ + if (HIWORD(strOrChar)) + { + char *s = MapSL(strOrChar); + while (*s) + { + *s = toupper(*s); + s++; + } + return strOrChar; + } + else return toupper((char)strOrChar); +} + +/*********************************************************************** + * Reserved4 (KERNEL.80) + */ +SEGPTR WINAPI KERNEL_AnsiLower16( SEGPTR strOrChar ) +{ + /* lowercase only one char if strOrChar < 0x10000 */ + if (HIWORD(strOrChar)) + { + char *s = MapSL(strOrChar); + while (*s) + { + *s = tolower(*s); + s++; + } + return strOrChar; + } + else return tolower((char)strOrChar); +} + +/*********************************************************************** + * Reserved5 (KERNEL.87) + */ +INT16 WINAPI KERNEL_lstrcmp16( LPCSTR str1, LPCSTR str2 ) +{ + return (INT16)strcmp( str1, str2 ); +} + +/*********************************************************************** + * lstrcpy (KERNEL.88) + */ +SEGPTR WINAPI lstrcpy16( SEGPTR dst, LPCSTR src ) +{ + if (!lstrcpyA( MapSL(dst), src )) dst = 0; + return dst; +} + +/*********************************************************************** + * lstrcat (KERNEL.89) + */ +SEGPTR WINAPI lstrcat16( SEGPTR dst, LPCSTR src ) +{ + /* Windows does not check for NULL pointers here, so we don't either */ + strcat( MapSL(dst), src ); + return dst; +} + +/*********************************************************************** + * lstrlen (KERNEL.90) + */ +INT16 WINAPI lstrlen16( LPCSTR str ) +{ + return (INT16)lstrlenA( str ); +} + +/*********************************************************************** + * hmemcpy (KERNEL.348) + */ +void WINAPI hmemcpy16( LPVOID dst, LPCVOID src, LONG count ) +{ + memcpy( dst, src, count ); +} + +/*********************************************************************** + * lstrcpyn (KERNEL.353) + */ +SEGPTR WINAPI lstrcpyn16( SEGPTR dst, LPCSTR src, INT16 n ) +{ + lstrcpynA( MapSL(dst), src, n ); + return dst; +} + +/*********************************************************************** + * lstrcatn (KERNEL.352) + */ +SEGPTR WINAPI lstrcatn16( SEGPTR dst, LPCSTR src, INT16 n ) +{ + LPSTR p = MapSL(dst); + LPSTR start = p; + + while (*p) p++; + if ((n -= (p - start)) <= 0) return dst; + lstrcpynA( p, src, n ); + return dst; +} + +/*********************************************************************** + * UnicodeToAnsi (KERNEL.434) + */ +INT16 WINAPI UnicodeToAnsi16( LPCWSTR src, LPSTR dst, INT16 codepage ) +{ + if ( codepage == -1 ) codepage = CP_ACP; + return WideCharToMultiByte( codepage, 0, src, -1, dst, 0x7fffffff, NULL, NULL ); +} + +/*********************************************************************** * EnableDos (KERNEL.41) * DisableDos (KERNEL.42) * GetLastDiskChange (KERNEL.98) diff --git a/dlls/kernel32/string.c b/dlls/kernel32/string.c index 1f606fd..c584bf7 100644 --- a/dlls/kernel32/string.c +++ b/dlls/kernel32/string.c @@ -141,26 +141,6 @@ INT WINAPIV k32wsprintfA(LPSTR buffer, LPCSTR spec, ...) /*********************************************************************** - * hmemcpy (KERNEL.348) - */ -void WINAPI hmemcpy16( LPVOID dst, LPCVOID src, LONG count ) -{ - memcpy( dst, src, count ); -} - - -/*********************************************************************** - * lstrcat (KERNEL.89) - */ -SEGPTR WINAPI lstrcat16( SEGPTR dst, LPCSTR src ) -{ - /* Windows does not check for NULL pointers here, so we don't either */ - strcat( MapSL(dst), src ); - return dst; -} - - -/*********************************************************************** * lstrcatA (KERNEL32.@) * lstrcat (KERNEL32.@) */ @@ -200,31 +180,6 @@ LPWSTR WINAPI lstrcatW( LPWSTR dst, LPCWSTR src ) /*********************************************************************** - * lstrcatn (KERNEL.352) - */ -SEGPTR WINAPI lstrcatn16( SEGPTR dst, LPCSTR src, INT16 n ) -{ - LPSTR p = MapSL(dst); - LPSTR start = p; - - while (*p) p++; - if ((n -= (p - start)) <= 0) return dst; - lstrcpynA( p, src, n ); - return dst; -} - - -/*********************************************************************** - * lstrcpy (KERNEL.88) - */ -SEGPTR WINAPI lstrcpy16( SEGPTR dst, LPCSTR src ) -{ - if (!lstrcpyA( MapSL(dst), src )) dst = 0; - return dst; -} - - -/*********************************************************************** * lstrcpyA (KERNEL32.@) * lstrcpy (KERNEL32.@) */ @@ -265,16 +220,6 @@ LPWSTR WINAPI lstrcpyW( LPWSTR dst, LPCWSTR src ) /*********************************************************************** - * lstrcpyn (KERNEL.353) - */ -SEGPTR WINAPI lstrcpyn16( SEGPTR dst, LPCSTR src, INT16 n ) -{ - lstrcpynA( MapSL(dst), src, n ); - return dst; -} - - -/*********************************************************************** * lstrcpynA (KERNEL32.@) * lstrcpyn (KERNEL32.@) * @@ -344,15 +289,6 @@ LPWSTR WINAPI lstrcpynW( LPWSTR dst, LPCWSTR src, INT n ) /*********************************************************************** - * lstrlen (KERNEL.90) - */ -INT16 WINAPI lstrlen16( LPCSTR str ) -{ - return (INT16)lstrlenA( str ); -} - - -/*********************************************************************** * lstrlenA (KERNEL32.@) * lstrlen (KERNEL32.@) */ @@ -391,84 +327,3 @@ INT WINAPI lstrlenW( LPCWSTR str ) __ENDTRY return ret; } - - -/*********************************************************************** - * UnicodeToAnsi (KERNEL.434) - */ -INT16 WINAPI UnicodeToAnsi16( LPCWSTR src, LPSTR dst, INT16 codepage ) -{ - if ( codepage == -1 ) codepage = CP_ACP; - return WideCharToMultiByte( codepage, 0, src, -1, dst, 0x7fffffff, NULL, NULL ); -} - - -/*************************************************************************** - * - * Win 2.x string functions now moved to USER - * - * We rather want to implement them here instead of doing Callouts - */ - -/*********************************************************************** - * Reserved1 (KERNEL.77) - */ -SEGPTR WINAPI KERNEL_AnsiNext16(SEGPTR current) -{ - return (*(char *)MapSL(current)) ? current + 1 : current; -} - -/*********************************************************************** - * Reserved2(KERNEL.78) - */ -SEGPTR WINAPI KERNEL_AnsiPrev16( SEGPTR start, SEGPTR current ) -{ - return (current==start)?start:current-1; -} - -/*********************************************************************** - * Reserved3 (KERNEL.79) - */ -SEGPTR WINAPI KERNEL_AnsiUpper16( SEGPTR strOrChar ) -{ - /* uppercase only one char if strOrChar < 0x10000 */ - if (HIWORD(strOrChar)) - { - char *s = MapSL(strOrChar); - while (*s) - { - *s = toupper(*s); - s++; - } - return strOrChar; - } - else return toupper((char)strOrChar); -} - -/*********************************************************************** - * Reserved4 (KERNEL.80) - */ -SEGPTR WINAPI KERNEL_AnsiLower16( SEGPTR strOrChar ) -{ - /* lowercase only one char if strOrChar < 0x10000 */ - if (HIWORD(strOrChar)) - { - char *s = MapSL(strOrChar); - while (*s) - { - *s = tolower(*s); - s++; - } - return strOrChar; - } - else return tolower((char)strOrChar); -} - - -/*********************************************************************** - * Reserved5 (KERNEL.87) - */ -INT16 WINAPI KERNEL_lstrcmp16( LPCSTR str1, LPCSTR str2 ) -{ - return (INT16)strcmp( str1, str2 ); -}
1
0
0
0
Paul Vriens : setupapi/tests: Cleanup after SetupCopyOEMInf() tests.
by Alexandre Julliard
07 Oct '09
07 Oct '09
Module: wine Branch: master Commit: bf0ffb2d3ef8e2017cec0faab55bc0824ddb764c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bf0ffb2d3ef8e2017cec0faab…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Wed Oct 7 15:35:43 2009 +0200 setupapi/tests: Cleanup after SetupCopyOEMInf() tests. --- dlls/setupapi/tests/misc.c | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-) diff --git a/dlls/setupapi/tests/misc.c b/dlls/setupapi/tests/misc.c index 848f64c..f7ac6d1 100644 --- a/dlls/setupapi/tests/misc.c +++ b/dlls/setupapi/tests/misc.c @@ -209,9 +209,8 @@ static void test_SetupCopyOEMInf(void) return; } - ok(GetLastError() == ERROR_FILE_NOT_FOUND || - GetLastError() == ERROR_FILE_EXISTS, /* Win98 */ - "Expected ERROR_FILE_NOT_FOUND or ERROR_FILE_EXISTS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, + "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); ok(file_exists(tmpfile), "Expected tmpfile to exist\n"); /* try SP_COPY_REPLACEONLY, dest does not exist */ @@ -307,6 +306,24 @@ static void test_SetupCopyOEMInf(void) ok(res == TRUE, "Expected TRUE, got %d\n", res); ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); ok(!file_exists(path), "Expected source inf to not exist\n"); + + if (pSetupUninstallOEMInfA) + { + char *destfile = strrchr(dest, '\\') + 1; + + SetLastError(0xdeadbeef); + ok(pSetupUninstallOEMInfA(destfile, 0, NULL), "Failed to uninstall '%s' : %d\n", destfile, GetLastError()); + } + else + { + /* Win9x/WinMe */ + SetLastError(0xdeadbeef); + ok(DeleteFileA(dest), "Failed to delete file '%s' : %d\n", dest, GetLastError()); + + /* On WinMe we also need to remove the .pnf file */ + *(strrchr(dest, '.') + 1) = 'p'; + DeleteFileA(dest); + } } static void create_source_file(LPSTR filename, const BYTE *data, DWORD size)
1
0
0
0
Alexander Scott-Johns : winecfg: In Load Theme dialog, add " (*.msstyles; * .theme)" to file type combobox.
by Alexandre Julliard
07 Oct '09
07 Oct '09
Module: wine Branch: master Commit: 28ae6361d1fbce06beaa030dc1282e5076182284 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=28ae6361d1fbce06beaa030dc…
Author: Alexander Scott-Johns <alexander.scott.johns(a)googlemail.com> Date: Thu Jul 2 18:36:50 2009 +0100 winecfg: In Load Theme dialog, add " (*.msstyles; *.theme)" to file type combobox. --- programs/winecfg/Bg.rc | 2 +- programs/winecfg/Cs.rc | 2 +- programs/winecfg/Da.rc | 2 +- programs/winecfg/De.rc | 2 +- programs/winecfg/En.rc | 2 +- programs/winecfg/Es.rc | 2 +- programs/winecfg/Fi.rc | 2 +- programs/winecfg/Fr.rc | 2 +- programs/winecfg/Hu.rc | 2 +- programs/winecfg/It.rc | 2 +- programs/winecfg/Ja.rc | 2 +- programs/winecfg/Ko.rc | 2 +- programs/winecfg/Lt.rc | 2 +- programs/winecfg/Nl.rc | 2 +- programs/winecfg/No.rc | 2 +- programs/winecfg/Pl.rc | 2 +- programs/winecfg/Pt.rc | 4 ++-- programs/winecfg/Ro.rc | 2 +- programs/winecfg/Ru.rc | 2 +- programs/winecfg/Si.rc | 2 +- programs/winecfg/Sv.rc | 2 +- programs/winecfg/Tr.rc | 2 +- programs/winecfg/Zh.rc | 4 ++-- 23 files changed, 25 insertions(+), 25 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=28ae6361d1fbce06beaa0…
1
0
0
0
← Newer
1
...
89
90
91
92
93
94
95
...
121
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Results per page:
10
25
50
100
200