Author: fireball
Date: Fri Jul 17 22:45:32 2009
New Revision: 42021
URL:
http://svn.reactos.org/svn/reactos?rev=42021&view=rev
Log:
- More fixes, stubbing out, commenting out..
- More 16bit crap removal.
Modified:
branches/arwinss/reactos/dll/win32/user32/cursoricon.c
branches/arwinss/reactos/dll/win32/user32/edit.c
branches/arwinss/reactos/dll/win32/user32/legacy.c
branches/arwinss/reactos/dll/win32/user32/lstr.c
branches/arwinss/reactos/dll/win32/user32/menu.c
branches/arwinss/reactos/dll/win32/user32/message.c
branches/arwinss/reactos/dll/win32/user32/resource.c
branches/arwinss/reactos/dll/win32/user32/user32.spec
branches/arwinss/reactos/dll/win32/user32/user_main.c
branches/arwinss/reactos/dll/win32/user32/user_private.h
branches/arwinss/reactos/dll/win32/user32/win.c
Modified: branches/arwinss/reactos/dll/win32/user32/cursoricon.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/cursoricon.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/cursoricon.c [iso-8859-1] Fri Jul 17
22:45:32 2009
@@ -1169,11 +1169,6 @@
return CURSORICON_LoadFromFile( name, width, height, colors, fCursor, loadflags
);
if (!hInstance) hInstance = user32_module; /* Load OEM cursor/icon */
-
- /* Normalize hInstance (must be uniquely represented for icon cache) */
-
- if (!HIWORD( hInstance ))
- hInstance = HINSTANCE_32(GetExePtr( HINSTANCE_16(hInstance) ));
/* Get directory resource ID */
Modified: branches/arwinss/reactos/dll/win32/user32/edit.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/edit.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/edit.c [iso-8859-1] Fri Jul 17 22:45:32
2009
@@ -1133,13 +1133,11 @@
*/
static void EDIT_LockBuffer(EDITSTATE *es)
{
- STACK16FRAME* stack16 = MapSL(PtrToUlong(NtCurrentTeb()->WOW32Reserved));
HINSTANCE16 hInstance = GetWindowLongPtrW( es->hwndSelf, GWLP_HINSTANCE );
if (!es->text) {
CHAR *textA = NULL;
UINT countA = 0;
- BOOL _16bit = FALSE;
if(es->hloc32W)
{
@@ -1148,16 +1146,6 @@
TRACE("Synchronizing with 32-bit ANSI buffer\n");
textA = LocalLock(es->hloc32A);
countA = strlen(textA) + 1;
- }
- else if(es->hloc16)
- {
- HANDLE16 oldDS = stack16->ds;
- TRACE("Synchronizing with 16-bit ANSI buffer\n");
- stack16->ds = hInstance;
- textA = MapSL(LocalLock16(es->hloc16));
- stack16->ds = oldDS;
- countA = strlen(textA) + 1;
- _16bit = TRUE;
}
}
else {
@@ -1192,14 +1180,6 @@
if(textA)
{
MultiByteToWideChar(CP_ACP, 0, textA, countA, es->text, es->buffer_size + 1);
- if(_16bit)
- {
- HANDLE16 oldDS = stack16->ds;
- stack16->ds = hInstance;
- LocalUnlock16(es->hloc16);
- stack16->ds = oldDS;
- }
- else
LocalUnlock(es->hloc32A);
}
}
Modified: branches/arwinss/reactos/dll/win32/user32/legacy.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/legacy.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/legacy.c [iso-8859-1] Fri Jul 17 22:45:32
2009
@@ -85,4 +85,14 @@
return FALSE;
}
+VOID
+WINAPI
+ReleaseThunkLock(DWORD *mutex_count)
+{
+}
+VOID
+WINAPI
+RestoreThunkLock(DWORD mutex_count)
+{
+}
Modified: branches/arwinss/reactos/dll/win32/user32/lstr.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/lstr.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/lstr.c [iso-8859-1] Fri Jul 17 22:45:32
2009
@@ -388,7 +388,8 @@
*/
BOOL WINAPI IsCharLowerW(WCHAR x)
{
- return (get_char_typeW(x) & C1_LOWER) != 0;
+ //return (get_char_typeW(x) & C1_LOWER) != 0;
+ return iswlower(x);
}
@@ -409,7 +410,8 @@
*/
BOOL WINAPI IsCharUpperW(WCHAR x)
{
- return (get_char_typeW(x) & C1_UPPER) != 0;
+ //return (get_char_typeW(x) & C1_UPPER) != 0;
+ return iswupper(x);
}
@@ -430,7 +432,8 @@
*/
BOOL WINAPI IsCharAlphaNumericW(WCHAR x)
{
- return (get_char_typeW(x) & (C1_ALPHA|C1_DIGIT)) != 0;
+ //return (get_char_typeW(x) & (C1_ALPHA|C1_DIGIT)) != 0;
+ return iswalnum(x);
}
@@ -451,5 +454,6 @@
*/
BOOL WINAPI IsCharAlphaW(WCHAR x)
{
- return (get_char_typeW(x) & C1_ALPHA) != 0;
-}
+ //return (get_char_typeW(x) & C1_ALPHA) != 0;
+ return iswalpha;
+}
Modified: branches/arwinss/reactos/dll/win32/user32/menu.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/menu.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/menu.c [iso-8859-1] Fri Jul 17 22:45:32
2009
@@ -5356,7 +5356,7 @@
if (!hWnd || !msg) return 0;
- if (!hAccel || !(lpAccelTbl = (LPACCEL16) LockResource16(HACCEL_16(hAccel))))
+ if (!hAccel || !(lpAccelTbl = (LPACCEL16) LockResource16(LOWORD(hAccel))))
{
WARN_(accel)("invalid accel handle=%p\n", hAccel);
return 0;
@@ -5408,7 +5408,7 @@
if (!hWnd || !msg) return 0;
- if (!hAccel || !(lpAccelTbl = (LPACCEL16) LockResource16(HACCEL_16(hAccel))))
+ if (!hAccel || !(lpAccelTbl = (LPACCEL16) LockResource16(LOWORD(hAccel))))
{
WARN_(accel)("invalid accel handle=%p\n", hAccel);
return 0;
Modified: branches/arwinss/reactos/dll/win32/user32/message.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/message.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/message.c [iso-8859-1] Fri Jul 17 22:45:32
2009
@@ -1763,11 +1763,11 @@
return FALSE;
}
accept_hardware_message( hw_id, remove, 0 );
-
+#if 0
if ( msg->message == WM_KEYDOWN || msg->message == WM_KEYUP )
if ( ImmProcessKey(msg->hwnd, GetKeyboardLayout(0), msg->wParam,
msg->lParam, 0) )
msg->wParam = VK_PROCESSKEY;
-
+#endif
return TRUE;
}
@@ -3017,10 +3017,10 @@
TRACE_(key)("Translating key %s (%04lx), scancode %02x\n",
SPY_GetVKeyName(msg->wParam), msg->wParam,
LOBYTE(HIWORD(msg->lParam)));
-
+#if 0
if ( msg->wParam == VK_PROCESSKEY )
return ImmTranslateMessage(msg->hwnd, msg->message, msg->wParam,
msg->lParam);
-
+#endif
GetKeyboardState( state );
/* FIXME : should handle ToUnicode yielding 2 */
switch (ToUnicode(msg->wParam, HIWORD(msg->lParam), state, wp, 2, 0))
Modified: branches/arwinss/reactos/dll/win32/user32/resource.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/resource.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/resource.c [iso-8859-1] Fri Jul 17 22:45:32
2009
@@ -46,6 +46,7 @@
/**********************************************************************
* LoadAccelerators [USER.177]
*/
+#ifndef __REACTOS__
HACCEL16 WINAPI LoadAccelerators16(HINSTANCE16 instance, LPCSTR lpTableName)
{
HRSRC16 hRsrc;
@@ -60,7 +61,7 @@
TRACE_(accel)("returning HACCEL 0x%x\n", hRsrc);
return LoadResource16(instance,hRsrc);
}
-
+#endif
/**********************************************************************
* LoadAcceleratorsW (USER32.@)
* The image layout seems to look like this (not 100% sure):
@@ -106,7 +107,7 @@
}
}
TRACE_(accel)("returning HACCEL %p\n", hRsrc);
- return HACCEL_32(hRetval);
+ return hRetval;
}
/***********************************************************************
@@ -147,7 +148,7 @@
INT entries)
{
int i,xsize;
- LPACCEL16 accel = (LPACCEL16)GlobalLock16(HACCEL_16(src));
+ LPACCEL16 accel = (LPACCEL16)GlobalLock16(LOWORD(src));
BOOL done = FALSE;
/* Do parameter checking to avoid the explosions and the screaming
@@ -157,7 +158,7 @@
src, dst, entries);
return 0;
}
- xsize = GlobalSize16(HACCEL_16(src))/sizeof(ACCEL16);
+ xsize = GlobalSize16(LOWORD(src))/sizeof(ACCEL16);
if (xsize<entries) entries=xsize;
i=0;
@@ -210,7 +211,7 @@
}
/* Allocate memory and copy the table. */
- hAccel = HACCEL_32(GlobalAlloc16(0,cEntries*sizeof(ACCEL16)));
+ hAccel = GlobalAlloc16(0,cEntries*sizeof(ACCEL16));
TRACE_(accel)("handle %p\n", hAccel);
if(!hAccel) {
@@ -218,7 +219,7 @@
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return NULL;
}
- accel = GlobalLock16(HACCEL_16(hAccel));
+ accel = GlobalLock16(hAccel);
for (i=0;i<cEntries;i++) {
accel[i].fVirt = lpaccel[i].fVirt&0x7f;
accel[i].key = lpaccel[i].key;
@@ -255,7 +256,7 @@
}
/* Allocate memory and copy the table. */
- hAccel = HACCEL_32(GlobalAlloc16(0,cEntries*sizeof(ACCEL16)));
+ hAccel = GlobalAlloc16(0,cEntries*sizeof(ACCEL16));
TRACE_(accel)("handle %p\n", hAccel);
if(!hAccel) {
@@ -263,7 +264,7 @@
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return NULL;
}
- accel = GlobalLock16(HACCEL_16(hAccel));
+ accel = GlobalLock16(LOWORD(hAccel));
for (i=0;i<cEntries;i++) {
@@ -303,12 +304,13 @@
{
if( !handle )
return FALSE;
- return !GlobalFree16(HACCEL_16(handle));
+ return !GlobalFree16(handle);
}
/**********************************************************************
* LoadString (USER.176)
*/
+#ifndef __REACTOS__
INT16 WINAPI LoadString16( HINSTANCE16 instance, UINT16 resource_id,
LPSTR buffer, INT16 buflen )
{
@@ -350,6 +352,7 @@
TRACE("'%s' loaded !\n", buffer);
return i;
}
+#endif
/**********************************************************************
* LoadStringW (USER32.@)
Modified: branches/arwinss/reactos/dll/win32/user32/user32.spec
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/user32.spec [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/user32.spec [iso-8859-1] Fri Jul 17 22:45:32
2009
@@ -774,16 +774,7 @@
################################################################
# Wine extensions: Win16 functions that are needed by other dlls
#
-@ stdcall CallWindowProc16(long long long long long)
-@ stdcall CloseDriver16(long long long)
-@ stdcall CreateDialogIndirectParam16(long ptr long long long)
-@ stdcall DefDriverProc16(long long long long long)
-@ stdcall DefWindowProc16(long long long long)
@ stdcall DestroyIcon32(long long)
-@ stdcall DialogBoxIndirectParam16(long long long long long)
-@ stdcall GetDriverModuleHandle16(long)
-@ stdcall OpenDriver16(str str long)
-@ stdcall SendDriverMessage16(long long long long)
@ stdcall UserYield16()
################################################################
Modified: branches/arwinss/reactos/dll/win32/user32/user_main.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/user_main.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/user_main.c [iso-8859-1] Fri Jul 17 22:45:32
2009
@@ -39,14 +39,7 @@
WORD USER_HeapSel = 0; /* USER heap selector */
HMODULE user32_module = 0;
-static SYSLEVEL USER_SysLevel;
-static CRITICAL_SECTION_DEBUG critsect_debug =
-{
- 0, 0, &USER_SysLevel.crst,
- { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
- 0, 0, { (DWORD_PTR)(__FILE__ ": USER_SysLevel") }
-};
-static SYSLEVEL USER_SysLevel = { { &critsect_debug, -1, 0, 0, 0, 0 }, 2 };
+static CRITICAL_SECTION USER_SysCrit;
static HPALETTE (WINAPI *pfnGDISelectPalette)( HDC hdc, HPALETTE hpal, WORD bkgnd );
static UINT (WINAPI *pfnGDIRealizePalette)( HDC hdc );
@@ -62,7 +55,7 @@
*/
void USER_Lock(void)
{
- _EnterSysLevel( &USER_SysLevel );
+ EnterCriticalSection(&USER_SysCrit);
}
@@ -71,7 +64,7 @@
*/
void USER_Unlock(void)
{
- _LeaveSysLevel( &USER_SysLevel );
+ LeaveCriticalSection(&USER_SysCrit);
}
@@ -82,7 +75,8 @@
*/
void USER_CheckNotLock(void)
{
- _CheckNotSysLevel( &USER_SysLevel );
+ //_CheckNotSysLevel( &USER_SysLevel );
+ UNIMPLEMENTED;
}
@@ -270,6 +264,7 @@
HINSTANCE16 instance;
/* Create USER heap */
+#ifndef __REACTOS__
if ((instance = LoadLibrary16( "USER.EXE" )) >= 32) USER_HeapSel =
instance | 7;
else
{
@@ -279,7 +274,7 @@
/* some Win9x dlls expect keyboard to be loaded */
if (GetVersion() & 0x80000000) LoadLibrary16( "keyboard.drv" );
-
+#endif
winstation_init();
/* Initialize system colors and metrics */
@@ -339,6 +334,7 @@
{
case DLL_PROCESS_ATTACH:
user32_module = inst;
+ InitializeCriticalSection(&USER_SysCrit);
ret = process_attach();
break;
case DLL_THREAD_DETACH:
Modified: branches/arwinss/reactos/dll/win32/user32/user_private.h
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/user_private.h [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/user_private.h [iso-8859-1] Fri Jul 17
22:45:32 2009
@@ -35,38 +35,20 @@
static inline HLOCAL16 LOCAL_Alloc( HANDLE16 ds, UINT16 flags, WORD size )
{
- STACK16FRAME* stack16 = MapSL(PtrToUlong(NtCurrentTeb()->WOW32Reserved));
- HANDLE16 oldDS = stack16->ds;
- HLOCAL16 ret;
-
- stack16->ds = ds;
- ret = LocalAlloc16 (flags, size);
- stack16->ds = oldDS;
- return ret;
+ DbgPrint("LOCAL_Alloc unimplemented!\n");
+ return 0;
}
static inline HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, UINT16
flags )
{
- STACK16FRAME* stack16 = MapSL(PtrToUlong(NtCurrentTeb()->WOW32Reserved));
- HANDLE16 oldDS = stack16->ds;
- HLOCAL16 ret;
-
- stack16->ds = ds;
- ret = LocalReAlloc16 (handle, size, flags);
- stack16->ds = oldDS;
- return ret;
+ DbgPrint("LOCAL_ReAlloc unimplemented!\n");
+ return 0;
}
static inline HLOCAL16 LOCAL_Free( HANDLE16 ds, HLOCAL16 handle )
{
- STACK16FRAME* stack16 = MapSL(PtrToUlong(NtCurrentTeb()->WOW32Reserved));
- HANDLE16 oldDS = stack16->ds;
- HLOCAL16 ret;
-
- stack16->ds = ds;
- ret = LocalFree16 (handle);
- stack16->ds = oldDS;
- return ret;
+ DbgPrint("LOCAL_Free unimplemented!\n");
+ return 0;
}
#define USER_HEAP_ALLOC(size) \
@@ -76,7 +58,8 @@
#define USER_HEAP_FREE(handle) \
LOCAL_Free( USER_HeapSel, LOWORD(handle) )
#define USER_HEAP_LIN_ADDR(handle) \
- ((handle) ? MapSL(MAKESEGPTR(USER_HeapSel, LOWORD(handle))) : NULL)
+ /*((handle) ? MapSL(MAKESEGPTR(USER_HeapSel, LOWORD(handle))) : NULL)*/ \
+ (handle)
#define GET_WORD(ptr) (*(const WORD *)(ptr))
#define GET_DWORD(ptr) (*(const DWORD *)(ptr))
Modified: branches/arwinss/reactos/dll/win32/user32/win.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/win.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/win.c [iso-8859-1] Fri Jul 17 22:45:32 2009
@@ -103,10 +103,6 @@
HWND handle = 0, full_parent = 0, full_owner = 0;
struct tagCLASS *class = NULL;
int extra_bytes = 0;
-
- /* if 16-bit instance, map to module handle */
- if (instance && !HIWORD(instance))
- instance = HINSTANCE_32(GetExePtr(HINSTANCE_16(instance)));
SERVER_START_REQ( create_window )
{
@@ -1217,10 +1213,7 @@
LPCSTR menuName = (LPCSTR)GetClassLongPtrA( hwnd, GCLP_MENUNAME );
if (menuName)
{
- if (!cs->hInstance || HIWORD(cs->hInstance))
- cs->hMenu = LoadMenuA(cs->hInstance,menuName);
- else
- cs->hMenu =
HMENU_32(LoadMenu16(HINSTANCE_16(cs->hInstance),menuName));
+ cs->hMenu = LoadMenuA(cs->hInstance,menuName);
if (cs->hMenu) MENU_SetMenu( hwnd, cs->hMenu );
}
@@ -2232,6 +2225,7 @@
/**********************************************************************
* GetWindowLong (USER.135)
*/
+#ifndef __REACTOS__
LONG WINAPI GetWindowLong16( HWND16 hwnd, INT16 offset )
{
WND *wndPtr;
@@ -2276,6 +2270,7 @@
if (is_winproc) retvalue = (LONG_PTR)WINPROC_GetProc16( (WNDPROC)retvalue, FALSE );
return retvalue;
}
+#endif
/**********************************************************************
@@ -2323,6 +2318,7 @@
/**********************************************************************
* SetWindowLong (USER.136)
*/
+#ifndef __REACTOS__
LONG WINAPI SetWindowLong16( HWND16 hwnd, INT16 offset, LONG newval )
{
WND *wndPtr;
@@ -2351,6 +2347,7 @@
}
else return SetWindowLongA( WIN_Handle32(hwnd), offset, newval );
}
+#endif
/**********************************************************************