Author: fireball
Date: Sat Jul 18 10:50:27 2009
New Revision: 42026
URL:
http://svn.reactos.org/svn/reactos?rev=42026&view=rev
Log:
- Add a temporary hack to SwitchDesktop.
- Temporary disable saving system parameters to the registry. It seems to do it wrong.
- Add a native assert implementation, this was the last bit which fixed MSVCRT-linkage
completely.
- Disable TRY/FINALLY block in menu.c since it has perverted syntax.
- Don't use errno.
- Use _snprintf instead of snprintf.
- Get rid of imm32.dll dependency by #if0-defining a block of code (a debug mark is put
there instead).
- Implement PrivateCsrssInitialized.
- Fix a warning.
- 16bit -> 32bit in cursoricon.c, resource.c (accelerators).
- Return success in RegisterServiceProcess.
- Disable debug print in USER_CheckNotLock.
- Get rid of another 16 bit history and move on to using Heap[Alloc/Realloc/Free] instead
of the old Local* functions (user_private.h).
- Make ClientThreadSetup and UpdatePerUserSystemParameters stubs returning success.
- Remove more unneeded 16 bit crap from winproc.c.
- Fix user32 exports so it loads on Windows 2003.
Modified:
branches/arwinss/reactos/dll/win32/user32/cursoricon.c
branches/arwinss/reactos/dll/win32/user32/dialog.c
branches/arwinss/reactos/dll/win32/user32/driver.c
branches/arwinss/reactos/dll/win32/user32/edit.c
branches/arwinss/reactos/dll/win32/user32/legacy.c
branches/arwinss/reactos/dll/win32/user32/menu.c
branches/arwinss/reactos/dll/win32/user32/misc.c
branches/arwinss/reactos/dll/win32/user32/resource.c
branches/arwinss/reactos/dll/win32/user32/spy.c
branches/arwinss/reactos/dll/win32/user32/sysparams.c
branches/arwinss/reactos/dll/win32/user32/user32.rbuild
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
branches/arwinss/reactos/dll/win32/user32/winproc.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] Sat Jul 18
10:50:27 2009
@@ -666,7 +666,7 @@
INT width, INT height,
UINT cFlag )
{
- HGLOBAL16 hObj;
+ HGLOBAL hObj;
static HDC hdcMem;
int sizeAnd, sizeXor;
HBITMAP hAndBits = 0, hXorBits = 0; /* error condition for later */
@@ -822,13 +822,13 @@
sizeXor = bmpXor.bmHeight * bmpXor.bmWidthBytes;
sizeAnd = bmpAnd.bmHeight * bmpAnd.bmWidthBytes;
- hObj = GlobalAlloc16( GMEM_MOVEABLE,
+ hObj = GlobalAlloc( GMEM_MOVEABLE,
sizeof(CURSORICONINFO) + sizeXor + sizeAnd );
if (hObj)
{
CURSORICONINFO *info;
- info = GlobalLock16( hObj );
+ info = GlobalLock( hObj );
info->ptHotSpot.x = hotspot.x;
info->ptHotSpot.y = hotspot.y;
info->nWidth = bmpXor.bmWidth;
@@ -841,12 +841,12 @@
GetBitmapBits( hAndBits, sizeAnd, info + 1 );
GetBitmapBits( hXorBits, sizeXor, (char *)(info + 1) + sizeAnd );
- GlobalUnlock16( hObj );
+ GlobalUnlock( hObj );
}
DeleteObject( hAndBits );
DeleteObject( hXorBits );
- return HICON_32(hObj);
+ return hObj;
}
@@ -1560,7 +1560,7 @@
* the Win95 one exactly, especially the return values, which
* depend on the setting of various flags.
*/
-WORD WINAPI DestroyIcon32( HGLOBAL16 handle, UINT16 flags )
+WORD WINAPI DestroyIcon32( HGLOBAL handle, UINT16 flags )
{
WORD retv;
@@ -1568,7 +1568,7 @@
/* Check whether destroying active cursor */
- if ( get_user_thread_info()->cursor == HICON_32(handle) )
+ if ( get_user_thread_info()->cursor == handle )
{
WARN_(cursor)("Destroying active cursor!\n" );
return FALSE;
@@ -1578,7 +1578,7 @@
if ( !(flags & CID_NONSHARED) )
{
- INT count = CURSORICON_DelSharedIcon(HICON_32(handle));
+ INT count = CURSORICON_DelSharedIcon(handle);
if ( count != -1 )
return (flags & CID_WIN32)? TRUE : (count == 0);
@@ -1588,7 +1588,7 @@
/* Now assume non-shared cursor/icon */
- retv = GlobalFree16( handle );
+ retv = GlobalFree( handle );
return (flags & CID_RESOURCE)? retv : TRUE;
}
@@ -1597,7 +1597,7 @@
*/
BOOL WINAPI DestroyIcon( HICON hIcon )
{
- return DestroyIcon32(HICON_16(hIcon), CID_WIN32);
+ return DestroyIcon32(hIcon, CID_WIN32);
}
@@ -1606,7 +1606,7 @@
*/
BOOL WINAPI DestroyCursor( HCURSOR hCursor )
{
- return DestroyIcon32(HCURSOR_16(hCursor), CID_WIN32);
+ return DestroyIcon32(hCursor, CID_WIN32);
}
/***********************************************************************
@@ -1691,7 +1691,7 @@
TRACE("%p, (%d,%d), %p\n", hdc, x, y, hIcon);
- if (!(ptr = GlobalLock16(HICON_16(hIcon)))) return FALSE;
+ if (!(ptr = GlobalLock(hIcon))) return FALSE;
if (!(hMemDC = CreateCompatibleDC( hdc ))) return FALSE;
dibLength = ptr->nHeight * get_bitmap_width_bytes(
@@ -1750,7 +1750,7 @@
DeleteDC( hMemDC );
if (hXorBits) DeleteObject( hXorBits );
if (hAndBits) DeleteObject( hAndBits );
- GlobalUnlock16(HICON_16(hIcon));
+ GlobalUnlock(hIcon);
SetTextColor( hdc, oldFg );
SetBkColor( hdc, oldBg );
return TRUE;
@@ -1797,8 +1797,8 @@
/* Change the cursor shape only if it is visible */
if (thread_info->cursor_count >= 0)
{
- USER_Driver->pSetCursor(GlobalLock16(HCURSOR_16(hCursor)));
- GlobalUnlock16(HCURSOR_16(hCursor));
+ USER_Driver->pSetCursor(GlobalLock(hCursor));
+ GlobalUnlock(hCursor);
}
return hOldCursor;
}
@@ -1816,8 +1816,8 @@
{
if (++thread_info->cursor_count == 0) /* Show it */
{
-
USER_Driver->pSetCursor(GlobalLock16(HCURSOR_16(thread_info->cursor)));
- GlobalUnlock16(HCURSOR_16(thread_info->cursor));
+ USER_Driver->pSetCursor(GlobalLock(thread_info->cursor));
+ GlobalUnlock(thread_info->cursor);
}
}
else
@@ -2060,7 +2060,7 @@
CURSORICONINFO *ciconinfo;
INT height;
- ciconinfo = GlobalLock16(HICON_16(hIcon));
+ ciconinfo = GlobalLock(hIcon);
if (!ciconinfo)
return FALSE;
@@ -2100,7 +2100,7 @@
iconinfo->hbmMask = CreateBitmap ( ciconinfo->nWidth, height,
1, 1, ciconinfo + 1);
- GlobalUnlock16(HICON_16(hIcon));
+ GlobalUnlock(hIcon);
return TRUE;
}
@@ -2112,7 +2112,7 @@
{
DIBSECTION bmpXor;
BITMAP bmpAnd;
- HICON16 hObj;
+ HICON hObj;
int xor_objsize = 0, sizeXor = 0, sizeAnd, planes, bpp;
TRACE("color %p, mask %p, hotspot %ux%u, fIcon %d\n",
@@ -2141,13 +2141,13 @@
sizeAnd = bmpAnd.bmHeight * get_bitmap_width_bytes(bmpAnd.bmWidth, 1);
- hObj = GlobalAlloc16( GMEM_MOVEABLE,
- sizeof(CURSORICONINFO) + sizeXor + sizeAnd );
+ hObj = GlobalAlloc( GMEM_MOVEABLE,
+ sizeof(CURSORICONINFO) + sizeXor + sizeAnd );
if (hObj)
{
CURSORICONINFO *info;
- info = GlobalLock16( hObj );
+ info = GlobalLock( hObj );
/* If we are creating an icon, the hotspot is unused */
if (iconinfo->fIcon)
@@ -2256,9 +2256,9 @@
dst_bits, &bminfo, DIB_RGB_COLORS );
}
}
- GlobalUnlock16( hObj );
- }
- return HICON_32(hObj);
+ GlobalUnlock( hObj );
+ }
+ return hObj;
}
/******************************************************************************
@@ -2297,7 +2297,7 @@
TRACE_(icon)("(hdc=%p,pos=%d.%d,hicon=%p,extend=%d.%d,istep=%d,br=%p,flags=0x%08x)\n",
hdc,x0,y0,hIcon,cxWidth,cyWidth,istep,hbr,flags );
- if (!(ptr = GlobalLock16(HICON_16(hIcon)))) return FALSE;
+ if (!(ptr = GlobalLock(hIcon))) return FALSE;
if (!(hMemDC = CreateCompatibleDC( hdc ))) return FALSE;
if (istep)
@@ -2444,7 +2444,7 @@
if (hMemDC) DeleteDC( hMemDC );
if (hDC_off) DeleteDC(hDC_off);
if (hB_off) DeleteObject(hB_off);
- GlobalUnlock16(HICON_16(hIcon));
+ GlobalUnlock(hIcon);
return result;
}
Modified: branches/arwinss/reactos/dll/win32/user32/dialog.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/dialog.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/dialog.c [iso-8859-1] Sat Jul 18 10:50:27
2009
@@ -22,7 +22,6 @@
#include "wine/port.h"
#include <ctype.h>
-#include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include <stdarg.h>
@@ -1379,7 +1378,7 @@
result = strtol( str, &endptr, 10 );
if (!endptr || (endptr == str)) /* Conversion was unsuccessful */
return 0;
- if (((result == LONG_MIN) || (result == LONG_MAX)) && (errno==ERANGE))
+ if (((result == LONG_MIN) || (result == LONG_MAX))/* &&
(errno==ERANGE)*/)
return 0;
}
else
@@ -1387,7 +1386,7 @@
result = strtoul( str, &endptr, 10 );
if (!endptr || (endptr == str)) /* Conversion was unsuccessful */
return 0;
- if ((result == ULONG_MAX) && (errno == ERANGE)) return 0;
+ if ((result == ULONG_MAX)/* && (errno == ERANGE)*/) return 0;
}
if (translated) *translated = TRUE;
return (UINT)result;
Modified: branches/arwinss/reactos/dll/win32/user32/driver.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/driver.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/driver.c [iso-8859-1] Sat Jul 18 10:50:27
2009
@@ -41,7 +41,12 @@
HMODULE graphics_driver;
USER_DRIVER *driver, *prev;
+#ifndef __REACTOS__
strcpy( buffer, "x11" ); /* default value */
+#else
+ strcpy( buffer, "nt" );
+#endif
+#if 0
/* @@ Wine registry key: HKCU\Software\Wine\Drivers */
if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Drivers", &hkey
))
{
@@ -49,14 +54,14 @@
RegQueryValueExA( hkey, "Graphics", 0, &type, (LPBYTE) buffer,
&count );
RegCloseKey( hkey );
}
-
+#endif
name = buffer;
while (name)
{
next = strchr( name, ',' );
if (next) *next++ = 0;
- snprintf( libname, sizeof(libname), "wine%s.drv", name );
+ _snprintf( libname, sizeof(libname), "wine%s.drv", name );
if ((graphics_driver = LoadLibraryA( libname )) != 0) break;
name = next;
}
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] Sat Jul 18 10:50:27
2009
@@ -4487,6 +4487,7 @@
static void EDIT_ImeComposition(HWND hwnd, LPARAM CompFlag, EDITSTATE *es)
{
+#if 0
HIMC hIMC;
int cursor;
@@ -4508,6 +4509,9 @@
cursor = ImmGetCompositionStringW(hIMC, GCS_CURSORPOS, 0, 0);
ImmReleaseContext(hwnd, hIMC);
EDIT_SetCaretPos(es, es->selection_start + cursor, es->flags &
EF_AFTER_WRAP);
+#else
+ UNIMPLEMENTED;
+#endif
}
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] Sat Jul 18 10:50:27
2009
@@ -9,9 +9,13 @@
#include "wine/winbase16.h"
#include "wine/winuser16.h"
+#include "win32k/rosuser.h"
+
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(userlegacy);
+
+void WINAPI DbgBreakPoint(void);
LPVOID
WINAPI
@@ -34,6 +38,7 @@
GlobalAlloc16(UINT16 u, DWORD d)
{
UNIMPLEMENTED;
+ DbgBreakPoint();
return 0;
}
@@ -58,7 +63,7 @@
LocalLock16(HLOCAL16 h)
{
UNIMPLEMENTED;
- return NULL;
+ return 0;
}
BOOL16
@@ -96,3 +101,22 @@
RestoreThunkLock(DWORD mutex_count)
{
}
+
+/*
+ * Private calls for CSRSS
+ */
+VOID
+WINAPI
+PrivateCsrssManualGuiCheck(LONG Check)
+{
+ UNIMPLEMENTED;
+}
+
+VOID
+WINAPI
+PrivateCsrssInitialized(VOID)
+{
+ /* Perform a reactos only CSRSS connection */
+ RosUserConnectCsrss();
+}
+
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] Sat Jul 18 10:50:27
2009
@@ -3082,7 +3082,7 @@
capture_win = (wFlags & TPM_POPUPMENU) ? menu->hWnd : mt.hOwnerWnd;
set_capture_window( capture_win, GUI_INMENUMODE, NULL );
- __TRY while (!fEndMenu)
+ /*__TRY*/ while (!fEndMenu)
{
menu = MENU_GetMenu( mt.hCurrentMenu );
if (!menu) /* sometimes happens if I do a window manager close */
@@ -3303,7 +3303,7 @@
PeekMessageW( &msg, 0, msg.message, msg.message, PM_REMOVE );
else mt.trackFlags &= ~TF_SKIPREMOVE;
}
- __FINALLY( release_capture )
+ /*__FINALLY(*/ release_capture(TRUE); /*)*/
/* If dropdown is still painted and the close box is clicked on
then the menu will be destroyed as part of the DispatchMessage above.
Modified: branches/arwinss/reactos/dll/win32/user32/misc.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/misc.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/misc.c [iso-8859-1] Sat Jul 18 10:50:27
2009
@@ -706,14 +706,3 @@
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
-
-/**********************************************************************
- * DisableProcessWindowsGhosting [USER32.@]
- *
- */
-VOID WINAPI DisableProcessWindowsGhosting(VOID)
-{
- FIXME(": stub\n");
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return;
-}
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] Sat Jul 18 10:50:27
2009
@@ -74,7 +74,7 @@
{
HRSRC hRsrc;
HACCEL hMem;
- HACCEL16 hRetval=0;
+ HACCEL hRetval=0;
DWORD size;
if (HIWORD(lpTableName))
@@ -91,11 +91,11 @@
if(size>=sizeof(PE_ACCEL))
{
LPPE_ACCEL accel_table = (LPPE_ACCEL) hMem;
- LPACCEL16 accel16;
+ LPACCEL accel16;
int i,nrofaccells = size/sizeof(PE_ACCEL);
- hRetval = GlobalAlloc16(0,sizeof(ACCEL16)*nrofaccells);
- accel16 = (LPACCEL16)GlobalLock16(hRetval);
+ hRetval = GlobalAlloc(0,sizeof(ACCEL)*nrofaccells);
+ accel16 = (LPACCEL)GlobalLock(hRetval);
for (i=0;i<nrofaccells;i++) {
accel16[i].fVirt = accel_table[i].fVirt & 0x7f;
accel16[i].key = accel_table[i].key;
@@ -148,7 +148,7 @@
INT entries)
{
int i,xsize;
- LPACCEL16 accel = (LPACCEL16)GlobalLock16(LOWORD(src));
+ LPACCEL accel = (LPACCEL)GlobalLock(src);
BOOL done = FALSE;
/* Do parameter checking to avoid the explosions and the screaming
@@ -158,7 +158,7 @@
src, dst, entries);
return 0;
}
- xsize = GlobalSize16(LOWORD(src))/sizeof(ACCEL16);
+ xsize = GlobalSize(src)/sizeof(ACCEL);
if (xsize<entries) entries=xsize;
i=0;
@@ -198,7 +198,7 @@
HACCEL WINAPI CreateAcceleratorTableA(LPACCEL lpaccel, INT cEntries)
{
HACCEL hAccel;
- LPACCEL16 accel;
+ LPACCEL accel;
int i;
/* Do parameter checking just in case someone's trying to be
@@ -211,7 +211,7 @@
}
/* Allocate memory and copy the table. */
- hAccel = GlobalAlloc16(0,cEntries*sizeof(ACCEL16));
+ hAccel = GlobalAlloc(0,cEntries*sizeof(ACCEL));
TRACE_(accel)("handle %p\n", hAccel);
if(!hAccel) {
@@ -219,7 +219,7 @@
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return NULL;
}
- accel = GlobalLock16(hAccel);
+ accel = GlobalLock(hAccel);
for (i=0;i<cEntries;i++) {
accel[i].fVirt = lpaccel[i].fVirt&0x7f;
accel[i].key = lpaccel[i].key;
@@ -242,7 +242,7 @@
HACCEL WINAPI CreateAcceleratorTableW(LPACCEL lpaccel, INT cEntries)
{
HACCEL hAccel;
- LPACCEL16 accel;
+ LPACCEL accel;
int i;
char ckey;
@@ -256,7 +256,7 @@
}
/* Allocate memory and copy the table. */
- hAccel = GlobalAlloc16(0,cEntries*sizeof(ACCEL16));
+ hAccel = GlobalAlloc(0,cEntries*sizeof(ACCEL));
TRACE_(accel)("handle %p\n", hAccel);
if(!hAccel) {
@@ -264,7 +264,7 @@
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return NULL;
}
- accel = GlobalLock16(LOWORD(hAccel));
+ accel = GlobalLock(hAccel);
for (i=0;i<cEntries;i++) {
@@ -304,7 +304,7 @@
{
if( !handle )
return FALSE;
- return !GlobalFree16(handle);
+ return !GlobalFree(handle);
}
/**********************************************************************
Modified: branches/arwinss/reactos/dll/win32/user32/spy.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/spy.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/spy.c [iso-8859-1] Sat Jul 18 10:50:27 2009
@@ -2667,6 +2667,7 @@
indent_tls_index = TlsAlloc();
/* @@ Wine registry key: HKCU\Software\Wine\Debug */
+#if 0
if(!RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Debug", &hkey))
{
DWORD type, count = sizeof(buffer);
@@ -2699,7 +2700,7 @@
RegCloseKey(hkey);
}
-
+#endif
/* find last good entry in spy notify array and save addr for b-search */
p = &spnfy_array[0];
j = 0xffffffff;
Modified: branches/arwinss/reactos/dll/win32/user32/sysparams.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/sysparams.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/sysparams.c [iso-8859-1] Sat Jul 18 10:50:27
2009
@@ -657,6 +657,7 @@
const BYTE* lpValue, DWORD valueSize,
DWORD type, UINT fWinIni )
{
+#if 0
HKEY hKey;
HKEY hBaseKey;
DWORD dwOptions;
@@ -687,6 +688,9 @@
RegCloseKey( hKey );
}
return ret;
+#else
+ return TRUE;
+#endif
}
/* Convenience function to save strings */
@@ -946,7 +950,7 @@
/* initialize system colors */
- if (RegCreateKeyExA(HKEY_CURRENT_USER, "Control Panel\\Colors", 0, 0, 0,
KEY_ALL_ACCESS, 0, &hkey, 0))
+ //if (RegCreateKeyExA(HKEY_CURRENT_USER, "Control Panel\\Colors", 0, 0, 0,
KEY_ALL_ACCESS, 0, &hkey, 0))
hkey = 0;
for (i = 0; i < NUM_SYS_COLORS; i++)
{
@@ -3306,3 +3310,13 @@
return TRUE;
}
+
+/***********************************************************************
+ * UpdatePerUserSystemParameters (USER32.@)
+ */
+BOOL WINAPI UpdatePerUserSystemParameters ( DWORD dwUnknown )
+{
+ FIXME( "stub, param %d!\n", dwUnknown);
+
+ return TRUE;
+}
Modified: branches/arwinss/reactos/dll/win32/user32/user32.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/user32.rbuild [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/user32.rbuild [iso-8859-1] Sat Jul 18
10:50:27 2009
@@ -13,7 +13,7 @@
<library>gdi32</library>
<library>kernel32</library>
<library>advapi32</library>
- <library>imm32</library>
+ <!--library>imm32</library-->
<library>win32ksys</library>
<library>pseh</library>
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] Sat Jul 18 10:50:27
2009
@@ -2,7 +2,7 @@
@ stdcall AdjustWindowRect(ptr long long)
@ stdcall AdjustWindowRectEx(ptr long long long)
@ stdcall AlignRects(ptr long long long)
-# @ stub AllowForegroundActivation
+@ stub AllowForegroundActivation
@ stdcall AllowSetForegroundWindow (long)
@ stdcall AnimateWindow(long long long)
@ stdcall AnyPopup()
@@ -19,9 +19,9 @@
@ stdcall BroadcastSystemMessageExA(long ptr long long long ptr)
@ stdcall BroadcastSystemMessageExW(long ptr long long long ptr)
@ stdcall BroadcastSystemMessageW(long ptr long long long)
-# @ stub BuildReasonArray
+@ stub BuildReasonArray
@ stdcall CalcChildScroll(long long)
-# @ stub CalcMenuBar
+@ stub CalcMenuBar
@ stdcall CallMsgFilter(ptr long) CallMsgFilterA
@ stdcall CallMsgFilterA(ptr long)
@ stdcall CallMsgFilterW(ptr long)
@@ -66,7 +66,7 @@
@ stdcall ChildWindowFromPointEx(long double long)
@ stub CliImmSetHotKey
@ stub ClientThreadConnect
-@ stub ClientThreadSetup
+@ stdcall ClientThreadSetup()
@ stdcall ClientToScreen(long ptr)
@ stdcall ClipCursor(ptr)
@ stdcall CloseClipboard()
@@ -98,13 +98,13 @@
@ stdcall CreateMDIWindowW(ptr ptr long long long long long long long long)
@ stdcall CreateMenu()
@ stdcall CreatePopupMenu()
-# @ stub CreateSystemThreads
+@ stub CreateSystemThreads
@ stdcall CreateWindowExA(long str str long long long long long long long long ptr)
@ stdcall CreateWindowExW(long wstr wstr long long long long long long long long ptr)
@ stdcall CreateWindowStationA(str long long ptr)
@ stdcall CreateWindowStationW(wstr long long ptr)
-# @ stub CsrBroadcastSystemMessageExW
-# @ stub CtxInitUser32
+@ stub CsrBroadcastSystemMessageExW
+@ stub CtxInitUser32
@ stdcall DdeAbandonTransaction(long long long)
@ stdcall DdeAccessData(long ptr)
@ stdcall DdeAddData(long ptr long long)
@@ -155,9 +155,9 @@
@ stdcall DestroyCursor(long)
@ stdcall DestroyIcon(long)
@ stdcall DestroyMenu(long)
-# @ stub DestroyReasons
+@ stub DestroyReasons
@ stdcall DestroyWindow(long)
-# @ stub DeviceEventWorker
+@ stub DeviceEventWorker
@ stdcall DialogBoxIndirectParamA(long ptr long ptr long)
@ stdcall DialogBoxIndirectParamAorW(long ptr long ptr long long)
@ stdcall DialogBoxIndirectParamW(long ptr long ptr long)
@@ -166,7 +166,7 @@
@ stdcall DisableProcessWindowsGhosting()
@ stdcall DispatchMessageA(ptr)
@ stdcall DispatchMessageW(ptr)
-# @ stub DisplayExitWindowsWarnings
+@ stub DisplayExitWindowsWarnings
@ stdcall DlgDirListA(long str long long long)
@ stdcall DlgDirListComboBoxA(long ptr long long long)
@ stdcall DlgDirListComboBoxW(long ptr long long long)
@@ -205,7 +205,7 @@
@ stdcall EndMenu()
@ stdcall EndPaint(long ptr)
@ stub EndTask
-# @ stub EnterReaderModeHelper
+@ stub EnterReaderModeHelper
@ stdcall EnumChildWindows(long ptr long)
@ stdcall EnumClipboardFormats(long)
@ stdcall EnumDesktopWindows(long ptr ptr)
@@ -272,7 +272,7 @@
@ stdcall GetClipboardViewer()
@ stdcall GetComboBoxInfo(long ptr)
@ stdcall GetCursor()
-# @ stub GetCursorFrameInfo
+@ stub GetCursorFrameInfo
@ stdcall GetCursorInfo(ptr)
@ stdcall GetCursorPos(ptr)
@ stdcall GetDC(long)
@@ -306,7 +306,7 @@
@ stdcall GetLastActivePopup(long)
@ stdcall GetLastInputInfo(ptr)
@ stdcall GetLayeredWindowAttributes(long ptr ptr ptr)
-# @ stub GetListBoxInfo
+@ stub GetListBoxInfo
@ stdcall GetMenu(long)
@ stdcall GetMenuBarInfo(long long long ptr)
@ stdcall GetMenuCheckMarkDimensions()
@@ -332,7 +332,7 @@
@ stdcall GetMouseMovePointsEx(long ptr ptr long long)
@ stdcall GetNextDlgGroupItem(long long long)
@ stdcall GetNextDlgTabItem(long long long)
-# @ stub GetNextQueueWindow
+@ stub GetNextQueueWindow
@ stdcall GetOpenClipboardWindow()
@ stdcall GetParent(long)
@ stdcall GetPriorityClipboardFormat(ptr long)
@@ -347,7 +347,7 @@
@ stdcall GetRawInputDeviceInfoA(ptr long ptr ptr)
@ stdcall GetRawInputDeviceInfoW(ptr long ptr ptr)
@ stdcall GetRawInputDeviceList(ptr ptr long)
-# @ stub GetReasonTitleFromReasonCode
+@ stub GetReasonTitleFromReasonCode
@ stdcall GetRegisteredRawInputDevices(ptr ptr long)
@ stdcall GetScrollBarInfo(long long ptr)
@ stdcall GetScrollInfo(long long ptr)
@@ -370,7 +370,7 @@
@ stdcall GetUserObjectInformationA (long long ptr long ptr)
@ stdcall GetUserObjectInformationW (long long ptr long ptr)
@ stdcall GetUserObjectSecurity (long ptr ptr long ptr)
-# @ stub GetWinStationInfo
+@ stub GetWinStationInfo
@ stdcall GetWindow(long long)
@ stdcall GetWindowContextHelpId(long)
@ stdcall GetWindowDC(long)
@@ -397,20 +397,20 @@
# @ stub HasSystemSleepStarted
@ stdcall HideCaret(long)
@ stdcall HiliteMenuItem(long long long long)
-# @ stub IMPGetIMEA
-# @ stub IMPGetIMEW
-# @ stub IMPQueryIMEA
-# @ stub IMPQueryIMEW
-# @ stub IMPSetIMEA
-# @ stub IMPSetIMEW
+@ stub IMPGetIMEA
+@ stub IMPGetIMEW
+@ stub IMPQueryIMEA
+@ stub IMPQueryIMEW
+@ stub IMPSetIMEA
+@ stub IMPSetIMEW
@ stdcall ImpersonateDdeClientWindow(long long)
@ stdcall InSendMessage()
@ stdcall InSendMessageEx(ptr)
@ stdcall InflateRect(ptr long long)
# @ stub InitSharedTable
# @ stub InitTask
-# @ stub InitializeLpkHooks
-# @ stub InitializeWin32EntryTable
+@ stub InitializeLpkHooks
+@ stub InitializeWin32EntryTable
@ stdcall InsertMenuA(long long long long ptr)
@ stdcall InsertMenuItemA(long long long ptr)
@ stdcall InsertMenuItemW(long long long ptr)
@@ -434,17 +434,18 @@
@ stdcall IsDialogMessageA(long ptr)
@ stdcall IsDialogMessageW(long ptr)
@ stdcall IsDlgButtonChecked(long long)
-# @ stub IsGUIThread
+@ stub IsGUIThread
@ stdcall IsHungAppWindow(long)
# @ stub IsHungThread
@ stdcall IsIconic(long)
@ stdcall IsMenu(long)
@ stdcall IsRectEmpty(ptr)
-# @ stub IsServerSideWindow
+@ stub IsSETEnabled
+@ stub IsServerSideWindow
@ stdcall IsWinEventHookInstalled(long)
@ stdcall IsWindow(long)
@ stdcall IsWindowEnabled(long)
-# @ stub IsWindowInDestroy
+@ stub IsWindowInDestroy
@ stdcall IsWindowUnicode(long)
@ stdcall IsWindowVisible(long)
@ stdcall IsZoomed(long)
@@ -463,7 +464,7 @@
@ stdcall LoadImageA(long str long long long long)
@ stdcall LoadImageW(long wstr long long long long)
@ stdcall LoadKeyboardLayoutA(str long)
-# @ stub LoadKeyboardLayoutEx
+@ stub LoadKeyboardLayoutEx
@ stdcall LoadKeyboardLayoutW(wstr long)
@ stdcall LoadLocalFonts()
@ stdcall LoadMenuA(long str)
@@ -480,7 +481,7 @@
@ stdcall LookupIconIdFromDirectory(ptr long)
@ stdcall LookupIconIdFromDirectoryEx(ptr long long long long)
@ stub MBToWCSEx
-# @ stub MB_GetString
+@ stub MB_GetString
@ stdcall MapDialogRect(long ptr)
@ stdcall MapVirtualKeyA(long long)
@ stdcall MapVirtualKeyExA(long long long)
@@ -496,8 +497,8 @@
@ stdcall MessageBoxExW(long wstr wstr long long)
@ stdcall MessageBoxIndirectA(ptr)
@ stdcall MessageBoxIndirectW(ptr)
-# @ stub MessageBoxTimeoutA
-# @ stub MessageBoxTimeoutW
+@ stub MessageBoxTimeoutA
+@ stub MessageBoxTimeoutW
@ stdcall MessageBoxW(long wstr wstr long)
# @ stub ModifyAccess
@ stdcall ModifyMenuA(long long long long ptr)
@@ -524,7 +525,7 @@
@ stdcall OpenWindowStationW(wstr long long)
@ stdcall PackDDElParam(long long long)
@ stdcall PaintDesktop(long)
-# @ stub PaintMenuBar
+@ stub PaintMenuBar
@ stdcall PeekMessageA(ptr long long long long)
@ stdcall PeekMessageW(ptr long long long long)
@ stub PlaySoundEvent
@@ -533,7 +534,7 @@
@ stdcall PostQuitMessage(long)
@ stdcall PostThreadMessageA(long long long long)
@ stdcall PostThreadMessageW(long long long long)
-# @ stub PrintWindow
+@ stub PrintWindow
@ stdcall PrivateExtractIconExA(str long ptr ptr long)
@ stdcall PrivateExtractIconExW(wstr long ptr ptr long)
@ stdcall PrivateExtractIconsA (str long long long ptr ptr long long)
@@ -547,9 +548,9 @@
@ stdcall RealGetWindowClass(long ptr long) RealGetWindowClassA
@ stdcall RealGetWindowClassA(long ptr long)
@ stdcall RealGetWindowClassW(long ptr long)
-# @ stub ReasonCodeNeedsBugID
-# @ stub ReasonCodeNeedsComment
-# @ stub RecordShutdownReason
+@ stub ReasonCodeNeedsBugID
+@ stub ReasonCodeNeedsComment
+@ stub RecordShutdownReason
@ stdcall RedrawWindow(long ptr long long)
@ stdcall RegisterClassA(ptr)
@ stdcall RegisterClassExA(ptr)
@@ -561,14 +562,14 @@
@ stdcall RegisterDeviceNotificationW(long ptr long)
@ stdcall RegisterHotKey(long long long long)
@ stdcall RegisterLogonProcess(long long)
-# @ stub RegisterMessagePumpHook
+@ stub RegisterMessagePumpHook
@ stub RegisterNetworkCapabilities
@ stdcall RegisterRawInputDevices(ptr long long)
@ stdcall RegisterServicesProcess(long)
@ stdcall RegisterShellHookWindow (long)
@ stdcall RegisterSystemThread(long long)
@ stdcall RegisterTasklist (long)
-# @ stub RegisterUserApiHook
+@ stub RegisterUserApiHook
@ stdcall RegisterWindowMessageA(str)
@ stdcall RegisterWindowMessageW(wstr)
@ stdcall ReleaseCapture()
@@ -610,14 +611,14 @@
@ stdcall SetClassWord(long long long)
@ stdcall SetClipboardData(long long)
@ stdcall SetClipboardViewer(long)
-# @ stub SetConsoleReserveKeys
+@ stub SetConsoleReserveKeys
@ stdcall SetCursor(long)
@ stub SetCursorContents
@ stdcall SetCursorPos(long long)
@ stdcall SetDebugErrorLevel(long)
@ stdcall SetDeskWallPaper(ptr)
-# @ stub SetDeskWallpaper
-# @ stub SetDesktopBitmap
+@ stub SetDeskWallpaper
+@ stub SetDesktopBitmap
@ stdcall SetDlgItemInt(long long long long)
@ stdcall SetDlgItemTextA(long long str)
@ stdcall SetDlgItemTextW(long long wstr)
@@ -689,7 +690,7 @@
@ stub ShowStartGlass
@ stdcall ShowWindow(long long)
@ stdcall ShowWindowAsync(long long)
-# @ stub SoftModalMessageBox
+@ stub SoftModalMessageBox
@ stdcall SubtractRect(ptr ptr ptr)
@ stdcall SwapMouseButton(long)
@ stdcall SwitchDesktop(long)
@@ -713,7 +714,7 @@
@ stdcall TranslateAcceleratorW(long long ptr)
@ stdcall TranslateMDISysAccel(long ptr)
@ stdcall TranslateMessage(ptr)
-# @ stub TranslateMessageEx
+@ stub TranslateMessageEx
@ stdcall UnhookWinEvent(long)
@ stdcall UnhookWindowsHook(long ptr)
@ stdcall UnhookWindowsHookEx(long)
@@ -725,18 +726,18 @@
@ stdcall UnregisterClassW(wstr long)
@ stdcall UnregisterDeviceNotification(long)
@ stdcall UnregisterHotKey(long long)
-# @ stub UnregisterMessagePumpHook
-# @ stub UnregisterUserApiHook
+@ stub UnregisterMessagePumpHook
+@ stub UnregisterUserApiHook
@ stdcall UpdateLayeredWindow(long long ptr ptr long ptr long ptr long)
@ stdcall UpdateLayeredWindowIndirect(long ptr)
-@ stub UpdatePerUserSystemParameters
+@ stdcall UpdatePerUserSystemParameters(long)
@ stdcall UpdateWindow(long)
@ stdcall User32InitializeImmEntryTable(ptr)
@ stdcall UserClientDllInitialize(long long ptr) DllMain
@ stub UserHandleGrantAccess
# @ stub UserIsSystemResumeAutomatic
-# @ stub UserLpkPSMTextOut
-# @ stub UserLpkTabbedTextOut
+@ stub UserLpkPSMTextOut
+@ stub UserLpkTabbedTextOut
@ stdcall UserRealizePalette(long)
@ stub UserRegisterWowHandlers
# @ stub UserSetDeviceHoldState
@@ -756,7 +757,7 @@
@ stub WNDPROC_CALLBACK
@ stdcall WaitForInputIdle(long long)
@ stdcall WaitMessage()
-# @ stub Win32PoolAllocationStats
+@ stub Win32PoolAllocationStats
@ stdcall WinHelpA(long str long long)
@ stdcall WinHelpW(long wstr long long)
# @ stub WinOldAppHackoMatic
@@ -781,3 +782,9 @@
# Wine dll separation hacks, these will go away, don't use them
#
@ cdecl HOOK_CallHooks(long long long long long)
+
+#################################################################
+# ROS specific exports
+#
+@ stdcall PrivateCsrssManualGuiCheck(long)
+@ stdcall PrivateCsrssInitialized()
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] Sat Jul 18 10:50:27
2009
@@ -76,7 +76,7 @@
void USER_CheckNotLock(void)
{
//_CheckNotSysLevel( &USER_SysLevel );
- UNIMPLEMENTED;
+ //UNIMPLEMENTED;
}
@@ -174,6 +174,7 @@
strcpyW( p, explorerW );
/* @@ Wine registry key: HKCU\Software\Wine\AppDefaults\app.exe\Explorer */
+#if 0
if (!RegOpenKeyW( HKEY_CURRENT_USER, app_defaultsW, &tmpkey ))
{
if (RegOpenKeyW( tmpkey, appname, &appkey )) appkey = 0;
@@ -187,17 +188,19 @@
ret = defaultW;
}
}
-
+#endif
memcpy( buffer, app_defaultsW, 13 * sizeof(WCHAR) ); /* copy only software\\wine */
strcpyW( buffer + 13, explorerW );
/* @@ Wine registry key: HKCU\Software\Wine\Explorer */
+#if 0
if (!RegOpenKeyW( HKEY_CURRENT_USER, buffer, &appkey ))
{
len = sizeof(buffer);
if (!RegQueryValueExW( appkey, desktopW, 0, NULL, (LPBYTE)buffer, &len )) ret
= buffer;
RegCloseKey( appkey );
}
+#endif
return ret;
}
@@ -402,5 +405,13 @@
int WINAPI RegisterServicesProcess(DWORD ServicesProcessId)
{
FIXME("(0x%x): stub\n", ServicesProcessId);
- return 0;
-}
+ return TRUE;
+}
+
+
+BOOL ClientThreadSetup()
+{
+ TRACE(": stub\n");
+ return TRUE;
+}
+
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] Sat Jul 18
10:50:27 2009
@@ -32,34 +32,15 @@
#include "wine/winbase16.h"
extern WORD USER_HeapSel DECLSPEC_HIDDEN;
-NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...);
-static inline HLOCAL16 LOCAL_Alloc( HANDLE16 ds, UINT16 flags, WORD size )
-{
- DbgPrint("LOCAL_Alloc unimplemented!\n");
- return 0;
-}
-
-static inline HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, UINT16
flags )
-{
- DbgPrint("LOCAL_ReAlloc unimplemented!\n");
- return 0;
-}
-
-static inline HLOCAL16 LOCAL_Free( HANDLE16 ds, HLOCAL16 handle )
-{
- DbgPrint("LOCAL_Free unimplemented!\n");
- return 0;
-}
#define USER_HEAP_ALLOC(size) \
- ((HANDLE)(ULONG_PTR)LOCAL_Alloc( USER_HeapSel, LMEM_FIXED, (size) ))
+ ((HANDLE)HeapAlloc( GetProcessHeap(), 0, (size) ))
#define USER_HEAP_REALLOC(handle,size) \
- ((HANDLE)(ULONG_PTR)LOCAL_ReAlloc( USER_HeapSel, LOWORD(handle), (size),
LMEM_FIXED ))
+ ((HANDLE)HeapReAlloc( GetProcessHeap(), 0, (handle), (size) ))
#define USER_HEAP_FREE(handle) \
- LOCAL_Free( USER_HeapSel, LOWORD(handle) )
+ HeapFree( GetProcessHeap(), 0, handle )
#define USER_HEAP_LIN_ADDR(handle) \
- /*((handle) ? MapSL(MAKESEGPTR(USER_HeapSel, LOWORD(handle))) : NULL)*/ \
- (handle)
+ (handle)
#define GET_WORD(ptr) (*(const WORD *)(ptr))
#define GET_DWORD(ptr) (*(const DWORD *)(ptr))
@@ -339,10 +320,23 @@
extern void CURSORICON_FreeModuleIcons( HMODULE16 hModule ) DECLSPEC_HIDDEN;
-/* Mingw's assert() imports MessageBoxA and gets confused by user32 exporting it */
-#ifdef __MINGW32__
+NTSYSAPI
+VOID
+NTAPI
+RtlAssert(
+ PVOID FailedAssertion,
+ PVOID FileName,
+ ULONG LineNumber,
+ PCHAR Message
+);
+
+#ifdef assert
#undef assert
-#define assert(expr) ((void)0)
#endif
+#define assert(x) if (!(x)) {RtlAssert("#x",__FILE__,__LINE__, "");
}
+
+#ifndef ASSERT
+#define ASSERT(x) if (!(x)) {RtlAssert("#x",__FILE__,__LINE__, "");
}
+#endif
#endif /* __WINE_USER_PRIVATE_H */
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] Sat Jul 18 10:50:27 2009
@@ -3398,7 +3398,20 @@
*/
BOOL WINAPI SwitchDesktop( HDESK hDesktop)
{
+ HWND hWnd;
+
FIXME("SwitchDesktop(hwnd %p) stub!\n", hDesktop);
+
+ hWnd = GetDesktopWindow(/*hDesktop*/);
+
+ SetWindowPos(hWnd,
+ NULL, 0, 0,
+ 800,//nmh->ShowDesktop.Width,
+ 600,//nmh->ShowDesktop.Height,
+ SWP_NOACTIVATE | SWP_NOZORDER | SWP_SHOWWINDOW);
+ UpdateWindow(hWnd);
+
+
return TRUE;
}
Modified: branches/arwinss/reactos/dll/win32/user32/winproc.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/winproc.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/winproc.c [iso-8859-1] Sat Jul 18 10:50:27
2009
@@ -83,6 +83,7 @@
/* find an existing winproc for a given 16-bit function and type */
/* FIXME: probably should do something more clever than a linear search */
+#ifndef __REACTOS__
static inline WINDOWPROC *find_winproc16( WNDPROC16 func )
{
unsigned int i;
@@ -93,7 +94,7 @@
}
return NULL;
}
-
+#endif
/* find an existing winproc for a given function and type */
/* FIXME: probably should do something more clever than a linear search */
static inline WINDOWPROC *find_winproc( WNDPROC funcA, WNDPROC funcW )
@@ -172,7 +173,7 @@
return proc;
}
-
+#ifndef __REACTOS__
#ifdef __i386__
#include "pshpack1.h"
@@ -272,6 +273,7 @@
}
#endif /* __i386__ */
+#endif /* __REACTOS__ */
#ifdef __i386__
@@ -655,6 +657,7 @@
* lot of windows, it will usually only have a limited number of window procedures, so
the
* array won't grow too large, and this way we avoid the need to track allocations
per window.
*/
+#ifndef __REACTOS__
WNDPROC WINPROC_AllocProc16( WNDPROC16 func )
{
WINDOWPROC *proc;
@@ -684,6 +687,7 @@
}
return proc_to_handle( proc );
}
+#endif
/**********************************************************************