12 added + 14 removed + 278 modified, total 304 files
- FIXME - Instead of copying the stuff to usermode we should map the tables to
- FIXME - just change it in the usermode structure, too, instead of asking win32k again */
- FIXME:
- FIXME:
- FIXME:
- TODO FIXME - should we validate params or ASSERT_IRQL?
- TODO FIXME - should we validate params or ASSERT_IRQL?
- FIXME */
- FIXME */
- FIXME */
- FIXME - What to do here? */
- FIXME - this is wrong!!!!!! we must NOT access pgp->Pos from here, it's
- FIXME - touch prcl when x == -1? */
- FIXME - touch prcl when x == -1? */
- FIXME - SourcePalGDI can be NULL!!! Handle this case instead of ASSERT! */
- FIXME - Handle pSurface == NULL!!!! */
- FIXME use the desktop's HDC instead of using ScreenDeviceContext */
- FIXME - BitmapObj can be NULL!!!!! */
- TODO: Fixme. Logic is screwed above */
- FIXME - Create a color pointer, only 32bit bitmap, set alpha bits!
- FIXME - Create a color pointer, create only one 32bit bitmap!
- FIXME - Don't exit here */
- FIXME - check if process has WINSTA_WRITEATTRIBUTES */
- FIXME - check if process has WINSTA_READATTRIBUTES */
- FIXME: Just a bad hack for now... */
- FIXME - Handle dc == NULL!!!! */
- FIXME - That's a bad thing! We should't access private gdi pointer fields
- FIXME - last error code? */
- FIXME - last error? */
- FIXME
- FIXME - we should make use of SEH here... */
- FIXME - we should make use of SEH here... */
- FIXME - changing ownership to current process only works for global objects! */
- FIXME - changing ownership to current process only works for global objects! */
- FIXME : this should perhaps be BS_HATCHED, at least for 1 bitperpixel */
- FIXME : this should perhaps be BS_HATCHED, at least for 1 bitperpixel */
- FIXME: Is this correct? */
- FIXME - update the syscolor pens and brushes */
- FIXME - BitmapDest can be NULL!!!! Don't assert here! */
- FIXME - BitmapSrc can be NULL!!!! Don't assert here! */
- FIXME - bmp can be NULL!!!!!! */
- FIXME: Fill in the rest of fields!!! */
- FIXME: Fill in the rest of fields!!! */
- FIXME - Handle obj == NULL!!! */
- FIXME - Handle PalGDI == NULL!!!! */
- FIXME - Handle palGDI == NULL!!!! */
- FIXME - Handle sysGDI == NULL!!!!! */
- FIXME - why does EngEraseSurface() sometimes crash?
- FIXME - NewDC can be NULL!!! Don't assert here! */
- FIXME - newdc can be NULL!!!! Don't assert here!!! */
- FIXME - Handle NewDC == NULL! */
- FIXME - SourcePalette can be NULL!!! Don't assert here! */
- FIXME - DestPalette can be NULL!!!! Don't assert here!!! */
- FIXME - BitmapObj can be NULL!!!! don't assert but handle this case gracefully! */
- FIXME - FillBrushObj can be NULL!!!!!!!! Don't Assert! */
- FIXME - handle PenBrushObj == NULL !!!!! */
- FIXME - BitmapObj can be NULL!!!! Don't assert but handle this case gracefully! */
- FIXME - BitmapObj can be NULL!!! Don't assert but handle this case gracefully! */
- FIXME - Handle FillBrushObj == NULL !!!! */
- FIXME - BitmapObj can be NULL!!!! Handle this case gracefully instead of ASSERT! */
- FIXME - Don't assert if FillBrushObj == NULL, handle this case !!!! */
- FIXME - PenBrushObject can be NULL!!! Don't assert!!!! */
- FIXME - BitmapObj can be NULL!!! Don't assert but handle this case gracefully! */
- FIXME - PalDestGDI can be NULL!!! Don't assert but handle this case gracefully! */
- FIXME - 0.5 ms? */
- FIXME - don't shift once ROS' PIDs match with nt! */
- FIXME - don't shift once ROS' PIDs match with nt! */
- FIXME - we shouldn't loop forever! Give up after some time! */
- FIXME - Instead of building the handle here and delete it using GDIOBJ_FreeObj
- FIXME - PenBrushObj can be NULL!!!! Don't assert here! */
- FIXME - PenBrushObj can be NULL! Don't assert here! */
- FIXME - BitmapObj can be NULL!!!! Don't assert but handle this case gracefully! */
- FIXME - PalGDI can be NULL!!! Don't assert here! */
- FIXME - PalGDI can be NULL!!! Don't assert here! */
- FIXME - handle pSysPal == NULL!!!!!!! */
- FIXME - Handle PenObject == NULL!!! */
- TODO FIXME - don't pass umode buffer to an Int function */
- FIXME - Handle BitmapObj == NULL !!!!!! */
- FIXME - Handle BitmapObj == NULL !!!! */
- FIXME - Handle BrushBg == NULL !!!!! */
- FIXME in wine include files
- FIXME: This is probably data, not a function */
reactos
diff -N makefile.dos
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ makefile.dos 13 Dec 2004 09:38:45 -0000 1.18.4.1
@@ -0,0 +1,142 @@
+#
+# Global makefile
+#
+
+#
+# Select your host
+#
+#HOST = mingw32-linux
+#HOST = djgpp-msdos
+HOST = mingw32-windows
+
+include rules.mak
+
+#
+# Required to run the system
+#
+COMPONENTS = iface_native ntoskrnl
+#DLLS = ntdll kernel32 crtdll user32 fmifs gdi32
+DLLS = ntdll kernel32 crtdll fmifs gdi32
+#DLLS = crtdll mingw32
+SUBSYS = win32k
+
+#
+# Select the server(s) you want to build
+#
+SERVERS = win32
+# SERVERS = posix linux os2
+
+#
+# Select the loader(s) you want to build
+#
+LOADERS = dos
+# LOADERS = boot
+
+#
+# Select the device drivers and filesystems you want
+#
+DEVICE_DRIVERS = blue ide keyboard mouse null parallel serial vidport
+# DEVICE_DRIVERS = beep event floppy ide_test sound test test1
+FS_DRIVERS = vfat
+# FS_DRIVERS = minix ext2 template
+KERNEL_SERVICES = $(DEVICE_DRIVERS) $(FS_DRIVERS)
+
+APPS = args hello shell test cat bench
+# APPS = cmd
+
+all: $(COMPONENTS) $(DLLS) $(SUBSYS) $(LOADERS) $(KERNEL_SERVICES) $(APPS)
+.PHONY: all
+
+clean: $(COMPONENTS:%=%_clean) $(DLLS:%=%_clean) $(LOADERS:%=%_clean) \
+ $(KERNEL_SERVICES:%=%_clean) $(APPS:%=%_clean)
+.PHONY: clean
+
+#
+# Applications
+#
+$(APPS): %:
+ make -C apps/$*
+
+$(APPS:%=%_clean): %_clean:
+ make -C apps/$* clean
+
+.PHONY: $(APPS) $(APPS:%=%_clean)
+
+#
+# Interfaces
+#
+iface_native:
+ make -C iface/native
+
+iface_native_clean:
+ make -C iface/native clean
+
+.PHONY: iface_native iface_native_clean
+
+#
+# Device driver rules
+#
+$(DEVICE_DRIVERS): %:
+ make -C services/dd/$*
+
+$(DEVICE_DRIVERS:%=%_clean): %_clean:
+ make -C services/dd/$* clean
+
+.PHONY: $(DEVICE_DRIVERS) $(DEVICE_DRIVERS:%=%_clean)
+
+$(FS_DRIVERS): %:
+ make -C services/fs/$*
+
+$(FS_DRIVERS:%=%_clean): %_clean:
+ make -C services/fs/$* clean
+
+.PHONY: $(FS_DRIVERS) $(FS_DRIVERS:%=%_clean)
+
+#
+# Kernel loaders
+#
+
+$(LOADERS): %:
+ make -C loaders/$*
+
+$(LOADERS:%=%_clean): %_clean:
+ make -C loaders/$* clean
+
+.PHONY: $(LOADERS) $(LOADERS:%=%_clean)
+
+#
+# Required system components
+#
+
+ntoskrnl:
+ make -C ntoskrnl
+
+ntoskrnl_clean:
+ make -C ntoskrnl clean
+
+.PHONY: ntoskrnl ntoskrnl_clean
+
+#
+# Required DLLs
+#
+
+$(DLLS): %:
+ make -C lib/$*
+
+$(DLLS:%=%_clean): %_clean:
+ make -C lib/$* clean
+
+.PHONY: $(DLLS) $(DLLS:%=%_clean)
+
+#
+# Kernel Subsystems
+#
+$(SUBSYS): %:
+ make -C subsys/$*
+
+$(SUBSYS:%=%_clean): %_clean:
+ make -C lib/$* clean
+
+.PHONY: $(SUBSYS) $(SUBSYS:%=%_clean)
+
+
reactos
diff -u -r1.262.2.1 -r1.262.2.2
--- Makefile 8 Dec 2004 21:56:46 -0000 1.262.2.1
+++ Makefile 13 Dec 2004 09:38:44 -0000 1.262.2.2
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.262.2.1 2004/12/08 21:56:46 hyperion Exp $
+# $Id: Makefile,v 1.262.2.2 2004/12/13 09:38:44 hyperion Exp $
#
# Global makefile
#
@@ -56,7 +56,7 @@
msgina msimg32 msvcrt20 msvideo mswsock netapi32 ntdll ole32 oleaut32 oledlg opengl32 packet psapi \
riched20 richedit rpcrt4 samlib secur32 setupapi shell32 shlwapi snmpapi syssetup twain unicode user32 \
userenv version wininet winmm winspool ws2help ws2_32 wsock32 wshirda \
- dnsapi dinput dinput8\
+ dnsapi dinput dinput8 dsound \
$(DLLS_KBD) $(DLLS_CPL) $(DLLS_SHELLEXT)
SUBSYS = smss win32k csrss ntvdm
@@ -156,6 +156,7 @@
$(REGTESTS:%=%_clean) clean_after tools_clean
clean_after:
+ $(HALFVERBOSEECHO) [RM] /include/roscfg.h
$(RM) $(PATH_TO_TOP)/include/roscfg.h
fastinstall: tools install_dirs install_before \
@@ -172,18 +173,31 @@
$(MAKE) -C $(FREELDR_DIR)
bootcd_directory_layout:
+ $(HALFVERBOSEECHO) [RMKDIR] $(BOOTCD_DIR)
$(RMKDIR) $(BOOTCD_DIR)
+ $(HALFVERBOSEECHO) [RMKDIR] $(BOOTCD_DIR)/bootdisk
$(RMKDIR) $(BOOTCD_DIR)/bootdisk
+ $(HALFVERBOSEECHO) [RMKDIR] $(BOOTCD_DIR)/loader
$(RMKDIR) $(BOOTCD_DIR)/loader
+ $(HALFVERBOSEECHO) [RMKDIR] $(BOOTCD_DIR)/reactos
$(RMKDIR) $(BOOTCD_DIR)/reactos
+ $(HALFVERBOSEECHO) [RMKDIR] $(BOOTCD_DIR)/reactos/system32
$(RMKDIR) $(BOOTCD_DIR)/reactos/system32
+ $(HALFVERBOSEECHO) [COPY] ${FREELDR_DIR}/bootsect/isoboot.bin to ${BOOTCD_DIR}/../isoboot.bin
$(CP) ${FREELDR_DIR}/bootsect/isoboot.bin ${BOOTCD_DIR}/../isoboot.bin
+ $(HALFVERBOSEECHO) [COPY] ${FREELDR_DIR}/bootsect/dosmbr.bin to ${BOOTCD_DIR}/loader/dosmbr.bin
$(CP) ${FREELDR_DIR}/bootsect/dosmbr.bin ${BOOTCD_DIR}/loader/dosmbr.bin
+ $(HALFVERBOSEECHO) [COPY] ${FREELDR_DIR}/bootsect/ext2.bin to ${BOOTCD_DIR}/loader/ext2.bin
$(CP) ${FREELDR_DIR}/bootsect/ext2.bin ${BOOTCD_DIR}/loader/ext2.bin
+ $(HALFVERBOSEECHO) [COPY] ${FREELDR_DIR}/bootsect/fat.bin to ${BOOTCD_DIR}/loader/fat.bin
$(CP) ${FREELDR_DIR}/bootsect/fat.bin ${BOOTCD_DIR}/loader/fat.bin
+ $(HALFVERBOSEECHO) [COPY] ${FREELDR_DIR}/bootsect/fat32.bin to ${BOOTCD_DIR}/loader/fat32.bin
$(CP) ${FREELDR_DIR}/bootsect/fat32.bin ${BOOTCD_DIR}/loader/fat32.bin
+ $(HALFVERBOSEECHO) [COPY] ${FREELDR_DIR}/bootsect/isoboot.bin to ${BOOTCD_DIR}/loader/isoboot.bin
$(CP) ${FREELDR_DIR}/bootsect/isoboot.bin ${BOOTCD_DIR}/loader/isoboot.bin
+ $(HALFVERBOSEECHO) [COPY] ${FREELDR_DIR}/freeldr/obj/i386/freeldr.sys to ${BOOTCD_DIR}/loader/freeldr.sys
$(CP) ${FREELDR_DIR}/freeldr/obj/i386/freeldr.sys ${BOOTCD_DIR}/loader/freeldr.sys
+ $(HALFVERBOSEECHO) [COPY] ${FREELDR_DIR}/freeldr/obj/i386/setupldr.sys to ${BOOTCD_DIR}/loader/setupldr.sys
$(CP) ${FREELDR_DIR}/freeldr/obj/i386/setupldr.sys ${BOOTCD_DIR}/loader/setupldr.sys
bootcd_bootstrap_files: $(COMPONENTS:%=%_bootcd) $(HALS:%=%_bootcd) $(BUS:%=%_bootcd) \
@@ -191,18 +205,31 @@
$(KERNEL_DRIVERS:%=%_bootcd) $(SUBSYS:%=%_bootcd) $(SYS_APPS:%=%_bootcd)
bootcd_install_before:
+ $(HALFVERBOSEECHO) [RLINE] bootdata/autorun.inf to $(BOOTCD_DIR)/autorun.inf
$(RLINE) bootdata/autorun.inf $(BOOTCD_DIR)/autorun.inf
+ $(HALFVERBOSEECHO) [RLINE] bootdata/readme.txt to $(BOOTCD_DIR)/readme.txt
$(RLINE) bootdata/readme.txt $(BOOTCD_DIR)/readme.txt
+ $(HALFVERBOSEECHO) [RLINE] bootdata/hivecls.inf to $(BOOTCD_DIR)/reactos/hivecls.inf
$(RLINE) bootdata/hivecls.inf $(BOOTCD_DIR)/reactos/hivecls.inf
+ $(HALFVERBOSEECHO) [RLINE] bootdata/hivedef.inf to $(BOOTCD_DIR)/reactos/hivedef.inf
$(RLINE) bootdata/hivedef.inf $(BOOTCD_DIR)/reactos/hivedef.inf
+ $(HALFVERBOSEECHO) [RLINE] bootdata/hivesft.inf to $(BOOTCD_DIR)/reactos/hivesft.inf
$(RLINE) bootdata/hivesft.inf $(BOOTCD_DIR)/reactos/hivesft.inf
+ $(HALFVERBOSEECHO) [RLINE] bootdata/hivesys.inf to $(BOOTCD_DIR)/reactos/hivesys.inf
$(RLINE) bootdata/hivesys.inf $(BOOTCD_DIR)/reactos/hivesys.inf
+ $(HALFVERBOSEECHO) [RLINE] bootdata/txtsetup.sif to $(BOOTCD_DIR)/reactos/txtsetup.sif
$(RLINE) bootdata/txtsetup.sif $(BOOTCD_DIR)/reactos/txtsetup.sif
+ $(HALFVERBOSEECHO) [COPY] bootdata/icon.ico to $(BOOTCD_DIR)/icon.ico
$(CP) bootdata/icon.ico $(BOOTCD_DIR)/icon.ico
+ $(HALFVERBOSEECHO) [COPY] subsys/system/welcome/welcome.exe to $(BOOTCD_DIR)/reactos/welcome.exe
$(CP) subsys/system/welcome/welcome.exe $(BOOTCD_DIR)/reactos/welcome.exe
+ $(HALFVERBOSEECHO) [COPY] media/nls/c_1252.nls to $(BOOTCD_DIR)/reactos/c_1252.nls
$(CP) media/nls/c_1252.nls $(BOOTCD_DIR)/reactos/c_1252.nls
+ $(HALFVERBOSEECHO) [COPY] media/nls/c_437.nls to $(BOOTCD_DIR)/reactos/c_437.nls
$(CP) media/nls/c_437.nls $(BOOTCD_DIR)/reactos/c_437.nls
+ $(HALFVERBOSEECHO) [COPY] media/nls/l_intl.nls to $(BOOTCD_DIR)/reactos/l_intl.nls
$(CP) media/nls/l_intl.nls $(BOOTCD_DIR)/reactos/l_intl.nls
+ $(HALFVERBOSEECHO) [COPY] media/drivers/etc/services to $(BOOTCD_DIR)/reactos/services
$(CP) media/drivers/etc/services $(BOOTCD_DIR)/reactos/services
bootcd_basic: bootcd_directory_layout bootcd_bootstrap_files bootcd_install_before
@@ -211,20 +238,31 @@
$(CABMAN) /C bootdata/packages/reactos.dff /L $(BOOTCD_DIR)/reactos /I
$(CABMAN) /C bootdata/packages/reactos.dff /RC $(BOOTCD_DIR)/reactos/reactos.inf /L $(BOOTCD_DIR)/reactos /N
- $(RM) $(BOOTCD_DIR)/reactos/reactos.inf
+ $(HALFVERBOSEECHO) [CDMAKE] ReactOS.iso
$(CDMAKE) -v -m -b $(BOOTCD_DIR)/../isoboot.bin $(BOOTCD_DIR) REACTOS ReactOS.iso
ubootcd_unattend:
+ $(HALFVERBOSEECHO) [COPY] bootdata/unattend.inf to $(BOOTCD_DIR)/reactos/unattend.inf
$(CP) bootdata/unattend.inf $(BOOTCD_DIR)/reactos/unattend.inf
livecd_directory_layout:
+ $(HALFVERBOSEECHO) [RMKDIR] $(LIVECD_DIR)
$(RMKDIR) $(LIVECD_DIR)
+ $(HALFVERBOSEECHO) [RMKDIR] $(LIVECD_DIR)/loader
$(RMKDIR) $(LIVECD_DIR)/loader
+ $(HALFVERBOSEECHO) [RMKDIR] $(LIVECD_DIR)/reactos
$(RMKDIR) $(LIVECD_DIR)/reactos
+ $(HALFVERBOSEECHO) [RMKDIR] $(LIVECD_DIR)/Profiles/All\ Users/Desktop
$(RMKDIR) $(LIVECD_DIR)/Profiles/All\ Users/Desktop
+ $(HALFVERBOSEECHO) [RMKDIR] $(LIVECD_DIR)/Profiles/Default\ User/Desktop
$(RMKDIR) $(LIVECD_DIR)/Profiles/Default\ User/Desktop
+ $(HALFVERBOSEECHO) [RMKDIR] $(LIVECD_DIR)/Profiles/Default\ User/My\ Documents
$(RMKDIR) $(LIVECD_DIR)/Profiles/Default\ User/My\ Documents
+ $(HALFVERBOSEECHO) [COPY] ${FREELDR_DIR}/bootsect/isoboot.bin to ${LIVECD_DIR}/../isoboot.bin
$(CP) ${FREELDR_DIR}/bootsect/isoboot.bin ${LIVECD_DIR}/../isoboot.bin
+ $(HALFVERBOSEECHO) [COPY] ${FREELDR_DIR}/freeldr/obj/i386/freeldr.sys to ${LIVECD_DIR}/loader/setupldr.sys
$(CP) ${FREELDR_DIR}/freeldr/obj/i386/freeldr.sys ${LIVECD_DIR}/loader/setupldr.sys
+ $(HALFVERBOSEECHO) [RLINE] bootdata/livecd.ini to $(LIVECD_DIR)/freeldr.ini
$(RLINE) bootdata/livecd.ini $(LIVECD_DIR)/freeldr.ini
livecd_bootstrap_files:
@@ -236,6 +274,7 @@
livecd_basic: livecd_directory_layout livecd_bootstrap_files livecd_install_before
livecd_makecd:
+ $(HALFVERBOSEECHO) [CDMAKE] roslive.iso
$(CDMAKE) -m -j -b $(LIVECD_DIR)/../isoboot.bin $(LIVECD_DIR) REACTOS roslive.iso
bootcd: bootcd_basic bootcd_makecd
@@ -388,17 +427,29 @@
# WARNING! Be very sure that there are no important files
# in these directories before cleaning them!!!
dk_clean:
+ $(HALFVERBOSEECHO) [RM] $(DDK_PATH_LIB)/*.a
$(RM) $(DDK_PATH_LIB)/*.a
-# $(RM) $(DDK_PATH_INC)/*.h
+# $(HALFVERBOSEECHO) [RM] $(DDK_PATH_INC)/*.h
+# $(RM) $(DDK_PATH_INC)/*.h
+ $(HALFVERBOSEECHO) [RMDIR] $(DDK_PATH_LIB)
$(RMDIR) $(DDK_PATH_LIB)
+# $(HALFVERBOSEECHO) [RMDIR] $(DDK_PATH_INC)
# $(RMDIR) $(DDK_PATH_INC)
+ $(HALFVERBOSEECHO) [RM] $(SDK_PATH_LIB)/*.a
$(RM) $(SDK_PATH_LIB)/*.a
-# $(RM) $(SDK_PATH_INC)/*.h
+# $(HALFVERBOSEECHO) [RM] $(SDK_PATH_INC)/*.h
+# $(RM) $(SDK_PATH_INC)/*.h
+ $(HALFVERBOSEECHO) [RMDIR] $(SDK_PATH_LIB)
$(RMDIR) $(SDK_PATH_LIB)
+# $(HALFVERBOSEECHO) [RMDIR] $(SDK_PATH_INC)
# $(RMDIR) $(SDK_PATH_INC)
+ $(HALFVERBOSEECHO) [RM] $(XDK_PATH_LIB)/*.a
$(RM) $(XDK_PATH_LIB)/*.a
+# $(HALFVERBOSEECHO) [RM] $(XDK_PATH_INC)/*.h
# $(RM) $(XDK_PATH_INC)/*.h
+ $(HALFVERBOSEECHO) [RMDIR] $(XDK_PATH_LIB)
$(RMDIR) $(XDK_PATH_LIB)
+# $(HALFVERBOSEECHO) [RMDIR] $(XDK_PATH_INC)
# $(RMDIR) $(XDK_PATH_INC)
dk_install:
@@ -909,45 +960,78 @@
#
install_clean:
+ $(HALFVERBOSEECHO) [RM] $(INSTALL_DIR)/system32/drivers/*.*
$(RM) $(INSTALL_DIR)/system32/drivers/*.*
+ $(HALFVERBOSEECHO) [RM] $(INSTALL_DIR)/system32/config/*.*
$(RM) $(INSTALL_DIR)/system32/config/*.*
+ $(HALFVERBOSEECHO) [RM] $(INSTALL_DIR)/system32/*.*
$(RM) $(INSTALL_DIR)/system32/*.*
+ $(HALFVERBOSEECHO) [RM] $(INSTALL_DIR)/symbols/*.*
$(RM) $(INSTALL_DIR)/symbols/*.*
+ $(HALFVERBOSEECHO) [RM] $(INSTALL_DIR)/media/fonts/*.*
$(RM) $(INSTALL_DIR)/media/fonts/*.*
+ $(HALFVERBOSEECHO) [RM] $(INSTALL_DIR)/media/*.*
$(RM) $(INSTALL_DIR)/media/*.*
+ $(HALFVERBOSEECHO) [RM] $(INSTALL_DIR)/inf/*.*
$(RM) $(INSTALL_DIR)/inf/*.*
+ $(HALFVERBOSEECHO) [RM] $(INSTALL_DIR)/bin/*.*
$(RM) $(INSTALL_DIR)/bin/*.*
+ $(HALFVERBOSEECHO) [RMDIR] $(INSTALL_DIR)/system32/drivers
$(RMDIR) $(INSTALL_DIR)/system32/drivers
+ $(HALFVERBOSEECHO) [RMDIR] $(INSTALL_DIR)/system32/config
$(RMDIR) $(INSTALL_DIR)/system32/config
+ $(HALFVERBOSEECHO) [RMDIR] $(INSTALL_DIR)/system32
$(RMDIR) $(INSTALL_DIR)/system32
+ $(HALFVERBOSEECHO) [RMDIR] $(INSTALL_DIR)/symbols
$(RMDIR) $(INSTALL_DIR)/symbols
+ $(HALFVERBOSEECHO) [RMDIR] $(INSTALL_DIR)/media/fonts
$(RMDIR) $(INSTALL_DIR)/media/fonts
+ $(HALFVERBOSEECHO) [RMDIR] $(INSTALL_DIR)/media
$(RMDIR) $(INSTALL_DIR)/media
+ $(HALFVERBOSEECHO) [RMDIR] $(INSTALL_DIR)/inf
$(RMDIR) $(INSTALL_DIR)/inf
+ $(HALFVERBOSEECHO) [RMDIR] $(INSTALL_DIR)/bin
$(RMDIR) $(INSTALL_DIR)/bin
+ $(HALFVERBOSEECHO) [RMDIR] $(INSTALL_DIR)
$(RMDIR) $(INSTALL_DIR)
install_dirs:
+ $(HALFVERBOSEECHO) [RMKDIR] $(INSTALL_DIR)
$(RMKDIR) $(INSTALL_DIR)
+ $(HALFVERBOSEECHO) [RMKDIR] $(INSTALL_DIR)/bin
$(RMKDIR) $(INSTALL_DIR)/bin
+ $(HALFVERBOSEECHO) [RMKDIR] $(INSTALL_DIR)/inf
$(RMKDIR) $(INSTALL_DIR)/inf
+ $(HALFVERBOSEECHO) [RMKDIR] $(INSTALL_DIR)/media
$(RMKDIR) $(INSTALL_DIR)/media
+ $(HALFVERBOSEECHO) [RMKDIR] $(INSTALL_DIR)/media/fonts
$(RMKDIR) $(INSTALL_DIR)/media/fonts
+ $(HALFVERBOSEECHO) [RMKDIR] $(INSTALL_DIR)/symbols
$(RMKDIR) $(INSTALL_DIR)/symbols
+ $(HALFVERBOSEECHO) [RMKDIR] $(INSTALL_DIR)/system32
$(RMKDIR) $(INSTALL_DIR)/system32
+ $(HALFVERBOSEECHO) [RMKDIR] $(INSTALL_DIR)/system32/config
$(RMKDIR) $(INSTALL_DIR)/system32/config
+ $(HALFVERBOSEECHO) [RMKDIR] $(INSTALL_DIR)/system32/drivers
$(RMKDIR) $(INSTALL_DIR)/system32/drivers
+ $(HALFVERBOSEECHO) [RMKDIR] $(INSTALL_DIR)/system32/drivers/etc
$(RMKDIR) $(INSTALL_DIR)/system32/drivers/etc
install_before:
+ $(HALFVERBOSEECHO) [INSTALL] media/inf to $(INSTALL_DIR)/inf
$(CP) media/inf $(INSTALL_DIR)/inf
+ $(HALFVERBOSEECHO) [INSTALL] media/fonts to $(INSTALL_DIR)/media/fonts
$(CP) media/fonts $(INSTALL_DIR)/media/fonts
+ $(HALFVERBOSEECHO) [INSTALL] media/nls to $(INSTALL_DIR)/system32
$(CP) media/nls $(INSTALL_DIR)/system32
+ $(HALFVERBOSEECHO) [INSTALL] media/nls/c_1252.nls to $(INSTALL_DIR)/system32/ansi.nls
$(CP) media/nls/c_1252.nls $(INSTALL_DIR)/system32/ansi.nls
+ $(HALFVERBOSEECHO) [INSTALL] media/nls/c_437.nls to $(INSTALL_DIR)/system32/oem.nls
$(CP) media/nls/c_437.nls $(INSTALL_DIR)/system32/oem.nls
+ $(HALFVERBOSEECHO) [INSTALL] media/nls/l_intl.nls to $(INSTALL_DIR)/system32/casemap.nls
$(CP) media/nls/l_intl.nls $(INSTALL_DIR)/system32/casemap.nls
- $(CP) media/drivers/etc/services \
- $(INSTALL_DIR)/system32/drivers/etc/services
+ $(HALFVERBOSEECHO) [INSTALL] media/drivers/etc/services to $(INSTALL_DIR)/system32/drivers/etc/services
+ $(CP) media/drivers/etc/services $(INSTALL_DIR)/system32/drivers/etc/services
.PHONY: install_clean install_dirs install_before
reactos
diff -u -r1.102 -r1.102.2.1
--- rules.mak 23 Oct 2004 21:05:11 -0000 1.102
+++ rules.mak 13 Dec 2004 09:38:44 -0000 1.102.2.1
@@ -1,17 +1,38 @@
-# Default to verbose mode
+# Default to half-verbose mode
ifeq ($(VERBOSE),no)
Q = @
+ HALFVERBOSEECHO = @:
+ # Do not print "Entering directory ..."
+ export MAKEFLAGS += --no-print-directory
+ # Be silent
+ export MAKEFLAGS += --silent
else
+ifeq ($(VERBOSE),yes)
Q =
+ HALFVERBOSEECHO = @:
+else
+ Q = @
+ # the following is a hack to get the target name for wine dlls
+ # it's disabled because it produces warnings about overriden rules for author.c
+ #ifeq ($(TARGET_TYPE),winedll)
+ # export TOOLS_PATH = $(PATH_TO_TOP)/tools
+ # -include Makefile.ros
+ #endif
+ ifeq ($(TARGET_NAME),)
+ HALFVERBOSEECHO = @echo
+ else
+ HALFVERBOSEECHO = @echo $(TARGET_NAME):
+ endif
+ # Do not print "Entering directory ..."
+ export MAKEFLAGS += --no-print-directory
+ # Be silent
+ export MAKEFLAGS += --silent
+endif
endif
export MAKE := @$(MAKE)
ifeq ($(VERBOSE),no)
-# Do not print "Entering directory ..."
-export MAKEFLAGS += --no-print-directory
-# Be silent
-export MAKEFLAGS += --silent
endif
# Windows is default host environment
@@ -20,8 +41,14 @@
endif
# Default to building map files which includes source and asm code
-ifeq ($(FULL_MAP),)
-export FULL_MAP = yes
+# Other options are: yes
+ifeq ($(BUILD_MAP),)
+export BUILD_MAP = full
+endif
+
+# Default to dumping .sym files out of .nostrip files
+ifeq ($(BUILD_SYM),)
+export BUILD_SYM = yes
endif
# Default to minimal dependencies, making components not
reactos/apps/testsets/loadlib
diff -u -r1.2 -r1.2.28.1
--- loadlib.c 14 Nov 2003 17:13:22 -0000 1.2
+++ loadlib.c 13 Dec 2004 09:38:45 -0000 1.2.28.1
@@ -23,6 +23,7 @@
#include <windows.h>
#include "loadlib.h"
#include <string.h>
+#include <stdlib.h>
#include <wchar.h>
#define APP_VERSION 1
reactos/apps/testsets/loadlib
diff -u -r1.2 -r1.2.28.1
--- makefile 14 Nov 2003 17:13:22 -0000 1.2
+++ makefile 13 Dec 2004 09:38:45 -0000 1.2.28.1
@@ -11,9 +11,7 @@
TARGET_NAME = loadlib
-TARGET_CFLAGS = -Wall -Werror
-
-#TARGET_CFLAGS = -DDBG -DUNICODE -D_UNICODE
+TARGET_CFLAGS = -Wall -Werror -D_USE_W32API -DUNICODE -D_UNICODE
TARGET_SDKLIBS = kernel32.a ntdll.a
reactos/apps/utils
diff -u -r1.12 -r1.12.2.1
--- Makefile 21 Nov 2004 23:00:18 -0000 1.12
+++ Makefile 13 Dec 2004 09:38:45 -0000 1.12.2.1
@@ -11,7 +11,7 @@
# cabman cat net objdir partinfo pice ps sc stats
UTIL_APPS = cat objdir partinfo pnpdump sc shutdown stats tickcount consw rundll32 ps
-UTIL_NET_APPS = arp finger ipconfig netstat ping telnet whois
+UTIL_NET_APPS = arp finger ipconfig netstat ping route telnet whois
all: $(UTIL_APPS) $(UTIL_NET_APPS)
reactos/bootdata
diff -u -r1.74 -r1.74.2.1
--- hivesys.inf 21 Nov 2004 19:11:31 -0000 1.74
+++ hivesys.inf 13 Dec 2004 09:38:45 -0000 1.74.2.1
@@ -451,26 +451,19 @@
HKLM,"SYSTEM\CurrentControlSet\Services\Keyboard","Type",0x00010001,0x00000001
; SB16 driver
-;HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd","Group",0x00000000,"Base"
-;HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd","ServiceType",0x00010001,0x00000001
-;HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd","Type",0x00010001,0x00000001
-;HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd","Start",0x00010001,0x00000001
-;HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd","ErrorControl",0x00010001,0x00000001
-;HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd","ImagePath",0x00020000,"system32\drivers\sb16snd.sys"
-;HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd\Parameters\Device0","DmaChannel",0x00010001,0x00000001
-;HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd\Parameters\Device0","DmaChannel16",0x00010001,0x00000005
-;HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd\Parameters\Device0","Port",0x00010001,0x00000220
-;HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd\Parameters\Device0","Interrupt",0x00010001,0x00000005
-;HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd\Parameters\Device0","DSP Version",0x00010001,0x00000401
-;HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd\Parameters\Device0\Devices","SBWaveIn0",0x00010001,0x00000001
-;HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd\Parameters\Device0\Devices","SBWaveOut0",0x00010001,0x00000002
-
-HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd","Group",0x00000000,"Base"
-HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd","ServiceType",0x00010001,0x00000001
-HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd","Type",0x00010001,0x00000001
-HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd","Start",0x00010001,0x00000001
-HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd","ErrorControl",0x00010001,0x00000001
-HKLM,"SYSTEM\CurrentControlSet\Services\sb16snd","ImagePath",0x00020000,"system32\drivers\sndblst.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","Group",0x00000000,"Base"
+HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","ServiceType",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","ImagePath",0x00020000,"system32\drivers\sndblst.sys"
+;HKLM,"SYSTEM\CurrentControlSet\Services\sndblst\Parameters\Device0","DmaChannel",0x00010001,0x00000001
+;HKLM,"SYSTEM\CurrentControlSet\Services\sndblst\Parameters\Device0","DmaChannel16",0x00010001,0x00000005
+;HKLM,"SYSTEM\CurrentControlSet\Services\sndblst\Parameters\Device0","Port",0x00010001,0x00000220
+;HKLM,"SYSTEM\CurrentControlSet\Services\sndblst\Parameters\Device0","Interrupt",0x00010001,0x00000005
+;HKLM,"SYSTEM\CurrentControlSet\Services\sndblst\Parameters\Device0","DSP Version",0x00010001,0x00000401
+HKLM,"SYSTEM\CurrentControlSet\Services\sndblst\Parameters\Device0\Devices","SBWaveIn0",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\sndblst\Parameters\Device0\Devices","SBWaveOut0",0x00010001,0x00000002
HKLM,"SYSTEM\CurrentControlSet\Services\es137140","Group",0x00000000,"Base"
HKLM,"SYSTEM\CurrentControlSet\Services\es137140","ServiceType",0x00010001,0x00000001
reactos/doc
diff -u -r1.20.2.1 -r1.20.2.2
--- README.WINE 8 Dec 2004 21:56:47 -0000 1.20.2.1
+++ README.WINE 13 Dec 2004 09:38:45 -0000 1.20.2.2
@@ -1,4 +1,4 @@
-# ReactOS WINE porting guide for 0.2
+# ReactOS WINE porting guide for 0.3
# Update this file when you port a dll/program from WINE.
The ReactOS Project shares quite a bit of code with the WINE project.
@@ -39,6 +39,7 @@
reactos/lib/comdlg32 # Synced to Wine-20041201
reactos/lib/dinput # Synced to Wine-20041201
reactos/lib/dinput8 # Synced to Wine-20041201
+reactos/lib/dsound # Synced to Wine-20041201
reactos/lib/icmp # Synced to Wine-20041201
reactos/lib/iphlpapi # Out of sync
reactos/lib/imagehlp # Patches for BindImage need review and submission to winehq.
@@ -46,7 +47,7 @@
reactos/lib/mpr # Synced to Wine-20041201
reactos/lib/msacm # Out of sync
reactos/lib/msi # Synced to Wine-20041201
-reactos/lib/msvidoe # Out of sync
+reactos/lib/msvideo # Out of sync
reactos/lib/netapi32 # Out of sync
reactos/lib/odbc32 # In sync. Depends on port of Linux ODBC.
reactos/lib/ole32 # Synced to Wine-20041201
@@ -68,8 +69,8 @@
reactos/lib/winmm/wavemap # Synced to Wine-20041201
ReactOS shares the following programs with Winehq.
-reactos/subsys/system/regedit #Out of sync
-reactos/subsys/system/expand
+reactos/subsys/system/regedit # Out of sync
+reactos/subsys/system/expand # Out of sync
In addition the following libs, dlls and source files are mostly based on code ported
from Winehq CVS. If you are looking to update something in these files
@@ -78,12 +79,26 @@
reactos/lib/imm32 #
reactos/lib/uuid #
-reactos/lib/user32/controls/button.c
-reactos/lib/user32/controls/edit.c
-reactos/lib/user32/controls/static.c
-reactos/lib/user32/misc/wsprintf.c
-reactos/lib/user32/windows/mdi.c
-reactos/lib/gdi32/objects/linedda.c
-reactos/lib/kernel32/misc/errormsg.c
-reactos/lib/msvcrt/wine/* - C++ exception handing
+advapi32 -
+ reactos/lib/advapi32/crypyto/*.c # Synced to Wine-20041201
+
+gdi32 -
+ reactos/lib/gdi32/objects/linedda.c # Out of sync
+
+kernel32 -
+ reactos/lib/kernel32/misc/errormsg.c # Out of sync
+ reactos/lib/kernel32/misc/profile.c # Out of sync
+ reactos/lib/kernel32/misc/lcformat.c # Out of sync
+
+msvcrt -
+ reactos/lib/msvcrt/wine/*.c # Out of sync
+
+User32 -
+ reactos/lib/user32/controls/button.c # Out of sync
+ reactos/lib/user32/controls/edit.c # Out of sync
+ reactos/lib/user32/controls/static.c # Out of sync
+ reactos/lib/user32/misc/wsprintf.c # Out of sync
+ reactos/lib/user32/windows/mdi.c # Out of sync
+
+
`
\ No newline at end of file
reactos/drivers/dd/null
diff -u -r1.19.10.1 -r1.19.10.2
--- makefile 8 Dec 2004 21:56:47 -0000 1.19.10.1
+++ makefile 13 Dec 2004 09:38:46 -0000 1.19.10.2
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.19.10.1 2004/12/08 21:56:47 hyperion Exp $
+# $Id: makefile,v 1.19.10.2 2004/12/13 09:38:46 hyperion Exp $
PATH_TO_TOP = ../../..
reactos/drivers/fs/cdfs
diff -u -r1.7 -r1.7.28.1
--- common.c 10 Nov 2003 18:07:36 -0000 1.7
+++ common.c 13 Dec 2004 09:38:46 -0000 1.7.28.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: common.c,v 1.7 2003/11/10 18:07:36 ekohl Exp $
+/* $Id: common.c,v 1.7.28.1 2004/12/13 09:38:46 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -146,8 +146,8 @@
DPRINT("CdfsDeviceIoControl(DeviceObject %x, CtlCode %x, "
"InputBuffer %x, InputBufferSize %x, OutputBuffer %x, "
"POutputBufferSize %x (%x)\n", DeviceObject, CtlCode,
- InputBuffer, InputBufferSize, OutputBuffer, pOutputBufferSize,
- pOutputBufferSize ? *pOutputBufferSize : 0);
+ InputBuffer, InputBufferSize, OutputBuffer, OutputBufferSize,
+ OutputBufferSize ? *OutputBufferSize : 0);
KeInitializeEvent (&Event, NotificationEvent, FALSE);
reactos/drivers/fs/vfat
diff -u -r1.15.6.1 -r1.15.6.2
--- cleanup.c 8 Dec 2004 21:56:48 -0000 1.15.6.1
+++ cleanup.c 13 Dec 2004 09:38:46 -0000 1.15.6.2
@@ -1,4 +1,4 @@
-/* $Id: cleanup.c,v 1.15.6.1 2004/12/08 21:56:48 hyperion Exp $
+/* $Id: cleanup.c,v 1.15.6.2 2004/12/13 09:38:46 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/drivers/fs/vfat
diff -u -r1.75.2.1 -r1.75.2.2
--- create.c 8 Dec 2004 21:56:48 -0000 1.75.2.1
+++ create.c 13 Dec 2004 09:38:46 -0000 1.75.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: create.c,v 1.75.2.1 2004/12/08 21:56:48 hyperion Exp $
+/* $Id: create.c,v 1.75.2.2 2004/12/13 09:38:46 hyperion Exp $
*
* PROJECT: ReactOS kernel
* FILE: drivers/fs/vfat/create.c
reactos/drivers/fs/vfat
diff -u -r1.35.2.1 -r1.35.2.2
--- dir.c 8 Dec 2004 21:56:48 -0000 1.35.2.1
+++ dir.c 13 Dec 2004 09:38:46 -0000 1.35.2.2
@@ -1,5 +1,5 @@
/*
- * $Id: dir.c,v 1.35.2.1 2004/12/08 21:56:48 hyperion Exp $
+ * $Id: dir.c,v 1.35.2.2 2004/12/13 09:38:46 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/drivers/fs/vfat
diff -u -r1.17.8.1 -r1.17.8.2
--- direntry.c 8 Dec 2004 21:56:48 -0000 1.17.8.1
+++ direntry.c 13 Dec 2004 09:38:46 -0000 1.17.8.2
@@ -1,4 +1,4 @@
-/* $Id: direntry.c,v 1.17.8.1 2004/12/08 21:56:48 hyperion Exp $
+/* $Id: direntry.c,v 1.17.8.2 2004/12/13 09:38:46 hyperion Exp $
*
*
* FILE: DirEntry.c
reactos/drivers/fs/vfat
diff -u -r1.42.2.1 -r1.42.2.2
--- dirwr.c 8 Dec 2004 21:56:48 -0000 1.42.2.1
+++ dirwr.c 13 Dec 2004 09:38:46 -0000 1.42.2.2
@@ -1,4 +1,4 @@
-/* $Id: dirwr.c,v 1.42.2.1 2004/12/08 21:56:48 hyperion Exp $
+/* $Id: dirwr.c,v 1.42.2.2 2004/12/13 09:38:46 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/drivers/fs/vfat
diff -u -r1.46.8.1 -r1.46.8.2
--- fat.c 8 Dec 2004 21:56:48 -0000 1.46.8.1
+++ fat.c 13 Dec 2004 09:38:46 -0000 1.46.8.2
@@ -1,5 +1,5 @@
/*
- * $Id: fat.c,v 1.46.8.1 2004/12/08 21:56:48 hyperion Exp $
+ * $Id: fat.c,v 1.46.8.2 2004/12/13 09:38:46 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/drivers/fs/vfat
diff -u -r1.42.2.1 -r1.42.2.2
--- fcb.c 8 Dec 2004 21:56:48 -0000 1.42.2.1
+++ fcb.c 13 Dec 2004 09:38:46 -0000 1.42.2.2
@@ -1,4 +1,4 @@
-/* $Id: fcb.c,v 1.42.2.1 2004/12/08 21:56:48 hyperion Exp $
+/* $Id: fcb.c,v 1.42.2.2 2004/12/13 09:38:46 hyperion Exp $
*
*
* FILE: drivers/fs/vfat/fcb.c
reactos/drivers/fs/vfat
diff -u -r1.38.2.1 -r1.38.2.2
--- finfo.c 8 Dec 2004 21:56:48 -0000 1.38.2.1
+++ finfo.c 13 Dec 2004 09:38:46 -0000 1.38.2.2
@@ -1,4 +1,4 @@
-/* $Id: finfo.c,v 1.38.2.1 2004/12/08 21:56:48 hyperion Exp $
+/* $Id: finfo.c,v 1.38.2.2 2004/12/13 09:38:46 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/drivers/fs/vfat
diff -u -r1.36.2.1 -r1.36.2.2
--- fsctl.c 8 Dec 2004 21:56:48 -0000 1.36.2.1
+++ fsctl.c 13 Dec 2004 09:38:46 -0000 1.36.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: fsctl.c,v 1.36.2.1 2004/12/08 21:56:48 hyperion Exp $
+/* $Id: fsctl.c,v 1.36.2.2 2004/12/13 09:38:46 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/drivers/fs/vfat
diff -u -r1.14.2.1 -r1.14.2.2
--- misc.c 8 Dec 2004 21:56:48 -0000 1.14.2.1
+++ misc.c 13 Dec 2004 09:38:46 -0000 1.14.2.2
@@ -1,4 +1,4 @@
-/* $Id: misc.c,v 1.14.2.1 2004/12/08 21:56:48 hyperion Exp $
+/* $Id: misc.c,v 1.14.2.2 2004/12/13 09:38:46 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/drivers/fs/vfat
diff -u -r1.71.2.1 -r1.71.2.2
--- rw.c 8 Dec 2004 21:56:48 -0000 1.71.2.1
+++ rw.c 13 Dec 2004 09:38:46 -0000 1.71.2.2
@@ -1,5 +1,5 @@
-/* $Id: rw.c,v 1.71.2.1 2004/12/08 21:56:48 hyperion Exp $
+/* $Id: rw.c,v 1.71.2.2 2004/12/13 09:38:46 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/drivers/fs/vfat
diff -u -r1.8.34.1 -r1.8.34.2
--- shutdown.c 8 Dec 2004 21:56:48 -0000 1.8.34.1
+++ shutdown.c 13 Dec 2004 09:38:46 -0000 1.8.34.2
@@ -1,4 +1,4 @@
-/* $Id: shutdown.c,v 1.8.34.1 2004/12/08 21:56:48 hyperion Exp $
+/* $Id: shutdown.c,v 1.8.34.2 2004/12/13 09:38:46 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/drivers/fs/vfat
diff -u -r1.69.2.1 -r1.69.2.2
--- vfat.h 8 Dec 2004 21:56:48 -0000 1.69.2.1
+++ vfat.h 13 Dec 2004 09:38:46 -0000 1.69.2.2
@@ -1,4 +1,4 @@
-/* $Id: vfat.h,v 1.69.2.1 2004/12/08 21:56:48 hyperion Exp $ */
+/* $Id: vfat.h,v 1.69.2.2 2004/12/13 09:38:46 hyperion Exp $ */
#include <ddk/ntifs.h>
reactos/drivers/fs/vfat
diff -u -r1.27.2.1 -r1.27.2.2
--- volume.c 8 Dec 2004 21:56:48 -0000 1.27.2.1
+++ volume.c 13 Dec 2004 09:38:47 -0000 1.27.2.2
@@ -1,4 +1,4 @@
-/* $Id: volume.c,v 1.27.2.1 2004/12/08 21:56:48 hyperion Exp $
+/* $Id: volume.c,v 1.27.2.2 2004/12/13 09:38:47 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/drivers/lib/ip
diff -u -r1.7.2.1 -r1.7.2.2
--- makefile 8 Dec 2004 21:56:49 -0000 1.7.2.1
+++ makefile 13 Dec 2004 09:38:47 -0000 1.7.2.2
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.7.2.1 2004/12/08 21:56:49 hyperion Exp $
+# $Id: makefile,v 1.7.2.2 2004/12/13 09:38:47 hyperion Exp $
PATH_TO_TOP = ../../..
reactos/drivers/lib/ip/network
diff -u -r1.5.2.1 -r1.5.2.2
--- loopback.c 8 Dec 2004 21:56:49 -0000 1.5.2.1
+++ loopback.c 13 Dec 2004 09:38:47 -0000 1.5.2.2
@@ -39,6 +39,9 @@
IPPacket.NdisPacket = NdisPacket;
IPPacket.HeaderSize = 0;
GetDataPtr( NdisPacket, 0, (PCHAR *)&IPPacket.Header, &IPPacket.TotalSize );
+ IPPacket.Header += Offset;
+ IPPacket.ContigSize = IPPacket.TotalSize;
+ IPPacket.Position = Offset;
TI_DbgPrint(MAX_TRACE,
("Doing receive (complete: %x, context %x, packet %x)\n",
reactos/drivers/lib/ip/network
diff -u -r1.4.2.1 -r1.4.2.2
--- neighbor.c 8 Dec 2004 21:56:49 -0000 1.4.2.1
+++ neighbor.c 13 Dec 2004 09:38:47 -0000 1.4.2.2
@@ -30,8 +30,9 @@
PNEIGHBOR_PACKET Packet;
/* Send any waiting packets */
- if( !IsListEmpty( &NCE->PacketQueue ) ) {
- PacketEntry = RemoveHeadList( &NCE->PacketQueue );
+ PacketEntry = ExInterlockedRemoveHeadList(&NCE->PacketQueue,
+ &NCE->Table->Lock);
+ if( PacketEntry != NULL ) {
Packet = CONTAINING_RECORD( PacketEntry, NEIGHBOR_PACKET, Next );
TI_DbgPrint
@@ -57,8 +58,9 @@
PLIST_ENTRY PacketEntry;
PNEIGHBOR_PACKET Packet;
- while( !IsListEmpty( &NCE->PacketQueue ) ) {
- PacketEntry = RemoveHeadList( &NCE->PacketQueue );
+ PacketEntry = ExInterlockedRemoveHeadList(&NCE->PacketQueue,
+ &NCE->Table->Lock);
+ while( PacketEntry != NULL ) {
Packet = CONTAINING_RECORD
( PacketEntry, NEIGHBOR_PACKET, Next );
@@ -78,6 +80,8 @@
}
PoolFreeBuffer( Packet );
+ PacketEntry = ExInterlockedRemoveHeadList(&NCE->PacketQueue,
+ &NCE->Table->Lock);
}
}
@@ -448,11 +452,11 @@
Packet->Packet = NdisPacket;
InsertTailList( &NCE->PacketQueue, &Packet->Next );
+ TcpipReleaseSpinLock(Lock, OldIrql);
+
if( NCE->State & NUD_CONNECTED )
NBSendPackets( NCE );
- TcpipReleaseSpinLock(Lock, OldIrql);
-
return TRUE;
}
reactos/drivers/lib/ip/network
diff -u -r1.1 -r1.1.2.1
--- ports.c 14 Nov 2004 21:28:21 -0000 1.1
+++ ports.c 13 Dec 2004 09:38:47 -0000 1.1.2.1
@@ -51,7 +51,25 @@
ExAcquireFastMutex( &PortSet->Mutex );
AllocatedPort = RtlFindClearBits( &PortSet->ProtoBitmap, 1, 0 );
if( AllocatedPort != (ULONG)-1 ) {
- RtlSetBits( &PortSet->ProtoBitmap, AllocatedPort, 1 );
+ RtlSetBit( &PortSet->ProtoBitmap, AllocatedPort );
+ AllocatedPort += PortSet->StartingPort;
+ }
+ ExReleaseFastMutex( &PortSet->Mutex );
+
+ return AllocatedPort;
+}
+
+ULONG AllocatePortFromRange( PPORT_SET PortSet, ULONG Lowest, ULONG Highest ) {
+ ULONG AllocatedPort;
+
+ Lowest -= PortSet->StartingPort;
+ Highest -= PortSet->StartingPort;
+
+ ExAcquireFastMutex( &PortSet->Mutex );
+ AllocatedPort = RtlFindClearBits( &PortSet->ProtoBitmap, 1, Lowest );
+ if( AllocatedPort != (ULONG)-1 && AllocatedPort >= Lowest &&
+ AllocatedPort <= Highest) {
+ RtlSetBit( &PortSet->ProtoBitmap, AllocatedPort );
AllocatedPort += PortSet->StartingPort;
}
ExReleaseFastMutex( &PortSet->Mutex );
reactos/drivers/lib/ip/network
diff -u -r1.3.2.1 -r1.3.2.2
--- receive.c 8 Dec 2004 21:56:49 -0000 1.3.2.1
+++ receive.c 13 Dec 2004 09:38:47 -0000 1.3.2.2
@@ -395,7 +395,7 @@
/* If this is the first fragment, save the IP header */
if (FragFirst == 0) {
TI_DbgPrint(DEBUG_IP, ("First fragment found. Header buffer is at (0x%X). "
- "Header size is (%d).\n", IPDR->IPv4Header, IPPacket->HeaderSize));
+ "Header size is (%d).\n", &IPDR->IPv4Header, IPPacket->HeaderSize));
RtlCopyMemory(&IPDR->IPv4Header, IPPacket->Header, IPPacket->HeaderSize);
IPDR->HeaderSize = IPPacket->HeaderSize;
reactos/drivers/lib/ip/transport/tcp
diff -u -r1.7.2.1 -r1.7.2.2
--- event.c 8 Dec 2004 21:56:51 -0000 1.7.2.1
+++ event.c 13 Dec 2004 09:38:47 -0000 1.7.2.2
@@ -96,13 +96,8 @@
Packet.SrcAddr = LocalAddress;
Packet.DstAddr = RemoteAddress;
-<<<<<<< event.c
- IPSendDatagram( &Packet, NCE, TCPPacketSendComplete, NULL );
-
-=======
IPSendDatagram( &Packet, NCE, TCPPacketSendComplete, NULL );
->>>>>>> 1.11
if( !NT_SUCCESS(NdisStatus) ) return OSK_EINVAL;
else return 0;
}
reactos/drivers/lib/ip/transport/tcp
diff -u -r1.9.2.1 -r1.9.2.2
--- tcp.c 8 Dec 2004 21:56:51 -0000 1.9.2.1
+++ tcp.c 13 Dec 2004 09:38:47 -0000 1.9.2.2
@@ -17,6 +17,132 @@
LIST_ENTRY SleepingThreadsList;
FAST_MUTEX SleepingThreadsLock;
RECURSIVE_MUTEX TCPLock;
+PORT_SET TCPPorts;
+
+static VOID HandleSignalledConnection( PCONNECTION_ENDPOINT Connection,
+ ULONG NewState ) {
+ NTSTATUS Status = STATUS_SUCCESS;
+ PTCP_COMPLETION_ROUTINE Complete;
+ PTDI_BUCKET Bucket;
+ PLIST_ENTRY Entry;
+ BOOLEAN CompletedOne = FALSE;
+
+ /* Things that can happen when we try the initial connection */
+ if( ((NewState & SEL_CONNECT) || (NewState & SEL_FIN)) &&
+
+ !(Connection->State & (SEL_CONNECT | SEL_FIN)) ) {
+ while( !IsListEmpty( &Connection->ConnectRequest ) ) {
+ Connection->State |= NewState & (SEL_CONNECT | SEL_FIN);
+ Entry = RemoveHeadList( &Connection->ConnectRequest );
+ Bucket = CONTAINING_RECORD( Entry, TDI_BUCKET, Entry );
+ Complete = Bucket->Request.RequestNotifyObject;
+ TI_DbgPrint(DEBUG_TCP,
+ ("Completing Connect Request %x\n", Bucket->Request));
+ if( NewState & SEL_FIN ) Status = STATUS_CONNECTION_REFUSED;
+ Complete( Bucket->Request.RequestContext, Status, 0 );
+ /* Frees the bucket allocated in TCPConnect */
+ PoolFreeBuffer( Bucket );
+ }
+ }
+
+ /* Things that happen after we're connected */
+ if( (NewState & SEL_READ) ) {
+ TI_DbgPrint(DEBUG_TCP,("Readable: irp list %s\n",
+ IsListEmpty(&Connection->ReceiveRequest) ?
+ "empty" : "nonempty"));
+
+ while( !IsListEmpty( &Connection->ReceiveRequest ) ) {
+ PIRP Irp;
+ OSK_UINT RecvLen = 0, Received = 0;
+ OSK_PCHAR RecvBuffer = 0;
+ PMDL Mdl;
+ NTSTATUS Status;
+
+ Entry = RemoveHeadList( &Connection->ReceiveRequest );
+ Bucket = CONTAINING_RECORD( Entry, TDI_BUCKET, Entry );
+ Complete = Bucket->Request.RequestNotifyObject;
+
+ TI_DbgPrint(DEBUG_TCP,
+ ("Readable, Completing read request %x\n",
+ Bucket->Request));
+
+ Irp = Bucket->Request.RequestContext;
+ Mdl = Irp->MdlAddress;
+
+ TI_DbgPrint(DEBUG_TCP,
+ ("Getting the user buffer from %x\n", Mdl));
+
+ NdisQueryBuffer( Mdl, &RecvBuffer, &RecvLen );
+
+ TI_DbgPrint(DEBUG_TCP,
+ ("Reading %d bytes to %x\n", RecvLen, RecvBuffer));
+
+ TI_DbgPrint(DEBUG_TCP, ("Connection: %x\n", Connection));
+ TI_DbgPrint
+ (DEBUG_TCP,
+ ("Connection->SocketContext: %x\n",
+ Connection->SocketContext));
+ TI_DbgPrint(DEBUG_TCP, ("RecvBuffer: %x\n", RecvBuffer));
+
+ Status = TCPTranslateError
+ ( OskitTCPRecv( Connection->SocketContext,
+ RecvBuffer,
+ RecvLen,
+ &Received,
+ 0 ) );
+
+ TI_DbgPrint(DEBUG_TCP,("TCP Bytes: %d\n", Received));
+
+ if( Status == STATUS_SUCCESS ) {
+ TI_DbgPrint(DEBUG_TCP,("Received %d bytes with status %x\n",
+ Received, Status));
+
+ TI_DbgPrint(DEBUG_TCP,
+ ("Completing Receive Request: %x\n",
+ Bucket->Request));
+
+ Complete( Bucket->Request.RequestContext,
+ STATUS_SUCCESS, Received );
+ CompletedOne = TRUE;
+ } else if( Status == STATUS_PENDING ) {
+ InsertHeadList( &Connection->ReceiveRequest,
+ &Bucket->Entry );
+ break;
+ } else {
+ TI_DbgPrint(DEBUG_TCP,
+ ("Completing Receive request: %x %x\n",
+ Bucket->Request, Status));
+ Complete( Bucket->Request.RequestContext, Status, 0 );
+ CompletedOne = TRUE;
+ }
+ }
+ }
+ if( NewState & SEL_FIN ) {
+ TI_DbgPrint(DEBUG_TCP, ("EOF From socket\n"));
+
+ while( !IsListEmpty( &Connection->ReceiveRequest ) ) {
+ Entry = RemoveHeadList( &Connection->ReceiveRequest );
+ Bucket = CONTAINING_RECORD( Entry, TDI_BUCKET, Entry );
+ Complete = Bucket->Request.RequestNotifyObject;
+
+ Complete( Bucket->Request.RequestContext, STATUS_SUCCESS, 0 );
+ }
+ }
+
+ Connection->Signalled = FALSE;
+}
+
+VOID DrainSignals() {
+ PCONNECTION_ENDPOINT Connection;
+ PLIST_ENTRY ListEntry;
+
+ while( !IsListEmpty( &SignalledConnections ) ) {
+ ListEntry = RemoveHeadList( &SignalledConnections );
+ Connection = CONTAINING_RECORD( ListEntry, CONNECTION_ENDPOINT,
+ SignalList );
+ HandleSignalledConnection( Connection, Connection->SignalState );
+ }
+}
static VOID HandleSignalledConnection( PCONNECTION_ENDPOINT Connection,
ULONG NewState ) {
@@ -268,6 +394,8 @@
InitializeListHead( &SleepingThreadsList );
InitializeListHead( &SignalledConnections );
+ PortsStartup( &TCPPorts, 1, 0xfffe );
+
RegisterOskitTCPEventHandlers( &EventHandlers );
InitOskitTCP();
@@ -308,6 +436,8 @@
DeinitOskitTCP();
+ PortsShutdown( &TCPPorts );
+
return STATUS_SUCCESS;
}
@@ -422,7 +552,7 @@
TcpipRecursiveMutexLeave( &TCPLock );
- if( Status == OSK_EINPROGRESS || Status == STATUS_SUCCESS )
+ if( Status == OSK_EINPROGRESS )
return STATUS_PENDING;
else
return Status;
@@ -491,26 +621,41 @@
UINT Backlog,
PTCP_COMPLETION_ROUTINE Complete,
PVOID Context) {
- NTSTATUS Status;
+ NTSTATUS Status;
+ SOCKADDR_IN AddressToBind;
- TI_DbgPrint(DEBUG_TCP,("TCPListen started\n"));
+ TI_DbgPrint(DEBUG_TCP,("TCPListen started\n"));
- TI_DbgPrint(DEBUG_TCP,("Connection->SocketContext %x\n",
- Connection->SocketContext));
+ TI_DbgPrint(DEBUG_TCP,("Connection->SocketContext %x\n",
+ Connection->SocketContext));
- ASSERT(Connection);
- ASSERT_KM_POINTER(Connection->SocketContext);
+ ASSERT(Connection);
+ ASSERT_KM_POINTER(Connection->SocketContext);
+ ASSERT_KM_POINTER(Connection->AddressFile);
- TcpipRecursiveMutexEnter( &TCPLock, TRUE );
+ TcpipRecursiveMutexEnter( &TCPLock, TRUE );
+
+ AddressToBind.sin_family = AF_INET;
+ memcpy( &AddressToBind.sin_addr,
+ &Connection->AddressFile->Address.Address.IPv4Address,
+ sizeof(AddressToBind.sin_addr) );
+ AddressToBind.sin_port = Connection->AddressFile->Port;
+
+ TI_DbgPrint(DEBUG_TCP,("AddressToBind - %x:%x\n", AddressToBind.sin_addr, AddressToBind.sin_port));
+
+ OskitTCPBind( Connection->SocketContext,
+ Connection,
+ &AddressToBind,
+ sizeof(AddressToBind) );
- Status = TCPTranslateError( OskitTCPListen( Connection->SocketContext,
+ Status = TCPTranslateError( OskitTCPListen( Connection->SocketContext,
Backlog ) );
- TcpipRecursiveMutexLeave( &TCPLock );
+ TcpipRecursiveMutexLeave( &TCPLock );
- TI_DbgPrint(DEBUG_TCP,("TCPListen finished %x\n", Status));
+ TI_DbgPrint(DEBUG_TCP,("TCPListen finished %x\n", Status));
- return Status;
+ return Status;
}
NTSTATUS TCPAccept
@@ -633,4 +778,15 @@
TcpipRecursiveMutexLeave( &TCPLock );
}
+UINT TCPAllocatePort( UINT HintPort ) {
+ if( HintPort ) {
+ if( AllocatePort( &TCPPorts, HintPort ) ) return HintPort;
+ else return (UINT)-1;
+ } else return AllocatePortFromRange( &TCPPorts, 1024, 5000 );
+}
+
+VOID TCPFreePort( UINT Port ) {
+ DeallocatePort( &TCPPorts, Port );
+}
+
/* EOF */
reactos/drivers/lib/oskittcp/oskittcp
diff -u -r1.3 -r1.3.6.1
--- in_pcb.c 23 Sep 2004 03:02:29 -0000 1.3
+++ in_pcb.c 13 Dec 2004 09:38:48 -0000 1.3.6.1
@@ -150,6 +150,7 @@
if (lport) {
struct inpcb *t;
+#ifndef __REACTOS__
/* GROSS */
if (ntohs(lport) < IPPORT_RESERVED &&
(error = suser(p->p_ucred, &p->p_acflag))) {
@@ -157,6 +158,7 @@
("Leaving EACCESS\n"));
return (EACCES);
}
+#endif
t = in_pcblookup(head, zeroin_addr, 0,
sin->sin_addr, lport, wild);
if (t && (reuseport & t->inp_socket->so_options) == 0)
reactos/drivers/lib/oskittcp/oskittcp
diff -u -r1.16.2.1 -r1.16.2.2
--- interface.c 8 Dec 2004 21:56:51 -0000 1.16.2.1
+++ interface.c 13 Dec 2004 09:38:48 -0000 1.16.2.2
@@ -324,7 +324,13 @@
}
int OskitTCPListen( void *socket, int backlog ) {
- return solisten( socket, backlog );
+ int error;
+
+ OS_DbgPrint(OSK_MID_TRACE,("Called, socket = %08x\n", socket));
+ error = solisten( socket, backlog );
+ OS_DbgPrint(OSK_MID_TRACE,("Ending: %08x\n", error));
+
+ return error;
}
void OskitTCPSetAddress( void *socket,
reactos/drivers/lib/oskittcp/oskittcp
diff -u -r1.5.6.1 -r1.5.6.2
--- tcp_output.c 8 Dec 2004 21:56:51 -0000 1.5.6.1
+++ tcp_output.c 13 Dec 2004 09:38:48 -0000 1.5.6.2
@@ -707,6 +707,25 @@
((struct ip *)ti)->ip_off |= IP_DF;
}
#endif
+ /*
+ * XXX: It seems that osktittcp expects that packets are
+ * synchronously processed. The current implementation feeds
+ * oskittcp with the packets asynchronously. That's not a
+ * problem normally when the packets are transfered over
+ * network, but it starts to be a problem when it comes to
+ * loopback packets.
+ * The ACK bits are set in tcp_input which calls tcp_output and
+ * expects them to be cleared before further processing.
+ * Instead tcp_output calls ip_output which produces a packet
+ * and ends up in tcp_input and we're stuck in infinite loop.
+ * Normally the flags are masked out at the end of this function
+ * and the incomming packets are processed then, but since
+ * currently the loopback packet is delivered during the
+ * ip_output call, the function end is never reached...
+ */
+#ifdef __REACTOS__
+ tp->t_flags &= ~(TF_ACKNOW|TF_DELACK);
+#endif
error = ip_output(m, tp->t_inpcb->inp_options, &tp->t_inpcb->inp_route,
so->so_options & SO_DONTROUTE, 0);
}
reactos/drivers/net/afd/afd
diff -u -r1.5.2.1 -r1.5.2.2
--- connect.c 8 Dec 2004 21:56:51 -0000 1.5.2.1
+++ connect.c 13 Dec 2004 09:38:48 -0000 1.5.2.2
@@ -1,4 +1,4 @@
-/* $Id: connect.c,v 1.5.2.1 2004/12/08 21:56:51 hyperion Exp $
+/* $Id: connect.c,v 1.5.2.2 2004/12/13 09:38:48 hyperion Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/connect.c
@@ -191,7 +191,7 @@
TdiBuildConnectionInfo
( &TargetAddress,
- ((PTRANSPORT_ADDRESS)&ConnectReq->RemoteAddress) );
+ &ConnectReq->RemoteAddress );
if( TargetAddress ) {
Status = TdiConnect( &FCB->PendingTdiIrp,
reactos/drivers/net/afd/afd
diff -u -r1.4.8.1 -r1.4.8.2
--- info.c 8 Dec 2004 21:56:51 -0000 1.4.8.1
+++ info.c 13 Dec 2004 09:38:48 -0000 1.4.8.2
@@ -1,4 +1,4 @@
-/* $Id: info.c,v 1.4.8.1 2004/12/08 21:56:51 hyperion Exp $
+/* $Id: info.c,v 1.4.8.2 2004/12/13 09:38:48 hyperion Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/info.c
@@ -60,3 +60,53 @@
return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL, FALSE );
}
+
+NTSTATUS STDCALL
+AfdGetSockName( PDEVICE_OBJECT DeviceObject, PIRP Irp,
+ PIO_STACK_LOCATION IrpSp ) {
+ NTSTATUS Status = STATUS_SUCCESS;
+ PFILE_OBJECT FileObject = IrpSp->FileObject;
+ PAFD_FCB FCB = FileObject->FsContext;
+ PMDL Mdl;
+
+ AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB));
+
+ if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp, FALSE );
+
+ if( FCB->AddressFile.Object == NULL) {
+ return UnlockAndMaybeComplete( FCB, STATUS_UNSUCCESSFUL, Irp, 0,
+ NULL, FALSE );
+ }
+
+ Mdl = IoAllocateMdl
+ ( Irp->UserBuffer,
+ IrpSp->Parameters.DeviceIoControl.OutputBufferLength,
+ FALSE,
+ FALSE,
+ NULL );
+
+ if( Mdl != NULL ) {
+ _SEH_TRY {
+ MmProbeAndLockPages( Mdl, Irp->RequestorMode, IoModifyAccess );
+ } _SEH_HANDLE {
+ AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
+ Status = _SEH_GetExceptionCode();
+ } _SEH_END;
+
+ if( NT_SUCCESS(Status) ) {
+ Status = TdiQueryInformation
+ ( FCB->AddressFile.Object,
+ TDI_QUERY_ADDRESS_INFO,
+ Mdl );
+ }
+
+ /* MmUnlockPages( Mdl ); */
+ IoFreeMdl( Mdl );
+ } else {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ }
+
+ AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status));
+
+ return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL, FALSE );
+}
reactos/drivers/net/afd/afd
diff -u -r1.13.2.1 -r1.13.2.2
--- main.c 8 Dec 2004 21:56:51 -0000 1.13.2.1
+++ main.c 13 Dec 2004 09:38:48 -0000 1.13.2.2
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.13.2.1 2004/12/08 21:56:51 hyperion Exp $
+/* $Id: main.c,v 1.13.2.2 2004/12/13 09:38:48 hyperion Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/main.c
@@ -359,6 +359,9 @@
case IOCTL_AFD_DISCONNECT:
return AfdDisconnect( DeviceObject, Irp, IrpSp );
+ case IOCTL_AFD_GET_SOCK_NAME:
+ return AfdGetSockName( DeviceObject, Irp, IrpSp );
+
case IOCTL_AFD_GET_TDI_HANDLES:
AFD_DbgPrint(MIN_TRACE, ("IOCTL_AFD_GET_TDI_HANDLES\n"));
break;
reactos/drivers/net/afd/afd
diff -u -r1.12.2.1 -r1.12.2.2
--- read.c 8 Dec 2004 21:56:51 -0000 1.12.2.1
+++ read.c 13 Dec 2004 09:38:49 -0000 1.12.2.2
@@ -1,4 +1,4 @@
-/* $Id: read.c,v 1.12.2.1 2004/12/08 21:56:51 hyperion Exp $
+/* $Id: read.c,v 1.12.2.2 2004/12/13 09:38:49 hyperion Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/read.c
reactos/drivers/net/afd/afd
diff -u -r1.7.2.1 -r1.7.2.2
--- select.c 8 Dec 2004 21:56:51 -0000 1.7.2.1
+++ select.c 13 Dec 2004 09:38:49 -0000 1.7.2.2
@@ -1,4 +1,4 @@
-/* $Id: select.c,v 1.7.2.1 2004/12/08 21:56:51 hyperion Exp $
+/* $Id: select.c,v 1.7.2.2 2004/12/13 09:38:49 hyperion Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/select.c
reactos/drivers/net/afd/afd
diff -u -r1.5 -r1.5.2.1
--- tdiconn.c 15 Nov 2004 18:24:57 -0000 1.5
+++ tdiconn.c 13 Dec 2004 09:38:49 -0000 1.5.2.1
@@ -1,4 +1,4 @@
-/* $Id: tdiconn.c,v 1.5 2004/11/15 18:24:57 arty Exp $
+/* $Id: tdiconn.c,v 1.5.2.1 2004/12/13 09:38:49 hyperion Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/tdiconn.c
@@ -16,6 +16,7 @@
case AF_INET:
return sizeof(TA_IP_ADDRESS);
default:
+ AFD_DbgPrint(MID_TRACE,("TdiAddressSizeFromType - invalid type: %x\n", AddressType));
KeBugCheck( 0 );
}
return 0;
reactos/drivers/net/afd/afd
diff -u -r1.12.2.1 -r1.12.2.2
--- write.c 8 Dec 2004 21:56:51 -0000 1.12.2.1
+++ write.c 13 Dec 2004 09:38:49 -0000 1.12.2.2
@@ -1,4 +1,4 @@
-/* $Id: write.c,v 1.12.2.1 2004/12/08 21:56:51 hyperion Exp $
+/* $Id: write.c,v 1.12.2.2 2004/12/13 09:38:49 hyperion Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/write.c
reactos/drivers/net/afd/include
diff -u -r1.25.2.1 -r1.25.2.2
--- afd.h 8 Dec 2004 21:56:51 -0000 1.25.2.1
+++ afd.h 13 Dec 2004 09:38:49 -0000 1.25.2.2
@@ -1,4 +1,4 @@
-/* $Id: afd.h,v 1.25.2.1 2004/12/08 21:56:51 hyperion Exp $
+/* $Id: afd.h,v 1.25.2.2 2004/12/13 09:38:49 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -178,6 +178,10 @@
AfdGetInfo( PDEVICE_OBJECT DeviceObject, PIRP Irp,
PIO_STACK_LOCATION IrpSp );
+NTSTATUS STDCALL
+AfdGetSockName( PDEVICE_OBJECT DeviceObject, PIRP Irp,
+ PIO_STACK_LOCATION IrpSp );
+
/* listen.c */
NTSTATUS AfdListenSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
reactos/drivers/net/afd/include
diff -u -r1.3.6.1 -r1.3.6.2
--- tdi_proto.h 8 Dec 2004 21:56:52 -0000 1.3.6.1
+++ tdi_proto.h 13 Dec 2004 09:38:49 -0000 1.3.6.2
@@ -24,4 +24,9 @@
PTDI_CONNECTION_INFORMATION RequestConnectionInfo,
PTDI_CONNECTION_INFORMATION ReturnConnectionInfo );
+NTSTATUS TdiQueryInformation(
+ PFILE_OBJECT FileObject,
+ LONG QueryType,
+ PMDL MdlBuffer);
+
#endif/*_TDI_PROTO_H*/
reactos/drivers/net/afd
diff -u -r1.14.2.1 -r1.14.2.2
--- makefile 8 Dec 2004 21:56:52 -0000 1.14.2.1
+++ makefile 13 Dec 2004 09:38:49 -0000 1.14.2.2
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.14.2.1 2004/12/08 21:56:52 hyperion Exp $
+# $Id: makefile,v 1.14.2.2 2004/12/13 09:38:49 hyperion Exp $
PATH_TO_TOP = ../../..
reactos/drivers/net/tcpip/datalink
diff -u -r1.27.2.1 -r1.27.2.2
--- lan.c 8 Dec 2004 21:56:52 -0000 1.27.2.1
+++ lan.c 13 Dec 2004 09:38:49 -0000 1.27.2.2
@@ -10,6 +10,31 @@
#include "precomp.h"
+/* Define this to bugcheck on double complete */
+/* #define BREAK_ON_DOUBLE_COMPLETE */
+
+UINT TransferDataCalled = 0;
+UINT TransferDataCompleteCalled = 0;
+UINT LanReceiveWorkerCalled = 0;
+
+#define NGFP(_Packet) \
+ { \
+ PVOID _Header; \
+ ULONG _ContigSize, _TotalSize; \
+ PNDIS_BUFFER _NdisBuffer; \
+ \
+ TI_DbgPrint(MID_TRACE,("Checking Packet %x\n", _Packet)); \
+ NdisGetFirstBufferFromPacket(_Packet, \
+ &_NdisBuffer, \
+ &_Header, \
+ &_ContigSize, \
+ &_TotalSize); \
+ TI_DbgPrint(MID_TRACE,("NdisBuffer: %x\n", _NdisBuffer)); \
+ TI_DbgPrint(MID_TRACE,("Header : %x\n", _Header)); \
+ TI_DbgPrint(MID_TRACE,("ContigSize: %x\n", _ContigSize)); \
+ TI_DbgPrint(MID_TRACE,("TotalSize : %x\n", _TotalSize)); \
+ }
+
typedef struct _LAN_WQ_ITEM {
LIST_ENTRY ListEntry;
PNDIS_PACKET Packet;
@@ -27,6 +52,54 @@
LIST_ENTRY LanWorkList;
WORK_QUEUE_ITEM LanWorkItem;
+/* Double complete protection */
+KSPIN_LOCK LanSendCompleteLock;
+LIST_ENTRY LanSendCompleteList;
+
+VOID LanChainCompletion( PLAN_ADAPTER Adapter, PNDIS_PACKET NdisPacket ) {
+ PLAN_WQ_ITEM PendingCompletion =
+ ExAllocatePool( NonPagedPool, sizeof(LAN_WQ_ITEM) );
+
+ if( !PendingCompletion ) return;
+
+ PendingCompletion->Packet = NdisPacket;
+ PendingCompletion->Adapter = Adapter;
+
+ ExInterlockedInsertTailList( &LanSendCompleteList,
+ &PendingCompletion->ListEntry,
+ &LanSendCompleteLock );
+}
+
+BOOLEAN LanShouldComplete( PLAN_ADAPTER Adapter, PNDIS_PACKET NdisPacket ) {
+ PLIST_ENTRY ListEntry;
+ PLAN_WQ_ITEM CompleteEntry;
+ KIRQL OldIrql;
+
+ KeAcquireSpinLock( &LanSendCompleteLock, &OldIrql );
+ for( ListEntry = LanSendCompleteList.Flink;
+ ListEntry != &LanSendCompleteList;
+ ListEntry = ListEntry->Flink ) {
+ CompleteEntry = CONTAINING_RECORD(ListEntry, LAN_WQ_ITEM, ListEntry);
+
+ if( CompleteEntry->Adapter == Adapter &&
+ CompleteEntry->Packet == NdisPacket ) {
+ RemoveEntryList( ListEntry );
+ KeReleaseSpinLock( &LanSendCompleteLock, OldIrql );
+ ExFreePool( CompleteEntry );
+ return TRUE;
+ }
+ }
+ KeReleaseSpinLock( &LanSendCompleteLock, OldIrql );
+
+ TI_DbgPrint(MID_TRACE,("NDIS completed the same send packet twice "
+ "(Adapter %x Packet %x)!!\n", Adapter, NdisPacket));
+#ifdef BREAK_ON_DOUBLE_COMPLETE
+ KeBugCheck(0);
+#endif
+
+ return FALSE;
+}
+
NDIS_STATUS NDISCall(
PLAN_ADAPTER Adapter,
NDIS_REQUEST_TYPE Type,
@@ -181,11 +254,13 @@
*/
{
TI_DbgPrint(DEBUG_DATALINK, ("Calling completion routine\n"));
- ASSERT_KM_POINTER(Packet);
- ASSERT_KM_POINTER(PC(Packet));
- ASSERT_KM_POINTER(PC(Packet)->DLComplete);
- (*PC(Packet)->DLComplete)( PC(Packet)->Context, Packet, Status);
- TI_DbgPrint(DEBUG_DATALINK, ("Finished\n"));
+ if( LanShouldComplete( (PLAN_ADAPTER)BindingContext, Packet ) ) {
+ ASSERT_KM_POINTER(Packet);
+ ASSERT_KM_POINTER(PC(Packet));
+ ASSERT_KM_POINTER(PC(Packet)->DLComplete);
+ (*PC(Packet)->DLComplete)( PC(Packet)->Context, Packet, Status);
+ TI_DbgPrint(DEBUG_DATALINK, ("Finished\n"));
+ }
}
VOID STDCALL LanReceiveWorker( PVOID Context ) {
@@ -198,12 +273,14 @@
PNDIS_BUFFER NdisBuffer;
IP_PACKET IPPacket;
-
TI_DbgPrint(DEBUG_DATALINK, ("Called.\n"));
while( (ListEntry =
ExInterlockedRemoveHeadList( &LanWorkList, &LanWorkLock )) ) {
WorkItem = CONTAINING_RECORD(ListEntry, LAN_WQ_ITEM, ListEntry);
+
+ LanReceiveWorkerCalled++;
+ ASSERT(LanReceiveWorkerCalled <= TransferDataCompleteCalled);
Packet = WorkItem->Packet;
Adapter = WorkItem->Adapter;
@@ -273,14 +350,25 @@
BOOLEAN WorkStart;
PLAN_WQ_ITEM WQItem;
PLAN_ADAPTER Adapter = (PLAN_ADAPTER)BindingContext;
+ KIRQL OldIrql;
+
+ ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL);
ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL);
if( Status != NDIS_STATUS_SUCCESS ) return;
+ TcpipAcquireSpinLock( &LanWorkLock, &OldIrql );
+
+ TransferDataCompleteCalled++;
+
+ ASSERT(TransferDataCompleteCalled <= TransferDataCalled);
+
WQItem = ExAllocatePool( NonPagedPool, sizeof(LAN_WQ_ITEM) );
- if( !WQItem ) return;
+ if( !WQItem ) {
+ TcpipReleaseSpinLock( &LanWorkLock, OldIrql );
+ return;
+ }
- TcpipAcquireSpinLockAtDpcLevel( &LanWorkLock );
WorkStart = IsListEmpty( &LanWorkList );
WQItem->Packet = Packet;
WQItem->Adapter = Adapter;
@@ -288,7 +376,7 @@
InsertTailList( &LanWorkList, &WQItem->ListEntry );
if( WorkStart )
ExQueueWorkItem( &LanWorkItem, CriticalWorkQueue );
- TcpipReleaseSpinLockFromDpcLevel( &LanWorkLock );
+ TcpipReleaseSpinLock( &LanWorkLock, OldIrql );
}
NDIS_STATUS STDCALL ProtocolReceive(
@@ -322,6 +410,7 @@
PNDIS_PACKET NdisPacket;
PLAN_ADAPTER Adapter = (PLAN_ADAPTER)BindingContext;
PETH_HEADER EHeader = (PETH_HEADER)HeaderBuffer;
+ KIRQL OldIrql;
TI_DbgPrint(DEBUG_DATALINK, ("Called. (packetsize %d)\n",PacketSize));
@@ -359,9 +448,12 @@
TI_DbgPrint(DEBUG_DATALINK, ("Adapter: %x (MTU %d)\n",
Adapter, Adapter->MTU));
+ TcpipAcquireSpinLock( &LanWorkLock, &OldIrql );
+
NdisStatus = AllocatePacketWithBuffer( &NdisPacket, NULL,
PacketSize + HeaderBufferSize );
if( NdisStatus != NDIS_STATUS_SUCCESS ) {
+ TcpipReleaseSpinLock( &LanWorkLock, OldIrql );
return NDIS_STATUS_NOT_ACCEPTED;
}
@@ -374,6 +466,8 @@
IPPacket.NdisPacket = NdisPacket;
IPPacket.Position = 0;
+ TransferDataCalled++;
+
if (LookaheadBufferSize == PacketSize)
{
/* Optimized code path for packets that are fully contained in
@@ -398,6 +492,7 @@
BytesTransferred = 0;
}
}
+ TcpipReleaseSpinLock( &LanWorkLock, OldIrql );
TI_DbgPrint(DEBUG_DATALINK, ("Calling complete\n"));
if (NdisStatus != NDIS_STATUS_PENDING)
@@ -576,6 +671,7 @@
TcpipAcquireSpinLock( &Adapter->Lock, &OldIrql );
TI_DbgPrint(MID_TRACE, ("NdisSend\n"));
NdisSend(&NdisStatus, Adapter->NdisHandle, NdisPacket);
+ LanChainCompletion( Adapter, NdisPacket );
TI_DbgPrint(MID_TRACE, ("NdisSend Done\n"));
TcpipReleaseSpinLock( &Adapter->Lock, OldIrql );
@@ -1181,6 +1277,8 @@
VOID LANStartup() {
InitializeListHead( &LanWorkList );
+ InitializeListHead( &LanSendCompleteList );
+ KeInitializeSpinLock( &LanSendCompleteLock );
ExInitializeWorkItem( &LanWorkItem, LanReceiveWorker, NULL );
}
@@ -1197,6 +1295,15 @@
ExFreePool( WorkItem );
}
TcpipReleaseSpinLock( &LanWorkLock, OldIrql );
+
+ KeAcquireSpinLock( &LanSendCompleteLock, &OldIrql );
+ while( !IsListEmpty( &LanSendCompleteList ) ) {
+ ListEntry = RemoveHeadList( &LanSendCompleteList );
+ WorkItem = CONTAINING_RECORD(ListEntry, LAN_WQ_ITEM, ListEntry);
+ FreeNdisPacket( WorkItem->Packet );
+ ExFreePool( WorkItem );
+ }
+ KeReleaseSpinLock( &LanSendCompleteLock, OldIrql );
}
/* EOF */
reactos/drivers/net/tcpip/include
diff -u -r1.1 -r1.1.2.1
--- ports.h 14 Nov 2004 19:45:16 -0000 1.1
+++ ports.h 13 Dec 2004 09:38:49 -0000 1.1.2.1
@@ -26,5 +26,6 @@
VOID DeallocatePort( PPORT_SET PortSet, ULONG Port );
BOOLEAN AllocatePort( PPORT_SET PortSet, ULONG Port );
ULONG AllocateAnyPort( PPORT_SET PortSet );
+ULONG AllocatePortFromRange( PPORT_SET PortSet, ULONG Lowest, ULONG Highest );
#endif/*_TCPIP_PORTS_H*/
reactos/drivers/net/tcpip/include
diff -u -r1.11.6.1 -r1.11.6.2
--- tcp.h 8 Dec 2004 21:56:52 -0000 1.11.6.1
+++ tcp.h 13 Dec 2004 09:38:49 -0000 1.11.6.2
@@ -153,6 +153,10 @@
VOID TCPTimeout();
+UINT TCPAllocatePort( UINT HintPort );
+
+VOID TCPFreePort( UINT Port );
+
NTSTATUS TCPStartup(
VOID);
reactos/drivers/net/tcpip
diff -u -r1.31.2.1 -r1.31.2.2
--- makefile 8 Dec 2004 21:56:53 -0000 1.31.2.1
+++ makefile 13 Dec 2004 09:38:49 -0000 1.31.2.2
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.31.2.1 2004/12/08 21:56:53 hyperion Exp $
+# $Id: makefile,v 1.31.2.2 2004/12/13 09:38:49 hyperion Exp $
PATH_TO_TOP = ../../..
reactos/drivers/net/tcpip/tcpip
diff -u -r1.2 -r1.2.2.1
--- buffer.c 7 Nov 2004 20:37:19 -0000 1.2
+++ buffer.c 13 Dec 2004 09:38:50 -0000 1.2.2.1
@@ -370,6 +370,7 @@
ExFreePool( NewData );
UntrackFL( File, Line, Packet );
FreeNdisPacket( Packet );
+ return Status;
}
TrackWithTag(NDIS_BUFFER_TAG, Buffer, File, Line);
reactos/drivers/net/tcpip/tcpip
diff -u -r1.26.2.1 -r1.26.2.2
--- dispatch.c 8 Dec 2004 21:56:53 -0000 1.26.2.1
+++ dispatch.c 13 Dec 2004 09:38:50 -0000 1.26.2.2
@@ -554,7 +554,8 @@
}
if (MmGetMdlByteCount(Irp->MdlAddress) <
- (sizeof(TDI_ADDRESS_INFO) + sizeof(TDI_ADDRESS_IP))) {
+ (FIELD_OFFSET(TDI_ADDRESS_INFO, Address.Address[0].Address) +
+ sizeof(TDI_ADDRESS_IP))) {
TI_DbgPrint(MID_TRACE, ("MDL buffer too small.\n"));
return STATUS_BUFFER_OVERFLOW;
}
reactos/drivers/net/tcpip/tcpip
diff -u -r1.24.2.1 -r1.24.2.2
--- fileobjs.c 8 Dec 2004 21:56:53 -0000 1.24.2.1
+++ fileobjs.c 13 Dec 2004 09:38:50 -0000 1.24.2.2
@@ -268,7 +268,7 @@
switch (Protocol) {
case IPPROTO_TCP:
/* FIXME: If specified port is 0, a port is chosen dynamically */
- AddrFile->Port = Address->Address[0].Address[0].sin_port;
+ AddrFile->Port = TCPAllocatePort(Address->Address[0].Address[0].sin_port);
AddrFile->Send = NULL; /* TCPSendData */
break;
@@ -346,7 +346,17 @@
AF_CLR_VALID(AddrFile);
TcpipReleaseSpinLock(&AddrFile->Lock, OldIrql);
- UDPFreePort( AddrFile->Port );
+
+ /* Protocol specific handling */
+ switch (AddrFile->Protocol) {
+ case IPPROTO_TCP:
+ TCPFreePort( AddrFile->Port );
+ break;
+
+ case IPPROTO_UDP:
+ UDPFreePort( AddrFile->Port );
+ break;
+ }
DeleteAddress(AddrFile);
reactos/drivers/video/displays/vga/main
diff -u -r1.3.20.1 -r1.3.20.2
--- enable.c 8 Dec 2004 21:56:53 -0000 1.3.20.1
+++ enable.c 13 Dec 2004 09:38:50 -0000 1.3.20.2
@@ -1,9 +1,9 @@
/*
* entry.c
*
- * $Revision: 1.3.20.1 $
+ * $Revision: 1.3.20.2 $
* $Author: hyperion $
- * $Date: 2004/12/08 21:56:53 $
+ * $Date: 2004/12/13 09:38:50 $
*
*/
@@ -258,12 +258,6 @@
}
PDev->KMDriver = Driver;
DPRINT( "PDev: %x, Driver: %x\n", PDev, PDev->KMDriver );
- PDev->xyCursor.x = 320;
- PDev->xyCursor.y = 240;
- PDev->ptlExtent.x = 0;
- PDev->ptlExtent.y = 0;
- PDev->cExtent = 0;
- PDev->flCursor = CURSOR_DOWN;
gaulCap.ulHorzRes = 640;
gaulCap.ulVertRes = 480;
reactos/drivers/video/displays/vga/objects
diff -u -r1.3 -r1.3.10.1
--- pointer.c 3 Jul 2004 13:45:42 -0000 1.3
+++ pointer.c 13 Dec 2004 09:38:50 -0000 1.3.10.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: pointer.c,v 1.3 2004/07/03 13:45:42 navaraf Exp $
+/* $Id: pointer.c,v 1.3.10.1 2004/12/13 09:38:50 hyperion Exp $
*
* PROJECT: ReactOS VGA16 display driver
* FILE: drivers/dd/vga/display/objects/pointer.c
@@ -33,8 +33,6 @@
/* GLOBALS *******************************************************************/
-static LONG oldx, oldy;
-static PSAVED_SCREEN_BITS ImageBehindCursor = NULL;
static VOID VGADDI_HideCursor(PPDEV ppdev);
static VOID VGADDI_ShowCursor(PPDEV ppdev, PRECTL prcl);
@@ -166,6 +164,9 @@
ULONG CursorWidth = 32, CursorHeight = 32;
ULONG PointerAttributesSize;
ULONG SavedMemSize;
+
+ ppdev->xyHotSpot.x = 0;
+ ppdev->xyHotSpot.y = 0;
/* Determine the size of the pointer attributes */
PointerAttributesSize = sizeof(VIDEO_POINTER_ATTRIBUTES) +
@@ -184,7 +185,7 @@
/* Allocate memory for the pixels behind the cursor */
SavedMemSize = ((((CursorWidth + 7) & ~0x7) + 16) * CursorHeight) >> 3;
- ImageBehindCursor = VGADDI_AllocSavedScreenBits(SavedMemSize);
+ ppdev->ImageBehindCursor = VGADDI_AllocSavedScreenBits(SavedMemSize);
return(TRUE);
}
@@ -197,20 +198,15 @@
{
PPDEV ppdev = (PPDEV)pso->dhpdev;
- if (x < 0 && 0 == (ppdev->flCursor & CURSOR_DOWN))
- {
- /* x < 0 and y < 0 indicates we must hide the cursor */
- VGADDI_HideCursor(ppdev);
- return;
- }
+ VGADDI_HideCursor(ppdev);
- ppdev->xyCursor.x = x;
- ppdev->xyCursor.y = y;
+ if(x != -1)
+ {
+ ppdev->pPointerAttributes->Column = x;
+ ppdev->pPointerAttributes->Row = y;
- if (0 == (ppdev->flCursor & CURSOR_DOWN))
- {
- VGADDI_ShowCursor(ppdev, prcl);
- }
+ VGADDI_ShowCursor(ppdev, prcl);
+ }
}
@@ -230,20 +226,14 @@
ULONG NewWidth, NewHeight;
PUCHAR Src, Dest;
ULONG i;
-
- /* Hide the cursor */
- if (ppdev->pPointerAttributes->Enable != 0
- && 0 == (ppdev->flCursor & CURSOR_DOWN))
- {
- VGADDI_HideCursor(ppdev);
- }
-
+
if (! psoMask)
{
- ppdev->flCursor = CURSOR_DOWN;
- return SPS_ACCEPT_EXCLUDE;
+ return SPS_DECLINE;
}
- ppdev->flCursor = ppdev->flCursor & (~ CURSOR_DOWN);
+
+ /* Hide the cursor */
+ VGADDI_HideCursor(ppdev);
NewWidth = abs(psoMask->lDelta) << 3;
NewHeight = (psoMask->cjBits / abs(psoMask->lDelta)) / 2;
@@ -270,9 +260,9 @@
ppdev->pPointerAttributes = NewPointerAttributes;
/* Reallocate the space for the saved bits. */
- VGADDI_FreeSavedScreenBits(ImageBehindCursor);
+ VGADDI_FreeSavedScreenBits(ppdev->ImageBehindCursor);
SavedMemSize = ((((NewWidth + 7) & ~0x7) + 16) * NewHeight) >> 3;
- ImageBehindCursor = VGADDI_AllocSavedScreenBits(SavedMemSize);
+ ppdev->ImageBehindCursor = VGADDI_AllocSavedScreenBits(SavedMemSize);
}
Src = (PUCHAR)psoMask->pvScan0;
@@ -293,13 +283,17 @@
}
/* Set the new cursor position */
- ppdev->xyCursor.x = x;
- ppdev->xyCursor.y = y;
ppdev->xyHotSpot.x = xHot;
ppdev->xyHotSpot.y = yHot;
- /* Show the cursor */
- VGADDI_ShowCursor(ppdev, prcl);
+ if(x != -1)
+ {
+ ppdev->pPointerAttributes->Column = x;
+ ppdev->pPointerAttributes->Row = y;
+
+ /* show the cursor */
+ VGADDI_ShowCursor(ppdev, prcl);
+ }
return SPS_ACCEPT_EXCLUDE;
}
@@ -322,18 +316,25 @@
static VOID
VGADDI_HideCursor(PPDEV ppdev)
{
- RECTL Rect;
-
- VGADDI_ComputePointerRect(ppdev, oldx, oldy, &Rect);
-
- /* Display what was behind cursor */
- VGADDI_BltFromSavedScreenBits(Rect.left,
- Rect.top,
- ImageBehindCursor,
- Rect.right - Rect.left,
- Rect.bottom - Rect.top);
-
- ppdev->pPointerAttributes->Enable = 0;
+ if(ppdev->pPointerAttributes->Enable)
+ {
+ LONG cx, cy;
+ RECTL Rect;
+
+ ppdev->pPointerAttributes->Enable = 0;
+
+ cx = ppdev->pPointerAttributes->Column - ppdev->xyHotSpot.x;
+ cy = ppdev->pPointerAttributes->Row - ppdev->xyHotSpot.y;
+
+ VGADDI_ComputePointerRect(ppdev, cx, cy, &Rect);
+
+ /* Display what was behind cursor */
+ VGADDI_BltFromSavedScreenBits(Rect.left,
+ Rect.top,
+ ppdev->ImageBehindCursor,
+ Rect.right - Rect.left,
+ Rect.bottom - Rect.top);
+ }
}
static VOID
@@ -343,19 +344,21 @@
PUCHAR AndMask, XorMask;
ULONG SizeX, SizeY;
RECTL Rect;
+
+ if(ppdev->pPointerAttributes->Enable)
+ {
+ return;
+ }
+ /* Mark the cursor as currently displayed. */
+ ppdev->pPointerAttributes->Enable = 1;
- if (ppdev->pPointerAttributes->Enable != 0)
- {
- VGADDI_HideCursor(ppdev);
- }
-
- cx = ppdev->xyCursor.x - ppdev->xyHotSpot.x;
- cy = ppdev->xyCursor.y - ppdev->xyHotSpot.y;
+ cx = ppdev->pPointerAttributes->Column - ppdev->xyHotSpot.x;
+ cy = ppdev->pPointerAttributes->Row - ppdev->xyHotSpot.y;
/* Capture pixels behind the cursor */
VGADDI_ComputePointerRect(ppdev, cx, cy, &Rect);
- VGADDI_BltToSavedScreenBits(ImageBehindCursor,
+ VGADDI_BltToSavedScreenBits(ppdev->ImageBehindCursor,
Rect.left,
Rect.top,
Rect.right - Rect.left,
@@ -384,13 +387,6 @@
ppdev->pPointerAttributes->WidthInBytes,
VGA_XOR);
- /* Save the new cursor location. */
- oldx = cx;
- oldy = cy;
-
- /* Mark the cursor as currently displayed. */
- ppdev->pPointerAttributes->Enable = 1;
-
if (NULL != prcl)
{
*prcl = Rect;
reactos/drivers/video/displays/vga
diff -u -r1.3 -r1.3.20.1
--- vgaddi.h 22 Mar 2004 16:00:38 -0000 1.3
+++ vgaddi.h 13 Dec 2004 09:38:50 -0000 1.3.20.1
@@ -25,8 +25,15 @@
USHORT y;
} XYPAIR;
+typedef struct _SAVED_SCREEN_BITS
+{
+ BOOL Free;
+ DWORD Offset;
+ ULONG Size;
+ LIST_ENTRY ListEntry;
+} SAVED_SCREEN_BITS, *PSAVED_SCREEN_BITS;
+
// Cursor states
-#define CURSOR_DOWN 0x00000001
#define CURSOR_COLOR 0x00000004
#define CURSOR_HW 0x00000010
#define CURSOR_HW_ACTIVE 0x00000020
@@ -43,14 +50,11 @@
PVOID AssociatedSurf; // associated surface
// Cursor
- XYPAIR xyCursor; // cursor position
XYPAIR xyHotSpot; // cursor hotspot
- POINTL ptlExtent; // cursor extent
- ULONG cExtent; // effective cursor extent
- ULONG flCursor; // cursor status
// Pointer
PVIDEO_POINTER_ATTRIBUTES pPointerAttributes; // HW Pointer Attributes
+ PSAVED_SCREEN_BITS ImageBehindCursor;
ULONG XorMaskStartOffset; // Start offset of hardware pointer
// XOR mask relative to AND mask for
// passing to HW pointer
@@ -92,32 +96,6 @@
//typedef VOID (*PFN_BankControl)(PDEVSURF, ULONG, BANK_JUST);
typedef VOID (*PFN_BankControl)(PVOID, ULONG, BANK_JUST);
-#if 0
-// descriptor for a saved screen bits block
-
-typedef struct _SAVED_SCREEN_BITS
-{
- BOOL bFlags;
- PBYTE pjBuffer; // pointer to save buffer start
- ULONG ulSize; // size of save buffer (per plane; display memory only)
- ULONG ulSaveWidthInBytes; // # of bytes across save area (including
- // partial edge bytes, if any)
- ULONG ulDelta; // # of bytes from end of one saved scan's saved bits to
- // start of next (system memory only)
- PVOID pvNextSSB; // pointer to next saved screen bits block
- // for system memory blocks, saved bits start immediately
- // after this structure
-} SAVED_SCREEN_BITS, *PSAVED_SCREEN_BITS;
-#else
-typedef struct _SAVED_SCREEN_BITS
-{
- BOOL Free;
- DWORD Offset;
- ULONG Size;
- LIST_ENTRY ListEntry;
-} SAVED_SCREEN_BITS, *PSAVED_SCREEN_BITS;
-#endif
-
// DEVSURF -- definition of a surface as seen and used by the various VGA
// drivers
reactos/include/afd
diff -u -r1.11.2.1 -r1.11.2.2
--- shared.h 8 Dec 2004 21:56:57 -0000 1.11.2.1
+++ shared.h 13 Dec 2004 09:38:50 -0000 1.11.2.2
@@ -194,6 +194,7 @@
#define AFD_SEND_DATAGRAM 8
#define AFD_SELECT 9
#define AFD_DISCONNECT 10
+#define AFD_GET_SOCK_NAME 11
#define AFD_GET_TDI_HANDLES 13
#define AFD_SET_INFO 14
#define AFD_GET_CONTEXT 16
@@ -240,6 +241,8 @@
_AFD_CONTROL_CODE(AFD_SELECT, METHOD_BUFFERED )
#define IOCTL_AFD_DISCONNECT \
_AFD_CONTROL_CODE(AFD_DISCONNECT, METHOD_NEITHER)
+#define IOCTL_AFD_GET_SOCK_NAME \
+ _AFD_CONTROL_CODE(AFD_GET_SOCK_NAME, METHOD_NEITHER)
#define IOCTL_AFD_GET_TDI_HANDLES \
_AFD_CONTROL_CODE(AFD_GET_TDI_HANDLES, METHOD_NEITHER)
#define IOCTL_AFD_SET_INFO \
@@ -389,17 +392,6 @@
INT Status;
} FILE_REPLY_CONNECT, *PFILE_REPLY_CONNECT;
-
-typedef struct _FILE_REQUEST_GETNAME {
- BOOL Peer;
-} FILE_REQUEST_GETNAME, *PFILE_REQUEST_GETNAME;
-
-typedef struct _FILE_REPLY_GETNAME {
- INT Status;
- SOCKADDR Name;
- INT NameSize;
-} FILE_REPLY_GETNAME, *PFILE_REPLY_GETNAME;
-
#endif /*__AFD_SHARED_H */
/* EOF */
reactos/include/ddk
diff -u -r1.43.2.1 -r1.43.2.2
--- exfuncs.h 8 Dec 2004 21:56:57 -0000 1.43.2.1
+++ exfuncs.h 13 Dec 2004 09:38:50 -0000 1.43.2.2
@@ -678,6 +678,16 @@
IN PEX_RUNDOWN_REF RunRef,
IN ULONG Count
);
+/* ReactOS Specific: begin */
+VOID STDCALL
+ExRosDumpPagedPoolByTag (
+ IN ULONG Tag
+ );
+ULONG STDCALL
+ExRosQueryPoolTag (
+ IN PVOID Block
+ );
+/* ReactOS Specific: end */
VOID
FASTCALL
ExRundownCompleted (
reactos/include/ddk
diff -u -r1.46.2.1 -r1.46.2.2
--- iofuncs.h 8 Dec 2004 21:56:57 -0000 1.46.2.1
+++ iofuncs.h 13 Dec 2004 09:38:50 -0000 1.46.2.2
@@ -1,6 +1,6 @@
#ifndef _INCLUDE_DDK_IOFUNCS_H
#define _INCLUDE_DDK_IOFUNCS_H
-/* $Id: iofuncs.h,v 1.46.2.1 2004/12/08 21:56:57 hyperion Exp $ */
+/* $Id: iofuncs.h,v 1.46.2.2 2004/12/13 09:38:50 hyperion Exp $ */
#ifdef __NTOSKRNL__
extern POBJECT_TYPE EXPORTED IoAdapterObjectType;
reactos/include/ddk
diff -u -r1.69.2.1 -r1.69.2.2
--- iotypes.h 8 Dec 2004 21:56:57 -0000 1.69.2.1
+++ iotypes.h 13 Dec 2004 09:38:50 -0000 1.69.2.2
@@ -1,4 +1,4 @@
-/* $Id: iotypes.h,v 1.69.2.1 2004/12/08 21:56:57 hyperion Exp $
+/* $Id: iotypes.h,v 1.69.2.2 2004/12/13 09:38:50 hyperion Exp $
*
*/
reactos/include/napi
diff -u -r1.21 -r1.21.2.1
--- win32.h 20 Nov 2004 16:46:04 -0000 1.21
+++ win32.h 13 Dec 2004 09:38:51 -0000 1.21.2.1
@@ -32,8 +32,8 @@
LIST_ENTRY CursorIconListHead;
struct _KBDTABLES* KeyboardLayout;
ULONG Flags;
- WORD GDIObjects;
- WORD UserObjects;
+ LONG GDIObjects;
+ LONG UserObjects;
} W32PROCESS, *PW32PROCESS;
PW32THREAD STDCALL
reactos/include/ntdll
diff -u -r1.27 -r1.27.2.1
--- ldr.h 19 Nov 2004 01:30:34 -0000 1.27
+++ ldr.h 13 Dec 2004 09:38:51 -0000 1.27.2.1
@@ -68,7 +68,7 @@
HANDLE SectionHandle;
ULONG CheckSum;
ULONG TimeDateStamp;
-#ifdef KDBG
+#if defined(DBG) || defined(KDBG)
IMAGE_SYMBOL_INFO SymbolInfo;
#endif /* KDBG */
} LDR_MODULE, *PLDR_MODULE;
@@ -85,7 +85,7 @@
#define RVA(m, b) ((ULONG)b + m)
-#ifdef KDBG
+#if defined(KDBG) || defined(DBG)
VOID
LdrpLoadUserModuleSymbols(PLDR_MODULE LdrModule);
reactos/include/ntdll
diff -u -r1.52.2.1 -r1.52.2.2
--- rtl.h 8 Dec 2004 21:56:57 -0000 1.52.2.1
+++ rtl.h 13 Dec 2004 09:38:51 -0000 1.52.2.2
@@ -1,4 +1,4 @@
-/* $Id: rtl.h,v 1.52.2.1 2004/12/08 21:56:57 hyperion Exp $
+/* $Id: rtl.h,v 1.52.2.2 2004/12/13 09:38:51 hyperion Exp $
*
*/
reactos/include/ntos
diff -u -r1.9.2.1 -r1.9.2.2
--- haltypes.h 8 Dec 2004 21:56:57 -0000 1.9.2.1
+++ haltypes.h 13 Dec 2004 09:38:51 -0000 1.9.2.2
@@ -1,4 +1,4 @@
-/* $Id: haltypes.h,v 1.9.2.1 2004/12/08 21:56:57 hyperion Exp $
+/* $Id: haltypes.h,v 1.9.2.2 2004/12/13 09:38:51 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/include/ntos
diff -u -r1.38.2.1 -r1.38.2.2
--- rtl.h 8 Dec 2004 21:56:57 -0000 1.38.2.1
+++ rtl.h 13 Dec 2004 09:38:51 -0000 1.38.2.2
@@ -1,4 +1,4 @@
-/* $Id: rtl.h,v 1.38.2.1 2004/12/08 21:56:57 hyperion Exp $
+/* $Id: rtl.h,v 1.38.2.2 2004/12/13 09:38:51 hyperion Exp $
*
*/
#ifndef __DDK_RTL_H
reactos/include/ntos
diff -u -r1.19 -r1.19.6.1
--- security.h 10 Aug 2004 20:13:38 -0000 1.19
+++ security.h 13 Dec 2004 09:38:51 -0000 1.19.6.1
@@ -188,10 +188,10 @@
typedef ULONG SECURITY_IMPERSONATION_LEVEL, *PSECURITY_IMPERSONATION_LEVEL;
-#define SecurityAnonymous ((SECURITY_IMPERSONATION_LEVEL)1)
-#define SecurityIdentification ((SECURITY_IMPERSONATION_LEVEL)2)
-#define SecurityImpersonation ((SECURITY_IMPERSONATION_LEVEL)3)
-#define SecurityDelegation ((SECURITY_IMPERSONATION_LEVEL)4)
+#define SecurityAnonymous ((SECURITY_IMPERSONATION_LEVEL)0)
+#define SecurityIdentification ((SECURITY_IMPERSONATION_LEVEL)1)
+#define SecurityImpersonation ((SECURITY_IMPERSONATION_LEVEL)2)
+#define SecurityDelegation ((SECURITY_IMPERSONATION_LEVEL)3)
typedef ULONG ACCESS_MASK, *PACCESS_MASK;
typedef ULONG TOKEN_TYPE, *PTOKEN_TYPE;
reactos/include/ntos
diff -u -r1.35.2.2 -r1.35.2.3
--- zw.h 13 Dec 2004 05:55:31 -0000 1.35.2.2
+++ zw.h 13 Dec 2004 09:38:51 -0000 1.35.2.3
@@ -1,5 +1,5 @@
-/* $Id: zw.h,v 1.35.2.2 2004/12/13 05:55:31 hyperion Exp $
+/* $Id: zw.h,v 1.35.2.3 2004/12/13 09:38:51 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -5839,7 +5839,7 @@
IN HANDLE ExistingToken,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
+ IN BOOLEAN EffectiveOnly,
IN TOKEN_TYPE TokenType,
OUT PHANDLE NewToken
);
reactos/include/win32k
diff -u -r1.26 -r1.26.4.1
--- bitmaps.h 12 Sep 2004 19:47:48 -0000 1.26
+++ bitmaps.h 13 Dec 2004 09:38:52 -0000 1.26.4.1
@@ -26,11 +26,12 @@
/* Internal interface */
#define BITMAPOBJ_AllocBitmap() \
- ((HBITMAP) GDIOBJ_AllocObj (sizeof (BITMAPOBJ), GDI_OBJECT_TYPE_BITMAP, (GDICLEANUPPROC) Bitmap_InternalDelete))
+ ((HBITMAP) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_BITMAP))
#define BITMAPOBJ_FreeBitmap(hBMObj) \
- GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP, GDIOBJFLAG_DEFAULT)
+ GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP)
#define BITMAPOBJ_LockBitmap(hBMObj) GDIOBJ_LockObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP)
-#define BITMAPOBJ_UnlockBitmap(hBMObj) GDIOBJ_UnlockObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP)
+#define BITMAPOBJ_UnlockBitmap(hBMObj) GDIOBJ_UnlockObj((HGDIOBJ) hBMObj)
+BOOL INTERNAL_CALL BITMAP_Cleanup(PVOID ObjectBody);
INT FASTCALL BITMAPOBJ_GetWidthBytes (INT bmWidth, INT bpp);
HBITMAP FASTCALL BITMAPOBJ_CopyBitmap (HBITMAP hBitmap);
@@ -38,7 +39,6 @@
int STDCALL DIB_GetDIBImageBytes (INT width, INT height, INT depth);
INT FASTCALL DIB_BitmapInfoSize (const BITMAPINFO * info, WORD coloruse);
INT STDCALL BITMAP_GetObject(BITMAPOBJ * bmp, INT count, LPVOID buffer);
-BOOL FASTCALL Bitmap_InternalDelete( PBITMAPOBJ pBmp );
HBITMAP FASTCALL BitmapToSurf(PBITMAPOBJ BitmapObj, HDEV GDIDevice);
HBITMAP FASTCALL IntCreateCompatibleBitmap(PDC Dc, INT Width, INT Height);
reactos/include/win32k
diff -u -r1.18 -r1.18.4.1
--- brush.h 12 Sep 2004 19:47:48 -0000 1.18
+++ brush.h 13 Dec 2004 09:38:52 -0000 1.18.4.1
@@ -68,10 +68,11 @@
#define GDIBRUSH_IS_MASKING 0x8000 /* Pattern bitmap is used as transparent mask (?) */
#define GDIBRUSH_CACHED_IS_SOLID 0x80000000
-#define BRUSHOBJ_AllocBrush() ((HBRUSH) GDIOBJ_AllocObj (sizeof(GDIBRUSHOBJ), GDI_OBJECT_TYPE_BRUSH, (GDICLEANUPPROC) Brush_InternalDelete))
-#define BRUSHOBJ_FreeBrush(hBrush) GDIOBJ_FreeObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH, GDIOBJFLAG_DEFAULT)
+#define BRUSHOBJ_AllocBrush() ((HBRUSH) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_BRUSH))
+#define BRUSHOBJ_FreeBrush(hBrush) GDIOBJ_FreeObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH)
#define BRUSHOBJ_LockBrush(hBrush) ((PGDIBRUSHOBJ)GDIOBJ_LockObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH))
-#define BRUSHOBJ_UnlockBrush(hBrush) GDIOBJ_UnlockObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH)
+#define BRUSHOBJ_UnlockBrush(hBrush) GDIOBJ_UnlockObj((HGDIOBJ)hBrush)
+BOOL INTERNAL_CALL BRUSH_Cleanup(PVOID ObjectBody);
#ifdef __USE_W32API
typedef struct _PATRECT {
reactos/include/win32k
diff -u -r1.39 -r1.39.4.1
--- dc.h 12 Sep 2004 19:47:48 -0000 1.39
+++ dc.h 13 Dec 2004 09:38:52 -0000 1.39.4.1
@@ -108,6 +108,26 @@
WIN_DC_INFO w;
} DC, *PDC;
+typedef struct _GDIPOINTER /* should stay private to ENG */
+{
+ /* private GDI pointer handling information, required for software emulation */
+ BOOL Enabled;
+ POINTL Pos;
+ SIZEL Size;
+ POINTL HotSpot;
+ XLATEOBJ *XlateObject;
+ HSURF ColorSurface;
+ HSURF MaskSurface;
+ HSURF SaveSurface;
+
+ /* public pointer information */
+ RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */
+ PGD_MOVEPOINTER MovePointer;
+ ULONG Status;
+ BOOL SafetySwitch;
+ UINT SafetyRemoveCount;
+} GDIPOINTER, *PGDIPOINTER;
+
typedef struct
{
HANDLE Handle;
@@ -119,21 +139,7 @@
DRIVER_FUNCTIONS DriverFunctions;
PFILE_OBJECT VideoFileObject;
- PGD_MOVEPOINTER MovePointer;
-
- struct {
- BOOL Enable;
- LONG Column;
- LONG Row;
- LONG Width;
- LONG Height;
- } PointerAttributes;
- XLATEOBJ *PointerXlateObject;
- HSURF PointerColorSurface;
- HSURF PointerMaskSurface;
- HSURF PointerSaveSurface;
- POINTL PointerHotSpot;
- ULONG PointerStatus;
+ GDIPOINTER Pointer;
} GDIDEVICE;
/* Internal functions */
@@ -141,16 +147,16 @@
#define DC_LockDc(hDC) \
((PDC) GDIOBJ_LockObj ((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC))
#define DC_UnlockDc(hDC) \
- GDIOBJ_UnlockObj ((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC)
+ GDIOBJ_UnlockObj ((HGDIOBJ) hDC)
HDC FASTCALL RetrieveDisplayHDC(VOID);
HDC FASTCALL DC_AllocDC(PUNICODE_STRING Driver);
VOID FASTCALL DC_InitDC(HDC DCToInit);
HDC FASTCALL DC_FindOpenDC(PUNICODE_STRING Driver);
VOID FASTCALL DC_FreeDC(HDC DCToFree);
+BOOL INTERNAL_CALL DC_Cleanup(PVOID ObjectBody);
HDC FASTCALL DC_GetNextDC (PDC pDC);
VOID FASTCALL DC_SetNextDC (PDC pDC, HDC hNextDC);
-BOOL FASTCALL DC_InternalDeleteDC( PDC DCToDelete );
VOID FASTCALL DC_SetOwnership(HDC DC, PEPROCESS Owner);
VOID FASTCALL DC_UpdateXforms(PDC dc);
reactos/include/win32k
diff -u -r1.26 -r1.26.4.1
--- gdiobj.h 12 Sep 2004 19:47:48 -0000 1.26
+++ gdiobj.h 13 Dec 2004 09:38:52 -0000 1.26.4.1
@@ -8,6 +8,26 @@
#include <ddk/ntddk.h>
+/* base address where the handle table is mapped to */
+#define GDI_HANDLE_TABLE_BASE_ADDRESS (0x400000)
+
+/* gdi handle table can hold 0x4000 handles */
+#define GDI_HANDLE_COUNT 0x4000
+
+#define GDI_GLOBAL_PROCESS (0x0)
+
+#define GDI_HANDLE_INDEX_MASK (GDI_HANDLE_COUNT - 1)
+#define GDI_HANDLE_TYPE_MASK 0x007f0000
+#define GDI_HANDLE_STOCK_MASK 0x00800000
+
+#define GDI_HANDLE_CREATE(i, t) ((HANDLE)(((i) & GDI_HANDLE_INDEX_MASK) | ((t) & GDI_HANDLE_TYPE_MASK)))
+#define GDI_HANDLE_GET_INDEX(h) (((DWORD)(h)) & GDI_HANDLE_INDEX_MASK)
+#define GDI_HANDLE_GET_TYPE(h) (((DWORD)(h)) & GDI_HANDLE_TYPE_MASK)
+#define GDI_HANDLE_IS_TYPE(h, t) ((t) == (((DWORD)(h)) & GDI_HANDLE_TYPE_MASK))
+#define GDI_HANDLE_IS_STOCKOBJ(h) (0 != (((DWORD)(h)) & GDI_HANDLE_STOCK_MASK))
+#define GDI_HANDLE_SET_STOCKOBJ(h) ((h) = (HANDLE)(((DWORD)(h)) | GDI_HANDLE_STOCK_MASK))
+
+
/*! \defgroup GDI object types
*
* GDI object types
@@ -35,28 +55,18 @@
typedef PVOID PGDIOBJ;
-typedef BOOL (FASTCALL *GDICLEANUPPROC)(PGDIOBJ Obj);
-
-#define GDIOBJ_USE_FASTMUTEX
+typedef BOOL (INTERNAL_CALL *GDICLEANUPPROC)(PVOID ObjectBody);
/*!
* GDI object header. This is a part of any GDI object
*/
typedef struct _GDIOBJHDR
{
- DWORD dwCount; /* reference count for the object */
- HANDLE hProcessId;
- GDICLEANUPPROC CleanupProc;
- WORD wTableIndex;
- WORD Magic;
+ PETHREAD LockingThread; /* only assigned if a thread is holding the lock! */
+ ULONG Locks;
+#ifdef GDI_DEBUG
const char* lockfile;
int lockline;
-#ifdef GDIOBJ_USE_FASTMUTEX
- FAST_MUTEX Lock;
- DWORD RecursiveLockCount;
-#else
- DWORD LockTid;
- DWORD LockCount;
#endif
} GDIOBJHDR, *PGDIOBJHDR;
@@ -67,32 +77,41 @@
DWORD ObjectType;
} GDIMULTILOCK, *PGDIMULTILOCK;
-HGDIOBJ FASTCALL GDIOBJ_AllocObj(WORD Size, DWORD ObjectType, GDICLEANUPPROC CleanupProcPtr);
-BOOL STDCALL GDIOBJ_FreeObj (HGDIOBJ Obj, DWORD ObjectType, DWORD Flag);
-PGDIOBJ FASTCALL GDIOBJ_LockObj (HGDIOBJ Obj, DWORD ObjectType);
-BOOL FASTCALL GDIOBJ_LockMultipleObj(PGDIMULTILOCK pList, INT nObj);
-BOOL FASTCALL GDIOBJ_UnlockObj (HGDIOBJ Obj, DWORD ObjectType);
-BOOL FASTCALL GDIOBJ_UnlockMultipleObj(PGDIMULTILOCK pList, INT nObj);
-DWORD FASTCALL GDIOBJ_GetObjectType(HGDIOBJ ObjectHandle);
-BOOL FASTCALL GDIOBJ_OwnedByCurrentProcess(HGDIOBJ ObjectHandle);
-void FASTCALL GDIOBJ_SetOwnership(HGDIOBJ ObjectHandle, PEPROCESS Owner);
-void FASTCALL GDIOBJ_CopyOwnership(HGDIOBJ CopyFrom, HGDIOBJ CopyTo);
-BOOL FASTCALL GDIOBJ_LockMultipleObj(PGDIMULTILOCK pList, INT nObj);
+HGDIOBJ INTERNAL_CALL GDIOBJ_AllocObj(ULONG ObjectType);
+BOOL INTERNAL_CALL GDIOBJ_LockMultipleObj(PGDIMULTILOCK pList, INT nObj);
+BOOL INTERNAL_CALL GDIOBJ_UnlockMultipleObj(PGDIMULTILOCK pList, INT nObj);
+BOOL INTERNAL_CALL GDIOBJ_OwnedByCurrentProcess(HGDIOBJ ObjectHandle);
+void INTERNAL_CALL GDIOBJ_SetOwnership(HGDIOBJ ObjectHandle, PEPROCESS Owner);
+void INTERNAL_CALL GDIOBJ_CopyOwnership(HGDIOBJ CopyFrom, HGDIOBJ CopyTo);
+BOOL INTERNAL_CALL GDIOBJ_ConvertToStockObj(HGDIOBJ *hObj);
+BOOL INTERNAL_CALL GDIOBJ_LockMultipleObj(PGDIMULTILOCK pList, INT nObj);
+
+#define GDIOBJ_GetObjectType(Handle) \
+ GDI_HANDLE_GET_TYPE(Handle)
+
+#ifdef GDI_DEBUG
/* a couple macros for debugging GDIOBJ locking */
+#define GDIOBJ_FreeObj(obj,ty) GDIOBJ_FreeObjDbg(__FILE__,__LINE__,obj,ty)
#define GDIOBJ_LockObj(obj,ty) GDIOBJ_LockObjDbg(__FILE__,__LINE__,obj,ty)
-#define GDIOBJ_UnlockObj(obj,ty) GDIOBJ_UnlockObjDbg(__FILE__,__LINE__,obj,ty)
+#define GDIOBJ_UnlockObj(obj) GDIOBJ_UnlockObjDbg(__FILE__,__LINE__,obj)
+
+BOOL INTERNAL_CALL GDIOBJ_FreeObjDbg (const char* file, int line, HGDIOBJ hObj, DWORD ObjectType);
+PGDIOBJ INTERNAL_CALL GDIOBJ_LockObjDbg (const char* file, int line, HGDIOBJ hObj, DWORD ObjectType);
+BOOL INTERNAL_CALL GDIOBJ_UnlockObjDbg (const char* file, int line, HGDIOBJ hObj);
-#ifdef GDIOBJ_LockObj
-PGDIOBJ FASTCALL GDIOBJ_LockObjDbg (const char* file, int line, HGDIOBJ Obj, DWORD ObjectType);
-#endif /* GDIOBJ_LockObj */
-
-#ifdef GDIOBJ_UnlockObj
-BOOL FASTCALL GDIOBJ_UnlockObjDbg (const char* file, int line, HGDIOBJ Obj, DWORD ObjectType);
-#endif /* GDIOBJ_UnlockObj */
+#else /* !GDI_DEBUG */
+
+BOOL INTERNAL_CALL GDIOBJ_FreeObj (HGDIOBJ hObj, DWORD ObjectType);
+PGDIOBJ INTERNAL_CALL GDIOBJ_LockObj (HGDIOBJ hObj, DWORD ObjectType);
+BOOL INTERNAL_CALL GDIOBJ_UnlockObj (HGDIOBJ hObj);
+
+#endif /* GDI_DEBUG */
#define GDIOBJFLAG_DEFAULT (0x0)
#define GDIOBJFLAG_IGNOREPID (0x1)
#define GDIOBJFLAG_IGNORELOCK (0x2)
+PVOID INTERNAL_CALL GDI_MapHandleTable(HANDLE hProcess);
+
#endif
reactos/include/win32k
diff -u -r1.9 -r1.9.18.1
--- kapi.h 10 May 2004 17:07:16 -0000 1.9
+++ kapi.h 13 Dec 2004 09:38:52 -0000 1.9.18.1
@@ -1,5 +1,10 @@
#ifndef _WIN32K_KAPI_H
#define _WIN32K_KAPI_H
+
+#ifndef INTERNAL_CALL
+#define INTERNAL_CALL STDCALL
+#endif
+
#include <win32k/bitmaps.h>
#include <win32k/brush.h>
#include <win32k/cliprgn.h>
reactos/include/win32k
diff -u -r1.139.2.1 -r1.139.2.2
--- ntuser.h 8 Dec 2004 21:56:58 -0000 1.139.2.1
+++ ntuser.h 13 Dec 2004 09:38:52 -0000 1.139.2.2
@@ -212,6 +212,10 @@
#define TWOPARAM_ROUTINE_SETCARETPOS 0x60
#define TWOPARAM_ROUTINE_GETWINDOWINFO 0x61
#define TWOPARAM_ROUTINE_REGISTERLOGONPROC 0x62
+#define TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES 0x63
+#define TWOPARAM_ROUTINE_GETSYSCOLORPENS 0x64
+#define TWOPARAM_ROUTINE_GETSYSCOLORS 0x65
+#define TWOPARAM_ROUTINE_SETSYSCOLORS 0x66
DWORD
STDCALL
NtUserCallTwoParam(
@@ -1805,17 +1809,13 @@
} Value;
} KMDDELPARAM, *PKMDDELPARAM;
-#include <pshpack1.h>
typedef struct _GDI_TABLE_ENTRY
{
- PVOID KernelData; /* Points to the kernel mode structure */
- unsigned short ProcessId; /* process id that created the object, 0 for stock objects */
- unsigned short Count; /* we don't use this field, only NT4 uses it */
- unsigned short Upper; /* copy of the upper 16 bit of the handle, contains the object type */
- unsigned short nType; /* object type */
- PVOID UserData; /* Points to the user mode structure, usually NULL though */
+ PVOID KernelData; /* Points to the kernel mode structure */
+ LONG ProcessId; /* process id that created the object, 0 for stock objects */
+ LONG Type; /* the first 16 bit is the object type including the stock obj flag, the last 16 bits is just the object type */
+ PVOID UserData; /* Points to the user mode structure, usually NULL though */
} GDI_TABLE_ENTRY, *PGDI_TABLE_ENTRY;
-#include <poppack.h>
#endif /* __WIN32K_NTUSER_H */
reactos/include/win32k
diff -u -r1.11 -r1.11.4.1
--- pen.h 12 Sep 2004 19:47:48 -0000 1.11
+++ pen.h 13 Dec 2004 09:38:52 -0000 1.11.4.1
@@ -6,10 +6,10 @@
/* Internal interface */
-#define PENOBJ_AllocPen() ((HPEN)GDIOBJ_AllocObj(sizeof(GDIBRUSHOBJ), GDI_OBJECT_TYPE_PEN, NULL))
-#define PENOBJ_FreePen(hBMObj) GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_PEN, GDIOBJFLAG_DEFAULT)
+#define PENOBJ_AllocPen() ((HPEN)GDIOBJ_AllocObj(GDI_OBJECT_TYPE_PEN))
+#define PENOBJ_FreePen(hBMObj) GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_PEN)
#define PENOBJ_LockPen(hBMObj) ((PGDIBRUSHOBJ)GDIOBJ_LockObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_PEN))
-#define PENOBJ_UnlockPen(hBMObj) GDIOBJ_UnlockObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_PEN)
+#define PENOBJ_UnlockPen(hBMObj) GDIOBJ_UnlockObj((HGDIOBJ) hBMObj)
HPEN STDCALL
NtGdiCreatePen(
reactos/include/win32k
diff -u -r1.25 -r1.25.4.1
--- region.h 12 Sep 2004 19:47:48 -0000 1.25
+++ region.h 13 Dec 2004 09:38:52 -0000 1.25.4.1
@@ -11,12 +11,11 @@
} ROSRGNDATA, *PROSRGNDATA, *LPROSRGNDATA;
-#define RGNDATA_FreeRgn(hRgn) GDIOBJ_FreeObj((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION, GDIOBJFLAG_DEFAULT)
+#define RGNDATA_FreeRgn(hRgn) GDIOBJ_FreeObj((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION)
#define RGNDATA_LockRgn(hRgn) ((PROSRGNDATA)GDIOBJ_LockObj((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION))
-#define RGNDATA_UnlockRgn(hRgn) GDIOBJ_UnlockObj((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION)
+#define RGNDATA_UnlockRgn(hRgn) GDIOBJ_UnlockObj((HGDIOBJ)hRgn)
HRGN FASTCALL RGNDATA_AllocRgn(INT n);
-
-BOOL FASTCALL RGNDATA_InternalDelete( PROSRGNDATA Obj );
+BOOL INTERNAL_CALL RGNDATA_Cleanup(PVOID ObjectBody);
/* User entry points */
HRGN STDCALL
reactos/include/win32k
diff -u -r1.23 -r1.23.4.1
--- text.h 12 Sep 2004 19:47:48 -0000 1.23
+++ text.h 13 Dec 2004 09:38:52 -0000 1.23.4.1
@@ -6,16 +6,16 @@
typedef struct
{
LOGFONTW logfont;
- HFONT GDIFontHandle;
+ FONTOBJ *Font;
} TEXTOBJ, *PTEXTOBJ;
/* Internal interface */
#define TEXTOBJ_AllocText() \
- ((HFONT) GDIOBJ_AllocObj (sizeof (TEXTOBJ), GDI_OBJECT_TYPE_FONT, NULL))
-#define TEXTOBJ_FreeText(hBMObj) GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_FONT, GDIOBJFLAG_DEFAULT)
+ ((HFONT) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_FONT))
+#define TEXTOBJ_FreeText(hBMObj) GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_FONT)
#define TEXTOBJ_LockText(hBMObj) ((PTEXTOBJ) GDIOBJ_LockObj ((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_FONT))
-#define TEXTOBJ_UnlockText(hBMObj) GDIOBJ_UnlockObj ((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_FONT)
+#define TEXTOBJ_UnlockText(hBMObj) GDIOBJ_UnlockObj ((HGDIOBJ) hBMObj)
NTSTATUS FASTCALL TextIntRealizeFont(HFONT FontHandle);
NTSTATUS FASTCALL TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont);
reactos/include/wine
diff -u -r1.5.2.1 -r1.5.2.2
--- objidl.h 8 Dec 2004 21:56:58 -0000 1.5.2.1
+++ objidl.h 13 Dec 2004 09:38:52 -0000 1.5.2.2
@@ -4,7 +4,6 @@
#include <unknwn.h>
/* First part: objidl.h copied from w32api. Fixed:
- * IMallocSpy::PreRealloc,
* IMarshal::MarshalInteface
* IMarshal::UnmarshalInterface
* IStorage_CreateStorage
@@ -526,7 +525,7 @@
STDMETHOD_(void*,PostAlloc)(THIS_ void*) PURE;
STDMETHOD_(void*,PreFree)(THIS_ void*,BOOL) PURE;
STDMETHOD_(void,PostFree)(THIS_ BOOL) PURE;
- STDMETHOD_(ULONG,PreRealloc)(THIS_ void*,ULONG,void*,BOOL) PURE;
+ STDMETHOD_(ULONG,PreRealloc)(THIS_ void*,ULONG,void**,BOOL) PURE;
STDMETHOD_(void*,PostRealloc)(THIS_ void*,BOOL) PURE;
STDMETHOD_(void*,PreGetSize)(THIS_ void*,BOOL) PURE;
STDMETHOD_(ULONG,PostGetSize)(THIS_ ULONG,BOOL) PURE;
@@ -884,7 +883,7 @@
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetComparisonData)(THIS_ PVOID,ULONG,PULONG) PURE;
+ STDMETHOD(GetComparisonData)(THIS_ PBYTE,ULONG,PULONG) PURE;
};
#undef INTERFACE
reactos/lib/advapi32
diff -u -r1.25 -r1.25.2.1
--- advapi32.def 21 Nov 2004 20:14:36 -0000 1.25
+++ advapi32.def 13 Dec 2004 09:38:53 -0000 1.25.2.1
@@ -1,4 +1,4 @@
-; $Id: advapi32.def,v 1.25 2004/11/21 20:14:36 gdalsnes Exp $
+; $Id: advapi32.def,v 1.25.2.1 2004/12/13 09:38:53 hyperion Exp $
;
; advapi32.def
;
@@ -6,6 +6,9 @@
;
LIBRARY advapi32.dll
EXPORTS
+A_SHAFinal@8
+A_SHAInit@4
+A_SHAUpdate@12
AbortSystemShutdownA@4
AbortSystemShutdownW@4
AccessCheck@32
@@ -36,10 +39,10 @@
;BuildImpersonateTrusteeW@8
;BuildSecurityDescriptorA@36
;BuildSecurityDescriptorW@36
-;BuildTrusteeWithNameA@8
-;BuildTrusteeWithNameW@8
-;BuildTrusteeWithSidA@8
-;BuildTrusteeWithSidW@8
+BuildTrusteeWithNameA@8
+BuildTrusteeWithNameW@8
+BuildTrusteeWithSidA@8
+BuildTrusteeWithSidW@8
ChangeServiceConfigA@44
ChangeServiceConfigW@44
ClearEventLogA@8
@@ -55,34 +58,34 @@
CreateProcessAsUserW@44
CreateServiceA@52
CreateServiceW@52
-;CryptAcquireContextA@20
-;CryptAcquireContextW@20
-;CryptContextAddRef@12
-;CryptCreateHash@20
-;CryptDecrypt@24
-;CryptDeriveKey@20
-;CryptDestroyHash@4
-;CryptDestroyKey@4
-;CryptEncrypt@28
-;CryptExportKey@24
-;CryptGenKey@16
-;CryptGenRandom@12
-;CryptGetHashParam@20
-;CryptGetKeyParam@20
-;CryptGetProvParam@20
-;CryptGetUserKey@12
-;CryptHashData@16
-;CryptHashSessionKey@12
-;CryptImportKey@24
-;CryptReleaseContext@8
-;CryptSetHashParam@16
-;CryptSetKeyParam@16
-;CryptSetProvParam@16
-;CryptSetProviderA@8
-;CryptSetProviderW@8
-;CryptSignHashA@24
+CryptAcquireContextA@20
+CryptAcquireContextW@20
+CryptContextAddRef@12
+CryptCreateHash@20
+CryptDecrypt@24
+CryptDeriveKey@20
+CryptDestroyHash@4
+CryptDestroyKey@4
+CryptEncrypt@28
+CryptExportKey@24
+CryptGenKey@16
+CryptGenRandom@12
+CryptGetHashParam@20
+CryptGetKeyParam@20
+CryptGetProvParam@20
+CryptGetUserKey@12
+CryptHashData@16
+CryptHashSessionKey@12
+CryptImportKey@24
+CryptReleaseContext@8
+CryptSetHashParam@16
+CryptSetKeyParam@16
+CryptSetProvParam@16
+CryptSetProviderA@8
+CryptSetProviderW@8
+CryptSignHashA@24
;CryptSignHashW@24
-;CryptVerifySignatureA@24
+CryptVerifySignatureA@24
;CryptVerifySignatureW@24
DeleteAce@8
DeleteService@4
@@ -259,6 +262,12 @@
MakeAbsoluteSD@44
MakeSelfRelativeSD@12
MapGenericMask@8
+MD4Final@4
+MD4Init@4
+MD4Update@12
+MD5Final@4
+MD5Init@4
+MD5Update@12
;NTAccessMaskToProvAccessRights@12
;NotifyBootConfigStatus@4
NotifyChangeEventLog@8
reactos/lib/advapi32
diff -u -r1.2 -r1.2.8.1
--- advapi32.h 23 Aug 2004 21:16:25 -0000 1.2
+++ advapi32.h 13 Dec 2004 09:38:53 -0000 1.2.8.1
@@ -8,3 +8,4 @@
#include <windows.h>
#include <sddl.h>
#include <rosrtl/string.h>
+#include <accctrl.h>
reactos/lib/advapi32
diff -u -r1.42 -r1.42.8.1
--- makefile 15 Aug 2004 17:03:14 -0000 1.42
+++ makefile 13 Dec 2004 09:38:53 -0000 1.42.8.1
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.42 2004/08/15 17:03:14 chorns Exp $
+# $Id: makefile,v 1.42.8.1 2004/12/13 09:38:53 hyperion Exp $
PATH_TO_TOP = ../..
@@ -17,6 +17,14 @@
TARGET_BASE = $(TARGET_BASE_LIB_ADVAPI32)
+CRYPT_OBJECTS = \
+ crypt/crypt_des.o \
+ crypt/crypt_lmhash.o \
+ crypt/crypt_md4.o \
+ crypt/crypt_md5.o \
+ crypt/crypt_sha.o \
+ crypt/crypt.o
+
MISC_OBJECTS = \
misc/dllmain.o \
misc/hwprofiles.o \
@@ -33,7 +41,8 @@
sec/lsa.o \
sec/misc.o \
sec/sec.o \
- sec/sid.o
+ sec/sid.o \
+ sec/trustee.o
SERVICE_OBJECTS = \
service/eventlog.o \
@@ -46,6 +55,7 @@
token/token.o
TARGET_OBJECTS = \
+ $(CRYPT_OBJECTS) \
$(MISC_OBJECTS) \
$(REGISTRY_OBJECTS) \
$(SECURITY_OBJECTS) \
reactos/lib/advapi32/misc
diff -u -r1.8 -r1.8.8.1
--- sysfunc.c 15 Aug 2004 17:03:14 -0000 1.8
+++ sysfunc.c 13 Dec 2004 09:38:54 -0000 1.8.8.1
@@ -1,4 +1,4 @@
-/* $Id: sysfunc.c,v 1.8 2004/08/15 17:03:14 chorns Exp $
+/* $Id: sysfunc.c,v 1.8.8.1 2004/12/13 09:38:54 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@@ -77,20 +77,6 @@
return 5;
}
-
-/**********************************************************************
- *
- * @unimplemented
- */
-INT
-STDCALL
-SystemFunction006(INT a, INT b)
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 6;
-}
-
-
/**********************************************************************
*
* @unimplemented
reactos/lib/advapi32/reg
diff -u -r1.63.2.1 -r1.63.2.2
--- reg.c 8 Dec 2004 21:56:58 -0000 1.63.2.1
+++ reg.c 13 Dec 2004 09:38:54 -0000 1.63.2.2
@@ -1,4 +1,4 @@
-/* $Id: reg.c,v 1.63.2.1 2004/12/08 21:56:58 hyperion Exp $
+/* $Id: reg.c,v 1.63.2.2 2004/12/13 09:38:54 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/lib/advapi32/sec
diff -N trustee.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ trustee.c 13 Dec 2004 09:38:54 -0000 1.2.2.1
@@ -0,0 +1,72 @@
+/* $Id: trustee.c,v 1.2.2.1 2004/12/13 09:38:54 hyperion Exp $
+ *
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * FILE: lib/advapi32/sec/trustee.c
+ * PURPOSE: Trustee functions
+ */
+
+#include "advapi32.h"
+
+#define NDEBUG
+#include "debug.h"
+
+
+/******************************************************************************
+ * BuildTrusteeWithSidA [ADVAPI32.@]
+ */
+VOID WINAPI BuildTrusteeWithSidA(PTRUSTEEA pTrustee, PSID pSid)
+{
+ DPRINT("%p %p\n", pTrustee, pSid);
+
+ pTrustee->pMultipleTrustee = NULL;
+ pTrustee->MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
+ pTrustee->TrusteeForm = TRUSTEE_IS_SID;
+ pTrustee->TrusteeType = TRUSTEE_IS_UNKNOWN;
+ pTrustee->ptstrName = (LPSTR) pSid;
+}
+
+
+/******************************************************************************
+ * BuildTrusteeWithSidW [ADVAPI32.@]
+ */
+VOID WINAPI BuildTrusteeWithSidW(PTRUSTEEW pTrustee, PSID pSid)
+{
+ DPRINT("%p %p\n", pTrustee, pSid);
+
+ pTrustee->pMultipleTrustee = NULL;
+ pTrustee->MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
+ pTrustee->TrusteeForm = TRUSTEE_IS_SID;
+ pTrustee->TrusteeType = TRUSTEE_IS_UNKNOWN;
+ pTrustee->ptstrName = (LPWSTR) pSid;
+}
+
+
+/******************************************************************************
+ * BuildTrusteeWithNameA [ADVAPI32.@]
+ */
+VOID WINAPI BuildTrusteeWithNameA(PTRUSTEEA pTrustee, LPSTR name)
+{
+ DPRINT("%p %s\n", pTrustee, name);
+
+ pTrustee->pMultipleTrustee = NULL;
+ pTrustee->MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
+ pTrustee->TrusteeForm = TRUSTEE_IS_NAME;
+ pTrustee->TrusteeType = TRUSTEE_IS_UNKNOWN;
+ pTrustee->ptstrName = name;
+}
+
+
+/******************************************************************************
+ * BuildTrusteeWithNameW [ADVAPI32.@]
+ */
+VOID WINAPI BuildTrusteeWithNameW(PTRUSTEEW pTrustee, LPWSTR name)
+{
+ DPRINT("%p %s\n", pTrustee, name);
+
+ pTrustee->pMultipleTrustee = NULL;
+ pTrustee->MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
+ pTrustee->TrusteeForm = TRUSTEE_IS_NAME;
+ pTrustee->TrusteeType = TRUSTEE_IS_UNKNOWN;
+ pTrustee->ptstrName = name;
+}
reactos/lib/advapi32/sec
diff -u -r1.27 -r1.27.2.1
--- misc.c 21 Nov 2004 20:14:36 -0000 1.27
+++ misc.c 13 Dec 2004 09:38:54 -0000 1.27.2.1
@@ -1,4 +1,4 @@
-/* $Id: misc.c,v 1.27 2004/11/21 20:14:36 gdalsnes Exp $
+/* $Id: misc.c,v 1.27.2.1 2004/12/13 09:38:54 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@@ -548,9 +548,25 @@
LPDWORD cchReferencedDomainName,
PSID_NAME_USE peUse)
{
+ DWORD NameLength;
+ DWORD DomainLength;
+
DPRINT1("LookupAccountSidA is unimplemented, but returns success\n");
- lstrcpynA(lpName, "Administrator", *cchName);
- lstrcpynA(lpReferencedDomainName, "ReactOS", *cchReferencedDomainName);
+
+ /* Calculate length needed */
+ NameLength = strlen("Administrator") + 1;
+ DomainLength = strlen("BUILTIN") + 1;
+
+ if (*cchName < NameLength || *cchReferencedDomainName < DomainLength)
+ {
+ *cchName = NameLength;
+ *cchReferencedDomainName = DomainLength;
+ SetLastError(ERROR_INSUFFICIENT_BUFFER);
+ return FALSE;
+ }
+
+ if (lpName) lstrcpynA(lpName, "Administrator", *cchName);
+ if (lpReferencedDomainName) lstrcpynA(lpReferencedDomainName, "BUILTIN", *cchReferencedDomainName);
return TRUE;
}
@@ -569,9 +585,25 @@
LPDWORD cchReferencedDomainName,
PSID_NAME_USE peUse)
{
+ DWORD NameLength;
+ DWORD DomainLength;
+
DPRINT1("LookupAccountSidW is unimplemented, but returns success\n");
- lstrcpynW(lpName, L"Administrator", *cchName);
- lstrcpynW(lpReferencedDomainName, L"ReactOS", *cchReferencedDomainName);
+
+ /* Calculate length needed */
+ NameLength = wcslen(L"Administrator") + sizeof(WCHAR);
+ DomainLength = wcslen(L"BUILTIN") + sizeof(WCHAR);
+
+ if (*cchName < NameLength || *cchReferencedDomainName < DomainLength)
+ {
+ *cchName = NameLength;
+ *cchReferencedDomainName = DomainLength;
+ SetLastError(ERROR_INSUFFICIENT_BUFFER);
+ return FALSE;
+ }
+
+ if (lpName) lstrcpynW(lpName, L"Administrator", *cchName);
+ if (lpReferencedDomainName) lstrcpynW(lpReferencedDomainName, L"BUILTIN", *cchReferencedDomainName);
return TRUE;
}
reactos/lib/advapi32/token
diff -u -r1.14 -r1.14.6.1
--- token.c 27 Sep 2004 20:04:53 -0000 1.14
+++ token.c 13 Dec 2004 09:38:54 -0000 1.14.6.1
@@ -1,4 +1,4 @@
-/* $Id: token.c,v 1.14 2004/09/27 20:04:53 gvg Exp $
+/* $Id: token.c,v 1.14.6.1 2004/12/13 09:38:54 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/lib/cabinet
diff -u -r1.3.16.1 -r1.3.16.2
--- Makefile.ros-template 8 Dec 2004 21:56:59 -0000 1.3.16.1
+++ Makefile.ros-template 13 Dec 2004 09:38:54 -0000 1.3.16.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.3.16.1 2004/12/08 21:56:59 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.3.16.2 2004/12/13 09:38:54 hyperion Exp $
TARGET_NAME = cabinet
reactos/lib/cabinet
diff -u -r1.2 -r1.2.6.1
--- fdi.c 19 Sep 2004 09:18:36 -0000 1.2
+++ fdi.c 13 Dec 2004 09:38:54 -0000 1.2.6.1
@@ -2696,13 +2696,19 @@
}
/* free decompression temps */
- if (LZX(window)) {
- PFDI_FREE(hfdi, LZX(window));
- LZX(window) = NULL;
- }
- if (QTM(window)) {
- PFDI_FREE(hfdi, QTM(window));
- QTM(window) = NULL;
+ switch (fol->comp_type & cffoldCOMPTYPE_MASK) {
+ case cffoldCOMPTYPE_LZX:
+ if (LZX(window)) {
+ PFDI_FREE(hfdi, LZX(window));
+ LZX(window) = NULL;
+ }
+ break;
+ case cffoldCOMPTYPE_QUANTUM:
+ if (QTM(window)) {
+ PFDI_FREE(hfdi, QTM(window));
+ QTM(window) = NULL;
+ }
+ break;
}
while (decomp_state) {
@@ -2738,13 +2744,19 @@
bail_and_fail: /* here we free ram before error returns */
/* free decompression temps */
- if (LZX(window)) {
- PFDI_FREE(hfdi, LZX(window));
- LZX(window) = NULL;
- }
- if (QTM(window)) {
- PFDI_FREE(hfdi, QTM(window));
- QTM(window) = NULL;
+ switch (fol->comp_type & cffoldCOMPTYPE_MASK) {
+ case cffoldCOMPTYPE_LZX:
+ if (LZX(window)) {
+ PFDI_FREE(hfdi, LZX(window));
+ LZX(window) = NULL;
+ }
+ break;
+ case cffoldCOMPTYPE_QUANTUM:
+ if (QTM(window)) {
+ PFDI_FREE(hfdi, QTM(window));
+ QTM(window) = NULL;
+ }
+ break;
}
while (decomp_state) {
reactos/lib/comctl32
diff -u -r1.3.16.1 -r1.3.16.2
--- Makefile.ros-template 8 Dec 2004 21:56:59 -0000 1.3.16.1
+++ Makefile.ros-template 13 Dec 2004 09:38:55 -0000 1.3.16.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.3.16.1 2004/12/08 21:56:59 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.3.16.2 2004/12/13 09:38:55 hyperion Exp $
TARGET_NAME = comctl32
reactos/lib/cpl/ncpa
diff -u -r1.4 -r1.4.2.1
--- tcpip_properties.c 31 Oct 2004 11:54:58 -0000 1.4
+++ tcpip_properties.c 13 Dec 2004 09:38:55 -0000 1.4.2.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: tcpip_properties.c,v 1.4 2004/10/31 11:54:58 ekohl Exp $
+/* $Id: tcpip_properties.c,v 1.4.2.1 2004/12/13 09:38:55 hyperion Exp $
*
* PROJECT: ReactOS Network Control Panel
* FILE: lib/cpl/system/tcpip_properties.c
@@ -79,7 +79,7 @@
}
{
DWORD dwIPAddr;
- DWORD b[4];
+ int b[4];
IP_ADDR_STRING *pString;
pString = &pInfo->IpAddressList;
while(pString->Next)
@@ -108,7 +108,7 @@
char pszDNS[MAX_PATH];
DWORD dwSize = sizeof(pszDNS);
DWORD dwType = REG_SZ;
- DWORD b[2][4];
+ int b[2][4];
DWORD dwIPAddr;
RegQueryValueExA(hKey,"NameServer",NULL,&dwType,(BYTE*)pszDNS,&dwSize);
RegCloseKey(hKey);
reactos/lib/dinput
diff -u -r1.2.16.1 -r1.2.16.2
--- Makefile 8 Dec 2004 21:57:07 -0000 1.2.16.1
+++ Makefile 13 Dec 2004 09:38:55 -0000 1.2.16.2
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.2.16.1 2004/12/08 21:57:07 hyperion Exp $
+# $Id: Makefile,v 1.2.16.2 2004/12/13 09:38:55 hyperion Exp $
PATH_TO_TOP = ../..
reactos/lib/dnsapi
diff -u -r1.5.16.1 -r1.5.16.2
--- Makefile 8 Dec 2004 21:57:08 -0000 1.5.16.1
+++ Makefile 13 Dec 2004 09:38:55 -0000 1.5.16.2
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.5.16.1 2004/12/08 21:57:08 hyperion Exp $
+# $Id: Makefile,v 1.5.16.2 2004/12/13 09:38:55 hyperion Exp $
PATH_TO_TOP = ../..
reactos/lib/expat
diff -u -r1.3.16.1 -r1.3.16.2
--- Makefile 8 Dec 2004 21:57:08 -0000 1.3.16.1
+++ Makefile 13 Dec 2004 09:38:55 -0000 1.3.16.2
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.3.16.1 2004/12/08 21:57:08 hyperion Exp $
+# $Id: Makefile,v 1.3.16.2 2004/12/13 09:38:55 hyperion Exp $
PATH_TO_TOP = ../..
reactos/lib/freetype/i386
diff -u -r1.1.34.1 -r1.1.34.2
--- setjmplongjmp.s 8 Dec 2004 21:57:09 -0000 1.1.34.1
+++ setjmplongjmp.s 13 Dec 2004 09:38:55 -0000 1.1.34.2
@@ -1,4 +1,4 @@
-/* $Id: setjmplongjmp.s,v 1.1.34.1 2004/12/08 21:57:09 hyperion Exp $
+/* $Id: setjmplongjmp.s,v 1.1.34.2 2004/12/13 09:38:55 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: FreeType implementation for ReactOS
reactos/lib/icmp
diff -u -r1.1.6.1 -r1.1.6.2
--- Makefile.ros-template 8 Dec 2004 21:57:09 -0000 1.1.6.1
+++ Makefile.ros-template 13 Dec 2004 09:38:55 -0000 1.1.6.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.1.6.1 2004/12/08 21:57:09 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.1.6.2 2004/12/13 09:38:55 hyperion Exp $
TARGET_NAME = icmp
reactos/lib/iphlpapi
diff -u -r1.2.16.1 -r1.2.16.2
--- Makefile.ros-template 8 Dec 2004 21:57:09 -0000 1.2.16.1
+++ Makefile.ros-template 13 Dec 2004 09:38:55 -0000 1.2.16.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.2.16.1 2004/12/08 21:57:09 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.2.16.2 2004/12/13 09:38:55 hyperion Exp $
TARGET_NAME = iphlpapi
reactos/lib/kernel32/debug
diff -u -r1.4 -r1.4.22.1
--- debugger.c 23 Jan 2004 17:12:54 -0000 1.4
+++ debugger.c 13 Dec 2004 09:38:55 -0000 1.4.22.1
@@ -1,4 +1,4 @@
-/* $Id: debugger.c,v 1.4 2004/01/23 17:12:54 ekohl Exp $
+/* $Id: debugger.c,v 1.4.22.1 2004/12/13 09:38:55 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@@ -14,89 +14,132 @@
/* FUNCTIONS *****************************************************************/
/*
- * @unimplemented
+ * @implemented
*/
-BOOL WINAPI CheckRemoteDebuggerPresent(HANDLE hProcess, PBOOL pbDebuggerPresent)
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
+BOOL WINAPI
+CheckRemoteDebuggerPresent (
+ HANDLE hProcess,
+ PBOOL pbDebuggerPresent
+ )
+{
+ HANDLE DebugPort;
+ NTSTATUS Status;
+
+ if(pbDebuggerPresent == NULL)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ Status = NtQueryInformationProcess(hProcess,
+ ProcessDebugPort,
+ (PVOID)&DebugPort,
+ sizeof(HANDLE),
+ NULL);
+ if(NT_SUCCESS(Status))
+ {
+ *pbDebuggerPresent = ((DebugPort != NULL) ? TRUE : FALSE);
+ return TRUE;
+ }
+
+ SetLastErrorByStatus(Status);
+ return FALSE;
}
/*
* @implemented
*/
-BOOL WINAPI ContinueDebugEvent
-(
- DWORD dwProcessId,
- DWORD dwThreadId,
- DWORD dwContinueStatus
-)
-{
- CLIENT_ID ClientId;
- NTSTATUS Status;
-
- ClientId.UniqueProcess = (HANDLE)dwProcessId;
- ClientId.UniqueThread = (HANDLE)dwThreadId;
-
- Status = DbgUiContinue(&ClientId, dwContinueStatus);
+BOOL WINAPI
+ContinueDebugEvent (
+ DWORD dwProcessId,
+ DWORD dwThreadId,
+ DWORD dwContinueStatus
+ )
+{
+ CLIENT_ID ClientId;
+ NTSTATUS Status;
+
+ ClientId.UniqueProcess = (HANDLE)dwProcessId;
+ ClientId.UniqueThread = (HANDLE)dwThreadId;
+
+ Status = DbgUiContinue(&ClientId, dwContinueStatus);
+
+ if(!NT_SUCCESS(Status))
+ {
+ SetLastErrorByStatus(Status);
+ return FALSE;
+ }
- if(!NT_SUCCESS(Status))
- {
- SetLastErrorByStatus(Status);
- return FALSE;
- }
-
- return TRUE;
+ return TRUE;
}
/*
* @unimplemented
*/
-BOOL WINAPI DebugActiveProcess(DWORD dwProcessId)
+BOOL
+WINAPI
+DebugActiveProcess (
+ DWORD dwProcessId
+ )
{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
}
/*
* @unimplemented
*/
-BOOL WINAPI DebugActiveProcessStop(DWORD dwProcessId)
+BOOL
+WINAPI
+DebugActiveProcessStop (
+ DWORD dwProcessId
+ )
{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
}
/*
* @unimplemented
*/
-BOOL WINAPI DebugSetProcessKillOnExit(BOOL KillOnExit)
+BOOL
+WINAPI
+DebugSetProcessKillOnExit (
+ BOOL KillOnExit
+ )
{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
}
/*
* @implemented
*/
-BOOL WINAPI IsDebuggerPresent(VOID)
+BOOL
+WINAPI
+IsDebuggerPresent (VOID)
{
- return (BOOL)NtCurrentPeb()->BeingDebugged;
+ return (BOOL)NtCurrentPeb()->BeingDebugged;
}
/*
* @unimplemented
*/
-BOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT lpDebugEvent, DWORD dwMilliseconds)
+BOOL
+WINAPI
+WaitForDebugEvent (
+ LPDEBUG_EVENT lpDebugEvent,
+ DWORD dwMilliseconds
+ )
{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
}
/* EOF */
reactos/lib/kernel32/except
diff -u -r1.18 -r1.18.2.1
--- except.c 10 Nov 2004 01:07:45 -0000 1.18
+++ except.c 13 Dec 2004 09:38:55 -0000 1.18.2.1
@@ -1,4 +1,4 @@
-/* $Id: except.c,v 1.18 2004/11/10 01:07:45 blight Exp $
+/* $Id: except.c,v 1.18.2.1 2004/12/13 09:38:55 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@@ -16,7 +16,7 @@
#include "../include/debug.h"
UINT GlobalErrMode = 0;
-LPTOP_LEVEL_EXCEPTION_FILTER GlobalTopLevelExceptionFilter = NULL;
+LPTOP_LEVEL_EXCEPTION_FILTER GlobalTopLevelExceptionFilter = UnhandledExceptionFilter;
UINT GetErrorMode(void)
{
@@ -46,10 +46,8 @@
LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter
)
{
- LPTOP_LEVEL_EXCEPTION_FILTER OldTopLevelExceptionFilter =
- GlobalTopLevelExceptionFilter;
- GlobalTopLevelExceptionFilter = lpTopLevelExceptionFilter;
- return OldTopLevelExceptionFilter;
+ return InterlockedExchangePointer(&GlobalTopLevelExceptionFilter,
+ lpTopLevelExceptionFilter);
}
reactos/lib/kernel32/file
diff -u -r1.40.2.1 -r1.40.2.2
--- create.c 8 Dec 2004 21:57:10 -0000 1.40.2.1
+++ create.c 13 Dec 2004 09:38:55 -0000 1.40.2.2
@@ -1,4 +1,4 @@
-/* $Id: create.c,v 1.40.2.1 2004/12/08 21:57:10 hyperion Exp $
+/* $Id: create.c,v 1.40.2.2 2004/12/13 09:38:55 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/lib/kernel32/file
diff -u -r1.17.8.1 -r1.17.8.2
--- delete.c 8 Dec 2004 21:57:10 -0000 1.17.8.1
+++ delete.c 13 Dec 2004 09:38:56 -0000 1.17.8.2
@@ -1,4 +1,4 @@
-/* $Id: delete.c,v 1.17.8.1 2004/12/08 21:57:10 hyperion Exp $
+/* $Id: delete.c,v 1.17.8.2 2004/12/13 09:38:56 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/lib/kernel32/file
diff -u -r1.50 -r1.50.2.1
--- dir.c 7 Oct 2004 21:05:36 -0000 1.50
+++ dir.c 13 Dec 2004 09:38:56 -0000 1.50.2.1
@@ -1,4 +1,4 @@
-/* $Id: dir.c,v 1.50 2004/10/07 21:05:36 gvg Exp $
+/* $Id: dir.c,v 1.50.2.1 2004/12/13 09:38:56 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@@ -20,6 +20,7 @@
#define NDEBUG
#include "../include/debug.h"
+UNICODE_STRING DllDirectory = {0, 0, NULL};
/* FUNCTIONS *****************************************************************/
@@ -878,4 +879,184 @@
return retCode / sizeof(WCHAR);
}
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+SetDllDirectoryW(
+ LPCWSTR lpPathName
+ )
+{
+ UNICODE_STRING PathName;
+
+ RtlInitUnicodeString(&PathName, lpPathName);
+
+ RtlEnterCriticalSection(&DllLock);
+ if(PathName.Length > 0)
+ {
+ if(PathName.Length + sizeof(WCHAR) <= DllDirectory.MaximumLength)
+ {
+ RtlCopyUnicodeString(&DllDirectory, &PathName);
+ }
+ else
+ {
+ RtlFreeUnicodeString(&DllDirectory);
+ if(!(DllDirectory.Buffer = (PWSTR)RtlAllocateHeap(RtlGetProcessHeap(),
+ 0,
+ PathName.Length + sizeof(WCHAR))))
+ {
+ RtlLeaveCriticalSection(&DllLock);
+ SetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ return FALSE;
+ }
+ DllDirectory.Length = 0;
+ DllDirectory.MaximumLength = PathName.Length + sizeof(WCHAR);
+
+ RtlCopyUnicodeString(&DllDirectory, &PathName);
+ }
+ }
+ else
+ {
+ RtlFreeUnicodeString(&DllDirectory);
+ }
+ RtlLeaveCriticalSection(&DllLock);
+
+ return TRUE;
+}
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+SetDllDirectoryA(
+ LPCSTR lpPathName
+ )
+{
+ UNICODE_STRING PathNameU;
+ ANSI_STRING PathNameA;
+ BOOL Ret;
+
+ if(lpPathName != NULL)
+ {
+ RtlInitAnsiString(&PathNameA, lpPathName);
+ if(bIsFileApiAnsi)
+ {
+ RtlAnsiStringToUnicodeString(&PathNameU, &PathNameA, TRUE);
+ }
+ else
+ {
+ RtlOemStringToUnicodeString(&PathNameU, &PathNameA, TRUE);
+ }
+ }
+ else
+ {
+ PathNameU.Buffer = NULL;
+ }
+
+ Ret = SetDllDirectoryW(PathNameU.Buffer);
+
+ if(lpPathName != NULL)
+ {
+ RtlFreeUnicodeString(&PathNameU);
+ }
+
+ return Ret;
+}
+
+/*
+ * @implemented
+ */
+DWORD
+STDCALL
+GetDllDirectoryW(
+ DWORD nBufferLength,
+ LPWSTR lpBuffer
+ )
+{
+ DWORD Ret;
+
+ RtlEnterCriticalSection(&DllLock);
+ if(nBufferLength > 0)
+ {
+ Ret = DllDirectory.Length / sizeof(WCHAR);
+ if(Ret > nBufferLength - 1)
+ {
+ Ret = nBufferLength - 1;
+ }
+
+ if(Ret > 0)
+ {
+ RtlCopyMemory(lpBuffer, DllDirectory.Buffer, Ret * sizeof(WCHAR));
+ }
+ lpBuffer[Ret] = L'\0';
+ }
+ else
+ {
+ /* include termination character, even if the string is empty! */
+ Ret = (DllDirectory.Length / sizeof(WCHAR)) + 1;
+ }
+ RtlLeaveCriticalSection(&DllLock);
+
+ return Ret;
+}
+
+/*
+ * @implemented
+ */
+DWORD
+STDCALL
+GetDllDirectoryA(
+ DWORD nBufferLength,
+ LPSTR lpBuffer
+ )
+{
+ UNICODE_STRING PathNameU;
+ ANSI_STRING PathNameA;
+ DWORD Ret;
+
+ if(nBufferLength > 0)
+ {
+ if(!(PathNameU.Buffer = (PWSTR)RtlAllocateHeap(RtlGetProcessHeap(),
+ 0,
+ nBufferLength * sizeof(WCHAR))))
+ {
+ SetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ return 0;
+ }
+ PathNameU.Length = 0;
+ PathNameU.MaximumLength = nBufferLength * sizeof(WCHAR);
+ }
+
+ Ret = GetDllDirectoryW(nBufferLength,
+ ((nBufferLength > 0) ? PathNameU.Buffer : NULL));
+
+ if(nBufferLength > 0)
+ {
+ PathNameU.Length = Ret * sizeof(WCHAR);
+
+ PathNameA.Length = 0;
+ PathNameA.MaximumLength = nBufferLength;
+ PathNameA.Buffer = lpBuffer;
+
+ if(Ret > 0)
+ {
+ if(bIsFileApiAnsi)
+ {
+ RtlUnicodeStringToAnsiString(&PathNameA, &PathNameU, FALSE);
+ }
+ else
+ {
+ RtlUnicodeStringToOemString(&PathNameA, &PathNameU, FALSE);
+ }
+ }
+ lpBuffer[Ret] = '\0';
+
+ RtlFreeHeap(RtlGetProcessHeap(), 0, PathNameU.Buffer);
+ }
+
+ return Ret;
+}
+
/* EOF */
reactos/lib/kernel32/file
diff -u -r1.60.2.1 -r1.60.2.2
--- file.c 8 Dec 2004 21:57:10 -0000 1.60.2.1
+++ file.c 13 Dec 2004 09:38:56 -0000 1.60.2.2
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.60.2.1 2004/12/08 21:57:10 hyperion Exp $
+/* $Id: file.c,v 1.60.2.2 2004/12/13 09:38:56 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/lib/kernel32/file
diff -u -r1.15.2.1 -r1.15.2.2
--- iocompl.c 8 Dec 2004 21:57:10 -0000 1.15.2.1
+++ iocompl.c 13 Dec 2004 09:38:56 -0000 1.15.2.2
@@ -1,4 +1,4 @@
-/* $Id: iocompl.c,v 1.15.2.1 2004/12/08 21:57:10 hyperion Exp $
+/* $Id: iocompl.c,v 1.15.2.2 2004/12/13 09:38:56 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/lib/kernel32/file
diff -u -r1.14.16.1 -r1.14.16.2
--- move.c 8 Dec 2004 21:57:10 -0000 1.14.16.1
+++ move.c 13 Dec 2004 09:38:56 -0000 1.14.16.2
@@ -1,4 +1,4 @@
-/* $Id: move.c,v 1.14.16.1 2004/12/08 21:57:10 hyperion Exp $
+/* $Id: move.c,v 1.14.16.2 2004/12/13 09:38:56 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/lib/kernel32/include
diff -u -r1.6 -r1.6.10.1
--- kernel32.h 26 Jun 2004 20:06:25 -0000 1.6
+++ kernel32.h 13 Dec 2004 09:38:56 -0000 1.6.10.1
@@ -41,6 +41,8 @@
extern CRITICAL_SECTION DllLock;
+extern UNICODE_STRING DllDirectory;
+
/* FUNCTION PROTOTYPES *******************************************************/
BOOL STDCALL IsConsoleHandle(HANDLE Handle);
reactos/lib/kernel32
diff -u -r1.89.2.1 -r1.89.2.2
--- makefile 8 Dec 2004 21:57:11 -0000 1.89.2.1
+++ makefile 13 Dec 2004 09:38:56 -0000 1.89.2.2
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.89.2.1 2004/12/08 21:57:11 hyperion Exp $
+# $Id: makefile,v 1.89.2.2 2004/12/13 09:38:56 hyperion Exp $
PATH_TO_TOP = ../..
reactos/lib/kernel32/misc
diff -u -r1.20.16.1 -r1.20.16.2
--- atom.c 8 Dec 2004 21:57:11 -0000 1.20.16.1
+++ atom.c 13 Dec 2004 09:38:56 -0000 1.20.16.2
@@ -1,4 +1,4 @@
-/* $Id: atom.c,v 1.20.16.1 2004/12/08 21:57:11 hyperion Exp $
+/* $Id: atom.c,v 1.20.16.2 2004/12/13 09:38:56 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/lib/kernel32/misc
diff -u -r1.37.2.1 -r1.37.2.2
--- dllmain.c 8 Dec 2004 21:57:11 -0000 1.37.2.1
+++ dllmain.c 13 Dec 2004 09:38:56 -0000 1.37.2.2
@@ -1,4 +1,4 @@
-/* $Id: dllmain.c,v 1.37.2.1 2004/12/08 21:57:11 hyperion Exp $
+/* $Id: dllmain.c,v 1.37.2.2 2004/12/13 09:38:56 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/lib/kernel32/misc
diff -u -r1.24.2.1 -r1.24.2.2
--- lang.c 8 Dec 2004 21:57:11 -0000 1.24.2.1
+++ lang.c 13 Dec 2004 09:38:56 -0000 1.24.2.2
@@ -1,4 +1,4 @@
-/* $Id: lang.c,v 1.24.2.1 2004/12/08 21:57:11 hyperion Exp $
+/* $Id: lang.c,v 1.24.2.2 2004/12/13 09:38:56 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT : ReactOS user mode libraries
reactos/lib/kernel32/misc
diff -u -r1.94.2.1 -r1.94.2.2
--- stubs.c 8 Dec 2004 21:57:11 -0000 1.94.2.1
+++ stubs.c 13 Dec 2004 09:38:56 -0000 1.94.2.2
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.94.2.1 2004/12/08 21:57:11 hyperion Exp $
+/* $Id: stubs.c,v 1.94.2.2 2004/12/13 09:38:56 hyperion Exp $
*
* KERNEL32.DLL stubs (STUB functions)
* Remove from this file, if you implement them.
@@ -649,20 +649,6 @@
/*
* @unimplemented
*/
-BOOL
-STDCALL
-GetThreadIOPendingFlag(
- HANDLE hThread,
- PBOOL lpIOIsPending
- )
-{
- STUB;
- return 0;
-}
-
-/*
- * @unimplemented
- */
UINT
STDCALL
GetWriteWatch(
@@ -1159,20 +1145,6 @@
*/
DWORD
STDCALL
-GetDllDirectoryW(
- DWORD nBufferLength,
- LPWSTR lpBuffer
- )
-{
- STUB;
- return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
GetFirmwareEnvironmentVariableW(
LPCWSTR lpName,
LPCWSTR lpGuid,
@@ -1311,19 +1283,6 @@
*/
BOOL
STDCALL
-SetDllDirectoryW(
- LPCWSTR lpPathName
- )
-{
- STUB;
- return TRUE;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
SetFirmwareEnvironmentVariableW(
LPCWSTR lpName,
LPCWSTR lpGuid,
@@ -1473,20 +1432,6 @@
*/
DWORD
STDCALL
-GetDllDirectoryA(
- DWORD nBufferLength,
- LPSTR lpBuffer
- )
-{
- STUB;
- return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
GetFirmwareEnvironmentVariableA(
LPCSTR lpName,
LPCSTR lpGuid,
@@ -1625,19 +1570,6 @@
*/
BOOL
STDCALL
-SetDllDirectoryA(
- LPCSTR lpPathName
- )
-{
- STUB;
- return TRUE;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
SetFirmwareEnvironmentVariableA(
LPCSTR lpName,
LPCSTR lpGuid,
reactos/lib/kernel32/misc
diff -u -r1.32.2.1 -r1.32.2.2
--- time.c 8 Dec 2004 21:57:11 -0000 1.32.2.1
+++ time.c 13 Dec 2004 09:38:56 -0000 1.32.2.2
@@ -1,4 +1,4 @@
-/* $Id: time.c,v 1.32.2.1 2004/12/08 21:57:11 hyperion Exp $
+/* $Id: time.c,v 1.32.2.2 2004/12/13 09:38:56 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/lib/kernel32/synch
diff -u -r1.31.2.1 -r1.31.2.2
--- wait.c 8 Dec 2004 21:57:12 -0000 1.31.2.1
+++ wait.c 13 Dec 2004 09:38:57 -0000 1.31.2.2
@@ -1,4 +1,4 @@
-/* $Id: wait.c,v 1.31.2.1 2004/12/08 21:57:12 hyperion Exp $
+/* $Id: wait.c,v 1.31.2.2 2004/12/13 09:38:57 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/lib/kernel32/thread
diff -u -r1.56.2.1 -r1.56.2.2
--- thread.c 8 Dec 2004 21:57:12 -0000 1.56.2.1
+++ thread.c 13 Dec 2004 09:38:57 -0000 1.56.2.2
@@ -1,4 +1,4 @@
-/* $Id: thread.c,v 1.56.2.1 2004/12/08 21:57:12 hyperion Exp $
+/* $Id: thread.c,v 1.56.2.2 2004/12/13 09:38:57 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@@ -794,4 +794,35 @@
return NT_SUCCESS(Status);
}
+/*
+ * @implemented
+ */
+BOOL STDCALL
+GetThreadIOPendingFlag(HANDLE hThread,
+ PBOOL lpIOIsPending)
+{
+ ULONG IoPending;
+ NTSTATUS Status;
+
+ if(lpIOIsPending == NULL)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ Status = NtQueryInformationThread(hThread,
+ ThreadIsIoPending,
+ (PVOID)&IoPending,
+ sizeof(IoPending),
+ NULL);
+ if(NT_SUCCESS(Status))
+ {
+ *lpIOIsPending = ((IoPending != 0) ? TRUE : FALSE);
+ return TRUE;
+ }
+
+ SetLastErrorByStatus(Status);
+ return FALSE;
+}
+
/* EOF */
reactos/lib/kjs
diff -u -r1.1.24.1 -r1.1.24.2
--- makefile 8 Dec 2004 21:57:12 -0000 1.1.24.1
+++ makefile 13 Dec 2004 09:38:57 -0000 1.1.24.2
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1.24.1 2004/12/08 21:57:12 hyperion Exp $
+# $Id: makefile,v 1.1.24.2 2004/12/13 09:38:57 hyperion Exp $
# Kernel JavaScript
#
# You can use this for various things but the most obvious is as a powerful
reactos/lib/libwine
diff -u -r1.3.6.1 -r1.3.6.2
--- makefile 8 Dec 2004 21:57:12 -0000 1.3.6.1
+++ makefile 13 Dec 2004 09:38:57 -0000 1.3.6.2
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.3.6.1 2004/12/08 21:57:12 hyperion Exp $
+# $Id: makefile,v 1.3.6.2 2004/12/13 09:38:57 hyperion Exp $
PATH_TO_TOP = ../..
reactos/lib/midimap
diff -u -r1.1.2.1 -r1.1.2.2
--- Makefile.ros-template 8 Dec 2004 21:57:12 -0000 1.1.2.1
+++ Makefile.ros-template 13 Dec 2004 09:38:57 -0000 1.1.2.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.1.2.1 2004/12/08 21:57:12 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.1.2.2 2004/12/13 09:38:57 hyperion Exp $
TARGET_NAME = midimap
reactos/lib/mpr
diff -u -r1.3.2.1 -r1.3.2.2
--- Makefile.ros-template 8 Dec 2004 21:57:12 -0000 1.3.2.1
+++ Makefile.ros-template 13 Dec 2004 09:38:57 -0000 1.3.2.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.3.2.1 2004/12/08 21:57:12 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.3.2.2 2004/12/13 09:38:57 hyperion Exp $
TARGET_NAME = mpr
reactos/lib/msacm
diff -u -r1.3.8.1 -r1.3.8.2
--- Makefile.ros-template 8 Dec 2004 21:57:12 -0000 1.3.8.1
+++ Makefile.ros-template 13 Dec 2004 09:38:57 -0000 1.3.8.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.3.8.1 2004/12/08 21:57:12 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.3.8.2 2004/12/13 09:38:57 hyperion Exp $
TARGET_NAME = msacm32
reactos/lib/msafd/misc
diff -u -r1.19.2.1 -r1.19.2.2
--- dllmain.c 8 Dec 2004 21:57:13 -0000 1.19.2.1
+++ dllmain.c 13 Dec 2004 09:38:57 -0000 1.19.2.2
@@ -335,9 +335,10 @@
/* Set up Address in TDI Format */
BindData->Address.TAAddressCount = 1;
BindData->Address.Address[0].AddressLength = SocketAddressLength - sizeof(SocketAddress->sa_family);
- RtlCopyMemory (&BindData->Address.Address[0].AddressType,
- SocketAddress,
- SocketAddressLength);
+ BindData->Address.Address[0].AddressType = SocketAddress->sa_family;
+ RtlCopyMemory (BindData->Address.Address[0].Address,
+ SocketAddress->sa_data,
+ SocketAddressLength - sizeof(SocketAddress->sa_family));
/* Get Address Information */
Socket->HelperData->WSHGetSockaddrType ((PSOCKADDR)SocketAddress,
@@ -519,7 +520,7 @@
/* Wait for Completition */
if (Status == STATUS_PENDING) {
- WaitForSingleObject(SockEvent, 0);
+ WaitForSingleObject(SockEvent, INFINITE);
}
/* Clear the Structures */
@@ -881,9 +882,10 @@
/* Set up Address in TDI Format */
ConnectInfo->RemoteAddress.TAAddressCount = 1;
ConnectInfo->RemoteAddress.Address[0].AddressLength = SocketAddressLength - sizeof(SocketAddress->sa_family);
- RtlCopyMemory (&ConnectInfo->RemoteAddress.Address[0].AddressType,
- SocketAddress,
- SocketAddressLength);
+ ConnectInfo->RemoteAddress.Address[0].AddressType = SocketAddress->sa_family;
+ RtlCopyMemory (ConnectInfo->RemoteAddress.Address[0].Address,
+ SocketAddress->sa_data,
+ SocketAddressLength - sizeof(SocketAddress->sa_family));
/* Tell AFD that we want Connection Data back, have it allocate a buffer */
if (lpCalleeData != NULL) {
@@ -997,7 +999,7 @@
/* Wait for return */
if (Status == STATUS_PENDING) {
- WaitForSingleObject(SockEvent, 0);
+ WaitForSingleObject(SockEvent, INFINITE);
}
AFD_DbgPrint(MID_TRACE,("Ending\n"));
@@ -1011,12 +1013,78 @@
INT
WSPAPI
WSPGetSockName(
- IN SOCKET s,
- OUT LPSOCKADDR name,
- IN OUT LPINT namelen,
+ IN SOCKET Handle,
+ OUT LPSOCKADDR Name,
+ IN OUT LPINT NameLength,
OUT LPINT lpErrno)
{
- return 0;
+ IO_STATUS_BLOCK IOSB;
+ ULONG TdiAddressSize;
+ PTDI_ADDRESS_INFO TdiAddress;
+ PTRANSPORT_ADDRESS SocketAddress;
+ PSOCKET_INFORMATION Socket = NULL;
+ NTSTATUS Status;
+ HANDLE SockEvent;
+
+ Status = NtCreateEvent( &SockEvent, GENERIC_READ | GENERIC_WRITE,
+ NULL, 1, FALSE );
+
+ if( !NT_SUCCESS(Status) ) return SOCKET_ERROR;
+
+ /* Get the Socket Structure associate to this Socket*/
+ Socket = GetSocketStructure(Handle);
+
+ /* Allocate a buffer for the address */
+ TdiAddressSize = FIELD_OFFSET(TDI_ADDRESS_INFO,
+ Address.Address[0].Address) +
+ Socket->SharedData.SizeOfLocalAddress;
+ TdiAddress = HeapAlloc(GlobalHeap, 0, TdiAddressSize);
+
+ if ( TdiAddress == NULL ) {
+ NtClose( SockEvent );
+ *lpErrno = WSAENOBUFS;
+ return SOCKET_ERROR;
+ }
+
+ SocketAddress = &TdiAddress->Address;
+
+ /* Send IOCTL */
+ Status = NtDeviceIoControlFile( (HANDLE)Socket->Handle,
+ SockEvent,
+ NULL,
+ NULL,
+ &IOSB,
+ IOCTL_AFD_GET_SOCK_NAME,
+ NULL,
+ 0,
+ TdiAddress,
+ TdiAddressSize);
+
+ /* Wait for return */
+ if (Status == STATUS_PENDING) {
+ WaitForSingleObject(SockEvent, INFINITE);
+ Status = IOSB.Status;
+ }
+
+ NtClose( SockEvent );
+
+ if (NT_SUCCESS(Status)) {
+ if (*NameLength >= SocketAddress->Address[0].AddressLength) {
+ Name->sa_family = SocketAddress->Address[0].AddressType;
+ RtlCopyMemory (Name->sa_data,
+ SocketAddress->Address[0].Address,
+ SocketAddress->Address[0].AddressLength);
+ HeapFree(GlobalHeap, 0, TdiAddress);
+ return 0;
+ } else {
+ HeapFree(GlobalHeap, 0, TdiAddress);
+ *lpErrno = WSAEFAULT;
+ return SOCKET_ERROR;
+ }
+ }
+
+ return MsafdReturnWithErrno
+ ( IOSB.Status, lpErrno, 0, NULL );
}
@@ -1193,7 +1261,7 @@
/* Wait for return */
if (Status == STATUS_PENDING) {
- WaitForSingleObject(SockEvent, 0);
+ WaitForSingleObject(SockEvent, INFINITE);
}
/* Return Information */
@@ -1249,7 +1317,7 @@
/* Wait for return */
if (Status == STATUS_PENDING) {
- WaitForSingleObject(SockEvent, 0);
+ WaitForSingleObject(SockEvent, INFINITE);
}
NtClose( SockEvent );
@@ -1308,7 +1376,7 @@
/* Wait for Completition */
if (Status == STATUS_PENDING) {
- WaitForSingleObject(SockEvent, 0);
+ WaitForSingleObject(SockEvent, INFINITE);
}
NtClose( SockEvent );
reactos/lib/msafd/misc
diff -u -r1.11.2.1 -r1.11.2.2
--- sndrcv.c 8 Dec 2004 21:57:13 -0000 1.11.2.1
+++ sndrcv.c 13 Dec 2004 09:38:58 -0000 1.11.2.2
@@ -321,7 +321,7 @@
/* Wait for completition of not overlapped */
if (Status == STATUS_PENDING && lpOverlapped == NULL) {
- WaitForSingleObject(SockEvent, 0); // BUGBUG, shouldn wait infintely for receive...
+ WaitForSingleObject(SockEvent, INFINITE); // BUGBUG, shouldn wait infintely for receive...
Status = IOSB->Status;
}
@@ -437,7 +437,7 @@
/* Wait for completition of not overlapped */
if (Status == STATUS_PENDING && lpOverlapped == NULL) {
- WaitForSingleObject(SockEvent, 0); // BUGBUG, shouldn wait infintely for send...
+ WaitForSingleObject(SockEvent, INFINITE); // BUGBUG, shouldn wait infintely for send...
Status = IOSB->Status;
}
@@ -563,7 +563,7 @@
/* Wait for completition of not overlapped */
if (Status == STATUS_PENDING && lpOverlapped == NULL) {
- WaitForSingleObject(SockEvent, 0); // BUGBUG, shouldn wait infintely for send...
+ WaitForSingleObject(SockEvent, INFINITE); // BUGBUG, shouldn wait infintely for send...
Status = IOSB->Status;
}
reactos/lib/msvcrt
diff -u -r1.48.6.1 -r1.48.6.2
--- Makefile 8 Dec 2004 21:57:13 -0000 1.48.6.1
+++ Makefile 13 Dec 2004 09:38:58 -0000 1.48.6.2
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.48.6.1 2004/12/08 21:57:13 hyperion Exp $
+# $Id: Makefile,v 1.48.6.2 2004/12/13 09:38:58 hyperion Exp $
PATH_TO_TOP = ../..
@@ -272,7 +272,9 @@
misc/environ.o \
misc/getargs.o \
misc/initterm.o \
+ misc/lock.o \
misc/purecall.o \
+ misc/stubs.o \
misc/tls.o
PROCESS_OBJECTS = \
@@ -458,8 +460,6 @@
wine/cpp.o \
wine/cppexcept.o \
wine/heap.o \
- wine/lock.o \
- wine/main.o \
wine/thread.o
WSTRING_OBJECTS = \
reactos/lib/msvcrt
diff -u -r1.3 -r1.3.20.1
--- README.txt 27 Feb 2004 22:39:37 -0000 1.3
+++ README.txt 13 Dec 2004 09:38:59 -0000 1.3.20.1
@@ -1,6 +1,4 @@
This file contains information about the status the MSVCRT runtime in ReactOS.
-The sources for this runtime have been cobbled together from all sorts of places
-from around the 'net and as such it has its share of bugs.
Please note that all of the MSVCRT.DLL runtime sources are license GPL unless
otherwise noted. The sources from WINE are dual licensed GPL/LGPL.
@@ -13,7 +11,3 @@
Write a decent regression test suite.
Convert all C++ style comments to C style comments.
????
-
-WINE Port Notes:
-More cleanup
-Disable of remove duplicate code. (When in doubt check the def)
reactos/lib/msvcrt/setjmp/i386
diff -u -r1.1.34.1 -r1.1.34.2
--- setjmp.s 8 Dec 2004 21:57:13 -0000 1.1.34.1
+++ setjmp.s 13 Dec 2004 09:38:59 -0000 1.1.34.2
@@ -1,4 +1,4 @@
-/* $Id: setjmp.s,v 1.1.34.1 2004/12/08 21:57:13 hyperion Exp $
+/* $Id: setjmp.s,v 1.1.34.2 2004/12/13 09:38:59 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/lib/msvcrt/wine
diff -N .cvsignore
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ .cvsignore 13 Dec 2004 09:38:59 -0000 1.1.2.1
@@ -0,0 +1,11 @@
+*.coff
+*.dll
+*.d
+*.o
+*.sym
+*.dsp
+*.dsw
+*.ncb
+*.opt
+*.map
+*.gch
reactos/lib/msvcrt/wine
diff -u -r1.2 -r1.2.20.1
--- cpp.c 19 Mar 2004 22:58:10 -0000 1.2
+++ cpp.c 13 Dec 2004 09:38:59 -0000 1.2.20.1
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "config.h"
+#include "wine/config.h"
#include "wine/port.h"
#include <stdarg.h>
@@ -37,7 +37,7 @@
#include "msvcrt.h"
#include "cppexcept.h"
-#include "mtdll.h"
+#include <msvcrt/internal/mtdll.h>
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
@@ -1023,7 +1023,6 @@
{
MSVCRT_thread_data *data = msvcrt_get_thread_data();
if (data->terminate_handler) data->terminate_handler();
-// MSVCRT_abort();
abort();
}
reactos/lib/msvcrt/wine
diff -u -r1.3 -r1.3.8.1
--- cppexcept.c 20 Aug 2004 15:19:38 -0000 1.3
+++ cppexcept.c 13 Dec 2004 09:38:59 -0000 1.3.8.1
@@ -23,7 +23,7 @@
* www.thecodeproject.com.
*/
-#include "config.h"
+#include "wine/config.h"
#include "wine/port.h"
#include <stdarg.h>
reactos/lib/msvcrt/wine
diff -u -r1.1 -r1.1.24.1
--- heap.c 24 Dec 2003 23:20:08 -0000 1.1
+++ heap.c 13 Dec 2004 09:38:59 -0000 1.1.24.1
@@ -21,12 +21,12 @@
* handler and non atomic heap operations
*/
-#include "msvcrt.h"
-#include "msvcrt/errno.h"
+#include "precomp.h"
+#include "msvcrt/errno.h"
#include "msvcrt/malloc.h"
#include "msvcrt/stdlib.h"
-#include "mtdll.h"
+#include <msvcrt/internal/mtdll.h>
#include "wine/debug.h"
@@ -48,7 +48,7 @@
*/
void* MSVCRT_operator_new(unsigned long size)
{
- void *retval = HeapAlloc(GetProcessHeap(), 0, size);
+ void *retval = malloc(size);
TRACE("(%ld) returning %p\n", size, retval);
LOCK_HEAP;
if(!retval && MSVCRT_new_handler)
@@ -63,7 +63,7 @@
void MSVCRT_operator_delete(void *mem)
{
TRACE("(%p)\n", mem);
- HeapFree(GetProcessHeap(), 0, mem);
+ free(mem);
}
@@ -119,173 +119,3 @@
UNLOCK_HEAP;
return old_mode;
}
-
-#if 0 /* __REACTOS__ */
-/*********************************************************************
- * _callnewh (MSVCRT.@)
- */
-int _callnewh(unsigned long size)
-{
- if(MSVCRT_new_handler)
- (*MSVCRT_new_handler)(size);
- return 0;
-}
-
-/*********************************************************************
- * _expand (MSVCRT.@)
- */
-void* _expand(void* mem, MSVCRT_size_t size)
-{
- return HeapReAlloc(GetProcessHeap(), HEAP_REALLOC_IN_PLACE_ONLY, mem, size);
-}
-
-/*********************************************************************
- * _heapchk (MSVCRT.@)
- */
-int _heapchk(void)
-{
- if (!HeapValidate( GetProcessHeap(), 0, NULL))
- {
- MSVCRT__set_errno(GetLastError());
- return _HEAPBADNODE;
- }
- return _HEAPOK;
-}
-
-/*********************************************************************
- * _heapmin (MSVCRT.@)
- */
-int _heapmin(void)
-{
- if (!HeapCompact( GetProcessHeap(), 0 ))
- {
- if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
- MSVCRT__set_errno(GetLastError());
- return -1;
- }
- return 0;
-}
-
-/*********************************************************************
- * _heapwalk (MSVCRT.@)
- */
-int _heapwalk(_HEAPINFO* next)
-{
- PROCESS_HEAP_ENTRY phe;
-
- LOCK_HEAP;
- phe.lpData = next->_pentry;
- phe.cbData = next->_size;
- phe.wFlags = next->_useflag == _USEDENTRY ? PROCESS_HEAP_ENTRY_BUSY : 0;
-
- if (phe.lpData && phe.wFlags & PROCESS_HEAP_ENTRY_BUSY &&
- !HeapValidate( GetProcessHeap(), 0, phe.lpData ))
- {
- UNLOCK_HEAP;
- MSVCRT__set_errno(GetLastError());
- return _HEAPBADNODE;
- }
-
- do
- {
- if (!HeapWalk( GetProcessHeap(), &phe ))
- {
- UNLOCK_HEAP;
- if (GetLastError() == ERROR_NO_MORE_ITEMS)
- return _HEAPEND;
- MSVCRT__set_errno(GetLastError());
- if (!phe.lpData)
- return _HEAPBADBEGIN;
- return _HEAPBADNODE;
- }
- } while (phe.wFlags & (PROCESS_HEAP_REGION|PROCESS_HEAP_UNCOMMITTED_RANGE));
-
- UNLOCK_HEAP;
- next->_pentry = phe.lpData;
- next->_size = phe.cbData;
- next->_useflag = phe.wFlags & PROCESS_HEAP_ENTRY_BUSY ? _USEDENTRY : _FREEENTRY;
- return _HEAPOK;
-}
-
-/*********************************************************************
- * _heapset (MSVCRT.@)
- */
-int _heapset(unsigned int value)
-{
- int retval;
- _HEAPINFO heap;
-
- memset( &heap, 0, sizeof(_HEAPINFO) );
- LOCK_HEAP;
- while ((retval = _heapwalk(&heap)) == _HEAPOK)
- {
- if (heap._useflag == _FREEENTRY)
- memset(heap._pentry, value, heap._size);
- }
- UNLOCK_HEAP;
- return retval == _HEAPEND? _HEAPOK : retval;
-}
-
-/*********************************************************************
- * _heapadd (MSVCRT.@)
- */
-int _heapadd(void* mem, MSVCRT_size_t size)
-{
- TRACE("(%p,%d) unsupported in Win32\n", mem,size);
- *MSVCRT__errno() = MSVCRT_ENOSYS;
- return -1;
-}
-
-/*********************************************************************
- * _msize (MSVCRT.@)
- */
-MSVCRT_size_t _msize(void* mem)
-{
- long size = HeapSize(GetProcessHeap(),0,mem);
- if (size == -1)
- {
- WARN(":Probably called with non wine-allocated memory, ret = -1\n");
- /* At least the Win32 crtdll/msvcrt also return -1 in this case */
- }
- return size;
-}
-
-/*********************************************************************
- * calloc (MSVCRT.@)
- */
-void* MSVCRT_calloc(MSVCRT_size_t size, MSVCRT_size_t count)
-{
- return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size * count );
-}
-
-/*********************************************************************
- * free (MSVCRT.@)
- */
-void MSVCRT_free(void* ptr)
-{
- HeapFree(GetProcessHeap(),0,ptr);
-}
-
-/*********************************************************************
- * malloc (MSVCRT.@)
- */
-void* MSVCRT_malloc(MSVCRT_size_t size)
-{
- void *ret = HeapAlloc(GetProcessHeap(),0,size);
- if (!ret)
- MSVCRT__set_errno(GetLastError());
- return ret;
-}
-
-/*********************************************************************
- * realloc (MSVCRT.@)
- */
-void* MSVCRT_realloc(void* ptr, MSVCRT_size_t size)
-{
- if (!ptr) return MSVCRT_malloc(size);
- if (size) return HeapReAlloc(GetProcessHeap(), 0, ptr, size);
- MSVCRT_free(ptr);
- return NULL;
-}
-
-#endif /* __REACTOS__ */
reactos/lib/msvcrt/wine
diff -u -r1.5 -r1.5.8.1
--- thread.c 20 Aug 2004 15:19:38 -0000 1.5
+++ thread.c 13 Dec 2004 09:38:59 -0000 1.5.8.1
@@ -22,13 +22,18 @@
#include "msvcrt.h"
#include "msvcrt/malloc.h"
-#include "process.h"
+#include "msvcrt/process.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
void _amsg_exit (int errnum);
+/* Index to TLS */
+DWORD MSVCRT_tls_index;
+
+typedef void (*_beginthread_start_routine_t)(void *);
+typedef unsigned int (__stdcall *_beginthreadex_start_routine_t)(void *);
/********************************************************************/
@@ -50,10 +55,11 @@
if (!(ptr = TlsGetValue( MSVCRT_tls_index )))
{
if (!(ptr = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ptr) )))
- //MSVCRT__amsg_exit( _RT_THREAD ); ROS
- _amsg_exit( _RT_THREAD ); //ROS
-// if (!TlsSetValue( MSVCRT_tls_index, ptr )) MSVCRT__amsg_exit( _RT_THREAD );
- if (!TlsSetValue( MSVCRT_tls_index, ptr )) _amsg_exit( _RT_THREAD );
+ _amsg_exit( _RT_THREAD );
+ if (!TlsSetValue( MSVCRT_tls_index, ptr ))
+ _amsg_exit( _RT_THREAD );
+ if (!TlsSetValue( MSVCRT_tls_index, ptr ))
+ _amsg_exit( _RT_THREAD );
}
SetLastError( err );
return ptr;
@@ -70,8 +76,7 @@
* away seems safer.
*/
memcpy(&local_trampoline,arg,sizeof(local_trampoline));
-// MSVCRT_free(arg); //ROS
- free(arg); //ROS
+ free(arg);
local_trampoline.start_address(local_trampoline.arglist);
return 0;
@@ -93,7 +98,6 @@
* starts... typically after this function has returned.
* _beginthread_trampoline is responsible for freeing the trampoline
*/
-// trampoline=MSVCRT_malloc(sizeof(*trampoline));
trampoline=malloc(sizeof(*trampoline));
trampoline->start_address = start_address;
trampoline->arglist = arglist;
@@ -102,47 +106,3 @@
return (unsigned long)CreateThread(NULL, stack_size, _beginthread_trampoline,
trampoline, 0, NULL);
}
-#if 0 /* __REACTOS__ */
-/*********************************************************************
- * _beginthreadex (MSVCRT.@)
- */
-unsigned long _beginthreadex(
- void *security, /* [in] Security descriptor for new thread; must be NULL for Windows 9x applications */
- unsigned int stack_size, /* [in] Stack size for new thread or 0 */
- _beginthreadex_start_routine_t start_address, /* [in] Start address of routine that begins execution of new thread */
- void *arglist, /* [in] Argument list to be passed to new thread or NULL */
- unsigned int initflag, /* [in] Initial state of new thread (0 for running or CREATE_SUSPEND for suspended) */
- unsigned int *thrdaddr) /* [out] Points to a 32-bit variable that receives the thread identifier */
-{
- TRACE("(%p, %d, %p, %p, %d, %p)\n", security, stack_size, start_address, arglist, initflag, thrdaddr);
-
- /* FIXME */
- return (unsigned long)CreateThread(security, stack_size,
- (LPTHREAD_START_ROUTINE) start_address,
- arglist, initflag, (LPDWORD) thrdaddr);
-}
-
-/*********************************************************************
- * _endthread (MSVCRT.@)
- */
-void _endthread(void)
-{
- TRACE("(void)\n");
-
- /* FIXME */
- ExitThread(0);
-}
-
-/*********************************************************************
- * _endthreadex (MSVCRT.@)
- */
-void _endthreadex(
- unsigned int retval) /* [in] Thread exit code */
-{
- TRACE("(%d)\n", retval);
-
- /* FIXME */
- ExitThread(retval);
-}
-
-#endif /* __REACTOS__ */
reactos/lib/msvcrt/wine
diff -N config.h
--- config.h 4 Jan 2004 14:41:23 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1 +0,0 @@
-#include_next <wine/config.h>
reactos/lib/msvcrt/wine
diff -N ctype.h
--- ctype.h 27 Feb 2004 22:39:38 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,115 +0,0 @@
-/*
- * Character type definitions
- *
- * Derived from the mingw header written by Colin Peters.
- * Modified for Wine use by Jon Griffiths and Francois Gouget.
- * This file is in the public domain.
- */
-#ifndef __WINE_CTYPE_H
-#define __WINE_CTYPE_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
-
-#ifndef MSVCRT
-# ifdef USE_MSVCRT_PREFIX
-# define MSVCRT(x) MSVCRT_##x
-# else
-# define MSVCRT(x) x
-# endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef MSVCRT_WCHAR_T_DEFINED
-#define MSVCRT_WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short MSVCRT(wchar_t);
-#endif
-#endif
-
-#ifndef USE_MSVCRT_PREFIX
-# ifndef WEOF
-# define WEOF (wint_t)(0xFFFF)
-# endif
-#else
-# ifndef MSVCRT_WEOF
-# define MSVCRT_WEOF (MSVCRT_wint_t)(0xFFFF)
-# endif
-#endif /* USE_MSVCRT_PREFIX */
-
-#ifndef MSVCRT_WCTYPE_T_DEFINED
-typedef MSVCRT(wchar_t) MSVCRT(wint_t);
-typedef MSVCRT(wchar_t) MSVCRT(wctype_t);
-#define MSVCRT_WCTYPE_T_DEFINED
-#endif
-
-/* ASCII char classification table - binary compatible */
-#define _UPPER 0x0001 /* C1_UPPER */
-#define _LOWER 0x0002 /* C1_LOWER */
-#define _DIGIT 0x0004 /* C1_DIGIT */
-#define _SPACE 0x0008 /* C1_SPACE */
-#define _PUNCT 0x0010 /* C1_PUNCT */
-#define _CONTROL 0x0020 /* C1_CNTRL */
-#define _BLANK 0x0040 /* C1_BLANK */
-#define _HEX 0x0080 /* C1_XDIGIT */
-#define _LEADBYTE 0x8000
-#define _ALPHA (0x0100|_UPPER|_LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */
-
-int MSVCRT(__isascii)(int);
-int MSVCRT(__iscsym)(int);
-int MSVCRT(__iscsymf)(int);
-int MSVCRT(__toascii)(int);
-int MSVCRT(_isctype)(int,int);
-int MSVCRT(_tolower)(int);
-int MSVCRT(_toupper)(int);
-int MSVCRT(isalnum)(int);
-int MSVCRT(isalpha)(int);
-int MSVCRT(iscntrl)(int);
-int MSVCRT(isdigit)(int);
-int MSVCRT(isgraph)(int);
-int MSVCRT(islower)(int);
-int MSVCRT(isprint)(int);
-int MSVCRT(ispunct)(int);
-int MSVCRT(isspace)(int);
-int MSVCRT(isupper)(int);
-int MSVCRT(isxdigit)(int);
-int MSVCRT(tolower)(int);
-int MSVCRT(toupper)(int);
-
-#ifndef MSVCRT_WCTYPE_DEFINED
-#define MSVCRT_WCTYPE_DEFINED
-int MSVCRT(is_wctype)(MSVCRT(wint_t),MSVCRT(wctype_t));
-int MSVCRT(isleadbyte)(int);
-int MSVCRT(iswalnum)(MSVCRT(wint_t));
-int MSVCRT(iswalpha)(MSVCRT(wint_t));
-int MSVCRT(iswascii)(MSVCRT(wint_t));
-int MSVCRT(iswcntrl)(MSVCRT(wint_t));
-int MSVCRT(iswctype)(MSVCRT(wint_t),MSVCRT(wctype_t));
-int MSVCRT(iswdigit)(MSVCRT(wint_t));
-int MSVCRT(iswgraph)(MSVCRT(wint_t));
-int MSVCRT(iswlower)(MSVCRT(wint_t));
-int MSVCRT(iswprint)(MSVCRT(wint_t));
-int MSVCRT(iswpunct)(MSVCRT(wint_t));
-int MSVCRT(iswspace)(MSVCRT(wint_t));
-int MSVCRT(iswupper)(MSVCRT(wint_t));
-int MSVCRT(iswxdigit)(MSVCRT(wint_t));
-MSVCRT(wchar_t) MSVCRT(towlower)(MSVCRT(wchar_t));
-MSVCRT(wchar_t) MSVCRT(towupper)(MSVCRT(wchar_t));
-#endif /* MSVCRT_WCTYPE_DEFINED */
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#ifndef USE_MSVCRT_PREFIX
-static inline int isascii(int c) { return __isascii(c); }
-static inline int iscsym(int c) { return __iscsym(c); }
-static inline int iscsymf(int c) { return __iscsymf(c); }
-static inline int toascii(int c) { return __toascii(c); }
-#endif /* USE_MSVCRT_PREFIX */
-
-#endif /* __WINE_CTYPE_H */
reactos/lib/msvcrt/wine
diff -N exit.c
--- exit.c 24 Dec 2003 23:20:08 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,261 +0,0 @@
-/*
- * msvcrt.dll exit functions
- *
- * Copyright 2000 Jon Griffiths
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#include <stdio.h>
-#include "msvcrt.h"
-
-#include "msvcrt/conio.h"
-#include "msvcrt/stdlib.h"
-#include "mtdll.h"
-#include "winuser.h"
-
-#include "wine/debug.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
-
-/* MT */
-#define LOCK_EXIT _mlock(_EXIT_LOCK1)
-#define UNLOCK_EXIT _munlock(_EXIT_LOCK1)
-
-static _onexit_t *MSVCRT_atexit_table = NULL;
-static int MSVCRT_atexit_table_size = 0;
-static int MSVCRT_atexit_registered = 0; /* Points to free slot */
-
-static LPCSTR szMsgBoxTitle = "Wine C++ Runtime Library";
-
-extern int MSVCRT_app_type;
-extern char *MSVCRT__pgmptr;
-
-/* INTERNAL: call atexit functions */
-void __MSVCRT__call_atexit(void)
-{
- /* Note: should only be called with the exit lock held */
- TRACE("%d atext functions to call\n", MSVCRT_atexit_registered);
- /* Last registered gets executed first */
- while (MSVCRT_atexit_registered > 0)
- {
- MSVCRT_atexit_registered--;
- TRACE("next is %p\n",MSVCRT_atexit_table[MSVCRT_atexit_registered]);
- if (MSVCRT_atexit_table[MSVCRT_atexit_registered])
- (*MSVCRT_atexit_table[MSVCRT_atexit_registered])();
- TRACE("returned\n");
- }
-}
-
-/*********************************************************************
- * __dllonexit (MSVCRT.@)
- */
-_onexit_t __dllonexit(_onexit_t func, _onexit_t **start, _onexit_t **end)
-{
- _onexit_t *tmp;
- int len;
-
- TRACE("(%p,%p,%p)\n", func, start, end);
-
- if (!start || !*start || !end || !*end)
- {
- FIXME("bad table\n");
- return NULL;
- }
-
- len = (*end - *start);
-
- TRACE("table start %p-%p, %d entries\n", *start, *end, len);
-
- if (++len <= 0)
- return NULL;
-
- tmp = (_onexit_t *)MSVCRT_realloc(*start, len * sizeof(tmp));
- if (!tmp)
- return NULL;
- *start = tmp;
- *end = tmp + len;
- tmp[len - 1] = func;
- TRACE("new table start %p-%p, %d entries\n", *start, *end, len);
- return func;
-}
-
-/*********************************************************************
- * _exit (MSVCRT.@)
- */
-void MSVCRT__exit(int exitcode)
-{
- TRACE("(%d)\n", exitcode);
- ExitProcess(exitcode);
-}
-
-/* Print out an error message with an option to debug */
-static void DoMessageBox(LPCSTR lead, LPCSTR message)
-{
- MSGBOXPARAMSA msgbox;
- char text[2048];
- INT ret;
-
- snprintf(text,sizeof(text),"%s\n\nProgram: %s\n%s\n\n"
- "Press OK to exit the program, or Cancel to start the Wine debugger.\n ",
- lead, MSVCRT__pgmptr, message);
-
- msgbox.cbSize = sizeof(msgbox);
- msgbox.hwndOwner = GetActiveWindow();
- msgbox.hInstance = 0;
- msgbox.lpszText = text;
- msgbox.lpszCaption = szMsgBoxTitle;
- msgbox.dwStyle = MB_OKCANCEL|MB_ICONERROR;
- msgbox.lpszIcon = NULL;
- msgbox.dwContextHelpId = 0;
- msgbox.lpfnMsgBoxCallback = NULL;
- msgbox.dwLanguageId = LANG_NEUTRAL;
-
- ret = MessageBoxIndirectA(&msgbox);
- if (ret == IDCANCEL)
- DebugBreak();
-}
-
-/*********************************************************************
- * _amsg_exit (MSVCRT.@)
- */
-void MSVCRT__amsg_exit(int errnum)
-{
- TRACE("(%d)\n", errnum);
- /* FIXME: text for the error number. */
- if (MSVCRT_app_type == 2)
- {
- char text[32];
- sprintf(text, "Error: R60%d",errnum);
- DoMessageBox("Runtime error!", text);
- }
- else
- _cprintf("\nruntime error R60%d\n",errnum);
- MSVCRT__exit(255);
-}
-
-/*********************************************************************
- * abort (MSVCRT.@)
- */
-void MSVCRT_abort(void)
-{
- TRACE("()\n");
- if (MSVCRT_app_type == 2)
- {
- DoMessageBox("Runtime error!", "abnormal program termination");
- }
- else
- _cputs("\nabnormal program termination\n");
- MSVCRT__exit(3);
-}
-
-/*********************************************************************
- * _assert (MSVCRT.@)
- */
-void MSVCRT__assert(const char* str, const char* file, unsigned int line)
-{
- TRACE("(%s,%s,%d)\n",str,file,line);
- if (MSVCRT_app_type == 2)
- {
- char text[2048];
- snprintf(text, sizeof(text), "File: %s\nLine: %d\n\nEpression: \"%s\"", file, line, str);
- DoMessageBox("Assertion failed!", text);
- }
- else
- _cprintf("Assertion failed: %s, file %s, line %d\n\n",str, file, line);
- MSVCRT__exit(3);
-}
-
-/*********************************************************************
- * _c_exit (MSVCRT.@)
- */
-void MSVCRT__c_exit(void)
-{
- TRACE("(void)\n");
- /* All cleanup is done on DLL detach; Return to caller */
-}
-
-/*********************************************************************
- * _cexit (MSVCRT.@)
- */
-void MSVCRT__cexit(void)
-{
- TRACE("(void)\n");
- /* All cleanup is done on DLL detach; Return to caller */
-}
-
-/*********************************************************************
- * _onexit (MSVCRT.@)
- */
-_onexit_t _onexit(_onexit_t func)
-{
- TRACE("(%p)\n",func);
-
- if (!func)
- return NULL;
-
- LOCK_EXIT;
- if (MSVCRT_atexit_registered > MSVCRT_atexit_table_size - 1)
- {
- _onexit_t *newtable;
- TRACE("expanding table\n");
- newtable = MSVCRT_calloc(sizeof(void *),MSVCRT_atexit_table_size + 32);
- if (!newtable)
- {
- TRACE("failed!\n");
- UNLOCK_EXIT;
- return NULL;
- }
- memcpy (newtable, MSVCRT_atexit_table, MSVCRT_atexit_table_size);
- MSVCRT_atexit_table_size += 32;
- if (MSVCRT_atexit_table)
- MSVCRT_free (MSVCRT_atexit_table);
- MSVCRT_atexit_table = newtable;
- }
- MSVCRT_atexit_table[MSVCRT_atexit_registered] = func;
- MSVCRT_atexit_registered++;
- UNLOCK_EXIT;
- return func;
-}
-
-/*********************************************************************
- * exit (MSVCRT.@)
- */
-void MSVCRT_exit(int exitcode)
-{
- TRACE("(%d)\n",exitcode);
- LOCK_EXIT;
- __MSVCRT__call_atexit();
- UNLOCK_EXIT;
- ExitProcess(exitcode);
-}
-
-/*********************************************************************
- * atexit (MSVCRT.@)
- */
-int MSVCRT_atexit(void (*func)(void))
-{
- TRACE("(%p)\n", func);
- return _onexit((_onexit_t)func) == (_onexit_t)func ? 0 : -1;
-}
-
-
-/*********************************************************************
- * _purecall (MSVCRT.@)
- */
-void _purecall(void)
-{
- TRACE("(void)\n");
- MSVCRT__amsg_exit( 25 );
-}
reactos/lib/msvcrt/wine
diff -N lock.c
--- lock.c 24 Dec 2003 23:20:08 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 2002, TransGaming Technologies Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "config.h"
-#include "wine/port.h"
-
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "winreg.h"
-#include "wine/winternl.h"
-#include "wine/exception.h"
-#include "winnt.h"
-#include "excpt.h"
-#include "wine/debug.h"
-#include "msvcrt/malloc.h"
-#include "msvcrt/stdlib.h"
-
-#include "msvcrt.h"
-#include "cppexcept.h"
-#include "mtdll.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
-
-typedef struct
-{
- BOOL bInit;
- CRITICAL_SECTION crit;
-} LOCKTABLEENTRY;
-
-static LOCKTABLEENTRY lock_table[ _TOTAL_LOCKS ];
-
-static inline void msvcrt_mlock_set_entry_initialized( int locknum, BOOL initialized )
-{
- lock_table[ locknum ].bInit = initialized;
-}
-
-static inline void msvcrt_initialize_mlock( int locknum )
-{
- InitializeCriticalSection( &(lock_table[ locknum ].crit) );
- msvcrt_mlock_set_entry_initialized( locknum, TRUE );
-}
-
-static inline void msvcrt_uninitialize_mlock( int locknum )
-{
- DeleteCriticalSection( &(lock_table[ locknum ].crit) );
- msvcrt_mlock_set_entry_initialized( locknum, FALSE );
-}
-
-/**********************************************************************
- * msvcrt_init_mt_locks (internal)
- *
- * Initialize the table lock. All other locks will be initialized
- * upon first use.
- *
- */
-void msvcrt_init_mt_locks(void)
-{
- int i;
-
- TRACE( "initializing mtlocks\n" );
-
- /* Initialize the table */
- for( i=0; i < _TOTAL_LOCKS; i++ )
- {
- msvcrt_mlock_set_entry_initialized( i, FALSE );
- }
-
- /* Initialize our lock table lock */
- msvcrt_initialize_mlock( _LOCKTAB_LOCK );
-}
-
-/**********************************************************************
- * msvcrt_free_mt_locks (internal)
- *
- * Uninitialize all mt locks. Assume that neither _lock or _unlock will
- * be called once we're calling this routine (ie _LOCKTAB_LOCK can be deleted)
- *
- */
-void msvcrt_free_mt_locks(void)
-{
- int i;
-
- TRACE( ": uninitializing all mtlocks\n" );
-
- /* Uninitialize the table */
- for( i=0; i < _TOTAL_LOCKS; i++ )
- {
- if( lock_table[ i ].bInit == TRUE )
- {
- msvcrt_uninitialize_mlock( i );
- }
- }
-}
-
-
-/**********************************************************************
- * _lock (MSVCRT.@)
- */
-void _lock( int locknum )
-{
- TRACE( "(%d)\n", locknum );
-
- /* If the lock doesn't exist yet, create it */
- if( lock_table[ locknum ].bInit == FALSE )
- {
- /* Lock while we're changing the lock table */
- _lock( _LOCKTAB_LOCK );
-
- /* Check again if we've got a bit of a race on lock creation */
- if( lock_table[ locknum ].bInit == FALSE )
- {
- TRACE( ": creating lock #%d\n", locknum );
- msvcrt_initialize_mlock( locknum );
- }
-
- /* Unlock ourselves */
- _unlock( _LOCKTAB_LOCK );
- }
-
- EnterCriticalSection( &(lock_table[ locknum ].crit) );
-}
-
-/**********************************************************************
- * _unlock (MSVCRT.@)
- *
- * NOTE: There is no error detection to make sure the lock exists and is acquired.
- */
-void _unlock( int locknum )
-{
- TRACE( "(%d)\n", locknum );
-
- LeaveCriticalSection( &(lock_table[ locknum ].crit) );
-}
-
reactos/lib/msvcrt/wine
diff -N main.c
--- main.c 20 Aug 2004 15:19:38 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,217 +0,0 @@
-/*
- * msvcrt.dll initialisation functions
- *
- * Copyright 2000 Jon Griffiths
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * This file isnt really the main file in ReactOS msvcrt.
- * -sedwards
- */
-
-#include "config.h"
-#include "wine/port.h"
-
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "winreg.h"
-#include "wine/winternl.h"
-#include "wine/exception.h"
-#include "winnt.h"
-#include "excpt.h"
-#include "wine/debug.h"
-#include "msvcrt/malloc.h"
-#include "msvcrt/stdlib.h"
-#include "msvcrt/locale.h"
-#include "msvcrt/stdio.h"
-
-#include "msvcrt.h"
-#include "cppexcept.h"
-#include "mtdll.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
-
-/* Index to TLS */
-DWORD MSVCRT_tls_index;
-
-static inline BOOL msvcrt_init_tls(void);
-static inline BOOL msvcrt_free_tls(void);
-//const char* msvcrt_get_reason(DWORD reason) WINE_UNUSED;
-
-typedef void* (*MSVCRT_malloc_func)(size_t);
-
-char* MSVCRT___unDName(char *,const char*,int,MSVCRT_malloc_func,MSVCRT_free_func,unsigned short int);
-char* MSVCRT___unDNameEx(char *,const char*,int,MSVCRT_malloc_func,MSVCRT_free_func,void *,unsigned short int);
-
-#if 0 /* __REACTOS__ */
-
-/*********************************************************************
- * Init
- */
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
-{
- MSVCRT_thread_data *tls;
-
- TRACE("(%p, %s, %p) pid(%lx), tid(%lx), tls(%ld)\n",
- hinstDLL, msvcrt_get_reason(fdwReason), lpvReserved,
- GetCurrentProcessId(), GetCurrentThreadId(),
- (long)MSVCRT_tls_index);
-
- switch (fdwReason)
- {
- case DLL_PROCESS_ATTACH:
- if (!msvcrt_init_tls())
- return FALSE;
- msvcrt_init_mt_locks();
- msvcrt_init_io();
- msvcrt_init_console();
- msvcrt_init_args();
- MSVCRT_setlocale(0, "C");
- TRACE("finished process init\n");
- break;
- case DLL_THREAD_ATTACH:
- break;
- case DLL_PROCESS_DETACH:
- msvcrt_free_mt_locks();
- msvcrt_free_io();
- msvcrt_free_console();
- msvcrt_free_args();
- if (!msvcrt_free_tls())
- return FALSE;
- TRACE("finished process free\n");
- break;
- case DLL_THREAD_DETACH:
- /* Free TLS */
- tls = TlsGetValue(MSVCRT_tls_index);
- if (tls) HeapFree(GetProcessHeap(), 0, tls);
- TRACE("finished thread free\n");
- break;
- }
- return TRUE;
-}
-
-#endif /* __REACTOS__ */
-
-static inline BOOL msvcrt_init_tls(void)
-{
- MSVCRT_tls_index = TlsAlloc();
-
- if (MSVCRT_tls_index == TLS_OUT_OF_INDEXES)
- {
- ERR("TlsAlloc() failed!\n");
- return FALSE;
- }
- return TRUE;
-}
-
-static inline BOOL msvcrt_free_tls(void)
-{
- if (!TlsFree(MSVCRT_tls_index))
- {
- ERR("TlsFree() failed!\n");
- return FALSE;
- }
- return TRUE;
-}
-
-const char* msvcrt_get_reason(DWORD reason)
-{
- switch (reason)
- {
- case DLL_PROCESS_ATTACH: return "DLL_PROCESS_ATTACH";
- case DLL_PROCESS_DETACH: return "DLL_PROCESS_DETACH";
- case DLL_THREAD_ATTACH: return "DLL_THREAD_ATTACH";
- case DLL_THREAD_DETACH: return "DLL_THREAD_DETACH";
- }
- return "UNKNOWN";
-}
-
-
-/*********************************************************************
- * $I10_OUTPUT (MSVCRT.@)
- * Function not really understood but needed to make the DLL work
- */
-void MSVCRT_I10_OUTPUT(void)
-{
- /* FIXME: This is probably data, not a function */
-}
-
-/*********************************************************************
- * __unDNameEx (MSVCRT.@)
- *
- * Demangle a C++ identifier.
- *
- * PARAMS
- * OutStr [O] If not NULL, the place to put the demangled string
- * mangled [I] Mangled name of the function
- * OutStrLen[I] Length of OutStr
- * memget [I] Function to allocate memory with
- * memfree [I] Function to free memory with
- * unknown [?] Unknown, possibly a call back
- * flags [I] Flags determining demangled format
- *
- * RETURNS
- * Success: A string pointing to the unmangled name, allocated with memget.
- * Failure: NULL.
- */
-char* MSVCRT___unDNameEx(char * OutStr, const char* mangled, int OutStrLen,
- MSVCRT_malloc_func memget,
- MSVCRT_free_func memfree,
- void * unknown,
- unsigned short int flags)
-{
- FIXME("(%p,%s,%d,%p,%p,%p,%x) stub!\n",
- OutStr, mangled, OutStrLen, memget, memfree, unknown, flags);
-
- /* FIXME: The code in tools/winebuild/msmangle.c is pretty complete and
- * could be used here.
- */
-
- /* Experimentation reveals the following flag meanings when set:
- * 0x0001 - Don't show __ in calling convention
- * 0x0002 - Don't show calling convention at all
- * 0x0004 - Don't show function/method return value
- * 0x0010 - Same as 0x1
- * 0x0080 - Don't show access specifier (public/protected/private)
- * 0x0200 - Don't show static specifier
- * 0x0800 - Unknown, passed by type_info::name()
- * 0x1000 - Only report the variable/class name
- * 0x2000 - Unknown, passed by type_info::name()
- */
- /* Duplicate the mangled name; for comparisons it doesn't matter anyway */
- if( OutStr == NULL) {
- OutStrLen = strlen(mangled) + 1;
- OutStr = memget( OutStrLen);
- }
- strncpy( OutStr, mangled, OutStrLen);
- return OutStr;
-}
-
-
-/*********************************************************************
- * __unDName (MSVCRT.@)
- */
-char* MSVCRT___unDName(char * OutStr, const char* mangled, int OutStrLen,
- MSVCRT_malloc_func memget,
- MSVCRT_free_func memfree,
- unsigned short int flags)
-{
- return MSVCRT___unDNameEx( OutStr, mangled, OutStrLen, memget, memfree,
- NULL, flags);
-}
reactos/lib/msvcrt/wine
diff -N mtdll.h
--- mtdll.h 24 Dec 2003 23:20:08 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2002, TransGaming Technologies Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef WINE_MTDLL_H
-#define WINE_MTDLL_H
-
-#if defined(_MT)
-
-#define _mlock(locknum) _lock(locknum)
-#define _munlock(locknum) _unlock(locknum)
-
-void _unlock( int locknum );
-void _lock( int locknum );
-
-#else
-
-#define _mlock(locknum) do {} while(0)
-#define _munlock(locknum) do {} while(0)
-
-#endif
-
-
-#define _SIGNAL_LOCK 1
-#define _IOB_SCAN_LOCK 2
-#define _TMPNAM_LOCK 3
-#define _INPUT_LOCK 4
-#define _OUTPUT_LOCK 5
-#define _CSCANF_LOCK 6
-#define _CPRINTF_LOCK 7
-#define _CONIO_LOCK 8
-#define _HEAP_LOCK 9
-#define _BHEAP_LOCK 10 /* No longer used? */
-#define _TIME_LOCK 11
-#define _ENV_LOCK 12
-#define _EXIT_LOCK1 13
-#define _EXIT_LOCK2 14
-#define _THREADDATA_LOCK 15 /* No longer used? */
-#define _POPEN_LOCK 16
-#define _LOCKTAB_LOCK 17
-#define _OSFHND_LOCK 18
-#define _SETLOCALE_LOCK 19
-#define _LC_COLLATE_LOCK 20 /* No longer used? */
-#define _LC_CTYPE_LOCK 21 /* No longer used? */
-#define _LC_MONETARY_LOCK 22 /* No longer used? */
-#define _LC_NUMERIC_LOCK 23 /* No longer used? */
-#define _LC_TIME_LOCK 24 /* No longer used? */
-#define _MB_CP_LOCK 25
-#define _NLG_LOCK 26
-#define _TYPEINFO_LOCK 27
-#define _STREAM_LOCKS 28
-
-/* Must match definition in msvcrt/stdio.h */
-#define _IOB_ENTRIES 20
-
-#define _LAST_STREAM_LOCK (_STREAM_LOCKS+_IOB_ENTRIES-1)
-
-#define _TOTAL_LOCKS (_LAST_STREAM_LOCK+1)
-
-#endif /* WINE_MTDLL_H */
reactos/lib/msvcrt/wine
diff -N process.h
--- process.h 27 Feb 2004 22:39:38 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,159 +0,0 @@
-/*
- * Process definitions
- *
- * Derived from the mingw header written by Colin Peters.
- * Modified for Wine use by Jon Griffiths and Francois Gouget.
- * This file is in the public domain.
- */
-#ifndef __WINE_PROCESS_H
-#define __WINE_PROCESS_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
-
-#ifndef MSVCRT
-# ifdef USE_MSVCRT_PREFIX
-# define MSVCRT(x) MSVCRT_##x
-# else
-# define MSVCRT(x) x
-# endif
-#endif
-
-#ifndef MSVCRT_WCHAR_T_DEFINED
-#define MSVCRT_WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short MSVCRT(wchar_t);
-#endif
-#endif
-
-/* Process creation flags */
-#define _P_WAIT 0
-#define _P_NOWAIT 1
-#define _P_OVERLAY 2
-#define _P_NOWAITO 3
-#define _P_DETACH 4
-
-#define _WAIT_CHILD 0
-#define _WAIT_GRANDCHILD 1
-
-#ifndef __stdcall
-# ifdef __i386__
-# ifdef __GNUC__
-# define __stdcall __attribute__((__stdcall__))
-# elif defined(_MSC_VER)
- /* Nothing needs to be done. __stdcall already exists */
-# else
-# error You need to define __stdcall for your compiler
-# endif
-# else /* __i386__ */
-# define __stdcall
-# endif /* __i386__ */
-#endif /* __stdcall */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*_beginthread_start_routine_t)(void *);
-typedef unsigned int (__stdcall *_beginthreadex_start_routine_t)(void *);
-
-unsigned long _beginthread(_beginthread_start_routine_t,unsigned int,void*);
-unsigned long _beginthreadex(void*,unsigned int,_beginthreadex_start_routine_t,void*,unsigned int,unsigned int*);
-int _cwait(int*,int,int);
-void _endthread(void);
-void _endthreadex(unsigned int);
-int _execl(const char*,const char*,...);
-int _execle(const char*,const char*,...);
-int _execlp(const char*,const char*,...);
-int _execlpe(const char*,const char*,...);
-int _execv(const char*,char* const *);
-int _execve(const char*,char* const *,const char* const *);
-int _execvp(const char*,char* const *);
-int _execvpe(const char*,char* const *,const char* const *);
-int _getpid(void);
-int _spawnl(int,const char*,const char*,...);
-int _spawnle(int,const char*,const char*,...);
-int _spawnlp(int,const char*,const char*,...);
-int _spawnlpe(int,const char*,const char*,...);
-int _spawnv(int,const char*,const char* const *);
-int _spawnve(int,const char*,const char* const *,const char* const *);
-int _spawnvp(int,const char*,const char* const *);
-int _spawnvpe(int,const char*,const char* const *,const char* const *);
-
-void MSVCRT(_c_exit)(void);
-void MSVCRT(_cexit)(void);
-void MSVCRT(_exit)(int);
-void MSVCRT(abort)(void);
-void MSVCRT(exit)(int);
-int MSVCRT(system)(const char*);
-
-#ifndef MSVCRT_WPROCESS_DEFINED
-#define MSVCRT_WPROCESS_DEFINED
-int _wexecl(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
-int _wexecle(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
-int _wexeclp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
-int _wexeclpe(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
-int _wexecv(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
-int _wexecve(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
-int _wexecvp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
-int _wexecvpe(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
-int _wspawnl(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
-int _wspawnle(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
-int _wspawnlp(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
-int _wspawnlpe(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
-int _wspawnv(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
-int _wspawnve(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
-int _wspawnvp(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
-int _wspawnvpe(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
-int _wsystem(const MSVCRT(wchar_t)*);
-#endif /* MSVCRT_WPROCESS_DEFINED */
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#ifndef USE_MSVCRT_PREFIX
-#define P_WAIT _P_WAIT
-#define P_NOWAIT _P_NOWAIT
-#define P_OVERLAY _P_OVERLAY
-#define P_NOWAITO _P_NOWAITO
-#define P_DETACH _P_DETACH
-
-#define WAIT_CHILD _WAIT_CHILD
-#define WAIT_GRANDCHILD _WAIT_GRANDCHILD
-
-static inline int cwait(int *status, int pid, int action) { return _cwait(status, pid, action); }
-static inline int getpid(void) { return _getpid(); }
-static inline int execv(const char* name, char* const* argv) { return _execv(name, argv); }
-static inline int execve(const char* name, char* const* argv, const char* const* envv) { return _execve(name, argv, envv); }
-static inline int execvp(const char* name, char* const* argv) { return _execvp(name, argv); }
-static inline int execvpe(const char* name, char* const* argv, const char* const* envv) { return _execvpe(name, argv, envv); }
-static inline int spawnv(int flags, const char* name, const char* const* argv) { return _spawnv(flags, name, argv); }
-static inline int spawnve(int flags, const char* name, const char* const* argv, const char* const* envv) { return _spawnve(flags, name, argv, envv); }
-static inline int spawnvp(int flags, const char* name, const char* const* argv) { return _spawnvp(flags, name, argv); }
-static inline int spawnvpe(int flags, const char* name, const char* const* argv, const char* const* envv) { return _spawnvpe(flags, name, argv, envv); }
-
-#ifdef __GNUC__
-extern int execl(const char*,const char*,...) __attribute__((alias("_execl")));
-extern int execle(const char*,const char*,...) __attribute__((alias("_execle")));
-extern int execlp(const char*,const char*,...) __attribute__((alias("_execlp")));
-extern int execlpe(const char*,const char*,...) __attribute__((alias("_execlpe")));
-extern int spawnl(int,const char*,const char*,...) __attribute__((alias("_spawnl")));
-extern int spawnle(int,const char*,const char*,...) __attribute__((alias("_spawnle")));
-extern int spawnlp(int,const char*,const char*,...) __attribute__((alias("_spawnlp")));
-extern int spawnlpe(int,const char*,const char*,...) __attribute__((alias("_spawnlpe")));
-#else
-#define execl _execl
-#define execle _execle
-#define execlp _execlp
-#define execlpe _execlpe
-#define spawnl _spawnl
-#define spawnle _spawnle
-#define spawnlp _spawnlp
-#define spawnlpe _spawnlpe
-#endif /* __GNUC__ */
-
-#endif /* USE_MSVCRT_PREFIX */
-
-#endif /* __WINE_PROCESS_H */
reactos/lib/msvcrt/wine
diff -N stdlib.h
--- stdlib.h 27 Feb 2004 22:39:38 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,273 +0,0 @@
-/*
- * Standard library definitions
- *
- * Derived from the mingw header written by Colin Peters.
- * Modified for Wine use by Jon Griffiths and Francois Gouget.
- * This file is in the public domain.
- */
-#ifndef __WINE_STDLIB_H
-#define __WINE_STDLIB_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
-
-#ifndef MSVCRT
-# ifdef USE_MSVCRT_PREFIX
-# define MSVCRT(x) MSVCRT_##x
-# else
-# define MSVCRT(x) x
-# endif
-#endif
-
-#ifndef NULL
-#ifdef __cplusplus
-#define NULL 0
-#else
-#define NULL ((void*)0)
-#endif
-#endif
-
-#ifndef MSVCRT_WCHAR_T_DEFINED
-#define MSVCRT_WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short MSVCRT(wchar_t);
-#endif
-#endif
-
-#ifndef _MSC_VER
-# ifndef __int64
-# define __int64 long long
-# endif
-#endif
-
-#ifndef USE_MSVCRT_PREFIX
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE -1
-#define RAND_MAX 0x7FFF
-#else
-#define MSVCRT_RAND_MAX 0x7FFF
-#endif /* USE_MSVCRT_PREFIX */
-
-#ifndef _MAX_PATH
-#define _MAX_DRIVE 3
-#define _MAX_FNAME 256
-#define _MAX_DIR _MAX_FNAME
-#define _MAX_EXT _MAX_FNAME
-#define _MAX_PATH 260
-#endif
-
-
-typedef struct MSVCRT(_div_t) {
- int quot;
- int rem;
-} MSVCRT(div_t);
-
-typedef struct MSVCRT(_ldiv_t) {
- long quot;
- long rem;
-} MSVCRT(ldiv_t);
-
-#ifndef MSVCRT_SIZE_T_DEFINED
-typedef unsigned int MSVCRT(size_t);
-#define MSVCRT_SIZE_T_DEFINED
-#endif
-
-#define __max(a,b) (((a) > (b)) ? (a) : (b))
-#define __min(a,b) (((a) < (b)) ? (a) : (b))
-#ifndef __cplusplus
-#ifndef max
-#define max(a,b) (((a) > (b)) ? (a) : (b))
-#endif
-#ifndef min
-#define min(a,b) (((a) < (b)) ? (a) : (b))
-#endif
-#endif
-
-/* _set_error_mode() constants */
-#define _OUT_TO_DEFAULT 0
-#define _OUT_TO_STDERR 1
-#define _OUT_TO_MSGBOX 2
-#define _REPORT_ERRMODE 3
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern unsigned int* __p__osver();
-extern unsigned int* __p__winver();
-extern unsigned int* __p__winmajor();
-extern unsigned int* __p__winminor();
-#define _osver (*__p__osver())
-#define _winver (*__p__winver())
-#define _winmajor (*__p__winmajor())
-#define _winminor (*__p__winminor())
-
-extern int* __p___argc(void);
-extern char*** __p___argv(void);
-extern MSVCRT(wchar_t)*** __p___wargv(void);
-extern char*** __p__environ(void);
-extern MSVCRT(wchar_t)*** __p__wenviron(void);
-extern int* __p___mb_cur_max(void);
-//extern unsigned long* __doserrno(void);
-extern unsigned int* __p__fmode(void);
-/* FIXME: We need functions to access these:
- * int _sys_nerr;
- * char** _sys_errlist;
- */
-#ifndef USE_MSVCRT_PREFIX
-#define __argc (*__p___argc())
-#define __argv (*__p___argv())
-#define __wargv (*__p___wargv())
-#define _environ (*__p__environ())
-#define _wenviron (*__p__wenviron())
-#define __mb_cur_max (*__p___mb_cur_max())
-#define _doserrno (*__doserrno())
-#define _fmode (*_fmode)
-#endif /* USE_MSVCRT_PREFIX */
-
-
-extern int* MSVCRT(_errno)(void);
-#ifndef USE_MSVCRT_PREFIX
-# define errno (*_errno())
-#else
-# define MSVCRT_errno (*MSVCRT__errno())
-#endif
-
-
-//typedef int (*_onexit_t)(void);
-
-
-__int64 _atoi64(const char*);
-long double _atold(const char*);
-void _beep(unsigned int,unsigned int);
-char* _ecvt(double,int,int*,int*);
-char* _fcvt(double,int,int*,int*);
-char* _fullpath(char*,const char*,MSVCRT(size_t));
-char* _gcvt(double,int,char*);
-char* _i64toa(__int64,char*,int);
-char* _itoa(int,char*,int);
-char* _ltoa(long,char*,int);
-unsigned long _lrotl(unsigned long,int);
-unsigned long _lrotr(unsigned long,int);
-void _makepath(char*,const char*,const char*,const char*,const char*);
-MSVCRT(size_t) _mbstrlen(const char*);
-//_onexit_t _onexit(_onexit_t);
-int _putenv(const char*);
-unsigned int _rotl(unsigned int,int);
-unsigned int _rotr(unsigned int,int);
-void _searchenv(const char*,const char*,char*);
-int _set_error_mode(int);
-void _seterrormode(int);
-void _sleep(unsigned long);
-void _splitpath(const char*,char*,char*,char*,char*);
-long double _strtold(const char*,char**);
-//void _swab(char*,char*,int); //REACTOS
-_CRTIMP void __cdecl _swab (const char*, char*, size_t);
-char* _ui64toa(unsigned __int64,char*,int);
-char* _ultoa(unsigned long,char*,int);
-
-void MSVCRT(_exit)(int);
-void MSVCRT(abort)();
-int MSVCRT(abs)(int);
-int MSVCRT(atexit)(void (*)(void));
-double MSVCRT(atof)(const char*);
-int MSVCRT(atoi)(const char*);
-long MSVCRT(atol)(const char*);
-void* MSVCRT(calloc)(MSVCRT(size_t),MSVCRT(size_t));
-#ifndef __i386__
-MSVCRT(div_t) MSVCRT(div)(int,int);
-MSVCRT(ldiv_t) MSVCRT(ldiv)(long,long);
-#endif
-void MSVCRT(exit)(int);
-void MSVCRT(free)(void*);
-char* MSVCRT(getenv)(const char*);
-long MSVCRT(labs)(long);
-void* MSVCRT(malloc)(MSVCRT(size_t));
-int MSVCRT(mblen)(const char*,MSVCRT(size_t));
-void MSVCRT(perror)(const char*);
-int MSVCRT(rand)(void);
-void* MSVCRT(realloc)(void*,MSVCRT(size_t));
-void MSVCRT(srand)(unsigned int);
-double MSVCRT(strtod)(const char*,char**);
-long MSVCRT(strtol)(const char*,char**,int);
-unsigned long MSVCRT(strtoul)(const char*,char**,int);
-int MSVCRT(system)(const char*);
-void* MSVCRT(bsearch)(const void*,const void*,MSVCRT(size_t),MSVCRT(size_t),
- int (*)(const void*,const void*));
-void MSVCRT(qsort)(void*,MSVCRT(size_t),MSVCRT(size_t),
- int (*)(const void*,const void*));
-
-#ifndef MSVCRT_WSTDLIB_DEFINED
-#define MSVCRT_WSTDLIB_DEFINED
-MSVCRT(wchar_t)*_itow(int,MSVCRT(wchar_t)*,int);
-MSVCRT(wchar_t)*_i64tow(__int64,MSVCRT(wchar_t)*,int);
-MSVCRT(wchar_t)*_ltow(long,MSVCRT(wchar_t)*,int);
-MSVCRT(wchar_t)*_ui64tow(unsigned __int64,MSVCRT(wchar_t)*,int);
-MSVCRT(wchar_t)*_ultow(unsigned long,MSVCRT(wchar_t)*,int);
-MSVCRT(wchar_t)*_wfullpath(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
-MSVCRT(wchar_t)*_wgetenv(const MSVCRT(wchar_t)*);
-void _wmakepath(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
-void _wperror(const MSVCRT(wchar_t)*);
-int _wputenv(const MSVCRT(wchar_t)*);
-void _wsearchenv(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(wchar_t)*);
-void _wsplitpath(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)*,MSVCRT(wchar_t)*,MSVCRT(wchar_t)*,MSVCRT(wchar_t)*);
-int _wsystem(const MSVCRT(wchar_t)*);
-int _wtoi(const MSVCRT(wchar_t)*);
-__int64 _wtoi64(const MSVCRT(wchar_t)*);
-long _wtol(const MSVCRT(wchar_t)*);
-
-MSVCRT(size_t) MSVCRT(mbstowcs)(MSVCRT(wchar_t)*,const char*,MSVCRT(size_t));
-int MSVCRT(mbtowc)(MSVCRT(wchar_t)*,const char*,MSVCRT(size_t));
-double MSVCRT(wcstod)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)**);
-long MSVCRT(wcstol)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)**,int);
-MSVCRT(size_t) MSVCRT(wcstombs)(char*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
-unsigned long MSVCRT(wcstoul)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)**,int);
-int MSVCRT(wctomb)(char*,MSVCRT(wchar_t));
-#endif /* MSVCRT_WSTDLIB_DEFINED */
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#ifndef USE_MSVCRT_PREFIX
-#define environ _environ
-#define onexit_t _onexit_t
-
-static inline char* ecvt(double value, int ndigit, int* decpt, int* sign) { return _ecvt(value, ndigit, decpt, sign); }
-static inline char* fcvt(double value, int ndigit, int* decpt, int* sign) { return _fcvt(value, ndigit, decpt, sign); }
-static inline char* gcvt(double value, int ndigit, char* buf) { return _gcvt(value, ndigit, buf); }
-static inline char* itoa(int value, char* str, int radix) { return _itoa(value, str, radix); }
-static inline char* ltoa(long value, char* str, int radix) { return _ltoa(value, str, radix); }
-static inline _onexit_t onexit(_onexit_t func) { return _onexit(func); }
-static inline int putenv(const char* str) { return _putenv(str); }
-static inline void swab(char* src, char* dst, int len) { _swab(src, dst, len); }
-static inline char* ultoa(unsigned long value, char* str, int radix) { return _ultoa(value, str, radix); }
-
-#ifdef __i386__
-static inline div_t __wine_msvcrt_div(int num, int denom)
-{
- extern unsigned __int64 div(int,int);
- div_t ret;
- unsigned __int64 res = div(num,denom);
- ret.quot = (int)res;
- ret.rem = (int)(res >> 32);
- return ret;
-}
-static inline ldiv_t __wine_msvcrt_ldiv(long num, long denom)
-{
- extern unsigned __int64 ldiv(long,long);
- ldiv_t ret;
- unsigned __int64 res = ldiv(num,denom);
- ret.quot = (long)res;
- ret.rem = (long)(res >> 32);
- return ret;
-}
-#define div(num,denom) __wine_msvcrt_div(num,denom)
-#define ldiv(num,denom) __wine_msvcrt_ldiv(num,denom)
-#endif
-
-#endif /* USE_MSVCRT_PREFIX */
-
-#endif /* __WINE_STDLIB_H */
reactos/lib/msvcrt/wine
diff -N string.h
--- string.h 27 Feb 2004 22:39:38 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,149 +0,0 @@
-/*
- * String definitions
- *
- * Derived from the mingw header written by Colin Peters.
- * Modified for Wine use by Jon Griffiths and Francois Gouget.
- * This file is in the public domain.
- */
-#ifndef __WINE_STRING_H
-#define __WINE_STRING_H
-#ifndef __WINE_USE_MSVCRT
-#define __WINE_USE_MSVCRT
-#endif
-
-#ifndef MSVCRT
-# ifdef USE_MSVCRT_PREFIX
-# define MSVCRT(x) MSVCRT_##x
-# else
-# define MSVCRT(x) x
-# endif
-#endif
-
-#ifndef MSVCRT_WCHAR_T_DEFINED
-#define MSVCRT_WCHAR_T_DEFINED
-#ifndef __cplusplus
-typedef unsigned short MSVCRT(wchar_t);
-#endif
-#endif
-
-#ifndef MSVCRT_SIZE_T_DEFINED
-typedef unsigned int MSVCRT(size_t);
-#define MSVCRT_SIZE_T_DEFINED
-#endif
-
-#ifndef MSVCRT_NLSCMP_DEFINED
-#define _NLSCMPERROR ((unsigned int)0x7fffffff)
-#define MSVCRT_NLSCMP_DEFINED
-#endif
-
-#ifndef NULL
-#ifdef __cplusplus
-#define NULL 0
-#else
-#define NULL ((void *)0)
-#endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void* _memccpy(void*,const void*,int,MSVCRT(size_t));
-int _memicmp(const void*,const void*,MSVCRT(size_t));
-int _strcmpi(const char*,const char*);
-char* _strdup(const char*);
-char* _strerror(const char*);
-int _stricmp(const char*,const char*);
-int _stricoll(const char*,const char*);
-char* _strlwr(char*);
-int _strnicmp(const char*,const char*,MSVCRT(size_t));
-char* _strnset(char*,int,MSVCRT(size_t));
-char* _strrev(char*);
-char* _strset(char*,int);
-char* _strupr(char*);
-
-void* MSVCRT(memchr)(const void*,int,MSVCRT(size_t));
-int MSVCRT(memcmp)(const void*,const void*,MSVCRT(size_t));
-void* MSVCRT(memcpy)(void*,const void*,MSVCRT(size_t));
-void* MSVCRT(memmove)(void*,const void*,MSVCRT(size_t));
-void* MSVCRT(memset)(void*,int,MSVCRT(size_t));
-char* MSVCRT(strcat)(char*,const char*);
-char* MSVCRT(strchr)(const char*,int);
-int MSVCRT(strcmp)(const char*,const char*);
-int MSVCRT(strcoll)(const char*,const char*);
-char* MSVCRT(strcpy)(char*,const char*);
-MSVCRT(size_t) MSVCRT(strcspn)(const char*,const char*);
-char* MSVCRT(strerror)(int);
-MSVCRT(size_t) MSVCRT(strlen)(const char*);
-char* MSVCRT(strncat)(char*,const char*,MSVCRT(size_t));
-int MSVCRT(strncmp)(const char*,const char*,MSVCRT(size_t));
-char* MSVCRT(strncpy)(char*,const char*,MSVCRT(size_t));
-char* MSVCRT(strpbrk)(const char*,const char*);
-char* MSVCRT(strrchr)(const char*,int);
-MSVCRT(size_t) MSVCRT(strspn)(const char*,const char*);
-char* MSVCRT(strstr)(const char*,const char*);
-char* MSVCRT(strtok)(char*,const char*);
-MSVCRT(size_t) MSVCRT(strxfrm)(char*,const char*,MSVCRT(size_t));
-
-#ifndef MSVCRT_WSTRING_DEFINED
-#define MSVCRT_WSTRING_DEFINED
-MSVCRT(wchar_t)*_wcsdup(const MSVCRT(wchar_t)*);
-int _wcsicmp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
-int _wcsicoll(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
-MSVCRT(wchar_t)*_wcslwr(MSVCRT(wchar_t)*);
-int _wcsnicmp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
-MSVCRT(wchar_t)*_wcsnset(MSVCRT(wchar_t)*,MSVCRT(wchar_t),MSVCRT(size_t));
-MSVCRT(wchar_t)*_wcsrev(MSVCRT(wchar_t)*);
-MSVCRT(wchar_t)*_wcsset(MSVCRT(wchar_t)*,MSVCRT(wchar_t));
-MSVCRT(wchar_t)*_wcsupr(MSVCRT(wchar_t)*);
-
-MSVCRT(wchar_t)*MSVCRT(wcscat)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
-MSVCRT(wchar_t)*MSVCRT(wcschr)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t));
-int MSVCRT(wcscmp)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
-int MSVCRT(wcscoll)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
-MSVCRT(wchar_t)*MSVCRT(wcscpy)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
-MSVCRT(size_t) MSVCRT(wcscspn)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
-MSVCRT(size_t) MSVCRT(wcslen)(const MSVCRT(wchar_t)*);
-MSVCRT(wchar_t)*MSVCRT(wcsncat)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
-int MSVCRT(wcsncmp)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
-MSVCRT(wchar_t)*MSVCRT(wcsncpy)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
-MSVCRT(wchar_t)*MSVCRT(wcspbrk)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
-MSVCRT(wchar_t)*MSVCRT(wcsrchr)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t) wcFor);
-MSVCRT(size_t) MSVCRT(wcsspn)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
-MSVCRT(wchar_t)*MSVCRT(wcsstr)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
-MSVCRT(wchar_t)*MSVCRT(wcstok)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
-MSVCRT(size_t) MSVCRT(wcsxfrm)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
-#endif /* MSVCRT_WSTRING_DEFINED */
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#ifndef USE_MSVCRT_PREFIX
-static inline void* memccpy(void *s1, const void *s2, int c, MSVCRT(size_t) n) { return _memccpy(s1, s2, c, n); }
-static inline int memicmp(const void* s1, const void* s2, MSVCRT(size_t) len) { return _memicmp(s1, s2, len); }
-static inline int strcasecmp(const char* s1, const char* s2) { return _stricmp(s1, s2); }
-static inline int strcmpi(const char* s1, const char* s2) { return _strcmpi(s1, s2); }
-static inline char* strdup(const char* buf) { return _strdup(buf); }
-static inline int stricmp(const char* s1, const char* s2) { return _stricmp(s1, s2); }
-static inline int stricoll(const char* s1, const char* s2) { return _stricoll(s1, s2); }
-static inline char* strlwr(char* str) { return _strlwr(str); }
-static inline int strncasecmp(const char *str1, const char *str2, size_t n) { return _strnicmp(str1, str2, n); }
-static inline int strnicmp(const char* s1, const char* s2, MSVCRT(size_t) n) { return _strnicmp(s1, s2, n); }
-static inline char* strnset(char* str, int value, unsigned int len) { return _strnset(str, value, len); }
-static inline char* strrev(char* str) { return _strrev(str); }
-static inline char* strset(char* str, int value) { return _strset(str, value); }
-static inline char* strupr(char* str) { return _strupr(str); }
-
-static inline MSVCRT(wchar_t)* wcsdup(const MSVCRT(wchar_t)* str) { return _wcsdup(str); }
-static inline int wcsicoll(const MSVCRT(wchar_t)* str1, const MSVCRT(wchar_t)* str2) { return _wcsicoll(str1, str2); }
-static inline MSVCRT(wchar_t)* wcslwr(MSVCRT(wchar_t)* str) { return _wcslwr(str); }
-static inline int wcsnicmp(const MSVCRT(wchar_t)* str1, const MSVCRT(wchar_t)* str2, MSVCRT(size_t) n) { return _wcsnicmp(str1, str2, n); }
-static inline MSVCRT(wchar_t)* wcsnset(MSVCRT(wchar_t)* str, MSVCRT(wchar_t) c, MSVCRT(size_t) n) { return _wcsnset(str, c, n); }
-static inline MSVCRT(wchar_t)* wcsrev(MSVCRT(wchar_t)* str) { return _wcsrev(str); }
-static inline MSVCRT(wchar_t)* wcsset(MSVCRT(wchar_t)* str, MSVCRT(wchar_t) c) { return _wcsset(str, c); }
-static inline MSVCRT(wchar_t)* wcsupr(MSVCRT(wchar_t)* str) { return _wcsupr(str); }
-#endif /* USE_MSVCRT_PREFIX */
-
-#endif /* __WINE_STRING_H */
reactos/lib/msvideo
diff -u -r1.1.8.1 -r1.1.8.2
--- Makefile.ros-template 8 Dec 2004 21:57:13 -0000 1.1.8.1
+++ Makefile.ros-template 13 Dec 2004 09:38:59 -0000 1.1.8.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.1.8.1 2004/12/08 21:57:13 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.1.8.2 2004/12/13 09:38:59 hyperion Exp $
TARGET_NAME = msvfw32
reactos/lib/netapi32
diff -u -r1.3.16.1 -r1.3.16.2
--- Makefile.ros-template 8 Dec 2004 21:57:14 -0000 1.3.16.1
+++ Makefile.ros-template 13 Dec 2004 09:38:59 -0000 1.3.16.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.3.16.1 2004/12/08 21:57:14 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.3.16.2 2004/12/13 09:38:59 hyperion Exp $
TARGET_NAME = netapi32
reactos/lib/ntdll/def
diff -u -r1.134.2.1 -r1.134.2.2
--- ntdll.def 8 Dec 2004 21:57:14 -0000 1.134.2.1
+++ ntdll.def 13 Dec 2004 09:39:00 -0000 1.134.2.2
@@ -1,4 +1,4 @@
-; $Id: ntdll.def,v 1.134.2.1 2004/12/08 21:57:14 hyperion Exp $
+; $Id: ntdll.def,v 1.134.2.2 2004/12/13 09:39:00 hyperion Exp $
;
; ReactOS Operating System
;
reactos/lib/ntdll/rtl
diff -u -r1.29.8.1 -r1.29.8.2
--- path.c 8 Dec 2004 21:57:14 -0000 1.29.8.1
+++ path.c 13 Dec 2004 09:39:00 -0000 1.29.8.2
@@ -1,4 +1,4 @@
-/* $Id: path.c,v 1.29.8.1 2004/12/08 21:57:14 hyperion Exp $
+/* $Id: path.c,v 1.29.8.2 2004/12/13 09:39:00 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/lib/odbc32
diff -u -r1.2.16.1 -r1.2.16.2
--- Makefile.ros-template 8 Dec 2004 21:57:14 -0000 1.2.16.1
+++ Makefile.ros-template 13 Dec 2004 09:39:00 -0000 1.2.16.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.2.16.1 2004/12/08 21:57:14 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.2.16.2 2004/12/13 09:39:00 hyperion Exp $
TARGET_NAME = odbc32
reactos/lib/ole32
diff -u -r1.2.16.1 -r1.2.16.2
--- Makefile.ros-template 8 Dec 2004 21:57:15 -0000 1.2.16.1
+++ Makefile.ros-template 13 Dec 2004 09:39:00 -0000 1.2.16.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.2.16.1 2004/12/08 21:57:15 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.2.16.2 2004/12/13 09:39:00 hyperion Exp $
TARGET_NAME = ole32
reactos/lib/oleaut32
diff -u -r1.5.2.1 -r1.5.2.2
--- Makefile.ros-template 8 Dec 2004 21:57:17 -0000 1.5.2.1
+++ Makefile.ros-template 13 Dec 2004 09:39:00 -0000 1.5.2.2
@@ -1,10 +1,10 @@
-# $Id: Makefile.ros-template,v 1.5.2.1 2004/12/08 21:57:17 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.5.2.2 2004/12/13 09:39:00 hyperion Exp $
TARGET_NAME = oleaut32
TARGET_OBJECTS = @C_SRCS@
-TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ -DCOBJMACROS
+TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__
TARGET_SDKLIBS = @IMPORTS@ winmm.a wine.a wine_uuid.a wine_unicode.a ntdll.a
reactos/lib/oleaut32
diff -u -r1.1.22.1 -r1.1.22.2
--- oaidl_p.c 8 Dec 2004 21:57:17 -0000 1.1.22.1
+++ oaidl_p.c 13 Dec 2004 09:39:00 -0000 1.1.22.2
@@ -57,8 +57,8 @@
} MIDL_PROC_FORMAT_STRING;
-extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
-extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
+static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
+static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
/* Standard interface: __MIDL_itf_oaidl_0000, ver. 0.0,
@@ -77,7 +77,7 @@
GUID={0x00020400,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */
-extern const MIDL_STUB_DESC Object_StubDesc;
+static const MIDL_STUB_DESC Object_StubDesc;
HRESULT STDMETHODCALLTYPE IDispatch_GetTypeInfoCount_Proxy(
@@ -116,9 +116,11 @@
if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
- *pctinfo = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++;
+ *pctinfo = *( UINT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(UINT);
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -157,7 +159,7 @@
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
- ( UINT __RPC_FAR * )pctinfo = 0;
+ pctinfo = 0;
RpcTryFinally
{
pctinfo = &_M0;
@@ -169,9 +171,11 @@
_StubMsg.BufferLength = 4U + 4U;
NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
- *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = *pctinfo;
+ *( UINT __RPC_FAR * )_StubMsg.Buffer = *pctinfo;
+ _StubMsg.Buffer += sizeof(UINT);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -224,9 +228,11 @@
_StubMsg.BufferLength = 4U + 4U;
NdrProxyGetBuffer(This, &_StubMsg);
- *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = iTInfo;
+ *( UINT __RPC_FAR * )_StubMsg.Buffer = iTInfo;
+ _StubMsg.Buffer += sizeof(UINT);
- *(( LCID __RPC_FAR * )_StubMsg.Buffer)++ = lcid;
+ *( LCID __RPC_FAR * )_StubMsg.Buffer = lcid;
+ _StubMsg.Buffer += sizeof(LCID);
NdrProxySendReceive(This, &_StubMsg);
@@ -239,7 +245,8 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -280,15 +287,17 @@
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
- ( ITypeInfo __RPC_FAR *__RPC_FAR * )ppTInfo = 0;
+ ppTInfo = 0;
RpcTryFinally
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[6] );
- iTInfo = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++;
+ iTInfo = *( UINT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(UINT);
- lcid = *(( LCID __RPC_FAR * )_StubMsg.Buffer)++;
+ lcid = *( LCID __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(LCID);
ppTInfo = &_M1;
_M1 = 0;
@@ -315,7 +324,8 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[6] );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -396,9 +406,11 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[54] );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = cNames;
+ *( UINT __RPC_FAR * )_StubMsg.Buffer = cNames;
+ _StubMsg.Buffer += sizeof(UINT);
- *(( LCID __RPC_FAR * )_StubMsg.Buffer)++ = lcid;
+ *( LCID __RPC_FAR * )_StubMsg.Buffer = lcid;
+ _StubMsg.Buffer += sizeof(LCID);
NdrProxySendReceive(This, &_StubMsg);
@@ -410,7 +422,8 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[88],
(unsigned char)0 );
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -454,8 +467,8 @@
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
- ( LPOLESTR __RPC_FAR * )rgszNames = 0;
- ( DISPID __RPC_FAR * )rgDispId = 0;
+ rgszNames = 0;
+ rgDispId = 0;
RpcTryFinally
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
@@ -472,9 +485,12 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- cNames = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++;
+ cNames = *( UINT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(UINT);
+
- lcid = *(( LCID __RPC_FAR * )_StubMsg.Buffer)++;
+ lcid = *( LCID __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(LCID);
rgDispId = NdrAllocate(&_StubMsg,cNames * 4);
@@ -505,7 +521,8 @@
(unsigned char __RPC_FAR *)rgDispId,
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[88] );
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -626,22 +643,26 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1184] );
NdrProxyGetBuffer(This, &_StubMsg);
- *(( DISPID __RPC_FAR * )_StubMsg.Buffer)++ = dispIdMember;
+ *( DISPID __RPC_FAR * )_StubMsg.Buffer = dispIdMember;
+ _StubMsg.Buffer += sizeof(DISPID);
NdrSimpleStructMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
(unsigned char __RPC_FAR *)riid,
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[38] );
- *(( LCID __RPC_FAR * )_StubMsg.Buffer)++ = lcid;
+ *( LCID __RPC_FAR * )_StubMsg.Buffer = lcid;
+ _StubMsg.Buffer += sizeof(LCID);
- *(( DWORD __RPC_FAR * )_StubMsg.Buffer)++ = dwFlags;
+ *( DWORD __RPC_FAR * )_StubMsg.Buffer = dwFlags;
+ _StubMsg.Buffer += sizeof(DWORD);
NdrComplexStructMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
(unsigned char __RPC_FAR *)pDispParams,
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1080] );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = cVarRef;
+ *( UINT __RPC_FAR * )_StubMsg.Buffer = cVarRef;
+ _StubMsg.Buffer += sizeof(UINT);
_StubMsg.MaxCount = cVarRef;
@@ -671,7 +692,8 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *pArgErr = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++;
+ *pArgErr = *( UINT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(UINT);
NdrComplexArrayUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
(unsigned char __RPC_FAR * __RPC_FAR *)&rgVarRef,
@@ -679,7 +701,8 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -744,27 +767,30 @@
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
- ( DISPPARAMS __RPC_FAR * )pDispParams = 0;
- ( VARIANT __RPC_FAR * )pVarResult = 0;
- ( EXCEPINFO __RPC_FAR * )pExcepInfo = 0;
- ( UINT __RPC_FAR * )pArgErr = 0;
- ( UINT __RPC_FAR * )rgVarRefIdx = 0;
- ( VARIANTARG __RPC_FAR * )rgVarRef = 0;
+ pDispParams = 0;
+ pVarResult = 0;
+ pExcepInfo = 0;
+ pArgErr = 0;
+ rgVarRefIdx = 0;
+ rgVarRef = 0;
RpcTryFinally
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[34] );
- dispIdMember = *(( DISPID __RPC_FAR * )_StubMsg.Buffer)++;
+ dispIdMember = *( DISPID __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(DISPID);
NdrSimpleStructUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
(unsigned char __RPC_FAR * __RPC_FAR *)&riid,
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[38],
(unsigned char)0 );
- lcid = *(( LCID __RPC_FAR * )_StubMsg.Buffer)++;
+ lcid = *( LCID __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(LCID);
- dwFlags = *(( DWORD __RPC_FAR * )_StubMsg.Buffer)++;
+ dwFlags = *( DWORD __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(DWORD);
NdrComplexStructUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
(unsigned char __RPC_FAR * __RPC_FAR *)&pDispParams,
@@ -772,7 +798,8 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- cVarRef = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++;
+ cVarRef = *( UINT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(UINT);
NdrConformantArrayUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
(unsigned char __RPC_FAR * __RPC_FAR *)&rgVarRefIdx,
@@ -838,7 +865,8 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1138] );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = *pArgErr;
+ *( UINT __RPC_FAR * )_StubMsg.Buffer = *pArgErr;
+ _StubMsg.Buffer += sizeof(UINT);
_StubMsg.MaxCount = cVarRef;
@@ -847,7 +875,8 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1184] );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -963,7 +992,8 @@
_StubMsg.BufferLength = 4U;
NdrProxyGetBuffer(This, &_StubMsg);
- *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++ = celt;
+ *( ULONG __RPC_FAR * )_StubMsg.Buffer = celt;
+ _StubMsg.Buffer += sizeof(ULONG);
NdrProxySendReceive(This, &_StubMsg);
@@ -976,9 +1006,11 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *pCeltFetched = *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++;
+ *pCeltFetched = *( ULONG __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(ULONG);
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -1027,14 +1059,15 @@
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
- ( VARIANT __RPC_FAR * )rgVar = 0;
- ( ULONG __RPC_FAR * )pCeltFetched = 0;
+ rgVar = 0;
+ pCeltFetched = 0;
RpcTryFinally
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[72] );
- celt = *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++;
+ celt = *( ULONG __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(ULONG);
rgVar = NdrAllocate(&_StubMsg,celt * 16);
pCeltFetched = &_M11;
@@ -1071,9 +1104,11 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1206] );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++ = *pCeltFetched;
+ *( ULONG __RPC_FAR * )_StubMsg.Buffer = *pCeltFetched;
+ _StubMsg.Buffer += sizeof(ULONG);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -1121,14 +1156,16 @@
_StubMsg.BufferLength = 4U;
NdrProxyGetBuffer(This, &_StubMsg);
- *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++ = celt;
+ *( ULONG __RPC_FAR * )_StubMsg.Buffer = celt;
+ _StubMsg.Buffer += sizeof(ULONG);
NdrProxySendReceive(This, &_StubMsg);
if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[84] );
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -1167,8 +1204,8 @@
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[84] );
- celt = *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++;
-
+ celt = *( ULONG __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(ULONG);
*_pdwStubPhase = STUB_CALL_SERVER;
_RetVal = (((IEnumVARIANT*) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> Skip((IEnumVARIANT *) ((CStdStubBuffer *)This)->pvServerObject,celt);
@@ -1177,7 +1214,8 @@
_StubMsg.BufferLength = 4U;
NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -1221,8 +1259,9 @@
if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[88] );
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
-
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
+
}
RpcFinally
{
@@ -1264,7 +1303,8 @@
_StubMsg.BufferLength = 4U;
NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -1326,7 +1366,8 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -1365,7 +1406,7 @@
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
- ( IEnumVARIANT __RPC_FAR *__RPC_FAR * )ppEnum = 0;
+ ppEnum = 0;
RpcTryFinally
{
ppEnum = &_M12;
@@ -1389,7 +1430,8 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1224] );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -1548,9 +1590,11 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1248] );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++ = lHashVal;
+ *( ULONG __RPC_FAR * )_StubMsg.Buffer = lHashVal;
+ _StubMsg.Buffer += sizeof(ULONG);
- *(( WORD __RPC_FAR * )_StubMsg.Buffer)++ = wFlags;
+ *( WORD __RPC_FAR * )_StubMsg.Buffer = wFlags;
+ _StubMsg.Buffer += sizeof(WORD);
NdrProxySendReceive(This, &_StubMsg);
@@ -1588,7 +1632,8 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -1660,13 +1705,13 @@
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
- ( LPOLESTR )szName = 0;
- ( ITypeInfo __RPC_FAR *__RPC_FAR * )ppTInfo = 0;
- ( DESCKIND __RPC_FAR * )pDescKind = 0;
- ( LPFUNCDESC __RPC_FAR * )ppFuncDesc = 0;
- ( LPVARDESC __RPC_FAR * )ppVarDesc = 0;
- ( ITypeComp __RPC_FAR *__RPC_FAR * )ppTypeComp = 0;
- ( CLEANLOCALSTORAGE __RPC_FAR * )pDummy = 0;
+ szName = 0;
+ ppTInfo = 0;
+ pDescKind = 0;
+ ppFuncDesc = 0;
+ ppVarDesc = 0;
+ ppTypeComp = 0;
+ pDummy = 0;
RpcTryFinally
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
@@ -1678,9 +1723,11 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- lHashVal = *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++;
+ lHashVal = *( ULONG __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(ULONG);
- wFlags = *(( WORD __RPC_FAR * )_StubMsg.Buffer)++;
+ wFlags = *( WORD __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(WORD);
ppTInfo = &_M15;
_M15 = 0;
@@ -1759,7 +1806,8 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1568] );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -1845,7 +1893,8 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1248] );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++ = lHashVal;
+ *( ULONG __RPC_FAR * )_StubMsg.Buffer = lHashVal;
+ _StubMsg.Buffer += sizeof(ULONG);
NdrProxySendReceive(This, &_StubMsg);
@@ -1858,7 +1907,8 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -1899,8 +1949,8 @@
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
- ( LPOLESTR )szName = 0;
- ( ITypeInfo __RPC_FAR *__RPC_FAR * )ppTInfo = 0;
+ szName = 0;
+ ppTInfo = 0;
RpcTryFinally
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
@@ -1912,7 +1962,8 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- lHashVal = *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++;
+ lHashVal = *( ULONG __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(ULONG);
ppTInfo = &_M23;
_M23 = 0;
@@ -1941,7 +1992,8 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[6] );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -2058,7 +2110,8 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -2103,8 +2156,8 @@
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
- ( LPTYPEATTR __RPC_FAR * )ppTypeAttr = 0;
- ( CLEANLOCALSTORAGE __RPC_FAR * )pDummy = 0;
+ ppTypeAttr = 0;
+ pDummy = 0;
RpcTryFinally
{
ppTypeAttr = &_M24;
@@ -2142,7 +2195,8 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1644] );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -2212,7 +2266,8 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -2251,7 +2306,7 @@
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
- ( ITypeComp __RPC_FAR *__RPC_FAR * )ppTComp = 0;
+ ppTComp = 0;
RpcTryFinally
{
ppTComp = &_M26;
@@ -2275,7 +2330,8 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1540] );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -2340,7 +2396,8 @@
_StubMsg.BufferLength = 4U;
NdrProxyGetBuffer(This, &_StubMsg);
- *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = index;
+ *( UINT __RPC_FAR * )_StubMsg.Buffer = index;
+ _StubMsg.Buffer += sizeof(UINT);
NdrProxySendReceive(This, &_StubMsg);
@@ -2358,7 +2415,8 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -2404,14 +2462,15 @@
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
- ( LPFUNCDESC __RPC_FAR * )ppFuncDesc = 0;
- ( CLEANLOCALSTORAGE __RPC_FAR * )pDummy = 0;
+ ppFuncDesc = 0;
+ pDummy = 0;
RpcTryFinally
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[158] );
- index = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++;
+ index = *( UINT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(UINT);
ppFuncDesc = &_M27;
_M27 = 0;
@@ -2449,7 +2508,8 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1660] );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -2518,7 +2578,8 @@
_StubMsg.BufferLength = 4U;
NdrProxyGetBuffer(This, &_StubMsg);
- *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = index;
+ *( UINT __RPC_FAR * )_StubMsg.Buffer = index;
+ _StubMsg.Buffer += sizeof(UINT);
NdrProxySendReceive(This, &_StubMsg);
@@ -2536,7 +2597,8 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -2582,14 +2644,15 @@
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
- ( LPVARDESC __RPC_FAR * )ppVarDesc = 0;
- ( CLEANLOCALSTORAGE __RPC_FAR * )pDummy = 0;
+ ppVarDesc = 0;
+ pDummy = 0;
RpcTryFinally
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[170] );
- index = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++;
+ index = *( UINT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(UINT);
ppVarDesc = &_M29;
_M29 = 0;
@@ -2627,7 +2690,8 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1676] );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -2693,9 +2757,11 @@
_StubMsg.BufferLength = 4U + 4U;
NdrProxyGetBuffer(This, &_StubMsg);
- *(( MEMBERID __RPC_FAR * )_StubMsg.Buffer)++ = memid;
+ *( MEMBERID __RPC_FAR * )_StubMsg.Buffer = memid;
+ _StubMsg.Buffer += sizeof(MEMBERID);
- *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = cMaxNames;
+ *( UINT __RPC_FAR * )_StubMsg.Buffer = cMaxNames;
+ _StubMsg.Buffer += sizeof(UINT);
NdrProxySendReceive(This, &_StubMsg);
@@ -2708,9 +2774,11 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *pcNames = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++;
+ *pcNames = *( UINT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(UINT);
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -2760,16 +2828,18 @@
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
- ( BSTR __RPC_FAR * )rgBstrNames = 0;
- ( UINT __RPC_FAR * )pcNames = 0;
+ rgBstrNames = 0;
+ pcNames = 0;
RpcTryFinally
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[182] );
- memid = *(( MEMBERID __RPC_FAR * )_StubMsg.Buffer)++;
+ memid = *( MEMBERID __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(MEMBERID);
- cMaxNames = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++;
+ cMaxNames = *( UINT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(UINT);
rgBstrNames = NdrAllocate(&_StubMsg,cMaxNames * 4);
pcNames = &_M34;
@@ -2807,9 +2877,11 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1690] );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = *pcNames;
+ *( UINT __RPC_FAR * )_StubMsg.Buffer = *pcNames;
+ _StubMsg.Buffer += sizeof(UINT);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -2862,16 +2934,19 @@
_StubMsg.BufferLength = 4U;
NdrProxyGetBuffer(This, &_StubMsg);
- *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = index;
+ *( UINT __RPC_FAR * )_StubMsg.Buffer = index;
+ _StubMsg.Buffer += sizeof(UINT);
NdrProxySendReceive(This, &_StubMsg);
if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[196] );
- *pRefType = *(( HREFTYPE __RPC_FAR * )_StubMsg.Buffer)++;
+ *pRefType = *( HREFTYPE __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HREFTYPE);
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -2911,13 +2986,14 @@
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
- ( HREFTYPE __RPC_FAR * )pRefType = 0;
+ pRefType = 0;
RpcTryFinally
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[196] );
- index = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++;
+ index = *( UINT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(UINT);
pRefType = &_M35;
@@ -2931,9 +3007,11 @@
_StubMsg.BufferLength = 4U + 4U;
NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
- *(( HREFTYPE __RPC_FAR * )_StubMsg.Buffer)++ = *pRefType;
+ *( HREFTYPE __RPC_FAR * )_StubMsg.Buffer = *pRefType;
+ _StubMsg.Buffer += sizeof(HREFTYPE);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -2978,16 +3056,19 @@
_StubMsg.BufferLength = 4U;
NdrProxyGetBuffer(This, &_StubMsg);
- *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = index;
+ *( UINT __RPC_FAR * )_StubMsg.Buffer = index;
+ _StubMsg.Buffer += sizeof(UINT);
NdrProxySendReceive(This, &_StubMsg);
if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[196] );
- *pImplTypeFlags = *(( INT __RPC_FAR * )_StubMsg.Buffer)++;
+ *pImplTypeFlags = *( INT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(INT);
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -3027,13 +3108,14 @@
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
- ( INT __RPC_FAR * )pImplTypeFlags = 0;
+ pImplTypeFlags = 0;
RpcTryFinally
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[196] );
- index = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++;
+ index = *( UINT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(UINT);
pImplTypeFlags = &_M36;
@@ -3047,9 +3129,11 @@
_StubMsg.BufferLength = 4U + 4U;
NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
- *(( INT __RPC_FAR * )_StubMsg.Buffer)++ = *pImplTypeFlags;
+ *( INT __RPC_FAR * )_StubMsg.Buffer = *pImplTypeFlags;
+ _StubMsg.Buffer += sizeof(INT);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -3093,7 +3177,8 @@
if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[88] );
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -3138,7 +3223,8 @@
_StubMsg.BufferLength = 4U;
NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -3182,7 +3268,8 @@
if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[88] );
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -3227,7 +3314,8 @@
_StubMsg.BufferLength = 4U;
NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
- *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
+ *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -3309,9 +3397,11 @@
_StubMsg.BufferLength = 4U + 4U;
NdrProxyGetBuffer(This, &_StubMsg);
- *(( MEMBERID __RPC_FAR * )_StubMsg.Buffer)++ = memid;
+ *( MEMBERID __RPC_FAR * )_StubMsg.Buffer = memid;
+ _StubMsg.Buffer += sizeof(MEMBERID);
- *(( DWORD __RPC_FAR * )_StubMsg.Buffer)++ = refPtrFlags;
+ *( DWORD __RPC_FAR * )_StubMsg.Buffer = refPtrFlags;
+ _StubMsg.Buffer += sizeof(DWORD);
NdrProxySendReceive(This, &_StubMsg);
@@ -3329,7 +3419,8 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- *pdwHelpContext = *(( DWORD __RPC_FAR * )_StubMsg.Buffer)++;
+ *pdwHelpContext = *( DWORD __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(DWORD);
NdrUserMarshalUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
(unsigned char __RPC_FAR * __RPC_FAR *)&pBstrHelpFile,
@@ -3337,7 +3428,8 @@
(unsigned char)0 );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
- _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
+ _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(HRESULT);
}
RpcFinally
@@ -3396,18 +3488,20 @@
&_StubMsg,
&Object_StubDesc,
_pRpcChannelBuffer);
- ( BSTR __RPC_FAR * )pBstrName = 0;
- ( BSTR __RPC_FAR * )pBstrDocString = 0;
- ( DWORD __RPC_FAR * )pdwHelpContext = 0;
- ( BSTR __RPC_FAR * )pBstrHelpFile = 0;
+ pBstrName = 0;
+ pBstrDocString = 0;
+ pdwHelpContext = 0;
+ pBstrHelpFile = 0;
RpcTryFinally
{
if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[204] );
- memid = *(( MEMBERID __RPC_FAR * )_StubMsg.Buffer)++;
+ memid = *( MEMBERID __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(MEMBERID);
- refPtrFlags = *(( DWORD __RPC_FAR * )_StubMsg.Buffer)++;
+ refPtrFlags = *( DWORD __RPC_FAR * )_StubMsg.Buffer;
+ _StubMsg.Buffer += sizeof(DWORD);
pBstrName = &_M37;
MIDL_memset(
@@ -3465,14 +3559,16 @@
(PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1128] );
_StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
[truncated at 1000 lines; 2116 more skipped]
reactos/lib/oledlg
diff -u -r1.3.16.1 -r1.3.16.2
--- Makefile.ros-template 8 Dec 2004 21:57:19 -0000 1.3.16.1
+++ Makefile.ros-template 13 Dec 2004 09:39:01 -0000 1.3.16.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.3.16.1 2004/12/08 21:57:19 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.3.16.2 2004/12/13 09:39:01 hyperion Exp $
TARGET_NAME = oledlg
reactos/lib/olepro32
diff -u -r1.2.16.1 -r1.2.16.2
--- Makefile.ros-template 8 Dec 2004 21:57:19 -0000 1.2.16.1
+++ Makefile.ros-template 13 Dec 2004 09:39:01 -0000 1.2.16.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.2.16.1 2004/12/08 21:57:19 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.2.16.2 2004/12/13 09:39:01 hyperion Exp $
TARGET_NAME = olepro32
reactos/lib/riched20
diff -u -r1.1.2.1 -r1.1.2.2
--- Makefile.ros-template 8 Dec 2004 21:57:20 -0000 1.1.2.1
+++ Makefile.ros-template 13 Dec 2004 09:39:01 -0000 1.1.2.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.1.2.1 2004/12/08 21:57:20 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.1.2.2 2004/12/13 09:39:01 hyperion Exp $
TARGET_NAME = riched20
reactos/lib/richedit
diff -u -r1.2.16.1 -r1.2.16.2
--- Makefile.ros-template 8 Dec 2004 21:57:21 -0000 1.2.16.1
+++ Makefile.ros-template 13 Dec 2004 09:39:01 -0000 1.2.16.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.2.16.1 2004/12/08 21:57:21 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.2.16.2 2004/12/13 09:39:01 hyperion Exp $
TARGET_NAME = riched32
reactos/lib/rpcrt4
diff -u -r1.3.16.1 -r1.3.16.2
--- Makefile.ros-template 8 Dec 2004 21:57:21 -0000 1.3.16.1
+++ Makefile.ros-template 13 Dec 2004 09:39:01 -0000 1.3.16.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.3.16.1 2004/12/08 21:57:21 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.3.16.2 2004/12/13 09:39:01 hyperion Exp $
TARGET_NAME = rpcrt4
reactos/lib/rtl
diff -u -r1.4.2.1 -r1.4.2.2
--- acl.c 8 Dec 2004 21:57:21 -0000 1.4.2.1
+++ acl.c 13 Dec 2004 09:39:01 -0000 1.4.2.2
@@ -1,4 +1,4 @@
-/* $Id: acl.c,v 1.4.2.1 2004/12/08 21:57:21 hyperion Exp $
+/* $Id: acl.c,v 1.4.2.2 2004/12/13 09:39:01 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/lib/rtl
diff -u -r1.3.6.1 -r1.3.6.2
--- heap.c 8 Dec 2004 21:57:21 -0000 1.3.6.1
+++ heap.c 13 Dec 2004 09:39:01 -0000 1.3.6.2
@@ -937,7 +937,30 @@
}
+void DumpStackFrames ( PULONG Frame, ULONG FrameCount )
+{
+ ULONG i=0;
+ DbgPrint("Frames: ");
+ if ( !Frame )
+ {
+#if defined __GNUC__
+ __asm__("mov %%ebp, %%ebx" : "=b" (Frame) : );
+#elif defined(_MSC_VER)
+ __asm mov [Frame], ebp
+#endif
+ Frame = (PULONG)Frame[0]; // step out of DumpStackFrames
+ }
+ while ( Frame != 0 && (ULONG)Frame != 0xDEADBEEF && (ULONG)Frame != 0xcdcdcdcd && (ULONG)Frame != 0xcccccccc && i++ < FrameCount )
+ {
+ DbgPrint("<%X>", (PVOID)Frame[1]);
+ if (Frame[1] == 0xdeadbeef)
+ break;
+ Frame = (PULONG)Frame[0];
+ DbgPrint(" ");
+ }
+ DbgPrint("\n");
+}
/***********************************************************************
* HEAP_IsRealArena [Internal]
@@ -985,11 +1008,13 @@
{
DPRINT("Heap %p: block %p is not inside heap\n",
heap, block );
+ DumpStackFrames(NULL,10);
}
else if (WARN_ON(heap))
{
DPRINT1("Heap %p: block %p is not inside heap\n",
heap, block );
+ DumpStackFrames(NULL,10);
}
ret = FALSE;
}
reactos/lib/rtl
diff -u -r1.1 -r1.1.18.1
--- largeint.c 31 May 2004 19:29:02 -0000 1.1
+++ largeint.c 13 Dec 2004 09:39:01 -0000 1.1.18.1
@@ -1,4 +1,4 @@
-/* $Id: largeint.c,v 1.1 2004/05/31 19:29:02 gdalsnes Exp $
+/* $Id: largeint.c,v 1.1.18.1 2004/12/13 09:39:01 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -254,7 +254,7 @@
else
{
/* copy the sign bit */
- RC.u.HighPart |= (LargeInteger.u.HighPart & 0x80000000);
+ RC.u.HighPart = (LargeInteger.u.HighPart & 0x80000000);
RC.u.LowPart = LargeInteger.u.HighPart >> Shift;
}
reactos/lib/rtl
diff -u -r1.2.8.1 -r1.2.8.2
--- mem.c 8 Dec 2004 21:57:21 -0000 1.2.8.1
+++ mem.c 13 Dec 2004 09:39:01 -0000 1.2.8.2
@@ -1,5 +1,5 @@
-/* $Id: mem.c,v 1.2.8.1 2004/12/08 21:57:21 hyperion Exp $
+/* $Id: mem.c,v 1.2.8.2 2004/12/13 09:39:01 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/lib/rtl
diff -u -r1.1.18.1 -r1.1.18.2
--- nls.c 8 Dec 2004 21:57:21 -0000 1.1.18.1
+++ nls.c 13 Dec 2004 09:39:01 -0000 1.1.18.2
@@ -1,4 +1,4 @@
-/* $Id: nls.c,v 1.1.18.1 2004/12/08 21:57:21 hyperion Exp $
+/* $Id: nls.c,v 1.1.18.2 2004/12/13 09:39:01 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/lib/setupapi
diff -u -r1.4.16.1 -r1.4.16.2
--- Makefile.ros-template 8 Dec 2004 21:57:21 -0000 1.4.16.1
+++ Makefile.ros-template 13 Dec 2004 09:39:01 -0000 1.4.16.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.4.16.1 2004/12/08 21:57:21 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.4.16.2 2004/12/13 09:39:01 hyperion Exp $
TARGET_NAME = setupapi
reactos/lib/shell32
diff -u -r1.6.2.1 -r1.6.2.2
--- Makefile.ros-template 8 Dec 2004 21:57:21 -0000 1.6.2.1
+++ Makefile.ros-template 13 Dec 2004 09:39:01 -0000 1.6.2.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.6.2.1 2004/12/08 21:57:21 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.6.2.2 2004/12/13 09:39:01 hyperion Exp $
TARGET_NAME = shell32
reactos/lib/shlwapi
diff -u -r1.9.2.1 -r1.9.2.2
--- Makefile.ros-template 8 Dec 2004 21:57:23 -0000 1.9.2.1
+++ Makefile.ros-template 13 Dec 2004 09:39:02 -0000 1.9.2.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.9.2.1 2004/12/08 21:57:23 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.9.2.2 2004/12/13 09:39:02 hyperion Exp $
TARGET_NAME = shlwapi
reactos/lib/string
diff -u -r1.2.34.1 -r1.2.34.2
--- strncpy.c 8 Dec 2004 21:57:24 -0000 1.2.34.1
+++ strncpy.c 13 Dec 2004 09:39:02 -0000 1.2.34.2
@@ -1,4 +1,4 @@
-/* $Id: strncpy.c,v 1.2.34.1 2004/12/08 21:57:24 hyperion Exp $
+/* $Id: strncpy.c,v 1.2.34.2 2004/12/13 09:39:02 hyperion Exp $
*/
#include <string.h>
#include "tcsncpy.h"
reactos/lib/syssetup
diff -u -r1.8.2.1 -r1.8.2.2
--- syssetup.rc 8 Dec 2004 21:57:24 -0000 1.8.2.1
+++ syssetup.rc 13 Dec 2004 09:39:02 -0000 1.8.2.2
@@ -1,4 +1,4 @@
-/* $Id: syssetup.rc,v 1.8.2.1 2004/12/08 21:57:24 hyperion Exp $ */
+/* $Id: syssetup.rc,v 1.8.2.2 2004/12/13 09:39:02 hyperion Exp $ */
#include <windows.h>
#include "resource.h"
reactos/lib/syssetup
diff -u -r1.15.2.1 -r1.15.2.2
--- wizard.c 8 Dec 2004 21:57:24 -0000 1.15.2.1
+++ wizard.c 13 Dec 2004 09:39:02 -0000 1.15.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: wizard.c,v 1.15.2.1 2004/12/08 21:57:24 hyperion Exp $
+/* $Id: wizard.c,v 1.15.2.2 2004/12/13 09:39:02 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/lib/twain
diff -u -r1.7.16.1 -r1.7.16.2
--- Makefile 8 Dec 2004 21:57:24 -0000 1.7.16.1
+++ Makefile 13 Dec 2004 09:39:02 -0000 1.7.16.2
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.7.16.1 2004/12/08 21:57:24 hyperion Exp $
+# $Id: Makefile,v 1.7.16.2 2004/12/13 09:39:02 hyperion Exp $
PATH_TO_TOP = ../..
reactos/lib/unicode
diff -u -r1.3.2.1 -r1.3.2.2
--- Makefile.ros-template 8 Dec 2004 21:57:24 -0000 1.3.2.1
+++ Makefile.ros-template 13 Dec 2004 09:39:02 -0000 1.3.2.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.3.2.1 2004/12/08 21:57:24 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.3.2.2 2004/12/13 09:39:02 hyperion Exp $
TARGET_NAME = wine_unicode
reactos/lib/urlmon
diff -u -r1.2.8.1 -r1.2.8.2
--- Makefile.ros-template 8 Dec 2004 21:57:24 -0000 1.2.8.1
+++ Makefile.ros-template 13 Dec 2004 09:39:02 -0000 1.2.8.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.2.8.1 2004/12/08 21:57:24 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.2.8.2 2004/12/13 09:39:02 hyperion Exp $
TARGET_NAME = urlmon
reactos/lib/user32
diff -u -r1.40.8.1 -r1.40.8.2
--- Makefile 8 Dec 2004 21:57:26 -0000 1.40.8.1
+++ Makefile 13 Dec 2004 09:39:02 -0000 1.40.8.2
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.40.8.1 2004/12/08 21:57:26 hyperion Exp $
+# $Id: Makefile,v 1.40.8.2 2004/12/13 09:39:02 hyperion Exp $
PATH_TO_TOP = ../..
reactos/lib/user32/include
diff -u -r1.31 -r1.31.6.1
--- user32.h 12 Sep 2004 19:47:49 -0000 1.31
+++ user32.h 13 Dec 2004 09:39:02 -0000 1.31.6.1
@@ -30,10 +30,21 @@
BYTE Showing;
} THRDCARETINFO, *PTHRDCARETINFO;
+void InitStockObjects(void);
VOID CreateFrameBrushes(VOID);
VOID DeleteFrameBrushes(VOID);
void DrawCaret(HWND hWnd, PTHRDCARETINFO CaretInfo);
+LONG WINAPI RegCloseKey(HKEY);
+LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
+LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
+
+#ifdef __USE_W32API
+NTSTATUS STDCALL ZwCallbackReturn(PVOID Result,
+ ULONG ResultLength,
+ NTSTATUS Status);
+#endif
+
#define NtUserAnyPopup() \
(BOOL)NtUserCallNoParam(NOPARAM_ROUTINE_ANYPOPUP)
@@ -61,6 +72,18 @@
#define NtUserRegisterLogonProcess(hproc, x) \
(BOOL)NtUserCallTwoParam((DWORD)hproc, (DWORD)x, TWOPARAM_ROUTINE_REGISTERLOGONPROC)
+#define NtUserGetSysColorBrushes(HBrushes, count) \
+ (BOOL)NtUserCallTwoParam((DWORD)(HBrushes), (DWORD)(count), TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES)
+
+#define NtUserGetSysColorPens(HPens, count) \
+ (BOOL)NtUserCallTwoParam((DWORD)(HPens), (DWORD)(count), TWOPARAM_ROUTINE_GETSYSCOLORPENS)
+
+#define NtUserGetSysColors(ColorRefs, count) \
+ (BOOL)NtUserCallTwoParam((DWORD)(ColorRefs), (DWORD)(count), TWOPARAM_ROUTINE_GETSYSCOLORS)
+
+#define NtUserSetSysColors(ColorRefs, count) \
+ (BOOL)NtUserCallTwoParam((DWORD)(ColorRefs), (DWORD)(count), TWOPARAM_ROUTINE_SETSYSCOLORS)
+
#define NtUserSetCaretBlinkTime(uMSeconds) \
(BOOL)NtUserCallOneParam((DWORD)uMSeconds, ONEPARAM_ROUTINE_SETCARETBLINKTIME)
@@ -100,12 +123,3 @@
#define NtUserEnableProcessWindowGhosting(bEnable) \
NtUserCallOneParam((DWORD)bEnable, ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING)
-LONG WINAPI RegCloseKey(HKEY);
-LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
-LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
-
-#ifdef __USE_W32API
-NTSTATUS STDCALL ZwCallbackReturn(PVOID Result,
- ULONG ResultLength,
- NTSTATUS Status);
-#endif
reactos/lib/user32/include
diff -u -r1.12 -r1.12.6.1
--- window.h 12 Sep 2004 19:47:49 -0000 1.12
+++ window.h 13 Dec 2004 09:39:02 -0000 1.12.6.1
@@ -7,14 +7,37 @@
#include <windows.h>
#include <user32/wininternal.h>
+extern COLORREF SysColors[];
+extern HPEN SysPens[];
+extern HBRUSH SysBrushes[];
+
+#define NUM_SYSCOLORS 31
+
#define IS_ATOM(x) \
(((ULONG_PTR)(x) > 0x0) && ((ULONG_PTR)(x) < 0x10000))
+#define UserHasAnyFrameStyle(Style, ExStyle) \
+ (((Style) & (WS_THICKFRAME | WS_DLGFRAME | WS_BORDER)) || \
+ ((ExStyle) & WS_EX_DLGMODALFRAME) || \
+ (!((Style) & (WS_CHILD | WS_POPUP))))
+
+#define UserHasDlgFrameStyle(Style, ExStyle) \
+ (((ExStyle) & WS_EX_DLGMODALFRAME) || \
+ (((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME))))
+
+#define UserHasThickFrameStyle(Style, ExStyle) \
+ (((Style) & WS_THICKFRAME) && \
+ (!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)))
+
+#define UserHasThinFrameStyle(Style, ExStyle) \
+ (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
+
+#define UserHasBigFrameStyle(Style, ExStyle) \
+ (((Style) & (WS_THICKFRAME | WS_DLGFRAME)) || \
+ ((ExStyle) & WS_EX_DLGMODALFRAME))
+
+
BOOL UserDrawSysMenuButton( HWND hWnd, HDC hDC, LPRECT, BOOL down );
-ULONG
-UserHasDlgFrameStyle(ULONG Style, ULONG ExStyle);
-ULONG
-UserHasThickFrameStyle(ULONG Style, ULONG ExStyle);
void
UserGetFrameSize(ULONG Style, ULONG ExStyle, SIZE *Size);
void
reactos/lib/user32/misc
diff -u -r1.13 -r1.13.2.1
--- display.c 16 Nov 2004 16:27:48 -0000 1.13
+++ display.c 13 Dec 2004 09:39:02 -0000 1.13.2.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: display.c,v 1.13 2004/11/16 16:27:48 blight Exp $
+/* $Id: display.c,v 1.13.2.1 2004/12/13 09:39:02 hyperion Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/misc/dde.c
@@ -46,28 +46,45 @@
PDISPLAY_DEVICEA lpDisplayDevice,
DWORD dwFlags)
{
-/* FIXME: This implementation doesn't convert the lpDisplayDevice structure! */
-#if 0
BOOL rc;
UNICODE_STRING Device;
+ DISPLAY_DEVICEW DisplayDeviceW;
+
if ( !RtlCreateUnicodeStringFromAsciiz ( &Device, (PCSZ)lpDevice ) )
{
SetLastError ( ERROR_OUTOFMEMORY );
return FALSE;
}
+ DisplayDeviceW.cb = lpDisplayDevice->cb;
rc = NtUserEnumDisplayDevices (
&Device,
iDevNum,
- lpDisplayDevice,
+ &DisplayDeviceW,
dwFlags );
+
+ /* Copy result from DisplayDeviceW to lpDisplayDevice */
+ lpDisplayDevice->StateFlags = DisplayDeviceW.StateFlags;
+ WideCharToMultiByte(CP_ACP,0,
+ DisplayDeviceW.DeviceName,wcslen(DisplayDeviceW.DeviceName),
+ lpDisplayDevice->DeviceName,sizeof(lpDisplayDevice->DeviceName) / sizeof(lpDisplayDevice->DeviceName[0]),
+ NULL,NULL);
+ WideCharToMultiByte(CP_ACP,0,
+ DisplayDeviceW.DeviceString,wcslen(DisplayDeviceW.DeviceString),
+ lpDisplayDevice->DeviceString,sizeof(lpDisplayDevice->DeviceString) / sizeof(lpDisplayDevice->DeviceString[0]),
+ NULL,NULL);
+ WideCharToMultiByte(CP_ACP,0,
+ DisplayDeviceW.DeviceID,wcslen(DisplayDeviceW.DeviceID),
+ lpDisplayDevice->DeviceID,sizeof(lpDisplayDevice->DeviceID) / sizeof(lpDisplayDevice->DeviceID[0]),
+ NULL,NULL);
+ WideCharToMultiByte(CP_ACP,0,
+ DisplayDeviceW.DeviceKey,wcslen(DisplayDeviceW.DeviceKey),
+ lpDisplayDevice->DeviceKey,sizeof(lpDisplayDevice->DeviceKey) / sizeof(lpDisplayDevice->DeviceKey[0]),
+ NULL,NULL);
RtlFreeUnicodeString ( &Device );
return rc;
-#else
- return 0;
-#endif
}
reactos/lib/user32/misc
diff -u -r1.45 -r1.45.6.1
--- dllmain.c 12 Sep 2004 19:47:49 -0000 1.45
+++ dllmain.c 13 Dec 2004 09:39:05 -0000 1.45.6.1
@@ -76,6 +76,7 @@
InitializeCriticalSection(&gcsMPH);
GdiDllInitialize(NULL, DLL_PROCESS_ATTACH, NULL);
+ InitStockObjects();
}
VOID
reactos/lib/user32/misc
diff -u -r1.9.2.1 -r1.9.2.2
--- misc.c 8 Dec 2004 21:57:26 -0000 1.9.2.1
+++ misc.c 13 Dec 2004 09:39:05 -0000 1.9.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: misc.c,v 1.9.2.1 2004/12/08 21:57:26 hyperion Exp $
+/* $Id: misc.c,v 1.9.2.2 2004/12/13 09:39:05 hyperion Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/misc/misc.c
reactos/lib/user32/misc
diff -u -r1.68 -r1.68.2.1
--- stubs.c 16 Nov 2004 16:27:48 -0000 1.68
+++ stubs.c 13 Dec 2004 09:39:05 -0000 1.68.2.1
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.68 2004/11/16 16:27:48 blight Exp $
+/* $Id: stubs.c,v 1.68.2.1 2004/12/13 09:39:05 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
@@ -148,21 +148,6 @@
*/
BOOL
STDCALL
-SetSysColors(
- int cElements,
- CONST INT *lpaElements,
- CONST COLORREF *lpaRgbValues)
-{
- UNIMPLEMENTED;
- return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
TrackMouseEvent(
LPTRACKMOUSEEVENT lpEventTrack)
{
reactos/lib/user32/windows
diff -u -r1.51.8.1 -r1.51.8.2
--- class.c 8 Dec 2004 21:57:27 -0000 1.51.8.1
+++ class.c 13 Dec 2004 09:39:06 -0000 1.51.8.2
@@ -1,4 +1,4 @@
-/* $Id: class.c,v 1.51.8.1 2004/12/08 21:57:27 hyperion Exp $
+/* $Id: class.c,v 1.51.8.2 2004/12/13 09:39:06 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
reactos/lib/user32/windows
diff -u -r1.147 -r1.147.2.1
--- defwnd.c 19 Nov 2004 23:07:09 -0000 1.147
+++ defwnd.c 13 Dec 2004 09:39:06 -0000 1.147.2.1
@@ -1,4 +1,4 @@
-/* $Id: defwnd.c,v 1.147 2004/11/19 23:07:09 gvg Exp $
+/* $Id: defwnd.c,v 1.147.2.1 2004/12/13 09:39:06 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
@@ -41,70 +41,46 @@
/* GLOBALS *******************************************************************/
-/* TODO: widgets will be cached here.
-static HBITMAP hbClose;
-static HBITMAP hbCloseD;
-static HBITMAP hbMinimize;
-static HBITMAP hbMinimizeD;
-static HBITMAP hbRestore;
-static HBITMAP hbRestoreD;
-static HBITMAP hbMaximize;
-static HBITMAP hbScrUp;
-static HBITMAP hbScrDwn;
-static HBITMAP hbScrLeft;
-static HBITMAP hbScrRight;
-*/
-
-
-static COLORREF SysColors[] =
-{
- RGB(212, 208, 200), /* COLOR_SCROLLBAR */
- RGB(58, 110, 165), /* COLOR_BACKGROUND */
- RGB(10, 36, 106), /* COLOR_ACTIVECAPTION */
- RGB(128, 128, 128), /* COLOR_INACTIVECAPTION */
- RGB(212, 208, 200), /* COLOR_MENU */
- RGB(255, 255, 255), /* COLOR_WINDOW */
- RGB(0, 0, 0), /* COLOR_WINDOWFRAME */
- RGB(0, 0, 0), /* COLOR_MENUTEXT */
- RGB(0, 0, 0), /* COLOR_WINDOWTEXT */
- RGB(255, 255, 255), /* COLOR_CAPTIONTEXT */
- RGB(212, 208, 200), /* COLOR_ACTIVEBORDER */
- RGB(212, 208, 200), /* COLOR_INACTIVEBORDER */
- RGB(128, 128, 128), /* COLOR_APPWORKSPACE */
- RGB(10, 36, 106), /* COLOR_HIGHLIGHT */
- RGB(255, 255, 255), /* COLOR_HIGHLIGHTTEXT */
- RGB(212, 208, 200), /* COLOR_BTNFACE */
- RGB(128, 128, 128), /* COLOR_BTNSHADOW */
- RGB(128, 128, 128), /* COLOR_GRAYTEXT */
- RGB(0, 0, 0), /* COLOR_BTNTEXT */
- RGB(212, 208, 200), /* COLOR_INACTIVECAPTIONTEXT */
- RGB(255, 255, 255), /* COLOR_BTNHIGHLIGHT */
- RGB(64, 64, 64), /* COLOR_3DDKSHADOW */
- RGB(212, 208, 200), /* COLOR_3DLIGHT */
- RGB(0, 0, 0), /* COLOR_INFOTEXT */
- RGB(255, 255, 225), /* COLOR_INFOBK */
- RGB(181, 181, 181), /* COLOR_UNKNOWN */
- RGB(0, 0, 128), /* COLOR_HOTLIGHT */
- RGB(166, 202, 240), /* COLOR_GRADIENTACTIVECAPTION */
- RGB(192, 192, 192), /* COLOR_GRADIENTINACTIVECAPTION */
- RGB(49, 106, 197), /* COLOR_MENUHILIGHT */
- RGB(236, 233, 216) /* COLOR_MENUBAR */
-};
-
-#define NUM_SYSCOLORS (sizeof(SysColors) / sizeof(SysColors[0]))
+static COLORREF SysColors[NUM_SYSCOLORS] = {0};
+static HPEN SysPens[NUM_SYSCOLORS] = {0};
+static HBRUSH SysBrushes[NUM_SYSCOLORS] = {0};
/* Bits in the dwKeyData */
#define KEYDATA_ALT 0x2000
/* FUNCTIONS *****************************************************************/
+void
+InitStockObjects(void)
+{
+ /* FIXME - Instead of copying the stuff to usermode we should map the tables to
+ userland. The current implementation has one big flaw: the system color
+ table doesn't get updated when another process changes them. That's why
+ we should rather map the table into usermode. But it only affects the
+ SysColors table - the pens, brushes and stock objects are not affected
+ as their handles never change. But it'd be faster to map them, too. */
+ if(SysBrushes[0] == NULL)
+ {
+ /* only initialize once */
+ NtUserGetSysColors(SysColors, NUM_SYSCOLORS);
+ NtUserGetSysColorPens(SysPens, NUM_SYSCOLORS);
+ NtUserGetSysColorBrushes(SysBrushes, NUM_SYSCOLORS);
+ }
+}
+
/*
* @implemented
*/
DWORD STDCALL
GetSysColor(int nIndex)
{
+ if(nIndex >= 0 && nIndex <= NUM_SYSCOLORS)
+ {
return SysColors[nIndex];
+ }
+
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
}
/*
@@ -113,22 +89,13 @@
HPEN STDCALL
GetSysColorPen(int nIndex)
{
- static HPEN SysPens[NUM_SYSCOLORS];
-
- if (nIndex < 0 || NUM_SYSCOLORS < nIndex)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return NULL;
- }
-
- /* FIXME should register this object with DeleteObject() so it
- can't be deleted */
- if (NULL == SysPens[nIndex])
- {
- SysPens[nIndex] = CreatePen(PS_SOLID, 1, SysColors[nIndex]);
- }
+ if(nIndex >= 0 && nIndex <= NUM_SYSCOLORS)
+ {
+ return SysPens[nIndex];
+ }
- return SysPens[nIndex];
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return NULL;
}
/*
@@ -137,89 +104,51 @@
HBRUSH STDCALL
GetSysColorBrush(int nIndex)
{
- static HBRUSH SysBrushes[NUM_SYSCOLORS];
-
- if (nIndex < 0 || NUM_SYSCOLORS < nIndex)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return NULL;
- }
-
- /* FIXME should register this object with DeleteObject() so it
- can't be deleted */
- if (NULL == SysBrushes[nIndex])
- {
- SysBrushes[nIndex] = (HBRUSH) ((DWORD) CreateSolidBrush(SysColors[nIndex]) | 0x00800000);
- }
+ if(nIndex >= 0 && nIndex <= NUM_SYSCOLORS)
+ {
+ return SysBrushes[nIndex];
+ }
- return SysBrushes[nIndex];
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return NULL;
}
/*
- * @unimplemented
- */
-/*
-LRESULT STDCALL
-DefFrameProcA( HWND hWnd,
- HWND hWndMDIClient,
- UINT uMsg,
- WPARAM wParam,
- LPARAM lParam )
-{
- UNIMPLEMENTED;
- return ((LRESULT)0);
-}
-*/
-
-/*
- * @unimplemented
+ * @implemented
*/
-/*
-LRESULT STDCALL
-DefFrameProcW(HWND hWnd,
- HWND hWndMDIClient,
- UINT uMsg,
- WPARAM wParam,
- LPARAM lParam)
+BOOL
+STDCALL
+SetSysColors(
+ int cElements,
+ CONST INT *lpaElements,
+ CONST COLORREF *lpaRgbValues)
{
- UNIMPLEMENTED;
- return ((LRESULT)0);
-}
-*/
-
-ULONG
-UserHasAnyFrameStyle(ULONG Style, ULONG ExStyle)
-{
- return ((Style & (WS_THICKFRAME | WS_DLGFRAME | WS_BORDER)) ||
- (ExStyle & WS_EX_DLGMODALFRAME) ||
- (!(Style & (WS_CHILD | WS_POPUP))));
-}
-
-ULONG
-UserHasDlgFrameStyle(ULONG Style, ULONG ExStyle)
-{
- return ((ExStyle & WS_EX_DLGMODALFRAME) ||
- ((Style & WS_DLGFRAME) && (!(Style & WS_THICKFRAME))));
-}
-
-ULONG
-UserHasThickFrameStyle(ULONG Style, ULONG ExStyle)
-{
- return ((Style & WS_THICKFRAME) &&
- (!((Style & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)));
-}
-
-ULONG
-UserHasThinFrameStyle(ULONG Style, ULONG ExStyle)
-{
- return ((Style & WS_BORDER) || (!(Style & (WS_CHILD | WS_POPUP))));
-}
+ BOOL Ret;
+ struct
+ {
+ INT *Elements;
+ COLORREF *Colors;
+ } ChangeSysColors;
-ULONG
-UserHasBigFrameStyle(ULONG Style, ULONG ExStyle)
-{
- return ((Style & (WS_THICKFRAME | WS_DLGFRAME)) ||
- (ExStyle & WS_EX_DLGMODALFRAME));
+ ChangeSysColors.Elements = (INT*)lpaElements;
+ ChangeSysColors.Colors = (COLORREF*)lpaRgbValues;
+
+ if(cElements > 0)
+ {
+ Ret = NtUserSetSysColors(&ChangeSysColors, cElements);
+ if(Ret)
+ {
+ /* FIXME - just change it in the usermode structure, too, instead of asking win32k again */
+ NtUserGetSysColors(SysColors, NUM_SYSCOLORS);
+ }
+ }
+ else
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ Ret = FALSE;
+ }
+
+ return Ret;
}
void
reactos/lib/user32/windows
diff -u -r1.11.8.1 -r1.11.8.2
--- font.c 8 Dec 2004 21:57:27 -0000 1.11.8.1
+++ font.c 13 Dec 2004 09:39:06 -0000 1.11.8.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: font.c,v 1.11.8.1 2004/12/08 21:57:27 hyperion Exp $
+/* $Id: font.c,v 1.11.8.2 2004/12/13 09:39:06 hyperion Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/input.c
reactos/lib/user32/windows
diff -u -r1.25 -r1.25.8.1
--- input.c 15 Aug 2004 21:36:29 -0000 1.25
+++ input.c 13 Dec 2004 09:39:06 -0000 1.25.8.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: input.c,v 1.25 2004/08/15 21:36:29 chorns Exp $
+/* $Id: input.c,v 1.25.8.1 2004/12/13 09:39:06 hyperion Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/input.c
@@ -478,25 +478,33 @@
/*
- * @unimplemented
+ * @implemented
*/
SHORT STDCALL
VkKeyScanA(CHAR ch)
{
- UNIMPLEMENTED;
- return 0;
+ WCHAR wChar;
+
+ if (IsDBCSLeadByte(ch)) return -1;
+
+ MultiByteToWideChar(CP_ACP, 0, &ch, 1, &wChar, 1);
+ return VkKeyScanW(wChar);
}
/*
- * @unimplemented
+ * @implemented
*/
SHORT STDCALL
VkKeyScanExA(CHAR ch,
HKL dwhkl)
{
- UNIMPLEMENTED;
- return 0;
+ WCHAR wChar;
+
+ if (IsDBCSLeadByte(ch)) return -1;
+
+ MultiByteToWideChar(CP_ACP, 0, &ch, 1, &wChar, 1);
+ return VkKeyScanExW(wChar, dwhkl);
}
@@ -508,18 +516,17 @@
HKL dwhkl)
{
UNIMPLEMENTED;
- return 0;
+ return -1;
}
/*
- * @unimplemented
+ * @implemented
*/
SHORT STDCALL
VkKeyScanW(WCHAR ch)
{
- UNIMPLEMENTED;
- return 0;
+ return VkKeyScanExW(ch, GetKeyboardLayout(0));
}
reactos/lib/user32/windows
diff -u -r1.71.6.1 -r1.71.6.2
--- menu.c 8 Dec 2004 21:57:27 -0000 1.71.6.1
+++ menu.c 13 Dec 2004 09:39:06 -0000 1.71.6.2
@@ -21,7 +21,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: menu.c,v 1.71.6.1 2004/12/08 21:57:27 hyperion Exp $
+/* $Id: menu.c,v 1.71.6.2 2004/12/13 09:39:06 hyperion Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/menu.c
@@ -203,26 +203,29 @@
static BOOL FASTCALL
MenuGetRosMenuItemInfo(HMENU Menu, UINT Index, PROSMENUITEMINFO ItemInfo)
{
- UNICODE_STRING Text;
+ UNICODE_STRING Text = {0, 0, NULL};
- if (MF_STRING == MENU_ITEM_TYPE(ItemInfo->fType) && NULL != ItemInfo->dwTypeData)
- {
- /* There's already a buffer allocated */
- Text.Buffer = ItemInfo->dwTypeData;
- Text.Length = ItemInfo->cch * sizeof(WCHAR);
- Text.MaximumLength = (ItemInfo->cch < INITIAL_STRING_SIZE ? INITIAL_STRING_SIZE
- : ItemInfo->cch + 1) * sizeof(WCHAR);
- }
- else
+ if (MF_STRING == MENU_ITEM_TYPE(ItemInfo->fType))
{
- Text.Buffer = HeapAlloc(GetProcessHeap(), 0, INITIAL_STRING_SIZE * sizeof(WCHAR));
- if (NULL == Text.Buffer)
+ if (NULL != ItemInfo->dwTypeData)
{
- return FALSE;
+ /* There's already a buffer allocated */
+ Text.Buffer = ItemInfo->dwTypeData;
+ Text.Length = ItemInfo->cch * sizeof(WCHAR);
+ Text.MaximumLength = (ItemInfo->cch < INITIAL_STRING_SIZE ? INITIAL_STRING_SIZE
+ : ItemInfo->cch + 1) * sizeof(WCHAR);
+ }
+ else
+ {
+ Text.Buffer = HeapAlloc(GetProcessHeap(), 0, INITIAL_STRING_SIZE * sizeof(WCHAR));
+ if (NULL == Text.Buffer)
+ {
+ return FALSE;
+ }
+ Text.Length = 0;
+ Text.MaximumLength = INITIAL_STRING_SIZE * sizeof(WCHAR);
+ ItemInfo->cch = INITIAL_STRING_SIZE - 1;
}
- Text.Length = 0;
- Text.MaximumLength = INITIAL_STRING_SIZE * sizeof(WCHAR);
- ItemInfo->cch = INITIAL_STRING_SIZE - 1;
}
ItemInfo->dwTypeData = (LPWSTR) &Text;
@@ -260,7 +263,7 @@
ItemInfo->cch++;
if (! NtUserMenuItemInfo(Menu, Index, TRUE, ItemInfo, FALSE))
{
- HeapFree(GetProcessHeap(), 0, ItemInfo->dwTypeData);
+ HeapFree(GetProcessHeap(), 0, Text.Buffer);
ItemInfo->dwTypeData = NULL;
ItemInfo->cch = 0;
ItemInfo->fType = 0;
@@ -280,6 +283,8 @@
if (NULL != Text.Buffer)
{
HeapFree(GetProcessHeap(), 0, Text.Buffer);
+ ItemInfo->dwTypeData = NULL;
+ ItemInfo->cch = 0;
}
}
@@ -3761,7 +3766,7 @@
if (!NtUserMenuItemInfo(Menu, Item, ByPosition, (PROSMENUITEMINFO)mii, FALSE))
{
- HeapFree(GetProcessHeap(), 0, mii->dwTypeData);
+ HeapFree(GetProcessHeap(), 0, Text.Buffer);
mii->dwTypeData = AnsiString;
return FALSE;
}
reactos/lib/user32/windows
diff -u -r1.43.6.1 -r1.43.6.2
--- message.c 8 Dec 2004 21:57:28 -0000 1.43.6.1
+++ message.c 13 Dec 2004 09:39:06 -0000 1.43.6.2
@@ -1,4 +1,4 @@
-/* $Id: message.c,v 1.43.6.1 2004/12/08 21:57:28 hyperion Exp $
+/* $Id: message.c,v 1.43.6.2 2004/12/13 09:39:06 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
reactos/lib/user32/windows
diff -u -r1.29 -r1.29.2.1
--- messagebox.c 19 Nov 2004 19:34:11 -0000 1.29
+++ messagebox.c 13 Dec 2004 09:39:07 -0000 1.29.2.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: messagebox.c,v 1.29 2004/11/19 19:34:11 weiden Exp $
+/* $Id: messagebox.c,v 1.29.2.1 2004/12/13 09:39:07 hyperion Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/messagebox.c
@@ -739,17 +739,22 @@
else
captionW.Buffer = (LPWSTR)lpMsgBoxParams->lpszCaption;
- if (HIWORD((UINT)lpMsgBoxParams->lpszIcon))
+ if(lpMsgBoxParams->dwStyle & MB_USERICON)
{
- RtlCreateUnicodeStringFromAsciiz(&iconW, (PCSZ)lpMsgBoxParams->lpszIcon);
- /*
- * UNICODE_STRING objects are always allocated with an extra byte so you
- * can null-term if you want
- */
- iconW.Buffer[iconW.Length / sizeof(WCHAR)] = L'\0';
+ if (HIWORD((UINT)lpMsgBoxParams->lpszIcon))
+ {
+ RtlCreateUnicodeStringFromAsciiz(&iconW, (PCSZ)lpMsgBoxParams->lpszIcon);
+ /*
+ * UNICODE_STRING objects are always allocated with an extra byte so you
+ * can null-term if you want
+ */
+ iconW.Buffer[iconW.Length / sizeof(WCHAR)] = L'\0';
+ }
+ else
+ iconW.Buffer = (LPWSTR)lpMsgBoxParams->lpszIcon;
}
else
- iconW.Buffer = (LPWSTR)lpMsgBoxParams->lpszIcon;
+ iconW.Buffer = NULL;
msgboxW.cbSize = sizeof(msgboxW);
msgboxW.hwndOwner = lpMsgBoxParams->hwndOwner;
@@ -770,7 +775,7 @@
if (HIWORD((UINT)lpMsgBoxParams->lpszCaption))
RtlFreeUnicodeString(&captionW);
- if (HIWORD((UINT)lpMsgBoxParams->lpszIcon))
+ if ((lpMsgBoxParams->dwStyle & MB_USERICON) && HIWORD((UINT)iconW.Buffer))
RtlFreeUnicodeString(&iconW);
return ret;
reactos/lib/userenv
diff -u -r1.8.2.1 -r1.8.2.2
--- environment.c 8 Dec 2004 21:57:28 -0000 1.8.2.1
+++ environment.c 13 Dec 2004 09:39:07 -0000 1.8.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: environment.c,v 1.8.2.1 2004/12/08 21:57:28 hyperion Exp $
+/* $Id: environment.c,v 1.8.2.2 2004/12/13 09:39:07 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/lib/version
diff -u -r1.15.16.1 -r1.15.16.2
--- makefile 8 Dec 2004 21:57:28 -0000 1.15.16.1
+++ makefile 13 Dec 2004 09:39:07 -0000 1.15.16.2
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.15.16.1 2004/12/08 21:57:28 hyperion Exp $
+# $Id: makefile,v 1.15.16.2 2004/12/13 09:39:07 hyperion Exp $
PATH_TO_TOP = ../..
reactos/lib/winmm
diff -u -r1.3.16.1 -r1.3.16.2
--- Makefile.ros-template 8 Dec 2004 21:57:28 -0000 1.3.16.1
+++ Makefile.ros-template 13 Dec 2004 09:39:07 -0000 1.3.16.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.3.16.1 2004/12/08 21:57:28 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.3.16.2 2004/12/13 09:39:07 hyperion Exp $
TARGET_NAME = winmm
reactos/lib/winmm/midimap
diff -u -r1.3.2.1 -r1.3.2.2
--- Makefile.ros-template 8 Dec 2004 21:57:29 -0000 1.3.2.1
+++ Makefile.ros-template 13 Dec 2004 09:39:07 -0000 1.3.2.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.3.2.1 2004/12/08 21:57:29 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.3.2.2 2004/12/13 09:39:07 hyperion Exp $
TARGET_NAME = midimap
reactos/lib/winmm/wavemap
diff -u -r1.2.8.1 -r1.2.8.2
--- Makefile.ros-template 8 Dec 2004 21:57:29 -0000 1.2.8.1
+++ Makefile.ros-template 13 Dec 2004 09:39:07 -0000 1.2.8.2
@@ -1,4 +1,4 @@
-# $Id: Makefile.ros-template,v 1.2.8.1 2004/12/08 21:57:29 hyperion Exp $
+# $Id: Makefile.ros-template,v 1.2.8.2 2004/12/13 09:39:07 hyperion Exp $
TARGET_NAME = msacm
reactos/lib/ws2_32
diff -u -r1.18.2.1 -r1.18.2.2
--- makefile 8 Dec 2004 21:57:30 -0000 1.18.2.1
+++ makefile 13 Dec 2004 09:39:07 -0000 1.18.2.2
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.18.2.1 2004/12/08 21:57:30 hyperion Exp $
+# $Id: makefile,v 1.18.2.2 2004/12/13 09:39:07 hyperion Exp $
PATH_TO_TOP = ../..
reactos/ntoskrnl
diff -u -r1.156.2.2 -r1.156.2.3
--- Makefile 9 Dec 2004 19:31:26 -0000 1.156.2.2
+++ Makefile 13 Dec 2004 09:39:07 -0000 1.156.2.3
@@ -16,6 +16,13 @@
CONFIG :=
+ifeq ($(DBG), 1)
+DBG_OR_KDBG := 1
+endif
+ifeq ($(KDBG), 1)
+DBG_OR_KDBG := 1
+endif
+
LINKER_SCRIPT := ntoskrnl.lnk
STRIP_FLAGS := -Wl,-s
@@ -27,7 +34,7 @@
ifeq ($(KDBG), 1)
OBJECTS_KDBG := dbg/kdb.o dbg/kdb_serial.o dbg/kdb_keyboard.o dbg/rdebug.o \
- dbg/i386/kdb_help.o dbg/kdb_stabs.o dbg/kdb_symbols.o dbg/profile.o \
+ dbg/i386/kdb_help.o dbg/profile.o \
../dk/w32/lib/libkjs.a dbg/i386/i386-dis.o
CFLAGS_KDBG := -I../lib/kjs/include
preall: all
@@ -37,9 +44,12 @@
else
OBJECTS_KDBG :=
endif
+ifeq ($(DBG_OR_KDBG), 1)
+OBJECTS_KDBG := $(OBJECTS_KDBG) dbg/kdb_stabs.o dbg/kdb_symbols.o
+endif
TARGET_ASFLAGS = -I./include
-TARGET_CFLAGS = -I./include $(CFLAGS_KDBG) -Wall -Werror $(CFLAGS_OPT) -D_ELF_SUPPORT
+TARGET_CFLAGS = -I./include $(CFLAGS_KDBG) -Wall -Werror $(CFLAGS_OPT)
# require os code to explicitly request A/W version of structs/functions
TARGET_CFLAGS += -D_DISABLE_TIDENTS
reactos/ntoskrnl
diff -u -r1.201.2.1 -r1.201.2.2
--- ntoskrnl.def 8 Dec 2004 21:57:31 -0000 1.201.2.1
+++ ntoskrnl.def 13 Dec 2004 09:39:08 -0000 1.201.2.2
@@ -1,4 +1,4 @@
-; $Id: ntoskrnl.def,v 1.201.2.1 2004/12/08 21:57:31 hyperion Exp $
+; $Id: ntoskrnl.def,v 1.201.2.2 2004/12/13 09:39:08 hyperion Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@@ -139,6 +139,8 @@
@ExReleaseResourceLite@4
@ExReleaseRundownProtection@4
@ExReleaseRundownProtectionEx@8
+ExRosDumpPagedPoolByTag@4
+ExRosQueryPoolTag@4
@ExRundownCompleted@4
ExSetResourceOwnerPointer@8
ExSetTimerResolution@8
reactos/ntoskrnl/cm
diff -u -r1.51 -r1.51.8.1
--- cm.h 25 Aug 2004 15:08:29 -0000 1.51
+++ cm.h 13 Dec 2004 09:39:08 -0000 1.51.8.1
@@ -47,6 +47,7 @@
#define REG_KEY_CELL_ID 0x6b6e
#define REG_HASH_TABLE_CELL_ID 0x666c
#define REG_VALUE_CELL_ID 0x6b76
+#define REG_SECURITY_CELL_ID 0x6b73
// BLOCK_OFFSET = offset in file after header block
@@ -239,6 +240,19 @@
#define REG_DATA_IN_OFFSET 0x80000000
+typedef struct _SECURITY_CELL
+{
+ LONG CellSize;
+ USHORT Id; // "sk"
+ USHORT Reserved;
+ BLOCK_OFFSET PrevSecurityCell;
+ BLOCK_OFFSET NextSecurityCell;
+ ULONG RefCount;
+ ULONG SdSize;
+ UCHAR Data[0];
+} SECURITY_CELL, *PSECURITY_CELL;
+
+
typedef struct _DATA_CELL
{
LONG CellSize;
@@ -270,7 +284,8 @@
ULONG FreeListMax;
PCELL_HEADER *FreeList;
BLOCK_OFFSET *FreeListOffset;
- ERESOURCE HiveResource;
+
+ PSECURITY_CELL RootSecurityCell;
PULONG BitmapBuffer;
RTL_BITMAP DirtyBitMap;
@@ -354,7 +369,8 @@
extern KSPIN_LOCK CmiKeyListLock;
extern LIST_ENTRY CmiHiveListHead;
-extern ERESOURCE CmiHiveListLock;
+
+extern ERESOURCE CmiRegistryLock;
/* Registry Callback Function */
typedef NTSTATUS (*PEX_CALLBACK_FUNCTION ) (
@@ -585,6 +601,10 @@
PVOID Cell,
BLOCK_OFFSET CellOffset);
+PHBIN
+CmiGetBin (PREGISTRY_HIVE RegistryHive,
+ BLOCK_OFFSET CellOffset);
+
PVOID
CmiGetCell (PREGISTRY_HIVE RegistryHive,
BLOCK_OFFSET CellOffset,
reactos/ntoskrnl/cm
diff -u -r1.30 -r1.30.8.1
--- import.c 15 Aug 2004 16:39:00 -0000 1.30
+++ import.c 13 Dec 2004 09:39:08 -0000 1.30.8.1
@@ -1,4 +1,4 @@
-/* $Id: import.c,v 1.30 2004/08/15 16:39:00 chorns Exp $
+/* $Id: import.c,v 1.30.8.1 2004/12/13 09:39:08 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -134,18 +134,15 @@
}
}
- /* Initialize the hive's executive resource */
- ExInitializeResourceLite(&Hive->HiveResource);
-
/* Acquire hive list lock exclusively */
KeEnterCriticalRegion();
- ExAcquireResourceExclusiveLite(&CmiHiveListLock, TRUE);
+ ExAcquireResourceExclusiveLite(&CmiRegistryLock, TRUE);
/* Add the new hive to the hive list */
InsertTailList(&CmiHiveListHead, &Hive->HiveList);
/* Release hive list lock */
- ExReleaseResourceLite(&CmiHiveListLock);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
*RegistryHive = Hive;
@@ -192,7 +189,7 @@
RegistryHive);
if (!NT_SUCCESS(Status))
{
- DPRINT1 ("CmiConnectHive() failed (Status %lx)\n", Status);
+ DPRINT1 ("CmiConnectHive(%wZ) failed (Status %lx)\n", &KeyName, Status);
// CmiRemoveRegistryHive(RegistryHive);
return FALSE;
}
@@ -344,7 +341,7 @@
RegistryHive);
if (!NT_SUCCESS(Status))
{
- DPRINT1 ("CmiConnectHive() failed (Status %lx)\n", Status);
+ DPRINT1 ("CmiConnectHive(%wZ) failed (Status %lx)\n", &KeyName, Status);
// CmiRemoveRegistryHive(RegistryHive);
return FALSE;
}
reactos/ntoskrnl/cm
diff -u -r1.71 -r1.71.2.1
--- ntfunc.c 8 Oct 2004 21:19:12 -0000 1.71
+++ ntfunc.c 13 Dec 2004 09:39:08 -0000 1.71.2.1
@@ -164,7 +164,7 @@
/* Acquire hive lock */
KeEnterCriticalRegion();
- ExAcquireResourceExclusiveLite(&KeyObject->RegistryHive->HiveResource, TRUE);
+ ExAcquireResourceExclusiveLite(&CmiRegistryLock, TRUE);
/* add key to subkeys of parent if needed */
Status = CmiAddSubKey(KeyObject->RegistryHive,
@@ -178,7 +178,7 @@
{
DPRINT("CmiAddSubKey() failed (Status %lx)\n", Status);
/* Release hive lock */
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject(KeyObject);
ObDereferenceObject(Object);
@@ -219,7 +219,7 @@
VERIFY_KEY_OBJECT(KeyObject);
/* Release hive lock */
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject(KeyObject);
@@ -240,23 +240,24 @@
PKEY_OBJECT KeyObject;
NTSTATUS Status;
- DPRINT("KeyHandle %x\n", KeyHandle);
+ DPRINT1("NtDeleteKey(KeyHandle %x) called\n", KeyHandle);
/* Verify that the handle is valid and is a registry key */
Status = ObReferenceObjectByHandle(KeyHandle,
- KEY_WRITE,
+ DELETE,
CmiKeyType,
UserMode,
(PVOID *)&KeyObject,
NULL);
if (!NT_SUCCESS(Status))
{
- return(Status);
+ DPRINT1("ObReferenceObjectByHandle() failed (Status %lx)\n", Status);
+ return Status;
}
/* Acquire hive lock */
KeEnterCriticalRegion();
- ExAcquireResourceExclusiveLite(&KeyObject->RegistryHive->HiveResource, TRUE);
+ ExAcquireResourceExclusiveLite(&CmiRegistryLock, TRUE);
VERIFY_KEY_OBJECT(KeyObject);
@@ -273,17 +274,18 @@
}
/* Release hive lock */
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
- DPRINT("PointerCount %lu\n", ObGetObjectPointerCount((PVOID)KeyObject));
+ DPRINT1("PointerCount %lu\n", ObGetObjectPointerCount((PVOID)KeyObject));
/* Dereference the object */
ObDereferenceObject(KeyObject);
- if(KeyObject->RegistryHive != KeyObject->ParentKey->RegistryHive)
+ if (KeyObject->RegistryHive != KeyObject->ParentKey->RegistryHive)
ObDereferenceObject(KeyObject);
DPRINT("PointerCount %lu\n", ObGetObjectPointerCount((PVOID)KeyObject));
+ DPRINT("HandleCount %lu\n", ObGetObjectHandleCount((PVOID)KeyObject));
/*
* Note:
@@ -292,7 +294,7 @@
* have been released.
*/
- return(Status);
+ return Status;
}
@@ -339,7 +341,7 @@
/* Acquire hive lock */
KeEnterCriticalRegion();
- ExAcquireResourceSharedLite(&KeyObject->RegistryHive->HiveResource, TRUE);
+ ExAcquireResourceSharedLite(&CmiRegistryLock, TRUE);
VERIFY_KEY_OBJECT(KeyObject);
@@ -352,7 +354,7 @@
/* Check for hightest possible sub key index */
if (Index >= KeyCell->NumberOfSubKeys + KeyObject->NumberOfSubKeys)
{
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject(KeyObject);
DPRINT("No more volatile entries\n");
@@ -382,7 +384,7 @@
if (i >= KeyObject->NumberOfSubKeys)
{
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject(KeyObject);
DPRINT("No more non-volatile entries\n");
@@ -396,7 +398,7 @@
{
if (KeyCell->HashTableOffset == (BLOCK_OFFSET)-1)
{
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject(KeyObject);
return STATUS_NO_MORE_ENTRIES;
@@ -406,7 +408,7 @@
if (HashTableBlock == NULL)
{
DPRINT("CmiGetBlock() failed\n");
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject(KeyObject);
return STATUS_UNSUCCESSFUL;
@@ -419,7 +421,7 @@
if (SubKeyCell == NULL)
{
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject(KeyObject);
DPRINT("No more entries\n");
@@ -634,7 +636,7 @@
break;
}
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject(KeyObject);
@@ -686,7 +688,7 @@
/* Acquire hive lock */
KeEnterCriticalRegion();
- ExAcquireResourceSharedLite(&KeyObject->RegistryHive->HiveResource, TRUE);
+ ExAcquireResourceSharedLite(&CmiRegistryLock, TRUE);
VERIFY_KEY_OBJECT(KeyObject);
@@ -702,7 +704,7 @@
if (!NT_SUCCESS(Status))
{
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject(KeyObject);
return Status;
@@ -715,7 +717,7 @@
case KeyValueBasicInformation:
NameSize = ValueCell->NameSize;
if (ValueCell->Flags & REG_VALUE_NAME_PACKED)
- {
+ {
NameSize *= sizeof(WCHAR);
}
@@ -883,7 +885,7 @@
Status = STATUS_UNSUCCESSFUL;
}
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject(KeyObject);
@@ -918,8 +920,7 @@
/* Acquire hive lock */
KeEnterCriticalRegion();
- ExAcquireResourceExclusiveLite(&RegistryHive->HiveResource,
- TRUE);
+ ExAcquireResourceExclusiveLite(&CmiRegistryLock, TRUE);
if (IsNoFileHive(RegistryHive))
{
@@ -931,7 +932,7 @@
Status = CmiFlushRegistryHive(RegistryHive);
}
- ExReleaseResourceLite(&RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject(KeyObject);
@@ -1039,7 +1040,7 @@
/* Acquire hive lock */
KeEnterCriticalRegion();
- ExAcquireResourceSharedLite(&KeyObject->RegistryHive->HiveResource, TRUE);
+ ExAcquireResourceSharedLite(&CmiRegistryLock, TRUE);
VERIFY_KEY_OBJECT(KeyObject);
@@ -1192,7 +1193,7 @@
break;
}
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject(KeyObject);
@@ -1238,7 +1239,7 @@
/* Acquire hive lock */
KeEnterCriticalRegion();
- ExAcquireResourceSharedLite(&KeyObject->RegistryHive->HiveResource, TRUE);
+ ExAcquireResourceSharedLite(&CmiRegistryLock, TRUE);
VERIFY_KEY_OBJECT(KeyObject);
@@ -1307,7 +1308,7 @@
break;
case KeyValuePartialInformation:
- DataSize = ValueCell->DataSize & REG_DATA_SIZE_MASK;
+ DataSize = ValueCell->DataSize & REG_DATA_SIZE_MASK;
*ResultLength = FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[0]) +
DataSize;
@@ -1324,14 +1325,14 @@
ValuePartialInformation->Type = ValueCell->DataType;
ValuePartialInformation->DataLength = DataSize;
- if (Length - FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[0]) <
- DataSize)
- {
- DataSize = Length - FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[0]);
- Status = STATUS_BUFFER_OVERFLOW;
- CHECKPOINT;
- }
-
+ if (Length - FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[0]) <
+ DataSize)
+ {
+ DataSize = Length - FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[0]);
+ Status = STATUS_BUFFER_OVERFLOW;
+ CHECKPOINT;
+ }
+
if (!(ValueCell->DataSize & REG_DATA_IN_OFFSET))
{
DataCell = CmiGetCell (RegistryHive, ValueCell->DataOffset, NULL);
@@ -1432,7 +1433,7 @@
}
ByeBye:;
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject(KeyObject);
@@ -1478,7 +1479,7 @@
/* Acquire hive lock exclucively */
KeEnterCriticalRegion();
- ExAcquireResourceExclusiveLite(&KeyObject->RegistryHive->HiveResource, TRUE);
+ ExAcquireResourceExclusiveLite(&CmiRegistryLock, TRUE);
VERIFY_KEY_OBJECT(KeyObject);
@@ -1505,7 +1506,7 @@
{
DPRINT("Cannot add value. Status 0x%X\n", Status);
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject(KeyObject);
return Status;
@@ -1570,7 +1571,7 @@
{
DPRINT("CmiAllocateBlock() failed (Status %lx)\n", Status);
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject(KeyObject);
@@ -1595,7 +1596,7 @@
NtQuerySystemTime (&KeyCell->LastWriteTime);
CmiMarkBlockDirty (RegistryHive, KeyObject->KeyCellOffset);
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject(KeyObject);
@@ -1628,7 +1629,7 @@
/* Acquire hive lock */
KeEnterCriticalRegion();
- ExAcquireResourceExclusiveLite(&KeyObject->RegistryHive->HiveResource, TRUE);
+ ExAcquireResourceExclusiveLite(&CmiRegistryLock, TRUE);
VERIFY_KEY_OBJECT(KeyObject);
@@ -1641,7 +1642,7 @@
CmiMarkBlockDirty (KeyObject->RegistryHive, KeyObject->KeyCellOffset);
/* Release hive lock */
- ExReleaseResourceLite (&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject (KeyObject);
@@ -1765,6 +1766,10 @@
DPRINT ("Full name: '%wZ'\n", NamePointer);
+ /* Acquire hive lock */
+ KeEnterCriticalRegion();
+ ExAcquireResourceExclusiveLite(&CmiRegistryLock, TRUE);
+
Status = CmiLoadHive (KeyObjectAttributes,
NamePointer,
Flags);
@@ -1773,6 +1778,10 @@
DPRINT1 ("CmiLoadHive() failed (Status %lx)\n", Status);
}
+ /* Release hive lock */
+ ExReleaseResourceLite(&CmiRegistryLock);
+ KeLeaveCriticalRegion();
+
if (Buffer != NULL)
ExFreePool (Buffer);
@@ -1830,7 +1839,7 @@
/* Acquire hive lock */
KeEnterCriticalRegion();
- ExAcquireResourceSharedLite(&KeyObject->RegistryHive->HiveResource, TRUE);
+ ExAcquireResourceSharedLite(&CmiRegistryLock, TRUE);
VERIFY_KEY_OBJECT(KeyObject);
@@ -1904,7 +1913,7 @@
*ReturnLength = BufferLength;
/* Release hive lock */
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject(KeyObject);
@@ -1964,14 +1973,13 @@
/* Acquire hive lock exclucively */
KeEnterCriticalRegion();
- ExAcquireResourceExclusiveLite (&KeyObject->RegistryHive->HiveResource,
- TRUE);
+ ExAcquireResourceExclusiveLite(&CmiRegistryLock, TRUE);
/* Refuse to save a volatile key */
if (KeyObject->RegistryHive == CmiVolatileHive)
{
DPRINT1 ("Cannot save a volatile key\n");
- ExReleaseResourceLite (&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject (KeyObject);
return STATUS_ACCESS_DENIED;
@@ -1981,7 +1989,7 @@
if (!NT_SUCCESS(Status))
{
DPRINT1 ("CmiCreateTempHive() failed (Status %lx)\n", Status);
- ExReleaseResourceLite (&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject (KeyObject);
return(Status);
@@ -1995,7 +2003,7 @@
{
DPRINT1 ("CmiCopyKey() failed (Status %lx)\n", Status);
CmiRemoveRegistryHive (TempHive);
- ExReleaseResourceLite (&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject (KeyObject);
return(Status);
@@ -2011,7 +2019,7 @@
CmiRemoveRegistryHive (TempHive);
/* Release hive lock */
- ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject (KeyObject);
@@ -2067,7 +2075,7 @@
/* Acquire hive lock */
KeEnterCriticalRegion();
- ExAcquireResourceExclusiveLite (&KeyObject->RegistryHive->HiveResource, TRUE);
+ ExAcquireResourceExclusiveLite(&CmiRegistryLock, TRUE);
VERIFY_KEY_OBJECT(KeyObject);
@@ -2078,7 +2086,7 @@
KeyObject->KeyCellOffset);
/* Release hive lock */
- ExReleaseResourceLite (&KeyObject->RegistryHive->HiveResource);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
ObDereferenceObject (KeyObject);
@@ -2109,33 +2117,34 @@
return STATUS_PRIVILEGE_NOT_HELD;
#endif
+ /* Acquire registry lock exclusively */
+ KeEnterCriticalRegion();
+ ExAcquireResourceExclusiveLite(&CmiRegistryLock, TRUE);
+
Status = CmiDisconnectHive (KeyObjectAttributes,
&RegistryHive);
if (!NT_SUCCESS (Status))
{
DPRINT1 ("CmiDisconnectHive() failed (Status %lx)\n", Status);
+ ExReleaseResourceLite (&CmiRegistryLock);
+ KeLeaveCriticalRegion();
return Status;
}
DPRINT ("RegistryHive %p\n", RegistryHive);
- /* Acquire hive list lock exclusively */
- KeEnterCriticalRegion();
- ExAcquireResourceExclusiveLite (&CmiHiveListLock,
- TRUE);
-
#if 0
/* Flush hive */
if (!IsNoFileHive (RegistryHive))
CmiFlushRegistryHive (RegistryHive);
#endif
- /* Release hive list lock */
- ExReleaseResourceLite (&CmiHiveListLock);
- KeLeaveCriticalRegion();
-
CmiRemoveRegistryHive (RegistryHive);
+ /* Release registry lock */
+ ExReleaseResourceLite (&CmiRegistryLock);
+ KeLeaveCriticalRegion();
+
DPRINT ("NtUnloadKey() done\n");
return STATUS_SUCCESS;
reactos/ntoskrnl/cm
diff -u -r1.83.2.1 -r1.83.2.2
--- regfile.c 8 Dec 2004 21:57:31 -0000 1.83.2.1
+++ regfile.c 13 Dec 2004 09:39:09 -0000 1.83.2.2
@@ -1099,19 +1099,16 @@
CmiCreateDefaultRootKeyCell (RootKeyCell);
Hive->HiveHeader->RootKeyOffset = (BLOCK_OFFSET)RootKeyCell;
- ExInitializeResourceLite (&Hive->HiveResource);
-
/* Acquire hive list lock exclusively */
KeEnterCriticalRegion();
- ExAcquireResourceExclusiveLite (&CmiHiveListLock,
- TRUE);
+ ExAcquireResourceExclusiveLite (&CmiRegistryLock, TRUE);
/* Add the new hive to the hive list */
InsertTailList (&CmiHiveListHead,
&Hive->HiveList);
/* Release hive list lock */
- ExReleaseResourceLite (&CmiHiveListLock);
+ ExReleaseResourceLite (&CmiRegistryLock);
KeLeaveCriticalRegion();
VERIFY_REGISTRY_HIVE (Hive);
@@ -1223,20 +1220,16 @@
return Status;
}
-
- ExInitializeResourceLite (&Hive->HiveResource);
-
/* Acquire hive list lock exclusively */
KeEnterCriticalRegion();
- ExAcquireResourceExclusiveLite (&CmiHiveListLock,
- TRUE);
+ ExAcquireResourceExclusiveLite(&CmiRegistryLock, TRUE);
/* Add the new hive to the hive list */
InsertTailList (&CmiHiveListHead,
&Hive->HiveList);
/* Release hive list lock */
- ExReleaseResourceLite (&CmiHiveListLock);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
VERIFY_REGISTRY_HIVE (Hive);
@@ -1295,21 +1288,12 @@
return Status;
}
- ExInitializeResourceLite (&Hive->HiveResource);
-
/* Add the new hive to the hive list */
- KeEnterCriticalRegion();
- ExAcquireResourceExclusiveLite (&CmiHiveListLock,
- TRUE);
InsertTailList (&CmiHiveListHead,
&Hive->HiveList);
- ExReleaseResourceLite (&CmiHiveListLock);
- KeLeaveCriticalRegion();
-
VERIFY_REGISTRY_HIVE(Hive);
-
Status = CmiConnectHive (KeyObjectAttributes,
Hive);
if (!NT_SUCCESS(Status))
@@ -1330,18 +1314,9 @@
if (RegistryHive->Flags & HIVE_POINTER)
return STATUS_UNSUCCESSFUL;
- /* Acquire hive list lock exclusively */
- KeEnterCriticalRegion();
- ExAcquireResourceExclusiveLite (&CmiHiveListLock,
- TRUE);
-
/* Remove hive from hive list */
RemoveEntryList (&RegistryHive->HiveList);
- /* Release hive list lock */
- ExReleaseResourceLite (&CmiHiveListLock);
- KeLeaveCriticalRegion();
-
/* Release file names */
RtlFreeUnicodeString (&RegistryHive->HiveFileName);
RtlFreeUnicodeString (&RegistryHive->LogFileName);
@@ -1353,9 +1328,6 @@
ExFreePool (RegistryHive->FreeList);
ExFreePool (RegistryHive->FreeListOffset);
- /* Release hive resource */
- ExDeleteResource (&RegistryHive->HiveResource);
-
/* Release bins and bin list */
CmiFreeHiveBins (RegistryHive);
ExFreePool (RegistryHive->BlockList);
reactos/ntoskrnl/cm
diff -u -r1.128 -r1.128.2.1
--- registry.c 20 Nov 2004 21:14:16 -0000 1.128
+++ registry.c 13 Dec 2004 09:39:09 -0000 1.128.2.1
@@ -1,4 +1,4 @@
-/* $Id: registry.c,v 1.128 2004/11/20 21:14:16 navaraf Exp $
+/* $Id: registry.c,v 1.128.2.1 2004/12/13 09:39:09 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -24,7 +24,8 @@
KSPIN_LOCK CmiKeyListLock;
LIST_ENTRY CmiHiveListHead;
-ERESOURCE CmiHiveListLock;
+
+ERESOURCE CmiRegistryLock;
volatile BOOLEAN CmiHiveSyncEnabled = FALSE;
volatile BOOLEAN CmiHiveSyncPending = FALSE;
@@ -279,7 +280,9 @@
/* Initialize the hive list */
InitializeListHead(&CmiHiveListHead);
- ExInitializeResourceLite(&CmiHiveListLock);
+
+ /* Initialize registry lock */
+ ExInitializeResourceLite(&CmiRegistryLock);
/* Build volatile registry store */
Status = CmiCreateVolatileHive (&CmiVolatileHive);
@@ -1067,7 +1070,7 @@
/* Acquire hive list lock exclusively */
KeEnterCriticalRegion();
- ExAcquireResourceExclusiveLite(&CmiHiveListLock, TRUE);
+ ExAcquireResourceExclusiveLite(&CmiRegistryLock, TRUE);
Entry = CmiHiveListHead.Flink;
while (Entry != &CmiHiveListHead)
@@ -1076,22 +1079,15 @@
if (!(IsNoFileHive(Hive) || IsNoSynchHive(Hive)))
{
- /* Acquire hive resource exclusively */
- ExAcquireResourceExclusiveLite(&Hive->HiveResource,
- TRUE);
-
/* Flush non-volatile hive */
CmiFlushRegistryHive(Hive);
-
- /* Release hive resource */
- ExReleaseResourceLite(&Hive->HiveResource);
}
Entry = Entry->Flink;
}
/* Release hive list lock */
- ExReleaseResourceLite(&CmiHiveListLock);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
DPRINT("CmShutdownRegistry() done\n");
@@ -1110,7 +1106,7 @@
/* Acquire hive list lock exclusively */
KeEnterCriticalRegion();
- ExAcquireResourceExclusiveLite(&CmiHiveListLock, TRUE);
+ ExAcquireResourceExclusiveLite(&CmiRegistryLock, TRUE);
Entry = CmiHiveListHead.Flink;
while (Entry != &CmiHiveListHead)
@@ -1119,22 +1115,15 @@
if (!(IsNoFileHive(Hive) || IsNoSynchHive(Hive)))
{
- /* Acquire hive resource exclusively */
- ExAcquireResourceExclusiveLite(&Hive->HiveResource,
- TRUE);
-
/* Flush non-volatile hive */
CmiFlushRegistryHive(Hive);
-
- /* Release hive resource */
- ExReleaseResourceLite(&Hive->HiveResource);
}
Entry = Entry->Flink;
}
/* Release hive list lock */
- ExReleaseResourceLite(&CmiHiveListLock);
+ ExReleaseResourceLite(&CmiRegistryLock);
KeLeaveCriticalRegion();
DPRINT("DeferredContext %x\n", DeferredContext);
reactos/ntoskrnl/dbg
diff -u -r1.20 -r1.20.8.1
--- print.c 21 Aug 2004 15:34:32 -0000 1.20
+++ print.c 13 Dec 2004 09:39:09 -0000 1.20.8.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: print.c,v 1.20 2004/08/21 15:34:32 tamlin Exp $
+/* $Id: print.c,v 1.20.8.1 2004/12/13 09:39:09 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -61,6 +61,13 @@
ANSI_STRING DebugString;
CHAR Buffer[1024];
va_list ap;
+#ifdef SERIALIZE_DBGPRINT
+# define MESSAGETABLE_SIZE 16
+ LONG MyTableIndex;
+ static LONG Lock = 0;
+ static LONG TableWriteIndex = 0, TableReadIndex = 0;
+ static CHAR MessageTable[MESSAGETABLE_SIZE][sizeof(Buffer)] = { { '\0' } };
+#endif /* SERIALIZE_DBGPRINT */
/* init ansi string */
DebugString.Buffer = Buffer;
@@ -70,7 +77,57 @@
DebugString.Length = _vsnprintf (Buffer, sizeof( Buffer ), Format, ap);
va_end (ap);
- KdpPrintString (&DebugString);
+#ifdef SERIALIZE_DBGPRINT
+ /* check if we are already running */
+ if (InterlockedCompareExchange(&Lock, 1, 0) == 1)
+ {
+ MyTableIndex = InterlockedIncrement(&TableWriteIndex) - 1;
+ InterlockedCompareExchange(&TableWriteIndex, 0, MESSAGETABLE_SIZE);
+ MyTableIndex %= MESSAGETABLE_SIZE;
+
+ if (MessageTable[MyTableIndex][0] != '\0') /* table is full */
+ {
+ DebugString.Buffer = "CRITICAL ERROR: DbgPrint Table is FULL!";
+ DebugString.Length = 39;
+ KdpPrintString(&DebugString);
+ for (;;);
+ }
+ else
+ {
+ /*DebugString.Buffer = "���";
+ DebugString.Length = 3;
+ KdpPrintString(&DebugString);*/
+ memcpy(MessageTable[MyTableIndex], DebugString.Buffer, DebugString.Length);
+ MessageTable[MyTableIndex][DebugString.Length] = '\0';
+ }
+ }
+ else
+ {
+#endif /* SERIALIZE_DBGPRINT */
+ KdpPrintString (&DebugString);
+#ifdef SERIALIZE_DBGPRINT
+ MyTableIndex = TableReadIndex;
+ while (MessageTable[MyTableIndex][0] != '\0')
+ {
+ /*DebugString.Buffer = "$$$";
+ DebugString.Length = 3;
+ KdpPrintString(&DebugString);*/
+
+ DebugString.Buffer = MessageTable[MyTableIndex];
+ DebugString.Length = strlen(DebugString.Buffer);
+ DebugString.MaximumLength = DebugString.Length + 1;
+
+ KdpPrintString(&DebugString);
+ MessageTable[MyTableIndex][0] = '\0';
+
+ MyTableIndex = InterlockedIncrement(&TableReadIndex);
+ InterlockedCompareExchange(&TableReadIndex, 0, MESSAGETABLE_SIZE);
+ MyTableIndex %= MESSAGETABLE_SIZE;
+ }
+ InterlockedDecrement(&Lock);
+ }
+# undef MESSAGETABLE_SIZE
+#endif /* SERIALIZE_DBGPRINT */
return (ULONG)DebugString.Length;
}
reactos/ntoskrnl/ex/i386
diff -u -r1.9 -r1.9.6.1
--- interlck.c 9 Sep 2004 18:51:17 -0000 1.9
+++ interlck.c 13 Dec 2004 09:39:09 -0000 1.9.6.1
@@ -1,10 +1,16 @@
-/* $Id: interlck.c,v 1.9 2004/09/09 18:51:17 hbirr Exp $
+/* $Id: interlck.c,v 1.9.6.1 2004/12/13 09:39:09 hyperion Exp $
*
* reactos/ntoskrnl/ex/i386/interlck.c
*
*/
#include <ntoskrnl.h>
+#ifdef MP
+#define LOCK "lock "
+#else
+#define LOCK " "
+#endif
+
#if defined(__GNUC__)
/*
@@ -86,7 +92,7 @@
__asm__("\n\t.global @Exfi386InterlockedExchangeUlong@8\n\t"
"@Exfi386InterlockedExchangeUlong@8:\n\t"
- "xchgl %edx,(%ecx)\n\t"
+ LOCK"xchgl %edx,(%ecx)\n\t"
"movl %edx,%eax\n\t"
"ret\n\t");
@@ -182,7 +188,7 @@
"_Exi386InterlockedExchangeUlong@8:\n\t"
"movl 4(%esp),%edx\n\t"
"movl 8(%esp),%eax\n\t"
- "xchgl %eax,(%edx)\n\t"
+ LOCK"xchgl %eax,(%edx)\n\t"
"ret $8\n\t");
#elif defined(_MSC_VER)
@@ -225,7 +231,7 @@
__asm__("\n\t.global @InterlockedIncrement@4\n\t"
"@InterlockedIncrement@4:\n\t"
"movl $1,%eax\n\t"
- "xaddl %eax,(%ecx)\n\t"
+ LOCK"xaddl %eax,(%ecx)\n\t"
"incl %eax\n\t"
"ret\n\t");
@@ -262,7 +268,7 @@
__asm__("\n\t.global @InterlockedDecrement@4\n\t"
"@InterlockedDecrement@4:\n\t"
"movl $-1,%eax\n\t"
- "xaddl %eax,(%ecx)\n\t"
+ LOCK"xaddl %eax,(%ecx)\n\t"
"decl %eax\n\t"
"ret\n\t");
@@ -301,7 +307,7 @@
__asm__("\n\t.global @InterlockedExchange@8\n\t"
"@InterlockedExchange@8:\n\t"
- "xchgl %edx,(%ecx)\n\t"
+ LOCK"xchgl %edx,(%ecx)\n\t"
"movl %edx,%eax\n\t"
"ret\n\t");
@@ -337,7 +343,7 @@
__asm__("\n\t.global @InterlockedExchangeAdd@8\n\t"
"@InterlockedExchangeAdd@8:\n\t"
- "xaddl %edx,(%ecx)\n\t"
+ LOCK"xaddl %edx,(%ecx)\n\t"
"movl %edx,%eax\n\t"
"ret\n\t");
@@ -374,7 +380,7 @@
__asm__("\n\t.global @InterlockedCompareExchange@12\n\t"
"@InterlockedCompareExchange@12:\n\t"
"movl 4(%esp),%eax\n\t"
- "cmpxchg %edx,(%ecx)\n\t"
+ LOCK"cmpxchg %edx,(%ecx)\n\t"
"ret $4\n\t");
#elif defined(_MSC_VER)
@@ -412,7 +418,7 @@
"\n1:\t"
"movl (%esi),%eax\n\t"
"movl 4(%esi),%edx\n\t"
- "lock cmpxchg8b (%esi)\n\t"
+ LOCK"cmpxchg8b (%esi)\n\t"
"jnz 1b\n\t"
"popl %esi\n\t"
"popl %ebx\n\t"
@@ -441,7 +447,7 @@
"movl 12(%esp),%edx\n\t"
"movl (%edx),%eax\n\t"
"movl 4(%edx),%edx\n\t"
- "lock cmpxchg8b (%esi)\n\t"
+ LOCK"cmpxchg8b (%esi)\n\t"
"popl %esi\n\t"
"popl %ebx\n\t"
"ret $4\n\t");
reactos/ntoskrnl/ex
diff -u -r1.59.2.2 -r1.59.2.3
--- sysinfo.c 13 Dec 2004 05:55:32 -0000 1.59.2.2
+++ sysinfo.c 13 Dec 2004 09:39:09 -0000 1.59.2.3
@@ -1,4 +1,4 @@
-/* $Id: sysinfo.c,v 1.59.2.2 2004/12/13 05:55:32 hyperion Exp $
+/* $Id: sysinfo.c,v 1.59.2.3 2004/12/13 09:39:09 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/ex
diff -u -r1.24.2.2 -r1.24.2.3
--- time.c 13 Dec 2004 05:55:32 -0000 1.24.2.2
+++ time.c 13 Dec 2004 09:39:10 -0000 1.24.2.3
@@ -1,4 +1,4 @@
-/* $Id: time.c,v 1.24.2.2 2004/12/13 05:55:32 hyperion Exp $
+/* $Id: time.c,v 1.24.2.3 2004/12/13 09:39:10 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/include
diff -u -r1.2.2.1 -r1.2.2.2
--- config.h 8 Dec 2004 21:57:33 -0000 1.2.2.1
+++ config.h 13 Dec 2004 09:39:10 -0000 1.2.2.2
@@ -1,6 +1,20 @@
#ifndef __INCLUDE_NTOSKRNL_CONFIG_H
#define __INCLUDE_NTOSKRNL_CONFIG_H
+/********** dbg/print.c **********/
+
+/* Enable serialization of debug messages printed with DbgPrint
+ *
+ * If this is enabled DbgPrint will queue messages if another thread is already
+ * printing a message, and immediately returns. The other thread will print
+ * queued messages before it returns.
+ * It could happen that some messages are lost if the processor is halted before
+ * the message queue was flushed.
+ */
+#undef SERIALIZE_DBGPRINT
+
+/********** mm/ppool.c **********/
+
/* Enable strict checking of the nonpaged pool on every allocation */
#undef ENABLE_VALIDATE_POOL
reactos/ntoskrnl/include/internal
diff -u -r1.49.2.1 -r1.49.2.2
--- io.h 8 Dec 2004 21:57:32 -0000 1.49.2.1
+++ io.h 13 Dec 2004 09:39:10 -0000 1.49.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: io.h,v 1.49.2.1 2004/12/08 21:57:32 hyperion Exp $
+/* $Id: io.h,v 1.49.2.2 2004/12/13 09:39:10 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/include/internal
diff -u -r1.28 -r1.28.2.1
--- kd.h 20 Nov 2004 22:21:35 -0000 1.28
+++ kd.h 13 Dec 2004 09:39:10 -0000 1.28.2.1
@@ -1,4 +1,4 @@
-/* $Id: kd.h,v 1.28 2004/11/20 22:21:35 arty Exp $
+/* $Id: kd.h,v 1.28.2.1 2004/12/13 09:39:10 hyperion Exp $
*
* kernel debugger prototypes
*/
@@ -108,7 +108,7 @@
VOID KdInitializeMda(VOID);
VOID KdPrintMda(PCH pch);
-#ifndef KDBG
+#if !defined(KDBG) && !defined(DBG)
# define KDB_LOADUSERMODULE_HOOK(LDRMOD) do { } while (0)
# define KDB_DELETEPROCESS_HOOK(PROCESS) do { } while (0)
# define KDB_LOADDRIVER_HOOK(FILENAME, MODULE) do { } while (0)
@@ -160,7 +160,7 @@
PKTRAP_FRAME TrapFrame,
BOOLEAN HandleAlways);
-#endif /* KDBG */
+#endif /* KDBG || DBG */
VOID
DebugLogDumpMessages(VOID);
reactos/ntoskrnl/include/internal
diff -u -r1.16 -r1.16.34.1
--- module.h 8 Sep 2002 10:23:23 -0000 1.16
+++ module.h 13 Dec 2004 09:39:10 -0000 1.16.34.1
@@ -14,7 +14,7 @@
LIST_ENTRY ListEntry;
PWCH Name;
PIMAGE_OPTIONAL_HEADER OptionalHeader;
-#ifdef KDBG
+#if defined(DBG) || defined(KDBG)
IMAGE_SYMBOL_INFO SymbolInfo;
#endif /* KDBG */
} MODULE_TEXT_SECTION, *PMODULE_TEXT_SECTION;
reactos/ntoskrnl/include/internal
diff -u -r1.75.2.1 -r1.75.2.2
--- ps.h 8 Dec 2004 21:57:33 -0000 1.75.2.1
+++ ps.h 13 Dec 2004 09:39:10 -0000 1.75.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: ps.h,v 1.75.2.1 2004/12/08 21:57:33 hyperion Exp $
+/* $Id: ps.h,v 1.75.2.2 2004/12/13 09:39:10 hyperion Exp $
*
* FILE: ntoskrnl/ke/kthread.c
* PURPOSE: Process manager definitions
reactos/ntoskrnl/include/internal
diff -u -r1.10 -r1.10.8.1
--- se.h 14 Jul 2004 14:24:20 -0000 1.10
+++ se.h 13 Dec 2004 09:39:10 -0000 1.10.8.1
@@ -110,6 +110,11 @@
BOOLEAN SepInitDACLs(VOID);
BOOLEAN SepInitSDs(VOID);
+NTSTATUS STDCALL
+SepCreateImpersonationTokenDacl(PACCESS_TOKEN Token,
+ PACCESS_TOKEN PrimaryToken,
+ PACL *Dacl);
+
VOID SepInitializeTokenImplementation(VOID);
NTSTATUS SepCreateSystemProcessToken(struct _EPROCESS* Process);
reactos/ntoskrnl/io
diff -u -r1.5 -r1.5.6.1
--- bootlog.c 28 Sep 2004 12:50:23 -0000 1.5
+++ bootlog.c 13 Dec 2004 09:39:10 -0000 1.5.6.1
@@ -1,4 +1,4 @@
-/* $Id: bootlog.c,v 1.5 2004/09/28 12:50:23 ekohl Exp $
+/* $Id: bootlog.c,v 1.5.6.1 2004/12/13 09:39:10 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -65,12 +65,12 @@
ExAcquireResourceExclusiveLite(&IopBootLogResource, TRUE);
- DPRINT("Boot log: %S %wZ\n",
+ DPRINT("Boot log: %wS %wZ\n",
Success ? L"Loaded driver" : L"Did not load driver",
DriverName);
swprintf(Buffer,
- L"%s %wZ",
+ L"%ws %wZ",
Success ? L"Loaded driver" : L"Did not load driver",
DriverName);
reactos/ntoskrnl/io
diff -u -r1.55 -r1.55.2.1
--- driver.c 7 Nov 2004 21:20:51 -0000 1.55
+++ driver.c 13 Dec 2004 09:39:10 -0000 1.55.2.1
@@ -1,4 +1,4 @@
-/* $Id: driver.c,v 1.55 2004/11/07 21:20:51 navaraf Exp $
+/* $Id: driver.c,v 1.55.2.1 2004/12/13 09:39:10 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -1237,7 +1237,7 @@
* and symbol files, if the kernel debugger is active
*/
if (_stricmp(Extension, ".exe") && _stricmp(Extension, ".dll")
-#ifdef KDBG
+#if defined(DBG) || defined(KDBG)
&& _stricmp(Extension, ".sym")
#endif
)
reactos/ntoskrnl/io
diff -u -r1.8.8.1 -r1.8.8.2
--- parttab.c 8 Dec 2004 21:57:33 -0000 1.8.8.1
+++ parttab.c 13 Dec 2004 09:39:10 -0000 1.8.8.2
@@ -1,4 +1,4 @@
-/* $Id: parttab.c,v 1.8.8.1 2004/12/08 21:57:33 hyperion Exp $
+/* $Id: parttab.c,v 1.8.8.2 2004/12/13 09:39:10 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/kd
diff -u -r1.56 -r1.56.2.1
--- kdebug.c 13 Oct 2004 22:27:03 -0000 1.56
+++ kdebug.c 13 Dec 2004 09:39:11 -0000 1.56.2.1
@@ -1,4 +1,4 @@
-/* $Id: kdebug.c,v 1.56 2004/10/13 22:27:03 ion Exp $
+/* $Id: kdebug.c,v 1.56.2.1 2004/12/13 09:39:11 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -69,32 +69,38 @@
VOID INIT_FUNCTION
-KdInitSystem(ULONG Reserved,
+KdInitSystem(ULONG BootPhase,
PLOADER_PARAMETER_BLOCK LoaderBlock)
{
KD_PORT_INFORMATION PortInfo;
ULONG Value;
PCHAR p1, p2;
+ if (BootPhase > 0)
+ {
#ifdef KDBG
- /* Initialize runtime debugging if available */
- DbgRDebugInit();
+ /* Initialize runtime debugging if available */
+ DbgRDebugInit();
#endif
#ifdef KDBG
- /* Initialize the local kernel debugger. */
- KdDebuggerEnabled = TRUE;
- KdDebugState |= KD_DEBUG_KDB;
+ /* Initialize the local kernel debugger. */
+ KdDebuggerEnabled = TRUE;
+ KdDebugState |= KD_DEBUG_KDB;
#endif
+ }
- /* Set debug port default values */
- PortInfo.ComPort = DEFAULT_DEBUG_PORT;
- PortInfo.BaudRate = DEFAULT_DEBUG_BAUD_RATE;
- KdpPortIrq = DEFAULT_DEBUG_COM2_IRQ;
-
- /* Set serial log port default values */
- LogPortInfo.ComPort = DEFAULT_DEBUG_PORT;
- LogPortInfo.BaudRate = DEFAULT_DEBUG_BAUD_RATE;
+ if (BootPhase == 0)
+ {
+ /* Set debug port default values */
+ PortInfo.ComPort = DEFAULT_DEBUG_PORT;
+ PortInfo.BaudRate = DEFAULT_DEBUG_BAUD_RATE;
+ KdpPortIrq = DEFAULT_DEBUG_COM2_IRQ;
+
+ /* Set serial log port default values */
+ LogPortInfo.ComPort = DEFAULT_DEBUG_PORT;
+ LogPortInfo.BaudRate = DEFAULT_DEBUG_BAUD_RATE;
+ }
/* Parse kernel command line */
@@ -109,19 +115,19 @@
if (*p2 == '=')
{
p2++;
- if (!_strnicmp(p2, "SCREEN", 6))
+ if (!_strnicmp(p2, "SCREEN", 6) && BootPhase > 0)
{
p2 += 6;
KdDebuggerEnabled = TRUE;
KdDebugState |= KD_DEBUG_SCREEN;
}
- else if (!_strnicmp(p2, "BOCHS", 5))
+ else if (!_strnicmp(p2, "BOCHS", 5) && BootPhase == 0)
{
p2 += 5;
KdDebuggerEnabled = TRUE;
KdDebugState |= KD_DEBUG_BOCHS;
}
- else if (!_strnicmp(p2, "GDB", 3))
+ else if (!_strnicmp(p2, "GDB", 3) && BootPhase > 0)
{
p2 += 3;
KdDebuggerEnabled = TRUE;
@@ -132,13 +138,13 @@
PortInfo.ComPort = DEFAULT_DEBUG_PORT;
PortInfo.BaudRate = DEFAULT_DEBUG_BAUD_RATE;
}
- else if (!_strnicmp(p2, "PICE", 4))
+ else if (!_strnicmp(p2, "PICE", 4) && BootPhase > 0)
{
p2 += 4;
KdDebuggerEnabled = TRUE;
KdDebugState |= KD_DEBUG_PICE;
}
- else if (!_strnicmp(p2, "COM", 3))
+ else if (!_strnicmp(p2, "COM", 3) && BootPhase == 0)
{
p2 += 3;
Value = (ULONG)atol(p2);
@@ -149,13 +155,13 @@
LogPortInfo.ComPort = Value;
}
}
- else if (!_strnicmp(p2, "BOOTLOG", 4))
+ else if (!_strnicmp(p2, "BOOTLOG", 4) && BootPhase > 0)
{
p2 += 4;
KdDebuggerEnabled = TRUE;
KdDebugState |= KD_DEBUG_BOOTLOG;
}
- else if (!_strnicmp(p2, "MDA", 3))
+ else if (!_strnicmp(p2, "MDA", 3) && BootPhase > 0)
{
p2 += 3;
KdDebuggerEnabled = TRUE;
@@ -163,42 +169,42 @@
}
}
}
- else if (!_strnicmp(p2, "KDSERIAL", 8))
+ else if (!_strnicmp(p2, "KDSERIAL", 8) && BootPhase > 0)
{
p2 += 8;
KdDebuggerEnabled = TRUE;
KdDebugState |= KD_DEBUG_SERIAL | KD_DEBUG_KDSERIAL;
}
- else if (!_strnicmp(p2, "KDNOECHO", 8))
+ else if (!_strnicmp(p2, "KDNOECHO", 8) && BootPhase > 0)
{
p2 += 8;
KdDebuggerEnabled = TRUE;
KdDebugState |= KD_DEBUG_KDNOECHO;
}
- else if (!_strnicmp(p2, "DEBUG", 5))
+ else if (!_strnicmp(p2, "DEBUG", 5) && BootPhase == 0)
{
p2 += 5;
KdDebuggerEnabled = TRUE;
KdDebugState |= KD_DEBUG_SERIAL;
}
- else if (!_strnicmp(p2, "NODEBUG", 7))
+ else if (!_strnicmp(p2, "NODEBUG", 7) && BootPhase == 0)
{
p2 += 7;
KdDebuggerEnabled = FALSE;
KdDebugState = KD_DEBUG_DISABLED;
}
- else if (!_strnicmp(p2, "CRASHDEBUG", 10))
+ else if (!_strnicmp(p2, "CRASHDEBUG", 10) && BootPhase == 0)
{
p2 += 10;
KdDebuggerEnabled = FALSE;
KdDebugState = KD_DEBUG_DISABLED;
}
- else if (!_strnicmp(p2, "BREAK", 5))
+ else if (!_strnicmp(p2, "BREAK", 5) && BootPhase > 0)
{
p2 += 5;
KdpBreakPending = TRUE;
}
- else if (!_strnicmp(p2, "COM", 3))
+ else if (!_strnicmp(p2, "COM", 3) && BootPhase == 0)
{
p2 += 3;
if ('=' == *p2)
@@ -211,7 +217,7 @@
}
}
}
- else if (!_strnicmp(p2, "BAUDRATE", 8))
+ else if (!_strnicmp(p2, "BAUDRATE", 8) && BootPhase == 0)
{
p2 += 8;
if ('=' == *p2)
@@ -224,7 +230,7 @@
}
}
}
- else if (!_strnicmp(p2, "IRQ", 3))
+ else if (!_strnicmp(p2, "IRQ", 3) && BootPhase == 0)
{
p2 += 3;
if ('=' == *p2)
@@ -238,7 +244,7 @@
}
}
#ifdef KDBG
- else if (!_strnicmp(p2, "PROFILE", 7))
+ else if (!_strnicmp(p2, "PROFILE", 7) && BootPhase > 0)
{
KdbInitProfiling();
}
@@ -249,16 +255,16 @@
/* Perform any initialization nescessary */
if (KdDebuggerEnabled == TRUE)
{
- if (KdDebugState & KD_DEBUG_GDB)
+ if (KdDebugState & KD_DEBUG_GDB && BootPhase > 0)
KdPortInitializeEx(&GdbPortInfo, 0, 0);
- if (KdDebugState & KD_DEBUG_SERIAL)
+ if (KdDebugState & KD_DEBUG_SERIAL && BootPhase == 0)
KdPortInitializeEx(&LogPortInfo, 0, 0);
- if (KdDebugState & KD_DEBUG_BOOTLOG)
+ if (KdDebugState & KD_DEBUG_BOOTLOG && BootPhase > 0)
DebugLogInit();
- if (KdDebugState & KD_DEBUG_MDA)
+ if (KdDebugState & KD_DEBUG_MDA && BootPhase > 0)
KdInitializeMda();
}
}
reactos/ntoskrnl/ke
diff -u -r1.47 -r1.47.2.1
--- bug.c 13 Oct 2004 22:27:03 -0000 1.47
+++ bug.c 13 Dec 2004 09:39:11 -0000 1.47.2.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: bug.c,v 1.47 2004/10/13 22:27:03 ion Exp $
+/* $Id: bug.c,v 1.47.2.1 2004/12/13 09:39:11 hyperion Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/bug.c
@@ -103,6 +103,7 @@
{
PRTL_MESSAGE_RESOURCE_ENTRY Message;
NTSTATUS Status;
+ ULONG Mask;
KIRQL OldIrql;
/* Make sure we're switching back to the blue screen and print messages on it */
@@ -142,13 +143,25 @@
{
DbgPrint(" No message text found!\n\n");
}
-
- if (InBugCheck == 1)
+ Mask = 1 << KeGetCurrentProcessorNumber();
+ if (InBugCheck & Mask)
{
+#ifdef MP
+ DbgPrint("Recursive bug check on CPU%d, halting now\n", KeGetCurrentProcessorNumber());
+ /*
+ * FIXME:
+ * Send an ipi to all other processors which halt them too.
+ */
+#else
DbgPrint("Recursive bug check halting now\n");
+#endif
Ke386HaltProcessor();
}
- InBugCheck = 1;
+ /*
+ * FIXME:
+ * Use InterlockedOr or InterlockedBitSet.
+ */
+ InBugCheck |= Mask;
if (Tf != NULL)
{
KiDumpTrapFrame(Tf, BugCheckParameter1, BugCheckParameter2);
@@ -178,6 +191,10 @@
for (;;)
{
+ /*
+ * FIXME:
+ * Send an ipi to all other processors which halt them too.
+ */
Ke386HaltProcessor();
}
}
reactos/ntoskrnl/ke
diff -u -r1.48.2.1 -r1.48.2.2
--- dpc.c 8 Dec 2004 21:57:34 -0000 1.48.2.1
+++ dpc.c 13 Dec 2004 09:39:11 -0000 1.48.2.2
@@ -19,7 +19,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: dpc.c,v 1.48.2.1 2004/12/08 21:57:34 hyperion Exp $
+/* $Id: dpc.c,v 1.48.2.2 2004/12/13 09:39:11 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/ke
diff -u -r1.3.2.1 -r1.3.2.2
--- ipi.c 8 Dec 2004 21:57:34 -0000 1.3.2.1
+++ ipi.c 13 Dec 2004 09:39:11 -0000 1.3.2.2
@@ -1,4 +1,4 @@
-/* $Id: ipi.c,v 1.3.2.1 2004/12/08 21:57:34 hyperion Exp $
+/* $Id: ipi.c,v 1.3.2.2 2004/12/13 09:39:11 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/ke
diff -u -r1.58 -r1.58.2.1
--- kthread.c 10 Nov 2004 02:50:59 -0000 1.58
+++ kthread.c 13 Dec 2004 09:39:11 -0000 1.58.2.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: kthread.c,v 1.58 2004/11/10 02:50:59 ion Exp $
+/* $Id: kthread.c,v 1.58.2.1 2004/12/13 09:39:11 hyperion Exp $
*
* FILE: ntoskrnl/ke/kthread.c
* PURPOSE: Microkernel thread support
@@ -311,13 +311,30 @@
KeRevertToUserAffinityThread(VOID)
{
PKTHREAD CurrentThread;
+ KIRQL oldIrql;
+
+ oldIrql = KeAcquireDispatcherDatabaseLock();
+
CurrentThread = KeGetCurrentThread();
-
+
+ ASSERT(CurrentThread->SystemAffinityActive != FALSE);
+
/* Return to User Affinity */
CurrentThread->Affinity = CurrentThread->UserAffinity;
/* Disable System Affinity */
CurrentThread->SystemAffinityActive = FALSE;
+
+ if (CurrentThread->Affinity & (1 << KeGetCurrentProcessorNumber()))
+ {
+ KeReleaseDispatcherDatabaseLock(oldIrql);
+ }
+ else
+ {
+ CurrentThread->WaitIrql = oldIrql;
+ PsDispatchThreadNoLock(THREAD_STATE_READY);
+ KeLowerIrql(oldIrql);
+ }
}
/*
@@ -349,13 +366,31 @@
KeSetSystemAffinityThread(IN KAFFINITY Affinity)
{
PKTHREAD CurrentThread;
+ KIRQL oldIrql;
+
+ oldIrql = KeAcquireDispatcherDatabaseLock();
+
CurrentThread = KeGetCurrentThread();
+
+ ASSERT(CurrentThread->SystemAffinityActive == FALSE);
+ ASSERT(Affinity & ((1 << KeNumberProcessors) - 1));
- /* Set the System Affinity Specified */
+ /* Set the System Affinity Specified */
CurrentThread->Affinity = Affinity;
/* Enable System Affinity */
CurrentThread->SystemAffinityActive = TRUE;
+
+ if (Affinity & (1 << KeGetCurrentProcessorNumber()))
+ {
+ KeReleaseDispatcherDatabaseLock(oldIrql);
+ }
+ else
+ {
+ CurrentThread->WaitIrql = oldIrql;
+ PsDispatchThreadNoLock(THREAD_STATE_READY);
+ KeLowerIrql(oldIrql);
+ }
}
/*
reactos/ntoskrnl/ke
diff -u -r1.206.2.1 -r1.206.2.2
--- main.c 8 Dec 2004 21:57:34 -0000 1.206.2.1
+++ main.c 13 Dec 2004 09:39:11 -0000 1.206.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: main.c,v 1.206.2.1 2004/12/08 21:57:34 hyperion Exp $
+/* $Id: main.c,v 1.206.2.2 2004/12/13 09:39:11 hyperion Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/main.c
@@ -457,7 +457,7 @@
/*
* Initialize the kernel debugger
*/
- KdInitSystem (0, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock);
+ KdInitSystem (1, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock);
KeInit2();
@@ -1044,6 +1044,7 @@
KeLoaderBlock.MmapAddr = (ULONG)KeMemoryMap;
}
+ KdInitSystem (0, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock);
HalInitSystem (0, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock);
KiSystemStartup(1);
reactos/ntoskrnl/ke
diff -u -r1.31.2.1 -r1.31.2.2
--- process.c 8 Dec 2004 21:57:34 -0000 1.31.2.1
+++ process.c 13 Dec 2004 09:39:11 -0000 1.31.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: process.c,v 1.31.2.1 2004/12/08 21:57:34 hyperion Exp $
+/* $Id: process.c,v 1.31.2.2 2004/12/13 09:39:11 hyperion Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/process.c
reactos/ntoskrnl/ke
diff -u -r1.90.2.1 -r1.90.2.2
--- timer.c 8 Dec 2004 21:57:34 -0000 1.90.2.1
+++ timer.c 13 Dec 2004 09:39:11 -0000 1.90.2.2
@@ -1,4 +1,4 @@
-/* $Id: timer.c,v 1.90.2.1 2004/12/08 21:57:34 hyperion Exp $
+/* $Id: timer.c,v 1.90.2.2 2004/12/13 09:39:11 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/ke
diff -u -r1.62 -r1.62.2.1
--- wait.c 21 Nov 2004 18:33:54 -0000 1.62
+++ wait.c 13 Dec 2004 09:39:11 -0000 1.62.2.1
@@ -79,8 +79,18 @@
KeReleaseDispatcherDatabaseLock(KIRQL OldIrql)
{
DPRINT("KeReleaseDispatcherDatabaseLock(OldIrql %x)\n",OldIrql);
-
- KeReleaseSpinLock(&DispatcherDatabaseLock, OldIrql);
+ if (!KeIsExecutingDpc() &&
+ OldIrql < DISPATCH_LEVEL &&
+ KeGetCurrentThread() != NULL &&
+ KeGetCurrentThread() == KeGetCurrentKPCR()->PrcbData.IdleThread)
+ {
+ PsDispatchThreadNoLock(THREAD_STATE_READY);
+ KeLowerIrql(OldIrql);
+ }
+ else
+ {
+ KeReleaseSpinLock(&DispatcherDatabaseLock, OldIrql);
+ }
}
reactos/ntoskrnl/ke/i386
diff -u -r1.94.2.1 -r1.94.2.2
--- exp.c 8 Dec 2004 21:57:35 -0000 1.94.2.1
+++ exp.c 13 Dec 2004 09:39:11 -0000 1.94.2.2
@@ -124,7 +124,7 @@
/* FUNCTIONS ****************************************************************/
-#ifdef KDBG
+#if defined(DBG) || defined(KDBG)
BOOLEAN STDCALL
KeRosPrintAddress(PVOID address)
{
reactos/ntoskrnl/ke/i386
diff -u -r1.17.2.1 -r1.17.2.2
--- fpu.c 8 Dec 2004 21:57:35 -0000 1.17.2.1
+++ fpu.c 13 Dec 2004 09:39:11 -0000 1.17.2.2
@@ -1,4 +1,4 @@
-/* $Id: fpu.c,v 1.17.2.1 2004/12/08 21:57:35 hyperion Exp $
+/* $Id: fpu.c,v 1.17.2.2 2004/12/13 09:39:11 hyperion Exp $
*
* ReactOS kernel
* Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
reactos/ntoskrnl/ke/i386
diff -u -r1.55.2.1 -r1.55.2.2
--- irq.c 8 Dec 2004 21:57:36 -0000 1.55.2.1
+++ irq.c 13 Dec 2004 09:39:12 -0000 1.55.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: irq.c,v 1.55.2.1 2004/12/08 21:57:36 hyperion Exp $
+/* $Id: irq.c,v 1.55.2.2 2004/12/13 09:39:12 hyperion Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/i386/irq.c
reactos/ntoskrnl/ke/i386
diff -u -r1.21.2.1 -r1.21.2.2
--- tskswitch.S 8 Dec 2004 21:57:36 -0000 1.21.2.1
+++ tskswitch.S 13 Dec 2004 09:39:12 -0000 1.21.2.2
@@ -200,8 +200,7 @@
*/
sti
- push $_PiThreadLock
- call _KeReleaseSpinLockFromDpcLevel@4
+ call _KeReleaseDispatcherDatabaseLockFromDpcLevel
cmpl $0, _PiNrThreadsAwaitingReaping
je 5f
reactos/ntoskrnl/ldr
diff -u -r1.49.2.1 -r1.49.2.2
--- init.c 8 Dec 2004 21:57:37 -0000 1.49.2.1
+++ init.c 13 Dec 2004 09:39:12 -0000 1.49.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: init.c,v 1.49.2.1 2004/12/08 21:57:37 hyperion Exp $
+/* $Id: init.c,v 1.49.2.2 2004/12/13 09:39:12 hyperion Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ldr/init.c
reactos/ntoskrnl/mm/i386
diff -u -r1.77.2.1 -r1.77.2.2
--- page.c 8 Dec 2004 21:57:37 -0000 1.77.2.1
+++ page.c 13 Dec 2004 09:39:12 -0000 1.77.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: page.c,v 1.77.2.1 2004/12/08 21:57:37 hyperion Exp $
+/* $Id: page.c,v 1.77.2.2 2004/12/13 09:39:12 hyperion Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/i386/page.c
reactos/ntoskrnl/mm
diff -u -r1.92.2.1 -r1.92.2.2
--- npool.c 8 Dec 2004 21:57:37 -0000 1.92.2.1
+++ npool.c 13 Dec 2004 09:39:12 -0000 1.92.2.2
@@ -1,4 +1,4 @@
-/* $Id: npool.c,v 1.92.2.1 2004/12/08 21:57:37 hyperion Exp $
+/* $Id: npool.c,v 1.92.2.2 2004/12/13 09:39:12 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/mm
diff -u -r1.35 -r1.35.6.1
--- pool.c 1 Oct 2004 20:51:29 -0000 1.35
+++ pool.c 13 Dec 2004 09:39:14 -0000 1.35.6.1
@@ -1,4 +1,4 @@
-/* $Id: pool.c,v 1.35 2004/10/01 20:51:29 arty Exp $
+/* $Id: pool.c,v 1.35.6.1 2004/12/13 09:39:14 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -24,6 +24,9 @@
#define TAG_NONE (ULONG)(('N'<<0) + ('o'<<8) + ('n'<<16) + ('e'<<24))
+ULONG STDCALL
+ExRosQueryPagedPoolTag ( PVOID Block );
+
/* FUNCTIONS ***************************************************************/
STATIC PVOID STDCALL
@@ -336,4 +339,20 @@
}
}
+ULONG STDCALL
+ExRosQueryPoolTag ( PVOID Block )
+{
+ ASSERT_IRQL(DISPATCH_LEVEL);
+
+ if (Block >= MmPagedPoolBase && (char*)Block < ((char*)MmPagedPoolBase + MmPagedPoolSize))
+ {
+ return ExRosQueryPagedPoolTag(Block);
+ }
+ else
+ {
+ UNIMPLEMENTED;
+ return 0;
+ }
+}
+
/* EOF */
reactos/ntoskrnl/mm
diff -u -r1.33 -r1.33.2.1
--- ppool.c 20 Nov 2004 21:16:38 -0000 1.33
+++ ppool.c 13 Dec 2004 09:39:14 -0000 1.33.2.1
@@ -1,4 +1,4 @@
-/* $Id: ppool.c,v 1.33 2004/11/20 21:16:38 navaraf Exp $
+/* $Id: ppool.c,v 1.33.2.1 2004/12/13 09:39:14 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -20,30 +20,48 @@
/* Define to enable strict checking of the paged pool on every allocation */
/* #define ENABLE_VALIDATE_POOL */
-#undef assert
-#define assert(x) if (!(x)) {DbgPrint("Assertion "#x" failed at %s:%d\n", __FILE__,__LINE__); KeBugCheck(0); }
-#define ASSERT_SIZE(n) assert ( (n) <= MmPagedPoolSize && (n) >= 0 )
-#define ASSERT_PTR(p) assert ( ((size_t)(p)) >= ((size_t)MmPagedPoolBase) && ((size_t)(p)) < ((size_t)((size_t)MmPagedPoolBase+MmPagedPoolSize)) )
+#undef ASSERT
+#define ASSERT(x) if (!(x)) {DbgPrint("Assertion "#x" failed at %s:%d\n", __FILE__,__LINE__); KeBugCheck(0); }
+#define ASSERT_SIZE(n) ASSERT ( (n) <= MmPagedPoolSize && (n) > 0 )
+#define IS_PPOOL_PTR(p) ((size_t)(p)) >= ((size_t)MmPagedPoolBase) && ((size_t)(p)) < ((size_t)((size_t)MmPagedPoolBase+MmPagedPoolSize))
+#define ASSERT_PTR(p) ASSERT ( IS_PPOOL_PTR(p) )
// to disable buffer over/under-run detection, set the following macro to 0
+#if !defined(DBG) && !defined(KDBG)
+#define MM_PPOOL_REDZONE_BYTES 0
+#else
#define MM_PPOOL_REDZONE_BYTES 4
-#define MM_PPOOL_REDZONE_VALUE 0xCD
+#define MM_PPOOL_REDZONE_LOVALUE 0x87
+#define MM_PPOOL_REDZONE_HIVALUE 0xA5
+#define MM_PPOOL_FREEMAGIC (ULONG)(('F'<<0) + ('r'<<8) + ('E'<<16) + ('e'<<24))
+#define MM_PPOOL_USEDMAGIC (ULONG)(('u'<<0) + ('S'<<8) + ('e'<<16) + ('D'<<24))
+#define MM_PPOOL_LASTOWNER_ENTRIES 3
+#endif
typedef struct _MM_PPOOL_FREE_BLOCK_HEADER
{
+#if MM_PPOOL_REDZONE_BYTES
+ ULONG FreeMagic;
+#endif//MM_PPOOL_REDZONE_BYTES
ULONG Size;
struct _MM_PPOOL_FREE_BLOCK_HEADER* NextFree;
+#if MM_PPOOL_REDZONE_BYTES
+ ULONG LastOwnerStack[MM_PPOOL_LASTOWNER_ENTRIES];
+#endif//MM_PPOOL_REDZONE_BYTES
}
MM_PPOOL_FREE_BLOCK_HEADER, *PMM_PPOOL_FREE_BLOCK_HEADER;
typedef struct _MM_PPOOL_USED_BLOCK_HEADER
{
+#if MM_PPOOL_REDZONE_BYTES
+ ULONG UsedMagic;
+#endif//MM_PPOOL_REDZONE_BYTES
ULONG Size;
#if MM_PPOOL_REDZONE_BYTES
-
ULONG UserSize; // how many bytes the user actually asked for...
- struct _MM_PPOOL_USED_BLOCK_HEADER* NextUsed;
#endif//MM_PPOOL_REDZONE_BYTES
+ struct _MM_PPOOL_USED_BLOCK_HEADER* NextUsed;
+ ULONG Tag;
}
MM_PPOOL_USED_BLOCK_HEADER, *PMM_PPOOL_USED_BLOCK_HEADER;
@@ -52,9 +70,7 @@
ULONG MmTotalPagedPoolQuota = 0;
static FAST_MUTEX MmPagedPoolLock;
static PMM_PPOOL_FREE_BLOCK_HEADER MmPagedPoolFirstFreeBlock;
-#if MM_PPOOL_REDZONE_BYTES
static PMM_PPOOL_USED_BLOCK_HEADER MmPagedPoolFirstUsedBlock;
-#endif//MM_PPOOL_REDZONE_BYTES
/* FUNCTIONS *****************************************************************/
@@ -86,6 +102,12 @@
MmPagedPoolFirstFreeBlock->NextFree = NULL;
#if MM_PPOOL_REDZONE_BYTES
+ MmPagedPoolFirstFreeBlock->FreeMagic = MM_PPOOL_FREEMAGIC;
+ {
+ int i;
+ for ( i = 0; i < MM_PPOOL_LASTOWNER_ENTRIES; i++ )
+ MmPagedPoolFirstFreeBlock->LastOwnerStack[i] = 0;
+ }
MmPagedPoolFirstUsedBlock = NULL;
#endif//MM_PPOOL_REDZONE_BYTES
@@ -102,6 +124,9 @@
while ( p )
{
DPRINT ( " 0x%x: %lu bytes (next 0x%x)\n", p, p->Size, p->NextFree );
+#if MM_PPOOL_REDZONE_BYTES
+ ASSERT ( p->FreeMagic == MM_PPOOL_FREEMAGIC );
+#endif//MM_PPOOL_REDZONE_BYTES
ASSERT_PTR(p);
ASSERT_SIZE(p->Size);
count++;
@@ -114,34 +139,84 @@
#define VerifyPagedPool()
#endif
+BOOLEAN STDCALL
+KeRosPrintAddress(PVOID address);
+
+#if !MM_PPOOL_REDZONE_BYTES
+#define MmpRedZoneCheck(pUsed,Addr,file,line)
+#else//MM_PPOOL_REDZONE_BYTES
+static VOID FASTCALL
+MmpRedZoneCheck ( PMM_PPOOL_USED_BLOCK_HEADER pUsed, PUCHAR Addr, const char* file, int line )
+{
+ int i;
+ PUCHAR AddrEnd = Addr + pUsed->UserSize;
+ BOOL bLow = TRUE;
+ BOOL bHigh = TRUE;
+
+ ASSERT_PTR(Addr);
+ if ( pUsed->UsedMagic == MM_PPOOL_FREEMAGIC )
+ {
+ PMM_PPOOL_FREE_BLOCK_HEADER pFree = (PMM_PPOOL_FREE_BLOCK_HEADER)pUsed;
+ DPRINT1 ( "Double-free detected for Block 0x%x (kthread=0x%x)!\n", Addr, KeGetCurrentThread() );
+ DbgPrint ( "First Free Stack Frames:" );
+ for ( i = 0; i < MM_PPOOL_LASTOWNER_ENTRIES; i++ )
+ {
+ if ( pFree->LastOwnerStack[i] != 0xDEADBEEF )
+ {
+ DbgPrint(" ");
+ if (!KeRosPrintAddress ((PVOID)pFree->LastOwnerStack[i]) )
+ {
+ DbgPrint("<%X>", pFree->LastOwnerStack[i] );
+ }
+ }
+ }
+ DbgPrint ( "\n" );
+ KEBUGCHECK(BAD_POOL_HEADER);
+ }
+ if ( pUsed->UsedMagic != MM_PPOOL_USEDMAGIC )
+ {
+ DPRINT1 ( "Bad magic in Block 0x%x!\n", Addr );
+ KEBUGCHECK(BAD_POOL_HEADER);
+ }
+ ASSERT_SIZE(pUsed->Size);
+ ASSERT_SIZE(pUsed->UserSize);
+ ASSERT_PTR(AddrEnd);
+ Addr -= MM_PPOOL_REDZONE_BYTES; // this is to simplify indexing below...
+ for ( i = 0; i < MM_PPOOL_REDZONE_BYTES && bLow && bHigh; i++ )
+ {
+ bLow = bLow && ( Addr[i] == MM_PPOOL_REDZONE_LOVALUE );
+ bHigh = bHigh && ( AddrEnd[i] == MM_PPOOL_REDZONE_HIVALUE );
+ }
+ if ( !bLow || !bHigh )
+ {
+ const char* violation = "High and Low-side";
+ if ( bHigh ) // high is okay, so it was just low failed
+ violation = "Low-side";
+ else if ( bLow ) // low side is okay, so it was just high failed
+ violation = "High-side";
+ DbgPrint("%s(%i): %s redzone violation detected for paged pool address 0x%x\n",
+ file, line, violation, Addr );
+ DbgPrint ( "UsedMagic 0x%x, LoZone ", pUsed->UsedMagic );
+ for ( i = 0; i < MM_PPOOL_REDZONE_BYTES; i++ )
+ DbgPrint ( "%02x", Addr[i] );
+ DbgPrint ( ", HiZone " );
+ for ( i = 0; i < MM_PPOOL_REDZONE_BYTES; i++ )
+ DbgPrint ( "%02x", AddrEnd[i] );
+ DbgPrint ( "\n" );
+ KEBUGCHECK(BAD_POOL_HEADER);
+ }
+}
+#endif//MM_PPOOL_REDZONE_BYTES
+
VOID STDCALL
MmDbgPagedPoolRedZoneCheck ( const char* file, int line )
{
#if MM_PPOOL_REDZONE_BYTES
PMM_PPOOL_USED_BLOCK_HEADER pUsed = MmPagedPoolFirstUsedBlock;
- int i;
- BOOL bLow = TRUE;
- BOOL bHigh = TRUE;
while ( pUsed )
{
- PUCHAR Addr = (PUCHAR)block_to_address(pUsed);
- for ( i = 0; i < MM_PPOOL_REDZONE_BYTES; i++ )
- {
- bLow = bLow && ( *(Addr-i-1) == MM_PPOOL_REDZONE_VALUE );
- bHigh = bHigh && ( *(Addr+pUsed->UserSize+i) == MM_PPOOL_REDZONE_VALUE );
- }
- if ( !bLow || !bHigh )
- {
- const char* violation = "High and Low-side";
- if ( bHigh ) // high is okay, so it was just low failed
- violation = "Low-side";
- else if ( bLow ) // low side is okay, so it was just high failed
- violation = "High-side";
- DbgPrint("%s(%i): %s redzone violation detected for paged pool address 0x%x\n",
- file, line, violation, Addr );
- KEBUGCHECK(0);
- }
+ MmpRedZoneCheck ( pUsed, block_to_address(pUsed), __FILE__, __LINE__ );
pUsed = pUsed->NextUsed;
}
#endif//MM_PPOOL_REDZONE_BYTES
@@ -228,7 +303,7 @@
PVOID CurrentBlockEnd = (char*)CurrentBlock + CurrentBlock->Size;
/* calculate last size-aligned address available within this block */
PVOID AlignedAddr = MM_ROUND_DOWN((char*)CurrentBlockEnd-NumberOfBytes-MM_PPOOL_REDZONE_BYTES, Alignment);
- assert ( (char*)AlignedAddr+NumberOfBytes+MM_PPOOL_REDZONE_BYTES <= (char*)CurrentBlockEnd );
+ ASSERT ( (char*)AlignedAddr+NumberOfBytes+MM_PPOOL_REDZONE_BYTES <= (char*)CurrentBlockEnd );
/* special case, this address is already size-aligned, and the right size */
if ( Addr == AlignedAddr )
@@ -268,8 +343,11 @@
{
PMM_PPOOL_FREE_BLOCK_HEADER NewFreeBlock =
(PMM_PPOOL_FREE_BLOCK_HEADER)address_to_block(BestAlignedAddr);
- assert ( BestAlignedAddr > Addr );
+ ASSERT ( BestAlignedAddr > Addr );
NewFreeBlock->Size = (char*)Addr + BestBlock->Size - (char*)BestAlignedAddr;
+#if MM_PPOOL_REDZONE_BYTES
+ NewFreeBlock->FreeMagic = MM_PPOOL_FREEMAGIC;
+#endif//MM_PPOOL_REDZONE_BYTES
ASSERT_SIZE(NewFreeBlock->Size);
BestBlock->Size = (size_t)NewFreeBlock - (size_t)Addr;
ASSERT_SIZE(BestBlock->Size);
@@ -344,6 +422,9 @@
NextBlock = (PMM_PPOOL_FREE_BLOCK_HEADER)((char*)BestBlock + BlockSize);
//DPRINT(".");
NextBlock->Size = NewSize;
+#if MM_PPOOL_REDZONE_BYTES
+ NextBlock->FreeMagic = MM_PPOOL_FREEMAGIC;
+#endif//MM_PPOOL_REDZONE_BYTES
ASSERT_SIZE ( NextBlock->Size );
//DPRINT(".");
NextBlock->NextFree = BestBlock->NextFree;
@@ -372,6 +453,9 @@
NewBlock = (PMM_PPOOL_USED_BLOCK_HEADER)BestBlock;
//DPRINT(".");
NewBlock->Size = BlockSize;
+#if MM_PPOOL_REDZONE_BYTES
+ NewBlock->UsedMagic = MM_PPOOL_USEDMAGIC;
+#endif//MM_PPOOL_REDZONE_BYTES
ASSERT_SIZE ( NewBlock->Size );
//DPRINT(".\n");
}
@@ -397,14 +481,17 @@
*/
NewBlock = (PMM_PPOOL_USED_BLOCK_HEADER)BestBlock;
NewBlock->Size = NewSize;
+#if MM_PPOOL_REDZONE_BYTES
+ NewBlock->UsedMagic = MM_PPOOL_USEDMAGIC;
+#endif//MM_PPOOL_REDZONE_BYTES
ASSERT_SIZE ( NewBlock->Size );
}
-#if MM_PPOOL_REDZONE_BYTES
// now add the block to the used block list
NewBlock->NextUsed = MmPagedPoolFirstUsedBlock;
MmPagedPoolFirstUsedBlock = NewBlock;
-#endif//MM_PPOOL_REDZONE_BYTES
+
+ NewBlock->Tag = Tag;
VerifyPagedPool();
@@ -421,17 +508,9 @@
PUCHAR Addr = (PUCHAR)BlockAddress;
//DbgPrint ( "writing buffer-overrun detection bytes" );
memset ( Addr - MM_PPOOL_REDZONE_BYTES,
- MM_PPOOL_REDZONE_VALUE, MM_PPOOL_REDZONE_BYTES );
- memset ( Addr + NewBlock->UserSize, MM_PPOOL_REDZONE_VALUE,
+ MM_PPOOL_REDZONE_LOVALUE, MM_PPOOL_REDZONE_BYTES );
+ memset ( Addr + NewBlock->UserSize, MM_PPOOL_REDZONE_HIVALUE,
MM_PPOOL_REDZONE_BYTES );
- /*for ( i = 0; i < MM_PPOOL_REDZONE_BYTES; i++ )
- {
- //DbgPrint(".");
- *(Addr-i-1) = 0xCD;
- //DbgPrint("o");
- *(Addr+NewBlock->UserSize+i) = 0xCD;
- }*/
- //DbgPrint ( "done!\n" );
}
#endif//MM_PPOOL_REDZONE_BYTES
@@ -452,33 +531,14 @@
ASSERT_IRQL(APC_LEVEL);
-#if MM_PPOOL_REDZONE_BYTES
- // write out buffer-overrun detection bytes
- {
- int i;
- PUCHAR Addr = (PUCHAR)Block;
- //DbgPrint ( "checking buffer-overrun detection bytes..." );
- for ( i = 0; i < MM_PPOOL_REDZONE_BYTES; i++ )
- {
- if (*(Addr-i-1) != MM_PPOOL_REDZONE_VALUE)
- {
- DPRINT1("Attempt to free memory %#08x. Redzone underrun!\n", Block);
- }
- if (*(Addr+UsedBlock->UserSize+i) != MM_PPOOL_REDZONE_VALUE)
- {
- DPRINT1("Attempt to free memory %#08x. Redzone overrun!\n", Block);
- }
+ MmpRedZoneCheck ( UsedBlock, Block, __FILE__, __LINE__ );
- assert ( *(Addr-i-1) == MM_PPOOL_REDZONE_VALUE );
- assert ( *(Addr+UsedBlock->UserSize+i) == MM_PPOOL_REDZONE_VALUE );
- }
- //DbgPrint ( "done!\n" );
- }
-#endif//MM_PPOOL_REDZONE_BYTES
+#if MM_PPOOL_REDZONE_BYTES
+ memset ( Block, 0xCD, UsedBlock->UserSize );
+#endif
ExAcquireFastMutex(&MmPagedPoolLock);
-#if MM_PPOOL_REDZONE_BYTES
// remove from used list...
{
PMM_PPOOL_USED_BLOCK_HEADER pPrev = MmPagedPoolFirstUsedBlock;
@@ -493,16 +553,42 @@
pPrev = pPrev->NextUsed;
// if this assert fails - memory has been corrupted
// ( or I have a logic error...! )
- assert ( pPrev->NextUsed == UsedBlock );
+ ASSERT ( pPrev->NextUsed == UsedBlock );
pPrev->NextUsed = UsedBlock->NextUsed;
}
}
-#endif//MM_PPOOL_REDZONE_BYTES
/*
* Begin setting up the newly freed block's header.
*/
FreeBlock->Size = UsedSize;
+#if MM_PPOOL_REDZONE_BYTES
+ FreeBlock->FreeMagic = MM_PPOOL_FREEMAGIC;
+ {
+ PULONG Frame;
+ int i;
+#if defined __GNUC__
+ __asm__("mov %%ebp, %%ebx" : "=b" (Frame) : );
+#elif defined(_MSC_VER)
+ __asm mov [Frame], ebp
+#endif
+ //DbgPrint ( "Stack Frames for Free Block 0x%x:", Block );
+ Frame = (PULONG)Frame[0]; // step out of ExFreePagedPool
+ for ( i = 0; i < MM_PPOOL_LASTOWNER_ENTRIES; i++ )
+ {
+ if ( Frame == 0 || (ULONG)Frame == 0xDEADBEEF )
+ FreeBlock->LastOwnerStack[i] = 0xDEADBEEF;
+ else
+ {
+ //DbgPrint ( " 0x%x", Frame[1] );
+ FreeBlock->LastOwnerStack[i] = Frame[1];
+ Frame = (PULONG)Frame[0];
+ }
+ }
+ //DbgPrint ( "\n" );
+ //KeRosDumpStackFrames ( NULL, 4 );
+ }
+#endif//MM_PPOOL_REDZONE_BYTES
ASSERT_SIZE ( FreeBlock->Size );
/*
@@ -533,6 +619,7 @@
/*
* If the next block is immediately adjacent to the newly freed one then
* merge them.
+ * PLEASE DO NOT WIPE OUT 'MAGIC' OR 'LASTOWNER' DATA FOR MERGED FREE BLOCKS
*/
if (NextBlock != NULL &&
((char*)FreeBlock + FreeBlock->Size) == (char*)NextBlock)
@@ -550,6 +637,7 @@
/*
* If the previous block is adjacent to the newly freed one then
* merge them.
+ * PLEASE DO NOT WIPE OUT 'MAGIC' OR 'LASTOWNER' DATA FOR MERGED FREE BLOCKS
*/
if (PreviousBlock != NULL &&
((char*)PreviousBlock + PreviousBlock->Size) == (char*)FreeBlock)
@@ -564,4 +652,40 @@
ExReleaseFastMutex(&MmPagedPoolLock);
}
+VOID STDCALL
+ExRosDumpPagedPoolByTag ( ULONG Tag )
+{
+ PMM_PPOOL_USED_BLOCK_HEADER UsedBlock = MmPagedPoolFirstUsedBlock;
+ int count = 0;
+ char tag[5];
+
+ // TODO FIXME - should we validate params or ASSERT_IRQL?
+ *(ULONG*)&tag[0] = Tag;
+ tag[4] = 0;
+ DbgPrint ( "PagedPool Dump by tag '%s'\n", tag );
+ DbgPrint ( " -BLOCK-- --SIZE--\n" );
+ while ( IS_PPOOL_PTR(UsedBlock) )
+ {
+ if ( UsedBlock->Tag == Tag )
+ {
+ DbgPrint ( " %08X %08X\n", UsedBlock, UsedBlock->Size );
+ ++count;
+ }
+ UsedBlock = UsedBlock->NextUsed;
+ }
+ if ( UsedBlock && !IS_PPOOL_PTR(UsedBlock) )
+ {
+ DPRINT1 ( "!!NextUsed took me to lala land: 0x%08X\n", UsedBlock );
+ }
+ DbgPrint ( "Entries found for tag '%s': %i\n", tag, count );
+}
+
+ULONG STDCALL
+ExRosQueryPagedPoolTag ( PVOID Block )
+{
+ PMM_PPOOL_USED_BLOCK_HEADER UsedBlock = address_to_block(Block);
+ // TODO FIXME - should we validate params or ASSERT_IRQL?
+ return UsedBlock->Tag;
+}
+
/* EOF */
reactos/ntoskrnl/ps
diff -u -r1.2.2.1 -r1.2.2.2
--- cid.c 8 Dec 2004 21:57:37 -0000 1.2.2.1
+++ cid.c 13 Dec 2004 09:39:14 -0000 1.2.2.2
@@ -1,4 +1,4 @@
-/* $Id: cid.c,v 1.2.2.1 2004/12/08 21:57:37 hyperion Exp $
+/* $Id: cid.c,v 1.2.2.2 2004/12/13 09:39:14 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/ps
diff -u -r1.86 -r1.86.2.1
--- create.c 20 Nov 2004 16:46:05 -0000 1.86
+++ create.c 13 Dec 2004 09:39:14 -0000 1.86.2.1
@@ -1,4 +1,4 @@
-/* $Id: create.c,v 1.86 2004/11/20 16:46:05 weiden Exp $
+/* $Id: create.c,v 1.86.2.1 2004/12/13 09:39:14 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -27,8 +27,6 @@
/* GLOBAL *******************************************************************/
-extern KSPIN_LOCK PiThreadLock;
-
#define MAX_THREAD_NOTIFY_ROUTINE_COUNT 8
static ULONG PiThreadNotifyRoutineCount = 0;
@@ -235,63 +233,6 @@
/*
* @implemented
*/
-NTSTATUS STDCALL
-NtOpenThreadToken (IN HANDLE ThreadHandle,
- IN ACCESS_MASK DesiredAccess,
- IN BOOLEAN OpenAsSelf,
- OUT PHANDLE TokenHandle)
-{
- PACCESS_TOKEN Token;
- PETHREAD Thread;
- NTSTATUS Status;
-
- Status = ObReferenceObjectByHandle (ThreadHandle,
- 0,
- PsThreadType,
- UserMode,
- (PVOID*)&Thread,
- NULL);
- if (!NT_SUCCESS(Status))
- {
- return(Status);
- }
-
- if (OpenAsSelf)
- {
- Token = Thread->ThreadsProcess->Token;
- }
- else
- {
- if (Thread->ActiveImpersonationInfo == FALSE)
- {
- ObDereferenceObject (Thread);
- return STATUS_NO_TOKEN;
- }
-
- Token = Thread->ImpersonationInfo->Token;
- }
-
- if (Token == NULL)
- {
- ObDereferenceObject (Thread);
- return STATUS_NO_TOKEN;
- }
-
- Status = ObCreateHandle (PsGetCurrentProcess(),
- Token,
- DesiredAccess,
- FALSE,
- TokenHandle);
-
- ObDereferenceObject (Thread);
-
- return Status;
-}
-
-
-/*
- * @implemented
- */
PACCESS_TOKEN STDCALL
PsReferenceImpersonationToken(IN PETHREAD Thread,
OUT PBOOLEAN CopyOnOpen,
@@ -339,7 +280,7 @@
}
/*
- * @unimplemented
+ * @implemented
*/
BOOLEAN
STDCALL
@@ -348,12 +289,32 @@
IN PSE_IMPERSONATION_STATE ImpersonationState
)
{
- UNIMPLEMENTED;
- return FALSE;
+ if (Thread->ActiveImpersonationInfo == FALSE)
+ {
+ ImpersonationState->Token = NULL;
+ ImpersonationState->CopyOnOpen = FALSE;
+ ImpersonationState->EffectiveOnly = FALSE;
+ ImpersonationState->Level = 0;
+ return TRUE;
+ }
+
+/* FIXME */
+/* ExfAcquirePushLockExclusive(&Thread->ThreadLock); */
+
+ Thread->ActiveImpersonationInfo = FALSE;
+ ImpersonationState->Token = Thread->ImpersonationInfo->Token;
+ ImpersonationState->CopyOnOpen = Thread->ImpersonationInfo->CopyOnOpen;
+ ImpersonationState->EffectiveOnly = Thread->ImpersonationInfo->EffectiveOnly;
+ ImpersonationState->Level = Thread->ImpersonationInfo->Level;
+
+/* FIXME */
+/* ExfReleasePushLock(&Thread->ThreadLock); */
+
+ return TRUE;
}
/*
- * @unimplemented
+ * @implemented
*/
VOID
STDCALL
@@ -362,7 +323,11 @@
IN PSE_IMPERSONATION_STATE ImpersonationState
)
{
- UNIMPLEMENTED;
+ PsImpersonateClient(Thread, ImpersonationState->Token,
+ ImpersonationState->CopyOnOpen,
+ ImpersonationState->EffectiveOnly,
+ ImpersonationState->Level);
+ ObfDereferenceObject(ImpersonationState->Token);
}
VOID
@@ -493,10 +458,10 @@
Thread->LpcExitThreadCalled = FALSE;
Thread->LpcReceivedMsgIdValid = FALSE;
- KeAcquireSpinLock(&PiThreadLock, &oldIrql);
+ oldIrql = KeAcquireDispatcherDatabaseLock();
InsertTailList(&Process->ThreadListHead,
&Thread->ThreadListEntry);
- KeReleaseSpinLock(&PiThreadLock, oldIrql);
+ KeReleaseDispatcherDatabaseLock(oldIrql);
*ThreadPtr = Thread;
reactos/ntoskrnl/ps
diff -u -r1.86.2.1 -r1.86.2.2
--- kill.c 8 Dec 2004 21:57:38 -0000 1.86.2.1
+++ kill.c 13 Dec 2004 09:39:14 -0000 1.86.2.2
@@ -1,4 +1,4 @@
-/* $Id: kill.c,v 1.86.2.1 2004/12/08 21:57:38 hyperion Exp $
+/* $Id: kill.c,v 1.86.2.2 2004/12/13 09:39:14 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -17,8 +17,6 @@
/* GLOBALS *******************************************************************/
-extern KSPIN_LOCK PiThreadLock;
-
VOID PsTerminateCurrentThread(NTSTATUS ExitStatus);
NTSTATUS STDCALL NtCallTerminatePorts(PETHREAD Thread);
@@ -41,19 +39,17 @@
PETHREAD Thread;
PLIST_ENTRY ListEntry;
- KeAcquireSpinLock(&PiThreadLock, &oldlvl);
+ oldlvl = KeAcquireDispatcherDatabaseLock();
while((ListEntry = RemoveHeadList(&ThreadsToReapHead)) != &ThreadsToReapHead)
{
PiNrThreadsAwaitingReaping--;
- KeReleaseSpinLock(&PiThreadLock, oldlvl);
-
+ KeReleaseDispatcherDatabaseLock(oldlvl);
Thread = CONTAINING_RECORD(ListEntry, ETHREAD, TerminationPortList);
ObDereferenceObject(Thread);
-
- KeAcquireSpinLock(&PiThreadLock, &oldlvl);
+ oldlvl = KeAcquireDispatcherDatabaseLock();
}
- KeReleaseSpinLock(&PiThreadLock, oldlvl);
+ KeReleaseDispatcherDatabaseLock(oldlvl);
}
VOID
@@ -73,9 +69,9 @@
DPRINT("PiTerminateProcessThreads(Process %x, ExitStatus %x)\n",
Process, ExitStatus);
+
+ oldlvl = KeAcquireDispatcherDatabaseLock();
- KeAcquireSpinLock(&PiThreadLock, &oldlvl);
-
current_entry = Process->ThreadListHead.Flink;
while (current_entry != &Process->ThreadListHead)
{
@@ -86,9 +82,9 @@
DPRINT("Terminating %x, current thread: %x, "
"thread's process: %x\n", current, PsGetCurrentThread(),
current->ThreadsProcess);
- KeReleaseSpinLock(&PiThreadLock, oldlvl);
+ KeReleaseDispatcherDatabaseLock(oldlvl);
PsTerminateOtherThread(current, ExitStatus);
- KeAcquireSpinLock(&PiThreadLock, &oldlvl);
+ oldlvl = KeAcquireDispatcherDatabaseLock();
current_entry = Process->ThreadListHead.Flink;
}
else
@@ -96,7 +92,7 @@
current_entry = current_entry->Flink;
}
}
- KeReleaseSpinLock(&PiThreadLock, oldlvl);
+ KeReleaseDispatcherDatabaseLock(oldlvl);
DPRINT("Finished PiTerminateProcessThreads()\n");
}
@@ -131,7 +127,7 @@
KeCancelTimer(&CurrentThread->Tcb.Timer);
- KeAcquireSpinLock(&PiThreadLock, &oldIrql);
+ oldIrql = KeAcquireDispatcherDatabaseLock();
DPRINT("terminating %x\n",CurrentThread);
@@ -145,7 +141,7 @@
InterlockedCompareExchangePointer(&KeGetCurrentKPCR()->PrcbData.NpxThread,
NULL, ETHREAD_TO_KTHREAD(CurrentThread));
- KeReleaseSpinLock(&PiThreadLock, oldIrql);
+ KeReleaseDispatcherDatabaseLock(oldIrql);
PsLockProcess(CurrentProcess, FALSE);
@@ -209,7 +205,7 @@
PiTerminateProcess(CurrentProcess, ExitStatus);
}
- KeAcquireSpinLock(&PiThreadLock, &oldIrql);
+ oldIrql = KeAcquireDispatcherDatabaseLock();
#ifdef _ENABLE_THRDEVTPAIR
ExpSwapThreadEventPair(CurrentThread, NULL); /* Release the associated eventpair object, if there was one */
@@ -260,14 +256,14 @@
DPRINT("PsTerminateOtherThread(Thread %x, ExitStatus %x)\n",
Thread, ExitStatus);
- KeAcquireSpinLock(&PiThreadLock, &OldIrql);
+ OldIrql = KeAcquireDispatcherDatabaseLock();
if (Thread->HasTerminated)
{
- KeReleaseSpinLock(&PiThreadLock, OldIrql);
+ KeReleaseDispatcherDatabaseLock (OldIrql);
return;
}
Thread->HasTerminated = TRUE;
- KeReleaseSpinLock(&PiThreadLock, OldIrql);
+ KeReleaseDispatcherDatabaseLock (OldIrql);
Thread->ExitStatus = ExitStatus;
Apc = ExAllocatePoolWithTag(NonPagedPool, sizeof(KAPC), TAG_TERMINATE_APC);
KeInitializeApc(Apc,
reactos/ntoskrnl/ps
diff -u -r1.157.2.1 -r1.157.2.2
--- process.c 8 Dec 2004 21:57:38 -0000 1.157.2.1
+++ process.c 13 Dec 2004 09:39:14 -0000 1.157.2.2
@@ -1,4 +1,4 @@
-/* $Id: process.c,v 1.157.2.1 2004/12/08 21:57:38 hyperion Exp $
+/* $Id: process.c,v 1.157.2.2 2004/12/13 09:39:14 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/ps
diff -u -r1.138.2.1 -r1.138.2.2
--- thread.c 8 Dec 2004 21:57:38 -0000 1.138.2.1
+++ thread.c 13 Dec 2004 09:39:15 -0000 1.138.2.2
@@ -1,4 +1,4 @@
-/* $Id: thread.c,v 1.138.2.1 2004/12/08 21:57:38 hyperion Exp $
+/* $Id: thread.c,v 1.138.2.2 2004/12/13 09:39:15 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -32,7 +32,6 @@
POBJECT_TYPE EXPORTED PsThreadType = NULL;
-KSPIN_LOCK PiThreadLock;
LONG PiNrThreadsAwaitingReaping = 0;
/*
@@ -338,10 +337,10 @@
DPRINT1("%d/%d\n", current->Cid.UniqueThread, current->Tcb.State);
}
ASSERT(current->Tcb.State == THREAD_STATE_READY);
- DPRINT("current->Tcb.UserAffinity %x Affinity %x PID %d %d\n",
- current->Tcb.UserAffinity, Affinity, current->Cid.UniqueThread,
+ DPRINT("current->Tcb.Affinity %x Affinity %x PID %d %d\n",
+ current->Tcb.Affinity, Affinity, current->Cid.UniqueThread,
Priority);
- if (current->Tcb.UserAffinity & Affinity)
+ if (current->Tcb.Affinity & Affinity)
{
PsRemoveFromThreadList(current);
return(current);
@@ -408,7 +407,7 @@
if (Candidate == CurrentThread)
{
Candidate->Tcb.State = THREAD_STATE_RUNNING;
- KeReleaseSpinLockFromDpcLevel(&PiThreadLock);
+ KeReleaseDispatcherDatabaseLockFromDpcLevel();
return;
}
if (Candidate != NULL)
@@ -441,8 +440,7 @@
{
return;
}
-
- KeAcquireSpinLock(&PiThreadLock, &oldIrql);
+ oldIrql = KeAcquireDispatcherDatabaseLock();
/*
* Save wait IRQL
*/
@@ -454,9 +452,6 @@
VOID
PsUnblockThread(PETHREAD Thread, PNTSTATUS WaitStatus)
{
- KIRQL oldIrql;
-
- KeAcquireSpinLock(&PiThreadLock, &oldIrql);
if (THREAD_STATE_TERMINATED_1 == Thread->Tcb.State ||
THREAD_STATE_TERMINATED_2 == Thread->Tcb.State)
{
@@ -478,7 +473,6 @@
Thread->Tcb.State = THREAD_STATE_READY;
PsInsertIntoThreadList(Thread->Tcb.Priority, Thread);
}
- KeReleaseSpinLock(&PiThreadLock, oldIrql);
}
VOID
@@ -493,11 +487,6 @@
if (!DispatcherLock)
{
oldIrql = KeAcquireDispatcherDatabaseLock();
- KiAcquireSpinLock(&PiThreadLock);
- }
- else
- {
- KeAcquireSpinLock(&PiThreadLock, &oldIrql);
}
KThread = KeGetCurrentThread();
@@ -511,7 +500,6 @@
WaitBlock = WaitBlock->NextWaitBlock;
}
Thread->Tcb.WaitBlockList = NULL;
- KeReleaseDispatcherDatabaseLockFromDpcLevel();
PsDispatchThreadNoLock (THREAD_STATE_READY);
if (Status != NULL)
{
@@ -520,7 +508,6 @@
}
else
{
- KeReleaseDispatcherDatabaseLockFromDpcLevel();
Thread->Tcb.Alertable = Alertable;
Thread->Tcb.WaitMode = (UCHAR)WaitMode;
Thread->Tcb.WaitIrql = WaitIrql;
@@ -546,8 +533,7 @@
PLIST_ENTRY current_entry;
PETHREAD current;
- KeAcquireSpinLock(&PiThreadLock, &oldIrql);
-
+ oldIrql = KeAcquireDispatcherDatabaseLock();
current_entry = Process->ThreadListHead.Flink;
while (current_entry != &Process->ThreadListHead)
{
@@ -562,7 +548,7 @@
current_entry = current_entry->Flink;
}
- KeReleaseSpinLock(&PiThreadLock, oldIrql);
+ KeReleaseDispatcherDatabaseLock(oldIrql);
}
ULONG
@@ -572,7 +558,7 @@
PLIST_ENTRY current_entry;
ULONG Count = 0;
- KeAcquireSpinLock(&PiThreadLock, &oldIrql);
+ oldIrql = KeAcquireDispatcherDatabaseLock();
current_entry = Process->ThreadListHead.Flink;
while (current_entry != &Process->ThreadListHead)
@@ -581,7 +567,7 @@
current_entry = current_entry->Flink;
}
- KeReleaseSpinLock(&PiThreadLock, oldIrql);
+ KeReleaseDispatcherDatabaseLock(oldIrql);
return Count;
}
@@ -657,6 +643,7 @@
TRUE);
IdleThread->Tcb.State = THREAD_STATE_RUNNING;
IdleThread->Tcb.FreezeCount = 0;
+ IdleThread->Tcb.Affinity = 1 << Id;
IdleThread->Tcb.UserAffinity = 1 << Id;
IdleThread->Tcb.Priority = LOW_PRIORITY;
Pcr->PrcbData.IdleThread = &IdleThread->Tcb;
@@ -678,7 +665,6 @@
HANDLE FirstThreadHandle;
NTSTATUS Status;
- KeInitializeSpinLock(&PiThreadLock);
for (i=0; i < MAXIMUM_PRIORITY; i++)
{
InitializeListHead(&PriorityListHead[i]);
@@ -713,6 +699,8 @@
THREAD_ALL_ACCESS,NULL, TRUE);
FirstThread->Tcb.State = THREAD_STATE_RUNNING;
FirstThread->Tcb.FreezeCount = 0;
+ FirstThread->Tcb.UserAffinity = (1 << 0); /* Set the affinity of the first thread to the boot processor */
+ FirstThread->Tcb.Affinity = (1 << 0);
KeGetCurrentKPCR()->PrcbData.CurrentThread = (PVOID)FirstThread;
NtClose(FirstThreadHandle);
@@ -791,7 +779,7 @@
KEBUGCHECK(0);
}
- KeAcquireSpinLock(&PiThreadLock, &oldIrql);
+ oldIrql = KeAcquireDispatcherDatabaseLock();
OldPriority = Thread->Priority;
Thread->BasePriority = Thread->Priority = (CHAR)Priority;
@@ -825,7 +813,7 @@
}
}
}
- KeReleaseSpinLock(&PiThreadLock, oldIrql);
+ KeReleaseDispatcherDatabaseLock(oldIrql);
return(OldPriority);
}
@@ -861,6 +849,7 @@
PETHREAD Thread;
NTSTATUS Status;
NTSTATUS ThreadStatus;
+ KIRQL oldIrql;
Status = ObReferenceObjectByHandle(ThreadHandle,
THREAD_SUSPEND_RESUME,
@@ -874,7 +863,9 @@
}
ThreadStatus = STATUS_ALERTED;
+ oldIrql = KeAcquireDispatcherDatabaseLock();
(VOID)PsUnblockThread(Thread, &ThreadStatus);
+ KeReleaseDispatcherDatabaseLock(oldIrql);
ObDereferenceObject(Thread);
return(STATUS_SUCCESS);
@@ -1006,21 +997,4 @@
return STATUS_INVALID_PARAMETER;
}
-/*
- * @unimplemented
- */
-NTSTATUS
-STDCALL
-NtOpenThreadTokenEx(
- IN HANDLE ThreadHandle,
- IN ACCESS_MASK DesiredAccess,
- IN BOOLEAN OpenAsSelf,
- IN ULONG HandleAttributes,
- OUT PHANDLE TokenHandle
- )
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
/* EOF */
reactos/ntoskrnl/ps
diff -u -r1.18.2.1 -r1.18.2.2
--- w32call.c 8 Dec 2004 21:57:38 -0000 1.18.2.1
+++ w32call.c 13 Dec 2004 09:39:15 -0000 1.18.2.2
@@ -1,4 +1,4 @@
-/* $Id: w32call.c,v 1.18.2.1 2004/12/08 21:57:38 hyperion Exp $
+/* $Id: w32call.c,v 1.18.2.2 2004/12/13 09:39:15 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/se
diff -u -r1.21 -r1.21.2.1
--- acl.c 6 Nov 2004 21:32:16 -0000 1.21
+++ acl.c 13 Dec 2004 09:39:15 -0000 1.21.2.1
@@ -1,4 +1,4 @@
-/* $Id: acl.c,v 1.21 2004/11/06 21:32:16 navaraf Exp $
+/* $Id: acl.c,v 1.21.2.1 2004/12/13 09:39:15 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -219,4 +219,47 @@
return(TRUE);
}
+NTSTATUS STDCALL
+SepCreateImpersonationTokenDacl(PACCESS_TOKEN Token,
+ PACCESS_TOKEN PrimaryToken,
+ PACL *Dacl)
+{
+ ULONG AclLength;
+ PVOID TokenDacl;
+
+ AclLength = sizeof(ACL) +
+ (sizeof(ACE) + RtlLengthSid(SeAliasAdminsSid)) +
+ (sizeof(ACE) + RtlLengthSid(SeRestrictedCodeSid)) +
+ (sizeof(ACE) + RtlLengthSid(SeLocalSystemSid)) +
+ (sizeof(ACE) + RtlLengthSid(Token->UserAndGroups->Sid)) +
+ (sizeof(ACE) + RtlLengthSid(PrimaryToken->UserAndGroups->Sid));
+
+ TokenDacl = ExAllocatePoolWithTag(PagedPool, AclLength, TAG_ACL);
+ if (TokenDacl == NULL)
+ {
+ return STATUS_INSUFFICIENT_RESOURCES;
+ }
+
+ RtlCreateAcl(TokenDacl, AclLength, ACL_REVISION);
+ RtlAddAccessAllowedAce(TokenDacl, ACL_REVISION, GENERIC_ALL,
+ Token->UserAndGroups->Sid);
+ RtlAddAccessAllowedAce(TokenDacl, ACL_REVISION, GENERIC_ALL,
+ PrimaryToken->UserAndGroups->Sid);
+ RtlAddAccessAllowedAce(TokenDacl, ACL_REVISION, GENERIC_ALL,
+ SeAliasAdminsSid);
+ RtlAddAccessAllowedAce(TokenDacl, ACL_REVISION, GENERIC_ALL,
+ SeLocalSystemSid);
+
+ /* FIXME */
+#if 0
+ if (Token->RestrictedSids != NULL || PrimaryToken->RestrictedSids != NULL)
+ {
+ RtlAddAccessAllowedAce(TokenDacl, ACL_REVISION, GENERIC_ALL,
+ SeRestrictedCodeSid);
+ }
+#endif
+
+ return STATUS_SUCCESS;
+}
+
/* EOF */
reactos/ntoskrnl/se
diff -u -r1.42 -r1.42.2.1
--- token.c 22 Oct 2004 20:48:00 -0000 1.42
+++ token.c 13 Dec 2004 09:39:15 -0000 1.42.2.1
@@ -1,4 +1,4 @@
-/* $Id: token.c,v 1.42 2004/10/22 20:48:00 ekohl Exp $
+/* $Id: token.c,v 1.42.2.1 2004/12/13 09:39:15 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -133,9 +133,9 @@
NTSTATUS
SepDuplicateToken(PACCESS_TOKEN Token,
POBJECT_ATTRIBUTES ObjectAttributes,
+ BOOLEAN EffectiveOnly,
TOKEN_TYPE TokenType,
SECURITY_IMPERSONATION_LEVEL Level,
- SECURITY_IMPERSONATION_LEVEL ExistingLevel,
KPROCESSOR_MODE PreviousMode,
PACCESS_TOKEN* NewAccessToken)
{
@@ -281,9 +281,9 @@
Status = SepDuplicateToken(pParentToken,
&ObjectAttributes,
+ FALSE,
TokenPrimary,
pParentToken->ImpersonationLevel,
- pParentToken->ImpersonationLevel,
KernelMode,
&pNewToken);
if ( ! NT_SUCCESS(Status) )
@@ -307,10 +307,12 @@
return STATUS_NOT_IMPLEMENTED;
}
-NTSTATUS SeCopyClientToken(PACCESS_TOKEN Token,
- SECURITY_IMPERSONATION_LEVEL Level,
- KPROCESSOR_MODE PreviousMode,
- PACCESS_TOKEN* NewToken)
+NTSTATUS
+STDCALL
+SeCopyClientToken(PACCESS_TOKEN Token,
+ SECURITY_IMPERSONATION_LEVEL Level,
+ KPROCESSOR_MODE PreviousMode,
+ PACCESS_TOKEN* NewToken)
{
NTSTATUS Status;
OBJECT_ATTRIBUTES ObjectAttributes;
@@ -322,8 +324,8 @@
NULL);
Status = SepDuplicateToken(Token,
&ObjectAttributes,
- 0,
- SecurityIdentification,
+ FALSE,
+ TokenImpersonation,
Level,
PreviousMode,
NewToken);
@@ -968,7 +970,7 @@
NtDuplicateToken(IN HANDLE ExistingTokenHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
+ IN BOOLEAN EffectiveOnly,
IN TOKEN_TYPE TokenType,
OUT PHANDLE NewTokenHandle)
{
@@ -976,7 +978,6 @@
PACCESS_TOKEN Token;
PACCESS_TOKEN NewToken;
NTSTATUS Status;
- ULONG ExistingImpersonationLevel;
PreviousMode = KeGetPreviousMode();
Status = ObReferenceObjectByHandle(ExistingTokenHandle,
@@ -991,12 +992,11 @@
return Status;
}
- ExistingImpersonationLevel = Token->ImpersonationLevel;
Status = SepDuplicateToken(Token,
ObjectAttributes,
+ EffectiveOnly,
TokenType,
- ImpersonationLevel,
- ExistingImpersonationLevel,
+ ObjectAttributes->SecurityQualityOfService->ImpersonationLevel,
PreviousMode,
&NewToken);
@@ -1748,4 +1748,149 @@
}
+/*
+ * @implemented
+ */
+NTSTATUS
+STDCALL
+NtOpenThreadTokenEx(IN HANDLE ThreadHandle,
+ IN ACCESS_MASK DesiredAccess,
+ IN BOOLEAN OpenAsSelf,
+ IN ULONG HandleAttributes,
+ OUT PHANDLE TokenHandle)
+{
+ PETHREAD Thread;
+ PACCESS_TOKEN Token, NewToken, PrimaryToken;
+ BOOLEAN CopyOnOpen, EffectiveOnly;
+ SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
+ SE_IMPERSONATION_STATE ImpersonationState;
+ OBJECT_ATTRIBUTES ObjectAttributes;
+ SECURITY_DESCRIPTOR SecurityDescriptor;
+ PACL Dacl = NULL;
+ NTSTATUS Status;
+
+ /*
+ * At first open the thread token for information access and verify
+ * that the token associated with thread is valid.
+ */
+
+ Status = ObReferenceObjectByHandle(ThreadHandle, THREAD_QUERY_INFORMATION,
+ PsThreadType, UserMode, (PVOID*)&Thread,
+ NULL);
+ if (!NT_SUCCESS(Status))
+ {
+ return Status;
+ }
+
+ Token = PsReferenceImpersonationToken(Thread, &CopyOnOpen, &EffectiveOnly,
+ &ImpersonationLevel);
+ if (Token == NULL)
+ {
+ ObfDereferenceObject(Thread);
+ return STATUS_NO_TOKEN;
+ }
+
+ ObDereferenceObject(Thread);
+
+ if (ImpersonationLevel == SecurityAnonymous)
+ {
+ ObfDereferenceObject(Token);
+ return STATUS_CANT_OPEN_ANONYMOUS;
+ }
+
+ /*
+ * Revert to self if OpenAsSelf is specified.
+ */
+
+ if (OpenAsSelf)
+ {
+ PsDisableImpersonation(PsGetCurrentThread(), &ImpersonationState);
+ }
+
+ if (CopyOnOpen)
+ {
+ Status = ObReferenceObjectByHandle(ThreadHandle, THREAD_ALL_ACCESS,
+ PsThreadType, UserMode,
+ (PVOID*)&Thread, NULL);
+ if (!NT_SUCCESS(Status))
+ {
+ ObfDereferenceObject(Token);
+ if (OpenAsSelf)
+ {
+ PsRestoreImpersonation(PsGetCurrentThread(), &ImpersonationState);
+ }
+ return Status;
+ }
+
+ PrimaryToken = PsReferencePrimaryToken(Thread->ThreadsProcess);
+ Status = SepCreateImpersonationTokenDacl(Token, PrimaryToken, &Dacl);
+ ObfDereferenceObject(PrimaryToken);
+ ObfDereferenceObject(Thread);
+ if (!NT_SUCCESS(Status))
+ {
+ ObfDereferenceObject(Token);
+ if (OpenAsSelf)
+ {
+ PsRestoreImpersonation(PsGetCurrentThread(), &ImpersonationState);
+ }
+ return Status;
+ }
+
+ RtlCreateSecurityDescriptor(&SecurityDescriptor,
+ SECURITY_DESCRIPTOR_REVISION);
+ RtlSetDaclSecurityDescriptor(&SecurityDescriptor, TRUE, Dacl,
+ FALSE);
+
+ InitializeObjectAttributes(&ObjectAttributes, NULL, HandleAttributes,
+ NULL, &SecurityDescriptor);
+
+ Status = SepDuplicateToken(Token, &ObjectAttributes, EffectiveOnly,
+ TokenImpersonation, ImpersonationLevel,
+ KernelMode, &NewToken);
+ ExFreePool(Dacl);
+ if (!NT_SUCCESS(Status))
+ {
+ ObfDereferenceObject(Token);
+ if (OpenAsSelf)
+ {
+ PsRestoreImpersonation(PsGetCurrentThread(), &ImpersonationState);
+ }
+ return Status;
+ }
+
+ Status = ObInsertObject(NewToken, NULL, DesiredAccess, 0, NULL,
+ TokenHandle);
+
+ ObfDereferenceObject(NewToken);
+ }
+ else
+ {
+ Status = ObOpenObjectByPointer(Token, HandleAttributes,
+ NULL, DesiredAccess, SepTokenObjectType,
+ ExGetPreviousMode(), TokenHandle);
+ }
+
+ ObfDereferenceObject(Token);
+
+ if (OpenAsSelf)
+ {
+ PsRestoreImpersonation(PsGetCurrentThread(), &ImpersonationState);
+ }
+
+ return Status;
+}
+
+/*
+ * @implemented
+ */
+NTSTATUS STDCALL
+NtOpenThreadToken(IN HANDLE ThreadHandle,
+ IN ACCESS_MASK DesiredAccess,
+ IN BOOLEAN OpenAsSelf,
+ OUT PHANDLE TokenHandle)
+{
+ return NtOpenThreadTokenEx(ThreadHandle, DesiredAccess, OpenAsSelf, 0,
+ TokenHandle);
+}
+
/* EOF */
reactos/subsys/csrss/win32csr
diff -u -r1.11.2.1 -r1.11.2.2
--- desktopbg.c 8 Dec 2004 21:57:38 -0000 1.11.2.1
+++ desktopbg.c 13 Dec 2004 09:39:15 -0000 1.11.2.2
@@ -1,4 +1,4 @@
-/* $Id: desktopbg.c,v 1.11.2.1 2004/12/08 21:57:38 hyperion Exp $
+/* $Id: desktopbg.c,v 1.11.2.2 2004/12/13 09:39:15 hyperion Exp $
*
* reactos/subsys/csrss/win32csr/desktopbg.c
*
reactos/subsys/csrss/win32csr
diff -u -r1.22.2.1 -r1.22.2.2
--- guiconsole.c 8 Dec 2004 21:57:38 -0000 1.22.2.1
+++ guiconsole.c 13 Dec 2004 09:39:15 -0000 1.22.2.2
@@ -1,4 +1,4 @@
-/* $Id: guiconsole.c,v 1.22.2.1 2004/12/08 21:57:38 hyperion Exp $
+/* $Id: guiconsole.c,v 1.22.2.2 2004/12/13 09:39:15 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/subsys/system/explorer
diff -u -r1.8 -r1.8.26.1
--- Doxyfile 14 Dec 2003 10:50:45 -0000 1.8
+++ Doxyfile 13 Dec 2004 09:39:16 -0000 1.8.26.1
@@ -1,213 +1,1169 @@
-# Doxyfile 1.3.5
+# Doxyfile 1.3.9.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
PROJECT_NAME = "ROS Explorer"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
PROJECT_NUMBER =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
OUTPUT_DIRECTORY = doxy-doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of source
+# files, where putting all generated files in the same directory would otherwise
+# cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish,
+# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese,
+# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,
+# Swedish, and Ukrainian.
+
OUTPUT_LANGUAGE = English
+
+# This tag can be used to specify the encoding used in the generated output.
+# The encoding is not always determined by the language that is chosen,
+# but also whether or not the output is meant for Windows or non-Windows users.
+# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
+# forces the Windows encoding (this is the default for the Windows binary),
+# whereas setting the tag to NO uses a Unix-style encoding (the default for
+# all platforms other than Windows).
+
USE_WINDOWS_ENCODING = YES
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is used
+# as the annotated text. Otherwise, the brief description is used as-is. If left
+# blank, the following values are used ("$name" is automatically replaced with the
+# name of the entity): "The $name class" "The $name widget" "The $name file"
+# "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
+# members of a class in the documentation of that class as if those members were
+# ordinary class members. Constructors, destructors and assignment operators of
+# the base classes will not be shown.
+
INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
FULL_PATH_NAMES = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like the Qt-style comments (thus requiring an
+# explicit @brief command for a brief description.
+
JAVADOC_AUTOBRIEF = YES
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member
+# documentation.
+
DETAILS_AT_TOP = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
INHERIT_DOCS = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
DISTRIBUTE_GROUP_DOC = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
+# only. Doxygen will then generate output that is more tailored for Java.
+# For instance, namespaces will be presented as packages, qualified scopes
+# will look different, etc.
+
OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
SUBGROUPING = YES
+
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
SHOW_INCLUDE_FILES = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation.
+
+SHOW_DIRECTORIES = YES
+
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
WARNINGS = NO
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
WARN_IF_UNDOCUMENTED = NO
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
WARN_IF_DOC_ERROR = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text.
+
WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
WARN_LOGFILE =
+
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
INPUT = . \
desktop \
dialogs \
shell \
taskbar \
utility
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
+# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
+
FILE_PATTERNS = *.cpp \
*.c \
*.hpp \
*.h
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
+# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+
EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+
EXCLUDE_PATTERNS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
FILTER_SOURCE_FILES = NO
+
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
INLINE_SOURCES = YES
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# then for each documented function all documented
+# functions referencing it will be listed.
+
REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default)
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
REFERENCES_RELATION = YES
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
VERBATIM_HEADERS = YES
+
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
ALPHABETICAL_INDEX = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
IGNORE_PREFIX =
+
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
HTML_FOOTER = doxy-footer.html
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
HTML_ALIGN_MEMBERS = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# of the generated HTML documentation.
+
GENERATE_HTMLHELP = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
TOC_EXPAND = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
ENUM_VALUES_PER_LINE = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
+# probably better off using the HTML help feature.
+
GENERATE_TREEVIEW = YES
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
TREEVIEW_WIDTH = 240
+
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
PDF_HYPERLINKS = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
USE_PDFLATEX = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
LATEX_HIDE_INDICES = NO
+
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
COMPACT_RTF = YES
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
RTF_HYPERLINKS = YES
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
RTF_EXTENSIONS_FILE =
+
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
MAN_LINKS = NO
+
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
GENERATE_AUTOGEN_DEF = NO
+
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
PERLMOD_MAKEVAR_PREFIX =
+
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
PREDEFINED = __cplusplus
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse the
+# parser if not removed.
+
SKIP_FUNCTION_MACROS = YES
+
#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
+# Configuration::additions related to external references
#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
[truncated at 1000 lines; 176 more skipped]
reactos/subsys/system/explorer
diff -u -r1.7 -r1.7.24.1
--- Doxyfile-all 25 Jan 2004 11:55:58 -0000 1.7
+++ Doxyfile-all 13 Dec 2004 09:39:16 -0000 1.7.24.1
@@ -1,213 +1,1169 @@
-# Doxyfile 1.3.5
+# Doxyfile 1.3.9.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
PROJECT_NAME = "ROS Explorer"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
PROJECT_NUMBER =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
OUTPUT_DIRECTORY = doxy-doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of source
+# files, where putting all generated files in the same directory would otherwise
+# cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish,
+# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese,
+# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,
+# Swedish, and Ukrainian.
+
OUTPUT_LANGUAGE = English
+
+# This tag can be used to specify the encoding used in the generated output.
+# The encoding is not always determined by the language that is chosen,
+# but also whether or not the output is meant for Windows or non-Windows users.
+# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
+# forces the Windows encoding (this is the default for the Windows binary),
+# whereas setting the tag to NO uses a Unix-style encoding (the default for
+# all platforms other than Windows).
+
USE_WINDOWS_ENCODING = YES
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is used
+# as the annotated text. Otherwise, the brief description is used as-is. If left
+# blank, the following values are used ("$name" is automatically replaced with the
+# name of the entity): "The $name class" "The $name widget" "The $name file"
+# "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
+# members of a class in the documentation of that class as if those members were
+# ordinary class members. Constructors, destructors and assignment operators of
+# the base classes will not be shown.
+
INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
FULL_PATH_NAMES = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like the Qt-style comments (thus requiring an
+# explicit @brief command for a brief description.
+
JAVADOC_AUTOBRIEF = YES
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member
+# documentation.
+
DETAILS_AT_TOP = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
INHERIT_DOCS = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
DISTRIBUTE_GROUP_DOC = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
+# only. Doxygen will then generate output that is more tailored for Java.
+# For instance, namespaces will be presented as packages, qualified scopes
+# will look different, etc.
+
OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
SUBGROUPING = YES
+
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
SHOW_INCLUDE_FILES = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation.
+
+SHOW_DIRECTORIES = YES
+
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
QUIET = YES
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
WARNINGS = NO
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
WARN_IF_UNDOCUMENTED = NO
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
WARN_IF_DOC_ERROR = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text.
+
WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
WARN_LOGFILE =
+
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
INPUT = . \
desktop \
dialogs \
shell \
taskbar \
utility
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
+# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
+
FILE_PATTERNS = *.cpp \
*.c \
*.hpp \
*.h
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
+# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+
EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+
EXCLUDE_PATTERNS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
FILTER_SOURCE_FILES = NO
+
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
INLINE_SOURCES = YES
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# then for each documented function all documented
+# functions referencing it will be listed.
+
REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default)
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
REFERENCES_RELATION = YES
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
VERBATIM_HEADERS = YES
+
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
ALPHABETICAL_INDEX = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
IGNORE_PREFIX =
+
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
HTML_FOOTER = doxy-footer.html
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
HTML_ALIGN_MEMBERS = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# of the generated HTML documentation.
+
GENERATE_HTMLHELP = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
TOC_EXPAND = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
ENUM_VALUES_PER_LINE = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
+# probably better off using the HTML help feature.
+
GENERATE_TREEVIEW = YES
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
TREEVIEW_WIDTH = 240
+
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
PDF_HYPERLINKS = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
USE_PDFLATEX = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
LATEX_HIDE_INDICES = NO
+
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
RTF_OUTPUT = rtf
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = YES
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = YES
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
RTF_EXTENSIONS_FILE =
+
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
MAN_LINKS = NO
+
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
GENERATE_AUTOGEN_DEF = NO
+
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
PERLMOD_MAKEVAR_PREFIX =
+
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
PREDEFINED = __cplusplus
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse the
+# parser if not removed.
+
SKIP_FUNCTION_MACROS = YES
+
#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
+# Configuration::additions related to external references
#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
[truncated at 1000 lines; 178 more skipped]
reactos/subsys/system/winlogon
diff -u -r1.4.8.1 -r1.4.8.2
--- winlogon.h 8 Dec 2004 21:57:39 -0000 1.4.8.1
+++ winlogon.h 13 Dec 2004 09:39:16 -0000 1.4.8.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: winlogon.h,v 1.4.8.1 2004/12/08 21:57:39 hyperion Exp $
+/* $Id: winlogon.h,v 1.4.8.2 2004/12/13 09:39:16 hyperion Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS winlogon
* FILE: subsys/system/winlogon/winlogon.h
reactos/subsys/win32k/eng
diff -u -r1.58 -r1.58.10.1
--- bitblt.c 14 Jul 2004 20:48:57 -0000 1.58
+++ bitblt.c 13 Dec 2004 09:39:16 -0000 1.58.10.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: bitblt.c,v 1.58 2004/07/14 20:48:57 navaraf Exp $
+/* $Id: bitblt.c,v 1.58.10.1 2004/12/13 09:39:16 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -91,6 +91,7 @@
PGDIBRUSHINST GdiBrush = NULL;
HBITMAP PatternSurface = NULL;
SURFOBJ *PatternObj = NULL;
+ PBITMAPOBJ PatternBitmap;
ULONG PatternWidth = 0, PatternHeight = 0, PatternY = 0;
if (Mask == NULL)
@@ -103,8 +104,6 @@
if (Brush->iSolidColor == 0xFFFFFFFF)
{
- PBITMAPOBJ PatternBitmap;
-
GdiBrush = CONTAINING_RECORD(
Brush,
GDIBRUSHINST,
@@ -112,11 +111,15 @@
PatternSurface = GdiBrush->GdiBrushObject->hbmPattern;
PatternBitmap = BITMAPOBJ_LockBitmap(GdiBrush->GdiBrushObject->hbmPattern);
-
- PatternObj = &PatternBitmap->SurfObj;
- PatternWidth = PatternObj->sizlBitmap.cx;
- PatternHeight = PatternObj->sizlBitmap.cy;
+ if(PatternBitmap != NULL)
+ {
+ PatternObj = &PatternBitmap->SurfObj;
+ PatternWidth = PatternObj->sizlBitmap.cx;
+ PatternHeight = PatternObj->sizlBitmap.cy;
+ }
}
+ else
+ PatternBitmap = NULL;
tMask = Mask->pvScan0 + SourcePoint->y * Mask->lDelta + (SourcePoint->x >> 3);
for (j = 0; j < dy; j++)
@@ -124,14 +127,14 @@
lMask = tMask;
c8 = SourcePoint->x & 0x07;
- if(PatternSurface)
+ if(PatternBitmap != NULL)
PatternY = (DestRect->top + j) % PatternHeight;
for (i = 0; i < dx; i++)
{
if (0 != (*lMask & maskbit[c8]))
{
- if (PatternSurface == NULL)
+ if (PatternBitmap == NULL)
{
DibFunctionsForBitmapFormat[Dest->iBitmapFormat].DIB_PutPixel(
Dest, DestRect->left + i, DestRect->top + j, Brush->iSolidColor);
@@ -153,7 +156,7 @@
tMask += Mask->lDelta;
}
- if (PatternSurface != NULL)
+ if (PatternBitmap != NULL)
BITMAPOBJ_UnlockBitmap(PatternSurface);
return TRUE;
@@ -222,15 +225,25 @@
if (ROP_USES_PATTERN(Rop4) && Brush->iSolidColor == 0xFFFFFFFF)
{
GdiBrush = CONTAINING_RECORD(Brush, GDIBRUSHINST, BrushObject);
- bmPattern = BITMAPOBJ_LockBitmap(GdiBrush->GdiBrushObject->hbmPattern);
- BltInfo.PatternSurface = &bmPattern->SurfObj;
+ if((bmPattern = BITMAPOBJ_LockBitmap(GdiBrush->GdiBrushObject->hbmPattern)))
+ {
+ BltInfo.PatternSurface = &bmPattern->SurfObj;
+ }
+ else
+ {
+ /* FIXME - What to do here? */
+ }
BltInfo.XlatePatternToDest = GdiBrush->XlateObject;
}
+ else
+ {
+ bmPattern = NULL;
+ }
Result = DibFunctionsForBitmapFormat[OutputObj->iBitmapFormat].DIB_BitBlt(&BltInfo);
/* Pattern brush */
- if (ROP_USES_PATTERN(Rop4) && Brush->iSolidColor == 0xFFFFFFFF)
+ if (bmPattern != NULL)
{
BITMAPOBJ_UnlockBitmap(BltInfo.PatternSurface->hsurf);
}
@@ -741,8 +754,7 @@
if (NULL != SourceObj)
{
MouseSafetyOnDrawStart(SourceSurf, SourceRect->left, SourceRect->top,
- (SourceRect->left + abs(SourceRect->right - SourceRect->left)),
- (SourceRect->top + abs(SourceRect->bottom - SourceRect->top)));
+ SourceRect->right, SourceRect->bottom);
}
/* No success yet */
reactos/subsys/win32k/eng
diff -u -r1.22 -r1.22.18.1
--- clip.c 30 May 2004 14:01:12 -0000 1.22
+++ clip.c 13 Dec 2004 09:39:16 -0000 1.22.18.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: clip.c,v 1.22 2004/05/30 14:01:12 weiden Exp $
+/* $Id: clip.c,v 1.22.18.1 2004/12/13 09:39:16 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -28,83 +28,7 @@
*/
#include <w32k.h>
-VOID STDCALL IntEngDeleteClipRegion(CLIPOBJ *ClipObj)
-{
- HCLIP HClip = AccessHandleFromUserObject(ClipObj);
- FreeGDIHandle(HClip);
-}
-
-CLIPOBJ* STDCALL
-IntEngCreateClipRegion(ULONG count, PRECTL pRect, PRECTL rcBounds)
-{
- HCLIP hClip;
- CLIPGDI* clipInt;
- CLIPOBJ* clipUser;
-
- DPRINT("IntEngCreateClipRegion count: %d\n", count);
- if (1 < count)
- {
- hClip = (HCLIP) CreateGDIHandle(sizeof(CLIPGDI) + count * sizeof(RECTL),
- sizeof(CLIPOBJ), (PVOID*)&clipInt, (PVOID*)&clipUser);
-
- if (hClip)
- {
- RtlCopyMemory(clipInt->EnumRects.arcl, pRect, count * sizeof(RECTL));
- clipInt->EnumRects.c = count;
- clipInt->EnumOrder = CD_ANY;
-
- clipUser->iDComplexity = DC_COMPLEX;
- clipUser->iFComplexity = (count <= 4) ? FC_RECT4: FC_COMPLEX;
- clipUser->iMode = TC_RECTANGLES;
- RtlCopyMemory(&(clipUser->rclBounds), rcBounds, sizeof(RECTL));
-
- return clipUser;
- }
- }
- else
- {
- hClip = (HCLIP) CreateGDIHandle(sizeof(CLIPGDI),
- sizeof(CLIPOBJ),
- (PVOID)&clipInt, (PVOID)&clipUser);
- if (hClip)
- {
- RtlCopyMemory(clipInt->EnumRects.arcl, rcBounds, sizeof(RECTL));
- clipInt->EnumRects.c = 1;
- clipInt->EnumOrder = CD_ANY;
-
- clipUser->iDComplexity = ((rcBounds->top==rcBounds->bottom)
- && (rcBounds->left==rcBounds->right))
- ? DC_TRIVIAL : DC_RECT;
- clipUser->iFComplexity = FC_RECT;
- clipUser->iMode = TC_RECTANGLES;
- DPRINT("IntEngCreateClipRegion: iDComplexity: %d\n", clipUser->iDComplexity);
- RtlCopyMemory(&(clipUser->rclBounds), rcBounds, sizeof(RECTL));
- return clipUser;
- }
- }
-
- return NULL;
-}
-
-/*
- * @implemented
- */
-CLIPOBJ * STDCALL
-EngCreateClip(VOID)
-{
- return EngAllocMem(FL_ZERO_MEMORY, sizeof(CLIPOBJ), 0);
-}
-
-/*
- * @implemented
- */
-VOID STDCALL
-EngDeleteClip(CLIPOBJ *ClipRegion)
-{
- EngFreeMem(ClipRegion);
-}
-
-static int
+static inline int
CompareRightDown(const PRECT r1, const PRECT r2)
{
int Cmp;
@@ -117,7 +41,7 @@
{
Cmp = +1;
}
- else
+ else
{
ASSERT(r1->bottom == r2->bottom);
if (r1->left < r2->left)
@@ -138,7 +62,7 @@
return Cmp;
}
-static int
+static inline int
CompareRightUp(const PRECT r1, const PRECT r2)
{
int Cmp;
@@ -151,7 +75,7 @@
{
Cmp = -1;
}
- else
+ else
{
ASSERT(r1->top == r2->top);
if (r1->left < r2->left)
@@ -172,7 +96,7 @@
return Cmp;
}
-static int
+static inline int
CompareLeftDown(const PRECT r1, const PRECT r2)
{
int Cmp;
@@ -185,7 +109,7 @@
{
Cmp = +1;
}
- else
+ else
{
ASSERT(r1->bottom == r2->bottom);
if (r1->right < r2->right)
@@ -206,7 +130,7 @@
return Cmp;
}
-static int
+static inline int
CompareLeftUp(const PRECT r1, const PRECT r2)
{
int Cmp;
@@ -219,7 +143,7 @@
{
Cmp = -1;
}
- else
+ else
{
ASSERT(r1->top == r2->top);
if (r1->right < r2->right)
@@ -240,6 +164,122 @@
return Cmp;
}
+static inline int
+CompareSpans(const PSPAN Span1, const PSPAN Span2)
+{
+ int Cmp;
+
+ if (Span1->Y < Span2->Y)
+ {
+ Cmp = -1;
+ }
+ else if (Span2->Y < Span1->Y)
+ {
+ Cmp = +1;
+ }
+ else
+ {
+ if (Span1->X < Span2->X)
+ {
+ Cmp = -1;
+ }
+ else if (Span2->X < Span1->X)
+ {
+ Cmp = +1;
+ }
+ else
+ {
+ Cmp = 0;
+ }
+ }
+
+ return Cmp;
+}
+
+VOID FASTCALL
+IntEngDeleteClipRegion(CLIPOBJ *ClipObj)
+{
+ EngFreeMem(ObjToGDI(ClipObj, CLIP));
+}
+
+CLIPOBJ* FASTCALL
+IntEngCreateClipRegion(ULONG count, PRECTL pRect, PRECTL rcBounds)
+{
+ CLIPGDI *Clip;
+
+ if(count > 1)
+ {
+ RECTL *dest;
+
+ Clip = EngAllocMem(0, sizeof(CLIPGDI) + ((count - 1) * sizeof(RECTL)), TAG_CLIPOBJ);
+
+ if(Clip != NULL)
+ {
+ Clip->EnumRects.c = count;
+ Clip->EnumOrder = CD_ANY;
+ for(dest = Clip->EnumRects.arcl;
+ count > 0;
+ count--, dest++, pRect++)
+ {
+ *dest = *pRect;
+ }
+
+ Clip->ClipObj.iDComplexity = DC_COMPLEX;
+ Clip->ClipObj.iFComplexity = ((Clip->EnumRects.c <= 4) ? FC_RECT4 : FC_COMPLEX);
+ Clip->ClipObj.iMode = TC_RECTANGLES;
+ Clip->ClipObj.rclBounds = *rcBounds;
+
+ return GDIToObj(Clip, CLIP);
+ }
+ }
+ else
+ {
+ Clip = EngAllocMem(0, sizeof(CLIPGDI), TAG_CLIPOBJ);
+
+ if(Clip != NULL)
+ {
+ Clip->EnumRects.c = 1;
+ Clip->EnumOrder = CD_ANY;
+ Clip->EnumRects.arcl[0] = *rcBounds;
+
+ Clip->ClipObj.iDComplexity = (((rcBounds->top == rcBounds->bottom) &&
+ (rcBounds->left == rcBounds->right))
+ ? DC_TRIVIAL : DC_RECT);
+ Clip->ClipObj.iFComplexity = FC_RECT;
+ Clip->ClipObj.iMode = TC_RECTANGLES;
+ Clip->ClipObj.rclBounds = *rcBounds;
+
+ return GDIToObj(Clip, CLIP);
+ }
+ }
+
+ return NULL;
+}
+
+/*
+ * @implemented
+ */
+CLIPOBJ * STDCALL
+EngCreateClip(VOID)
+{
+ CLIPGDI *Clip = EngAllocMem(FL_ZERO_MEMORY, sizeof(CLIPOBJ), TAG_CLIPOBJ);
+ if(Clip != NULL)
+ {
+ return GDIToObj(Clip, CLIP);
+ }
+
+ return NULL;
+}
+
+/*
+ * @implemented
+ */
+VOID STDCALL
+EngDeleteClip(CLIPOBJ *ClipRegion)
+{
+ EngFreeMem(ObjToGDI(ClipRegion, CLIP));
+}
+
/*
* @implemented
*/
@@ -250,7 +290,7 @@
IN ULONG BuildOrder,
IN ULONG MaxRects)
{
- CLIPGDI *ClipGDI = (CLIPGDI*)AccessInternalObjectFromUserObject(ClipObj);
+ CLIPGDI *ClipGDI = ObjToGDI(ClipObj, CLIP);
SORTCOMP CompareFunc;
ClipGDI->EnumPos = 0;
@@ -305,8 +345,9 @@
IN ULONG ObjSize,
OUT ULONG *EnumRects)
{
- CLIPGDI *ClipGDI = (CLIPGDI*)AccessInternalObjectFromUserObject(ClipObj);
- ULONG nCopy;
+ RECTL *dest, *src;
+ CLIPGDI *ClipGDI = ObjToGDI(ClipObj, CLIP);
+ ULONG nCopy, i;
ENUMRECTS* pERects = (ENUMRECTS*)EnumRects;
//calculate how many rectangles we should copy
@@ -317,8 +358,16 @@
{
return FALSE;
}
- RtlCopyMemory( pERects->arcl, ClipGDI->EnumRects.arcl + ClipGDI->EnumPos,
- nCopy * sizeof(RECTL) );
+
+ /* copy rectangles */
+ src = ClipGDI->EnumRects.arcl + ClipGDI->EnumPos;
+ for(i = 0, dest = pERects->arcl;
+ i < nCopy;
+ i++, dest++, src++)
+ {
+ *dest = *src;
+ }
+
pERects->c = nCopy;
ClipGDI->EnumPos+=nCopy;
@@ -326,38 +375,6 @@
return ClipGDI->EnumPos < ClipGDI->EnumRects.c;
}
-static int
-CompareSpans(const PSPAN Span1, const PSPAN Span2)
-{
- int Cmp;
-
- if (Span1->Y < Span2->Y)
- {
- Cmp = -1;
- }
- else if (Span2->Y < Span1->Y)
- {
- Cmp = +1;
- }
- else
- {
- if (Span1->X < Span2->X)
- {
- Cmp = -1;
- }
- else if (Span2->X < Span1->X)
- {
- Cmp = +1;
- }
- else
- {
- Cmp = 0;
- }
- }
-
- return Cmp;
-}
-
BOOLEAN FASTCALL
ClipobjToSpans(PSPAN *Spans, UINT *Count, CLIPOBJ *ClipRegion, PRECTL Boundary)
{
@@ -418,7 +435,14 @@
}
if (0 != *Count)
{
- RtlCopyMemory(NewSpans, *Spans, *Count * sizeof(SPAN));
+ PSPAN dest, src;
+ UINT i = *Count;
+ for(dest = NewSpans, src = *Spans;
+ i > 0;
+ i--)
+ {
+ *dest++ = *src++;
+ }
ExFreePool(*Spans);
}
*Spans = NewSpans;
reactos/subsys/win32k/eng
diff -u -r1.11 -r1.11.2.1
--- gradient.c 15 Nov 2004 23:10:41 -0000 1.11
+++ gradient.c 13 Dec 2004 09:39:16 -0000 1.11.2.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: gradient.c,v 1.11 2004/11/15 23:10:41 gvg Exp $
+/* $Id: gradient.c,v 1.11.2.1 2004/12/13 09:39:16 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -529,9 +529,14 @@
{
BOOL Ret;
SURFOBJ *psoDest = &pboDest->SurfObj;
+ ASSERT(psoDest);
- MouseSafetyOnDrawStart(psoDest, pco->rclBounds.left, pco->rclBounds.top,
- pco->rclBounds.right, pco->rclBounds.bottom);
+ MouseSafetyOnDrawStart(
+ psoDest,
+ pco->rclBounds.left,
+ pco->rclBounds.top,
+ pco->rclBounds.right,
+ pco->rclBounds.bottom);
if((psoDest->iType != STYPE_BITMAP) && (pboDest->flHooks & HOOK_GRADIENTFILL))
{
Ret = GDIDEVFUNCS(psoDest).GradientFill(
reactos/subsys/win32k/eng
diff -u -r1.77 -r1.77.8.1
--- mouse.c 30 Jul 2004 09:42:11 -0000 1.77
+++ mouse.c 13 Dec 2004 09:39:16 -0000 1.77.8.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: mouse.c,v 1.77 2004/07/30 09:42:11 weiden Exp $
+/* $Id: mouse.c,v 1.77.8.1 2004/12/13 09:39:16 hyperion Exp $
*
* PROJECT: ReactOS kernel
* PURPOSE: Mouse
@@ -30,64 +30,7 @@
/* FUNCTIONS *****************************************************************/
-BOOL FASTCALL
-IntIsPrimarySurface(SURFOBJ *SurfObj);
-
-VOID FASTCALL
-EnableMouse(HDC hDisplayDC)
-{
- PDC dc;
- BITMAPOBJ *BitmapObj;
- GDIDEVICE *GdiDev;
- PSYSTEM_CURSORINFO CurInfo = IntGetSysCursorInfo(InputWindowStation);
-
- if( hDisplayDC && InputWindowStation)
- {
- if(!IntGetWindowStationObject(InputWindowStation))
- {
- CurInfo->Enabled = FALSE;
- return;
- }
-
- dc = DC_LockDc(hDisplayDC);
- ASSERT(dc);
- BitmapObj = BITMAPOBJ_LockBitmap(dc->w.hBitmap);
- ASSERT(BitmapObj);
-
- /* Move the cursor to the screen center */
- DPRINT("Setting Cursor up at 0x%x, 0x%x\n", SurfObj->sizlBitmap.cx / 2, SurfObj->sizlBitmap.cy / 2);
- ExAcquireFastMutex(&CurInfo->CursorMutex);
- CurInfo->x = BitmapObj->SurfObj.sizlBitmap.cx / 2;
- CurInfo->y = BitmapObj->SurfObj.sizlBitmap.cy / 2;
- ExReleaseFastMutex(&CurInfo->CursorMutex);
-
- GdiDev = GDIDEV(&BitmapObj->SurfObj);
- BITMAPOBJ_UnlockBitmap(dc->w.hBitmap);
- DC_UnlockDc( hDisplayDC );
-
- IntSetCursor(InputWindowStation, NULL, TRUE);
-
- CurInfo->Enabled = (SPS_ACCEPT_EXCLUDE == GdiDev->PointerStatus ||
- SPS_ACCEPT_NOEXCLUDE == GdiDev->PointerStatus);
-
- IntLoadDefaultCursors();
-
- ObDereferenceObject(InputWindowStation);
- }
- else
- {
- if(IntGetWindowStationObject(InputWindowStation))
- {
- IntSetCursor(InputWindowStation, NULL, TRUE);
- CurInfo->Enabled = FALSE;
- CurInfo->CursorClipInfo.IsClipped = FALSE;
- ObDereferenceObject(InputWindowStation);
- return;
- }
- }
-}
-
-INT FASTCALL
+INT INTERNAL_CALL
MouseSafetyOnDrawStart(SURFOBJ *SurfObj, LONG HazardX1,
LONG HazardY1, LONG HazardX2, LONG HazardY2)
/*
@@ -96,45 +39,25 @@
*/
{
LONG tmp;
- PSYSTEM_CURSORINFO CurInfo;
- BOOL MouseEnabled = FALSE;
- PCURICON_OBJECT Cursor;
+ GDIDEVICE *ppdev;
+ GDIPOINTER *pgp;
+ ASSERT(SurfObj != NULL);
- /* Mouse is not allowed to move if GDI is busy drawing */
-
- if(IntGetWindowStationObject(InputWindowStation))
- {
- CurInfo = IntGetSysCursorInfo(InputWindowStation);
-
- MouseEnabled = CurInfo->Enabled && CurInfo->ShowingCursor;
- }
- else
- return FALSE;
-
- if (SurfObj == NULL)
- {
- ObDereferenceObject(InputWindowStation);
- return(FALSE);
- }
- if (!IntIsPrimarySurface(SurfObj) || MouseEnabled == FALSE)
+ ppdev = GDIDEV(SurfObj);
+
+ if(ppdev == NULL)
{
- ObDereferenceObject(InputWindowStation);
return(FALSE);
}
+
+ pgp = &ppdev->Pointer;
- if (SPS_ACCEPT_NOEXCLUDE == GDIDEV(SurfObj)->PointerStatus)
+ if (SPS_ACCEPT_NOEXCLUDE == pgp->Status ||
+ pgp->Exclude.right == -1)
{
- /* Hardware cursor, no need to remove it */
- ObDereferenceObject(InputWindowStation);
return(FALSE);
}
-
- if(!(Cursor = CurInfo->CurrentCursorObject))
- {
- ObDereferenceObject(InputWindowStation);
- return(FALSE);
- }
if (HazardX1 > HazardX2)
{
@@ -145,182 +68,173 @@
tmp = HazardY2; HazardY2 = HazardY1; HazardY1 = tmp;
}
- if (CurInfo->PointerRectRight >= HazardX1
- && CurInfo->PointerRectLeft <= HazardX2
- && CurInfo->PointerRectBottom >= HazardY1
- && CurInfo->PointerRectTop <= HazardY2)
+ if (pgp->Exclude.right >= HazardX1
+ && pgp->Exclude.left <= HazardX2
+ && pgp->Exclude.bottom >= HazardY1
+ && pgp->Exclude.top <= HazardY2)
{
- /* Mouse is not allowed to move if GDI is busy drawing */
- ExAcquireFastMutex(&CurInfo->CursorMutex);
- if (0 != CurInfo->SafetyRemoveCount++)
+ if (0 != pgp->SafetyRemoveCount++)
{
- /* Was already removed */
- ExReleaseFastMutex(&CurInfo->CursorMutex);
- ObDereferenceObject(InputWindowStation);
return FALSE;
}
- CurInfo->SafetySwitch = TRUE;
- if (GDIDEVFUNCS(SurfObj).MovePointer)
- GDIDEVFUNCS(SurfObj).MovePointer(SurfObj, -1, -1, NULL);
+ pgp->SafetySwitch = TRUE;
+ if (pgp->MovePointer)
+ pgp->MovePointer(SurfObj, -1, -1, NULL);
else
- EngMovePointer(SurfObj, -1, -1, NULL);
- ExReleaseFastMutex(&CurInfo->CursorMutex);
+ EngMovePointer(SurfObj, -1, -1, NULL);
}
-
- ObDereferenceObject(InputWindowStation);
- return(TRUE);
-}
-VOID FASTCALL
-SetPointerRect(PSYSTEM_CURSORINFO CurInfo, PRECTL PointerRect)
-{
- CurInfo->PointerRectLeft = PointerRect->left;
- CurInfo->PointerRectRight = PointerRect->right;
- CurInfo->PointerRectTop = PointerRect->top;
- CurInfo->PointerRectBottom = PointerRect->bottom;
+ return(TRUE);
}
-INT FASTCALL
+INT INTERNAL_CALL
MouseSafetyOnDrawEnd(SURFOBJ *SurfObj)
/*
* FUNCTION: Notify the mouse driver that drawing has finished on a surface.
*/
{
- PSYSTEM_CURSORINFO CurInfo;
- BOOL MouseEnabled = FALSE;
- RECTL PointerRect;
-
- if(IntGetWindowStationObject(InputWindowStation))
- {
- CurInfo = IntGetSysCursorInfo(InputWindowStation);
- }
- else
- return FALSE;
-
- ExAcquireFastMutex(&CurInfo->CursorMutex);
- if(SurfObj == NULL)
- {
- ExReleaseFastMutex(&CurInfo->CursorMutex);
- ObDereferenceObject(InputWindowStation);
- return FALSE;
- }
+ GDIDEVICE *ppdev;
+ GDIPOINTER *pgp;
+
+ ASSERT(SurfObj != NULL);
+
+ ppdev = GDIDEV(SurfObj);
- MouseEnabled = CurInfo->Enabled && CurInfo->ShowingCursor;
- if (!IntIsPrimarySurface(SurfObj) || MouseEnabled == FALSE)
+ if(ppdev == NULL)
{
- ExReleaseFastMutex(&CurInfo->CursorMutex);
- ObDereferenceObject(InputWindowStation);
return(FALSE);
}
- if (SPS_ACCEPT_NOEXCLUDE == GDIDEV(SurfObj)->PointerStatus)
- {
- /* Hardware cursor, it wasn't removed so need to restore it */
- ExReleaseFastMutex(&CurInfo->CursorMutex);
- ObDereferenceObject(InputWindowStation);
- return(FALSE);
- }
-
- if (CurInfo->SafetySwitch)
+ pgp = &ppdev->Pointer;
+
+ if(SPS_ACCEPT_NOEXCLUDE == pgp->Status ||
+ pgp->Exclude.right == -1)
+ {
+ return FALSE;
+ }
+
+ if (pgp->SafetySwitch)
{
- if (1 < CurInfo->SafetyRemoveCount--)
+ if (1 < pgp->SafetyRemoveCount--)
{
/* Someone else removed it too, let them restore it */
- ExReleaseFastMutex(&CurInfo->CursorMutex);
- ObDereferenceObject(InputWindowStation);
return FALSE;
}
- if (GDIDEVFUNCS(SurfObj).MovePointer)
- GDIDEVFUNCS(SurfObj).MovePointer(SurfObj, CurInfo->x, CurInfo->y, &PointerRect);
+ /* FIXME - this is wrong!!!!!! we must NOT access pgp->Pos from here, it's
+ a private field for ENG/driver. This will paint the cursor to the
+ wrong screen coordinates when a driver overrides DrvMovePointer()!
+ We should store the coordinates before calling Drv/EngMovePointer()
+ and Drv/EngSetPointerShape() separately in the GDIDEVICE structure
+ or somewhere where ntuser can access it! */
+ if (pgp->MovePointer)
+ pgp->MovePointer(SurfObj, pgp->Pos.x, pgp->Pos.y, &pgp->Exclude);
else
- EngMovePointer(SurfObj, CurInfo->x, CurInfo->y, &PointerRect);
- SetPointerRect(CurInfo, &PointerRect);
- CurInfo->SafetySwitch = FALSE;
+ EngMovePointer(SurfObj, pgp->Pos.x, pgp->Pos.y, &pgp->Exclude);
+ pgp->SafetySwitch = FALSE;
}
- ExReleaseFastMutex(&CurInfo->CursorMutex);
- ObDereferenceObject(InputWindowStation);
return(TRUE);
}
/* SOFTWARE MOUSE POINTER IMPLEMENTATION **************************************/
-VOID FASTCALL
+VOID INTERNAL_CALL
IntHideMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface)
{
- if (ppdev->PointerAttributes.Enable == FALSE)
- {
- return;
- }
+ GDIPOINTER *pgp;
+ POINTL pt;
- ppdev->PointerAttributes.Enable = FALSE;
+ ASSERT(ppdev);
+ ASSERT(DestSurface);
- if (ppdev->PointerAttributes.Column + ppdev->PointerHotSpot.x == -1)
+ pgp = &ppdev->Pointer;
+
+ if (!pgp->Enabled)
{
return;
}
- if (ppdev->PointerSaveSurface != NULL)
+ pgp->Enabled = FALSE;
+
+ pt.x = pgp->Pos.x - pgp->HotSpot.x;
+ pt.y = pgp->Pos.y - pgp->HotSpot.y;
+
+ if (pgp->SaveSurface != NULL)
{
RECTL DestRect;
POINTL SrcPoint;
SURFOBJ *SaveSurface;
SURFOBJ *MaskSurface;
- DestRect.left = max(ppdev->PointerAttributes.Column, 0);
- DestRect.top = max(ppdev->PointerAttributes.Row, 0);
+ DestRect.left = max(pt.x, 0);
+ DestRect.top = max(pt.y, 0);
DestRect.right = min(
- ppdev->PointerAttributes.Column + ppdev->PointerAttributes.Width,
+ pt.x + pgp->Size.cx,
DestSurface->sizlBitmap.cx);
DestRect.bottom = min(
- ppdev->PointerAttributes.Row + ppdev->PointerAttributes.Height,
+ pt.y + pgp->Size.cy,
DestSurface->sizlBitmap.cy);
- SrcPoint.x = max(-ppdev->PointerAttributes.Column, 0);
- SrcPoint.y = max(-ppdev->PointerAttributes.Row, 0);
+ SrcPoint.x = max(-pt.x, 0);
+ SrcPoint.y = max(-pt.y, 0);
- SaveSurface = EngLockSurface(ppdev->PointerSaveSurface);
- MaskSurface = EngLockSurface(ppdev->PointerMaskSurface);
- EngBitBlt(DestSurface, SaveSurface, MaskSurface, NULL, NULL,
- &DestRect, &SrcPoint, &SrcPoint, NULL, NULL, SRCCOPY);
- EngUnlockSurface(MaskSurface);
- EngUnlockSurface(SaveSurface);
+ if((SaveSurface = EngLockSurface(pgp->SaveSurface)))
+ {
+ if((MaskSurface = EngLockSurface(pgp->MaskSurface)))
+ {
+ EngBitBlt(DestSurface, SaveSurface, MaskSurface, NULL, NULL,
+ &DestRect, &SrcPoint, &SrcPoint, NULL, NULL, SRCCOPY);
+ EngUnlockSurface(MaskSurface);
+ }
+ EngUnlockSurface(SaveSurface);
+ }
}
}
-VOID FASTCALL
+VOID INTERNAL_CALL
IntShowMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface)
{
- if (ppdev->PointerAttributes.Enable == TRUE)
+ GDIPOINTER *pgp;
+ SURFOBJ *SaveSurface;
+ POINTL pt;
+
+ ASSERT(ppdev);
+ ASSERT(DestSurface);
+
+ pgp = &ppdev->Pointer;
+
+ if (pgp->Enabled)
{
return;
}
- ppdev->PointerAttributes.Enable = TRUE;
+ pgp->Enabled = TRUE;
+
+ pt.x = pgp->Pos.x - pgp->HotSpot.x;
+ pt.y = pgp->Pos.y - pgp->HotSpot.y;
/*
* Copy the pixels under the cursor to temporary surface.
*/
-
- if (ppdev->PointerSaveSurface != NULL)
+
+ if (pgp->SaveSurface != NULL &&
+ (SaveSurface = EngLockSurface(pgp->SaveSurface)))
{
RECTL DestRect;
POINTL SrcPoint;
- SURFOBJ *SaveSurface;
- SrcPoint.x = max(ppdev->PointerAttributes.Column, 0);
- SrcPoint.y = max(ppdev->PointerAttributes.Row, 0);
+ SrcPoint.x = max(pt.x, 0);
+ SrcPoint.y = max(pt.y, 0);
- DestRect.left = SrcPoint.x - ppdev->PointerAttributes.Column;
- DestRect.top = SrcPoint.y - ppdev->PointerAttributes.Row;
+ DestRect.left = SrcPoint.x - pt.x;
+ DestRect.top = SrcPoint.y - pt.y;
DestRect.right = min(
- ppdev->PointerAttributes.Width,
- DestSurface->sizlBitmap.cx - ppdev->PointerAttributes.Column);
+ pgp->Size.cx,
+ DestSurface->sizlBitmap.cx - pt.x);
DestRect.bottom = min(
- ppdev->PointerAttributes.Height,
- DestSurface->sizlBitmap.cy - ppdev->PointerAttributes.Row);
+ pgp->Size.cy,
+ DestSurface->sizlBitmap.cy - pt.y);
- SaveSurface = EngLockSurface(ppdev->PointerSaveSurface);
EngBitBlt(SaveSurface, DestSurface, NULL, NULL, NULL,
&DestRect, &SrcPoint, NULL, NULL, NULL, SRCCOPY);
EngUnlockSurface(SaveSurface);
@@ -336,35 +250,40 @@
SURFOBJ *ColorSurf;
SURFOBJ *MaskSurf;
- DestRect.left = max(ppdev->PointerAttributes.Column, 0);
- DestRect.top = max(ppdev->PointerAttributes.Row, 0);
+ DestRect.left = max(pt.x, 0);
+ DestRect.top = max(pt.y, 0);
DestRect.right = min(
- ppdev->PointerAttributes.Column + ppdev->PointerAttributes.Width,
+ pt.x + pgp->Size.cx,
DestSurface->sizlBitmap.cx);
DestRect.bottom = min(
- ppdev->PointerAttributes.Row + ppdev->PointerAttributes.Height,
+ pt.y + pgp->Size.cy,
DestSurface->sizlBitmap.cy);
- SrcPoint.x = max(-ppdev->PointerAttributes.Column, 0);
- SrcPoint.y = max(-ppdev->PointerAttributes.Row, 0);
+ SrcPoint.x = max(-pt.x, 0);
+ SrcPoint.y = max(-pt.y, 0);
- MaskSurf = EngLockSurface(ppdev->PointerMaskSurface);
- if (ppdev->PointerColorSurface != NULL)
- {
- ColorSurf = EngLockSurface(ppdev->PointerColorSurface);
- EngBitBlt(DestSurface, ColorSurf, MaskSurf, NULL, ppdev->PointerXlateObject,
- &DestRect, &SrcPoint, &SrcPoint, NULL, NULL, 0xAACC);
- EngUnlockSurface(ColorSurf);
- }
- else
+ MaskSurf = EngLockSurface(pgp->MaskSurface);
+ if (MaskSurf != NULL)
{
- EngBitBlt(DestSurface, MaskSurf, NULL, NULL, ppdev->PointerXlateObject,
- &DestRect, &SrcPoint, NULL, NULL, NULL, SRCAND);
- SrcPoint.y += ppdev->PointerAttributes.Height;
- EngBitBlt(DestSurface, MaskSurf, NULL, NULL, ppdev->PointerXlateObject,
- &DestRect, &SrcPoint, NULL, NULL, NULL, SRCINVERT);
+ if (pgp->ColorSurface != NULL)
+ {
+ if((ColorSurf = EngLockSurface(pgp->ColorSurface)))
+ {
+ EngBitBlt(DestSurface, ColorSurf, MaskSurf, NULL, pgp->XlateObject,
+ &DestRect, &SrcPoint, &SrcPoint, NULL, NULL, 0xAACC);
+ EngUnlockSurface(ColorSurf);
+ }
+ }
+ else
+ {
+ EngBitBlt(DestSurface, MaskSurf, NULL, NULL, pgp->XlateObject,
+ &DestRect, &SrcPoint, NULL, NULL, NULL, SRCAND);
+ SrcPoint.y += pgp->Size.cy;
+ EngBitBlt(DestSurface, MaskSurf, NULL, NULL, pgp->XlateObject,
+ &DestRect, &SrcPoint, NULL, NULL, NULL, SRCINVERT);
+ }
+ EngUnlockSurface(MaskSurf);
}
- EngUnlockSurface(MaskSurf);
}
}
@@ -385,45 +304,55 @@
IN RECTL *prcl,
IN FLONG fl)
{
- GDIDEVICE *ppdev = (GDIDEVICE *)pso->hdev;
+ GDIDEVICE *ppdev;
SURFOBJ *TempSurfObj;
-
+ GDIPOINTER *pgp;
+
+ ASSERT(pso);
+
+ ppdev = GDIDEV(pso);
+ pgp = &ppdev->Pointer;
+
IntHideMousePointer(ppdev, pso);
- if (ppdev->PointerColorSurface != NULL)
+ if (pgp->ColorSurface != NULL)
{
/* FIXME: Is this really needed? */
- TempSurfObj = EngLockSurface(ppdev->PointerColorSurface);
- EngFreeMem(TempSurfObj->pvBits);
- TempSurfObj->pvBits = 0;
- EngUnlockSurface(TempSurfObj);
+ if((TempSurfObj = EngLockSurface(pgp->ColorSurface)))
+ {
+ EngFreeMem(TempSurfObj->pvBits);
+ TempSurfObj->pvBits = 0;
+ EngUnlockSurface(TempSurfObj);
+ }
- EngDeleteSurface(ppdev->PointerColorSurface);
- ppdev->PointerMaskSurface = NULL;
+ EngDeleteSurface(pgp->ColorSurface);
+ pgp->MaskSurface = NULL;
}
- if (ppdev->PointerMaskSurface != NULL)
+ if (pgp->MaskSurface != NULL)
{
/* FIXME: Is this really needed? */
- TempSurfObj = EngLockSurface(ppdev->PointerMaskSurface);
- EngFreeMem(TempSurfObj->pvBits);
- TempSurfObj->pvBits = 0;
- EngUnlockSurface(TempSurfObj);
+ if((TempSurfObj = EngLockSurface(pgp->MaskSurface)))
+ {
+ EngFreeMem(TempSurfObj->pvBits);
+ TempSurfObj->pvBits = 0;
+ EngUnlockSurface(TempSurfObj);
+ }
- EngDeleteSurface(ppdev->PointerMaskSurface);
- ppdev->PointerMaskSurface = NULL;
+ EngDeleteSurface(pgp->MaskSurface);
+ pgp->MaskSurface = NULL;
}
- if (ppdev->PointerSaveSurface != NULL)
+ if (pgp->SaveSurface != NULL)
{
- EngDeleteSurface(ppdev->PointerSaveSurface);
- ppdev->PointerSaveSurface = NULL;
+ EngDeleteSurface(pgp->SaveSurface);
+ pgp->SaveSurface = NULL;
}
- if (ppdev->PointerXlateObject != NULL)
+ if (pgp->XlateObject != NULL)
{
- EngDeleteXlate(ppdev->PointerXlateObject);
- ppdev->PointerXlateObject = NULL;
+ EngDeleteXlate(pgp->XlateObject);
+ pgp->XlateObject = NULL;
}
/*
@@ -435,51 +364,44 @@
return SPS_ACCEPT_NOEXCLUDE;
}
- ppdev->PointerHotSpot.x = xHot;
- ppdev->PointerHotSpot.y = yHot;
+ pgp->HotSpot.x = xHot;
+ pgp->HotSpot.y = yHot;
- ppdev->PointerAttributes.Column = x - xHot;
- ppdev->PointerAttributes.Row = y - yHot;
- ppdev->PointerAttributes.Width = abs(psoMask->lDelta) << 3;
- ppdev->PointerAttributes.Height = (psoMask->cjBits / abs(psoMask->lDelta)) >> 1;
-
- if (prcl != NULL)
- {
- prcl->left = ppdev->PointerAttributes.Column;
- prcl->top = ppdev->PointerAttributes.Row;
- prcl->right = prcl->left + ppdev->PointerAttributes.Width;
- prcl->bottom = prcl->top + ppdev->PointerAttributes.Height;
+ if (x != -1)
+ {
+ pgp->Pos.x = x;
+ pgp->Pos.y = y;
}
+
+ pgp->Size.cx = abs(psoMask->lDelta) << 3;
+ pgp->Size.cy = (psoMask->cjBits / abs(psoMask->lDelta)) >> 1;
if (psoColor != NULL)
{
- SIZEL Size;
PBYTE Bits;
- Size.cx = ppdev->PointerAttributes.Width;
- Size.cy = ppdev->PointerAttributes.Height;
Bits = EngAllocMem(0, psoColor->cjBits, TAG_MOUSE);
memcpy(Bits, psoColor->pvBits, psoColor->cjBits);
- ppdev->PointerColorSurface = (HSURF)EngCreateBitmap(Size,
+ pgp->ColorSurface = (HSURF)EngCreateBitmap(pgp->Size,
psoColor->lDelta, psoColor->iBitmapFormat,
psoColor->lDelta < 0 ? 0 : BMF_TOPDOWN, Bits);
}
else
{
- ppdev->PointerColorSurface = NULL;
+ pgp->ColorSurface = NULL;
}
{
SIZEL Size;
PBYTE Bits;
- Size.cx = ppdev->PointerAttributes.Width;
- Size.cy = ppdev->PointerAttributes.Height << 1;
+ Size.cx = pgp->Size.cx;
+ Size.cy = pgp->Size.cy << 1;
Bits = EngAllocMem(0, psoMask->cjBits, TAG_MOUSE);
memcpy(Bits, psoMask->pvBits, psoMask->cjBits);
- ppdev->PointerMaskSurface = (HSURF)EngCreateBitmap(Size,
+ pgp->MaskSurface = (HSURF)EngCreateBitmap(Size,
psoMask->lDelta, psoMask->iBitmapFormat,
psoMask->lDelta < 0 ? 0 : BMF_TOPDOWN, Bits);
}
@@ -493,20 +415,18 @@
{
HPALETTE BWPalette, DestPalette;
ULONG BWColors[] = {0, 0xFFFFFF};
- PDC Dc;
BWPalette = EngCreatePalette(PAL_INDEXED, sizeof(BWColors) / sizeof(ULONG),
BWColors, 0, 0, 0);
- Dc = DC_LockDc(IntGetScreenDC());
- DestPalette = Dc->w.hPalette;
- DC_UnlockDc(IntGetScreenDC());
- ppdev->PointerXlateObject = IntEngCreateXlate(0, PAL_INDEXED,
+
+ DestPalette = ppdev->DevInfo.hpalDefault;
+ pgp->XlateObject = IntEngCreateXlate(0, PAL_INDEXED,
DestPalette, BWPalette);
EngDeletePalette(BWPalette);
}
else
{
- ppdev->PointerXlateObject = pxlo;
+ pgp->XlateObject = pxlo;
}
/*
@@ -514,28 +434,51 @@
*/
{
- SIZEL Size;
LONG lDelta;
- Size.cx = ppdev->PointerAttributes.Width;
- Size.cy = ppdev->PointerAttributes.Height;
-
switch (pso->iBitmapFormat)
{
- case BMF_1BPP: lDelta = Size.cx >> 3; break;
- case BMF_4BPP: lDelta = Size.cx >> 1; break;
- case BMF_8BPP: lDelta = Size.cx; break;
- case BMF_16BPP: lDelta = Size.cx << 1; break;
- case BMF_24BPP: lDelta = Size.cx * 3; break;
- case BMF_32BPP: lDelta = Size.cx << 2; break;
- default: lDelta = 0; break;
+ case BMF_1BPP:
+ lDelta = pgp->Size.cx >> 3;
+ break;
+ case BMF_4BPP:
+ lDelta = pgp->Size.cx >> 1;
+ break;
+ case BMF_8BPP:
+ lDelta = pgp->Size.cx;
+ break;
+ case BMF_16BPP:
+ lDelta = pgp->Size.cx << 1;
+ break;
+ case BMF_24BPP:
+ lDelta = pgp->Size.cx * 3;
+ break;
+ case BMF_32BPP:
+ lDelta = pgp->Size.cx << 2;
+ break;
+ default:
+ lDelta = 0;
+ break;
}
- ppdev->PointerSaveSurface = (HSURF)EngCreateBitmap(
- Size, lDelta, pso->iBitmapFormat, BMF_TOPDOWN | BMF_NOZEROINIT, NULL);
+ pgp->SaveSurface = (HSURF)EngCreateBitmap(
+ pgp->Size, lDelta, pso->iBitmapFormat, BMF_TOPDOWN | BMF_NOZEROINIT, NULL);
}
- IntShowMousePointer(ppdev, pso);
+ if(x != -1)
+ {
+ IntShowMousePointer(ppdev, pso);
+
+ if (prcl != NULL)
+ {
+ prcl->left = pgp->Pos.x - pgp->HotSpot.x;
+ prcl->top = pgp->Pos.y - pgp->HotSpot.x;
+ prcl->right = prcl->left + pgp->Size.cx;
+ prcl->bottom = prcl->top + pgp->Size.cy;
+ }
+ }
+
+ /* FIXME - touch prcl when x == -1? */
return SPS_ACCEPT_EXCLUDE;
}
@@ -551,23 +494,33 @@
IN LONG y,
IN RECTL *prcl)
{
- GDIDEVICE *ppdev = (GDIDEVICE *)pso->hdev;
+ GDIDEVICE *ppdev;
+ GDIPOINTER *pgp;
+
+ ASSERT(pso);
+
+ ppdev = GDIDEV(pso);
+ ASSERT(ppdev);
+
+ pgp = &ppdev->Pointer;
+
IntHideMousePointer(ppdev, pso);
- ppdev->PointerAttributes.Column = x - ppdev->PointerHotSpot.x;
- ppdev->PointerAttributes.Row = y - ppdev->PointerHotSpot.y;
if (x != -1)
{
- IntShowMousePointer(ppdev, pso);
- }
-
- if (prcl != NULL)
- {
- prcl->left = ppdev->PointerAttributes.Column;
- prcl->top = ppdev->PointerAttributes.Row;
- prcl->right = prcl->left + ppdev->PointerAttributes.Width;
- prcl->bottom = prcl->top + ppdev->PointerAttributes.Height;
+ pgp->Pos.x = x;
+ pgp->Pos.y = y;
+ IntShowMousePointer(ppdev, pso);
+ if (prcl != NULL)
+ {
+ prcl->left = pgp->Pos.x - pgp->HotSpot.x;
+ prcl->top = pgp->Pos.y - pgp->HotSpot.x;
+ prcl->right = prcl->left + pgp->Size.cx;
+ prcl->bottom = prcl->top + pgp->Size.cy;
+ }
}
+
+ /* FIXME - touch prcl when x == -1? */
}
/* EOF */
reactos/subsys/win32k/eng
diff -u -r1.32 -r1.32.12.1
--- objects.h 3 Jul 2004 13:55:35 -0000 1.32
+++ objects.h 13 Dec 2004 09:39:16 -0000 1.32.12.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: objects.h,v 1.32 2004/07/03 13:55:35 navaraf Exp $
+/* $Id: objects.h,v 1.32.12.1 2004/12/13 09:39:16 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -34,8 +34,6 @@
/* Structure of internal gdi objects that win32k manages for ddi engine:
|---------------------------------|
- | EngObj |
- |---------------------------------|
| Public part |
| accessed from engine |
|---------------------------------|
@@ -45,21 +43,8 @@
---------------------------------------------------------------------------*/
-typedef struct _ENGOBJ {
- ULONG hObj;
- ULONG InternalSize;
- ULONG UserSize;
-} ENGOBJ, *PENGOBJ;
-
typedef struct _CLIPGDI {
- ENGOBJ Header;
- CLIPOBJ ClipObj;
- /* ei what were these for?
- ULONG NumRegionRects;
- ULONG NumIntersectRects;
- RECTL *RegionRects;
- RECTL *IntersectRects;
- */
+ CLIPOBJ ClipObj;
ULONG EnumPos;
ULONG EnumOrder;
ULONG EnumMax;
@@ -73,12 +58,11 @@
} DRVFUNCTIONSGDI;
typedef struct _FLOATGDI {
-
+ ULONG Dummy;
} FLOATGDI;
typedef struct _FONTGDI {
- ENGOBJ Header;
- FONTOBJ FontObj;
+ FONTOBJ FontObj;
LPCWSTR Filename;
FT_Face face;
@@ -86,13 +70,11 @@
} FONTGDI, *PFONTGDI;
typedef struct _PATHGDI {
- ENGOBJ Header;
- PATHOBJ PathObj;
+ PATHOBJ PathObj;
} PATHGDI;
typedef struct _STRGDI {
- ENGOBJ Header;
- STROBJ StrObj;
+ STROBJ StrObj;
} STRGDI;
typedef BOOL STDCALL (*PFN_BitBlt)(SURFOBJ *, SURFOBJ *, SURFOBJ *, CLIPOBJ *,
@@ -141,12 +123,11 @@
typedef BOOL STDCALL (*PFN_GradientFill)(SURFOBJ*, CLIPOBJ*, XLATEOBJ*, TRIVERTEX*, ULONG, PVOID, ULONG, RECTL*, POINTL*, ULONG);
typedef struct _XFORMGDI {
- ENGOBJ Header;
+ ULONG Dummy;
/* XFORMOBJ has no public members */
} XFORMGDI;
typedef struct _XLATEGDI {
- ENGOBJ Header;
XLATEOBJ XlateObj;
HPALETTE DestPal;
HPALETTE SourcePal;
@@ -170,4 +151,10 @@
// };
} XLATEGDI;
+/* as the *OBJ structures are located at the beginning of the *GDI structures
+ we can simply typecast the pointer */
+#define ObjToGDI(ClipObj, Type) (Type##GDI *)(ClipObj)
+#define GDIToObj(ClipGDI, Type) (Type##OBJ *)(ClipGDI)
+
+
#endif //__ENG_OBJECTS_H
reactos/subsys/win32k/eng
diff -u -r1.44 -r1.44.12.1
--- surface.c 7 Jul 2004 16:33:44 -0000 1.44
+++ surface.c 13 Dec 2004 09:39:16 -0000 1.44.12.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: surface.c,v 1.44 2004/07/07 16:33:44 navaraf Exp $
+/* $Id: surface.c,v 1.44.12.1 2004/12/13 09:39:16 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -481,7 +481,13 @@
SURFOBJ * STDCALL
EngLockSurface(IN HSURF Surface)
{
- return &((BITMAPOBJ*)BITMAPOBJ_LockBitmap(Surface))->SurfObj;
+ BITMAPOBJ *bmp = (BITMAPOBJ*)BITMAPOBJ_LockBitmap(Surface);
+ if(bmp != NULL)
+ {
+ return &bmp->SurfObj;
+ }
+
+ return NULL;
}
/*
@@ -490,6 +496,7 @@
VOID STDCALL
EngUnlockSurface(IN SURFOBJ *Surface)
{
- BITMAPOBJ_UnlockBitmap ( Surface->hsurf );
+ ASSERT (Surface);
+ BITMAPOBJ_UnlockBitmap (Surface->hsurf);
}
/* EOF */
reactos/subsys/win32k/eng
diff -u -r1.42 -r1.42.8.1
--- xlate.c 15 Jul 2004 21:14:51 -0000 1.42
+++ xlate.c 13 Dec 2004 09:39:16 -0000 1.42.8.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: xlate.c,v 1.42 2004/07/15 21:14:51 navaraf Exp $
+/* $Id: xlate.c,v 1.42.8.1 2004/12/13 09:39:16 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -29,7 +29,8 @@
#include <w32k.h>
-static ULONG FASTCALL ShiftAndMask(XLATEGDI *XlateGDI, ULONG Color)
+static inline ULONG
+ShiftAndMask(XLATEGDI *XlateGDI, ULONG Color)
{
ULONG TranslatedColor;
@@ -50,62 +51,65 @@
}
-ULONG STDCALL
+static inline ULONG
ClosestColorMatch(XLATEGDI *XlateGDI, LPPALETTEENTRY SourceColor,
PALETTEENTRY *DestColors, ULONG NumColors)
{
ULONG SourceRed, SourceGreen, SourceBlue;
- ULONG cxRed, cxGreen, cxBlue, Rating, BestMatch = 16777215;
+ ULONG cxRed, cxGreen, cxBlue, Rating, BestMatch = 0xFFFFFF;
ULONG CurrentIndex, BestIndex = 0;
SourceRed = SourceColor->peRed;
SourceGreen = SourceColor->peGreen;
SourceBlue = SourceColor->peBlue;
- for (CurrentIndex = 0; CurrentIndex < NumColors; CurrentIndex++)
+ for (CurrentIndex = 0; CurrentIndex < NumColors; CurrentIndex++, DestColors++)
{
- cxRed = abs((SHORT)SourceRed - (SHORT)DestColors[CurrentIndex].peRed);
+ cxRed = abs((SHORT)SourceRed - (SHORT)DestColors->peRed);
cxRed *= cxRed;
- cxGreen = abs((SHORT)SourceGreen - (SHORT)DestColors[CurrentIndex].peGreen);
+ cxGreen = abs((SHORT)SourceGreen - (SHORT)DestColors->peGreen);
cxGreen *= cxGreen;
- cxBlue = abs((SHORT)SourceBlue - (SHORT)DestColors[CurrentIndex].peBlue);
+ cxBlue = abs((SHORT)SourceBlue - (SHORT)DestColors->peBlue);
cxBlue *= cxBlue;
Rating = cxRed + cxGreen + cxBlue;
+
+ if (Rating == 0)
+ {
+ /* Exact match */
+ BestIndex = CurrentIndex;
+ break;
+ }
if (Rating < BestMatch)
{
BestIndex = CurrentIndex;
BestMatch = Rating;
}
-
- /* Exact match */
- if (Rating == 0)
- break;
}
return BestIndex;
}
-static VOID STDCALL
+static inline VOID
BitMasksFromPal(USHORT PalType, PPALGDI Palette,
PULONG RedMask, PULONG BlueMask, PULONG GreenMask)
{
- static const union { PALETTEENTRY Color; ULONG Mask; } Red = {{255, 0, 0}};
- static const union { PALETTEENTRY Color; ULONG Mask; } Green = {{0, 255, 0}};
- static const union { PALETTEENTRY Color; ULONG Mask; } Blue = {{0, 0, 255}};
+ static const union { PALETTEENTRY Color; ULONG Mask; } Red = {{0xFF, 0x00, 0x00}};
+ static const union { PALETTEENTRY Color; ULONG Mask; } Green = {{0x00, 0xFF, 0x00}};
+ static const union { PALETTEENTRY Color; ULONG Mask; } Blue = {{0x00, 0x00, 0xFF}};
switch (PalType)
{
case PAL_RGB:
- *RedMask = RGB(255, 0, 0);
- *GreenMask = RGB(0, 255, 0);
- *BlueMask = RGB(0, 0, 255);
+ *RedMask = RGB(0xFF, 0x00, 0x00);
+ *GreenMask = RGB(0x00, 0xFF, 0x00);
+ *BlueMask = RGB(0x00, 0x00, 0xFF);
break;
case PAL_BGR:
- *RedMask = RGB(0, 0, 255);
- *GreenMask = RGB(0, 255, 0);
- *BlueMask = RGB(255, 0, 0);
+ *RedMask = RGB(0x00, 0x00, 0xFF);
+ *GreenMask = RGB(0x00, 0xFF, 0x00);
+ *BlueMask = RGB(0xFF, 0x00, 0x00);
break;
case PAL_BITFIELDS:
*RedMask = Palette->RedMask;
@@ -124,7 +128,8 @@
* Calculate the number of bits Mask must be shift to the left to get a
* 1 in the most significant bit position
*/
-static INT FASTCALL CalculateShift(ULONG Mask)
+static inline INT
+CalculateShift(ULONG Mask)
{
ULONG Shift = 0;
ULONG LeftmostBit = 1 << (8 * sizeof(ULONG) - 1);
@@ -138,22 +143,25 @@
return Shift;
}
-XLATEOBJ* STDCALL
+XLATEOBJ* FASTCALL
IntEngCreateXlate(USHORT DestPalType, USHORT SourcePalType,
HPALETTE PaletteDest, HPALETTE PaletteSource)
{
- ULONG NewXlate;
XLATEOBJ *XlateObj;
XLATEGDI *XlateGDI;
PALGDI *SourcePalGDI = 0;
PALGDI *DestPalGDI = 0;
- ULONG SourceRedMask, SourceGreenMask, SourceBlueMask;
- ULONG DestRedMask, DestGreenMask, DestBlueMask;
+ ULONG SourceRedMask = 0, SourceGreenMask = 0, SourceBlueMask = 0;
+ ULONG DestRedMask = 0, DestGreenMask = 0, DestBlueMask = 0;
ULONG i;
- NewXlate = CreateGDIHandle(sizeof(XLATEGDI), sizeof(XLATEOBJ), (PVOID*)&XlateGDI, (PVOID*)&XlateObj);
- if (!ValidEngHandle(NewXlate))
+ XlateGDI = EngAllocMem(0, sizeof(XLATEGDI), TAG_XLATEOBJ);
+ if (XlateGDI == NULL)
+ {
+ DPRINT1("Failed to allocate memory for a XLATE structure!\n");
return NULL;
+ }
+ XlateObj = GDIToObj(XlateGDI, XLATE);
if (PaletteSource != NULL)
SourcePalGDI = PALETTE_LockPalette(PaletteSource);
@@ -270,20 +278,25 @@
return XlateObj;
}
-XLATEOBJ * STDCALL IntEngCreateMonoXlate(
+XLATEOBJ* FASTCALL
+IntEngCreateMonoXlate(
USHORT SourcePalType, HPALETTE PaletteDest, HPALETTE PaletteSource,
ULONG BackgroundColor)
{
- ULONG NewXlate;
XLATEOBJ *XlateObj;
XLATEGDI *XlateGDI;
PALGDI *SourcePalGDI;
- NewXlate = CreateGDIHandle(sizeof(XLATEGDI), sizeof(XLATEOBJ), (PVOID*)&XlateGDI, (PVOID*)&XlateObj);
- if (!ValidEngHandle(NewXlate))
+ XlateGDI = EngAllocMem(0, sizeof(XLATEGDI), TAG_XLATEOBJ);
+ if (XlateGDI == NULL)
+ {
+ DPRINT1("Failed to allocate memory for a XLATE structure!\n");
return NULL;
+ }
+ XlateObj = GDIToObj(XlateGDI, XLATE);
SourcePalGDI = PALETTE_LockPalette(PaletteSource);
+ /* FIXME - SourcePalGDI can be NULL!!! Handle this case instead of ASSERT! */
ASSERT(SourcePalGDI);
if (SourcePalType == 0)
@@ -329,12 +342,11 @@
return XlateObj;
}
-XLATEOBJ * STDCALL
+XLATEOBJ* FASTCALL
IntEngCreateSrcMonoXlate(HPALETTE PaletteDest,
ULONG ForegroundColor,
ULONG BackgroundColor)
{
- ULONG NewXlate;
XLATEOBJ *XlateObj;
XLATEGDI *XlateGDI;
PALGDI *DestPalGDI;
@@ -343,14 +355,20 @@
if (DestPalGDI == NULL)
return NULL;
- NewXlate = CreateGDIHandle(sizeof(XLATEGDI), sizeof(XLATEOBJ), (PVOID*)&XlateGDI, (PVOID*)&XlateObj);
- if (!ValidEngHandle(NewXlate))
+ XlateGDI = EngAllocMem(0, sizeof(XLATEGDI), TAG_XLATEOBJ);
+ if (XlateGDI == NULL)
+ {
+ PALETTE_UnlockPalette(PaletteDest);
+ DPRINT1("Failed to allocate memory for a XLATE structure!\n");
return NULL;
+ }
+ XlateObj = GDIToObj(XlateGDI, XLATE);
XlateGDI->translationTable = EngAllocMem(0, sizeof(ULONG) * 2, 0);
if (XlateGDI->translationTable == NULL)
{
- FreeGDIHandle(NewXlate);
+ PALETTE_UnlockPalette(PaletteDest);
+ EngFreeMem(XlateGDI);
return NULL;
}
@@ -368,9 +386,9 @@
BitMasksFromPal(DestPalGDI->Mode, DestPalGDI, &XlateGDI->RedMask,
&XlateGDI->BlueMask, &XlateGDI->GreenMask);
- XlateGDI->RedShift = CalculateShift(RGB(255, 0, 0)) - CalculateShift(XlateGDI->RedMask);
- XlateGDI->GreenShift = CalculateShift(RGB(0, 255, 0)) - CalculateShift(XlateGDI->GreenMask);
- XlateGDI->BlueShift = CalculateShift(RGB(0, 0, 255)) - CalculateShift(XlateGDI->BlueMask);
+ XlateGDI->RedShift = CalculateShift(RGB(0xFF, 0x00, 0x00)) - CalculateShift(XlateGDI->RedMask);
+ XlateGDI->GreenShift = CalculateShift(RGB(0x00, 0xFF, 0x00)) - CalculateShift(XlateGDI->GreenMask);
+ XlateGDI->BlueShift = CalculateShift(RGB(0x00, 0x00, 0xFF)) - CalculateShift(XlateGDI->BlueMask);
XlateGDI->translationTable[0] = ShiftAndMask(XlateGDI, BackgroundColor);
XlateGDI->translationTable[1] = ShiftAndMask(XlateGDI, ForegroundColor);
@@ -403,7 +421,6 @@
EngDeleteXlate(XLATEOBJ *XlateObj)
{
XLATEGDI *XlateGDI;
- HANDLE HXlate;
if (XlateObj == NULL)
{
@@ -411,8 +428,7 @@
return;
}
- XlateGDI = (XLATEGDI *)AccessInternalObjectFromUserObject(XlateObj);
- HXlate = (HANDLE)AccessHandleFromUserObject(XlateObj);
+ XlateGDI = ObjToGDI(XlateObj, XLATE);
if ((XlateObj->flXlate & XO_TABLE) &&
XlateGDI->translationTable != NULL)
@@ -420,7 +436,7 @@
EngFreeMem(XlateGDI->translationTable);
}
- FreeGDIHandle((ULONG)HXlate);
+ EngFreeMem(XlateGDI);
}
/*
@@ -429,7 +445,7 @@
PULONG STDCALL
XLATEOBJ_piVector(XLATEOBJ *XlateObj)
{
- XLATEGDI *XlateGDI = (XLATEGDI*)AccessInternalObjectFromUserObject(XlateObj);
+ XLATEGDI *XlateGDI = ObjToGDI(XlateObj, XLATE);
if (XlateObj->iSrcType == PAL_INDEXED)
{
@@ -459,7 +475,7 @@
if (XlateObj->flXlate & XO_TABLE)
return XlateObj->pulXlate[Color];
- XlateGDI = (XLATEGDI *)AccessInternalObjectFromUserObject(XlateObj);
+ XlateGDI = ObjToGDI(XlateObj, XLATE);
if (XlateObj->flXlate & XO_TO_MONO)
return Color == XlateGDI->BackgroundColor;
@@ -472,17 +488,19 @@
{
/* FIXME: should we cache colors used often? */
/* FIXME: won't work if destination isn't indexed */
-
- /* Extract the destination palette. */
- PalGDI = PALETTE_LockPalette(XlateGDI->DestPal);
-
+
/* Convert the source color to the palette RGB format. */
Color = ShiftAndMask(XlateGDI, Color);
- /* Return closest match for the given color. */
- Closest = ClosestColorMatch(XlateGDI, (LPPALETTEENTRY)&Color, PalGDI->IndexedColors, PalGDI->NumColors);
- PALETTE_UnlockPalette(XlateGDI->DestPal);
- return Closest;
+ /* Extract the destination palette. */
+ PalGDI = PALETTE_LockPalette(XlateGDI->DestPal);
+ if(PalGDI != NULL)
+ {
+ /* Return closest match for the given color. */
+ Closest = ClosestColorMatch(XlateGDI, (LPPALETTEENTRY)&Color, PalGDI->IndexedColors, PalGDI->NumColors);
+ PALETTE_UnlockPalette(XlateGDI->DestPal);
+ return Closest;
+ }
}
return 0;
@@ -498,8 +516,9 @@
HPALETTE hPalette;
XLATEGDI *XlateGDI;
PALGDI *PalGDI;
+ ULONG *InPal;
- XlateGDI = (XLATEGDI*)AccessInternalObjectFromUserObject(XlateObj);
+ XlateGDI = ObjToGDI(XlateObj, XLATE);
if (PalOutType == XO_SRCPALETTE)
hPalette = XlateGDI->SourcePal;
else if (PalOutType == XO_DESTPALETTE)
@@ -508,10 +527,23 @@
UNIMPLEMENTED;
PalGDI = PALETTE_LockPalette(hPalette);
- RtlCopyMemory(OutPal, PalGDI->IndexedColors, sizeof(ULONG) * cPal);
- PALETTE_UnlockPalette(hPalette);
+ if(PalGDI != NULL)
+ {
+ /* copy the indexed colors into the buffer */
- return cPal;
+ for(InPal = (ULONG*)PalGDI->IndexedColors;
+ cPal > 0;
+ cPal--, InPal++, OutPal++)
+ {
+ *OutPal = *InPal;
+ }
+
+ PALETTE_UnlockPalette(hPalette);
+
+ return cPal;
+ }
+
+ return 0;
}
/* EOF */
reactos/subsys/win32k/eng
diff -N clip.h
--- clip.h 14 May 2004 22:56:18 -0000 1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,44 +0,0 @@
-/*
- * ReactOS kernel
- * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-#ifndef __WIN32K_CLIP_H
-#define __WIN32K_CLIP_H
-
-typedef ULONG HCLIP;
-CLIPOBJ* STDCALL IntEngCreateClipRegion( ULONG count, PRECTL pRect, PRECTL rcBounds );
-VOID STDCALL IntEngDeleteClipRegion(CLIPOBJ *ClipObj);
-
-
-#define ENUM_RECT_LIMIT 50
-
-typedef struct _RECT_ENUM
-{
- ULONG c;
- RECTL arcl[ENUM_RECT_LIMIT];
-} RECT_ENUM;
-
-typedef struct tagSPAN
-{
- LONG Y;
- LONG X;
- ULONG Width;
-} SPAN, *PSPAN;
-
-BOOLEAN FASTCALL ClipobjToSpans(PSPAN *Spans, UINT *Count, CLIPOBJ *ClipRegion, PRECTL Boundary);
-
-#endif
reactos/subsys/win32k/eng
diff -N handle.c
--- handle.c 30 May 2004 14:01:12 -0000 1.16
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,134 +0,0 @@
-/*
- * ReactOS W32 Subsystem
- * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-/* $Id: handle.c,v 1.16 2004/05/30 14:01:12 weiden Exp $
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * PURPOSE: Manage GDI Handles
- * FILE: subsys/win32k/eng/handle.c
- * PROGRAMER: Jason Filby
- * REVISION HISTORY:
- * 29/8/1999: Created
- */
-#include <w32k.h>
-
-static int LastHandle = MAX_GDI_HANDLES;
-static GDI_HANDLE GDIHandles[MAX_GDI_HANDLES];
-
-ULONG FASTCALL CreateGDIHandle(ULONG InternalSize, ULONG UserSize, PVOID *InternalObject, PVOID *UserObject)
-{
- PENGOBJ pObj;
- int i;
-
- /* internal size includes header and user portions */
- pObj = EngAllocMem( FL_ZERO_MEMORY, InternalSize, 0 );
-
- if( !pObj )
- return 0;
-
- #if 0
- /* not used at the moment */
- pObj->InternalSize = InternalSize;
- pObj->UserSize = UserSize;
- #endif
-
- for( i = (MAX_GDI_HANDLES - 1 <= LastHandle ? 1 : LastHandle + 1); i != LastHandle;
- i = (MAX_GDI_HANDLES - 1 <= i ? 1 : i + 1) ){
- if( GDIHandles[ i ].pEngObj == NULL ){
- pObj->hObj = i;
- GDIHandles[ i ].pEngObj = pObj;
-
- *InternalObject = pObj;
- *UserObject = (PVOID)( (PCHAR)pObj + sizeof( ENGOBJ ) );
-
- DPRINT("CreateGDIHandle: obj: %x, handle: %d, usersize: %d\n", pObj, i, UserSize );
- LastHandle = i;
- return i;
- }
- }
- DPRINT1("CreateGDIHandle: Out of available handles!!!\n");
- EngFreeMem( pObj );
- return 0;
-}
-
-VOID FASTCALL FreeGDIHandle(ULONG Handle)
-{
- if( Handle == 0 || Handle >= MAX_GDI_HANDLES ){
- DPRINT1("FreeGDIHandle: invalid handle!!!!\n");
- return;
- }
- DPRINT("FreeGDIHandle: handle: %d\n", Handle);
- EngFreeMem( GDIHandles[Handle].pEngObj );
- GDIHandles[Handle].pEngObj = NULL;
-}
-
-PVOID FASTCALL AccessInternalObject(ULONG Handle)
-{
- PENGOBJ pEngObj;
-
- if (Handle == 0 || Handle >= MAX_GDI_HANDLES
- || !(pEngObj = GDIHandles[Handle].pEngObj))
- {
- DPRINT1("AccessInternalObject: invalid handle: %d!!!!\n", Handle);
- return NULL;
- }
-
- return (PVOID)pEngObj;
-}
-
-PVOID FASTCALL AccessUserObject(ULONG Handle)
-{
- PENGOBJ pEngObj;
-
- if (Handle == 0 || Handle >= MAX_GDI_HANDLES
- || !(pEngObj = GDIHandles[Handle].pEngObj))
- {
- DPRINT1("AccessUserObject: invalid handle: %d!!!!\n", Handle);
- return NULL;
- }
-
- return (PVOID)( (PCHAR)pEngObj + sizeof( ENGOBJ ) );
-}
-
-ULONG FASTCALL AccessHandleFromUserObject(PVOID UserObject)
-{
- PENGOBJ pEngObj;
- ULONG Handle;
-
- if( !UserObject )
- return INVALID_HANDLE;
-
- pEngObj = (PENGOBJ)((PCHAR) UserObject - sizeof( ENGOBJ ));
- Handle = pEngObj->hObj;
-
- if( Handle == 0 || Handle >= MAX_GDI_HANDLES ){
- DPRINT1("AccessHandleFromUserObject: inv handle: %d, obj: %x!!!!\n", Handle, pEngObj);
- return INVALID_HANDLE;
- }
- return Handle;
-}
-
-VOID FASTCALL InitEngHandleTable( void )
-{
- ULONG i;
- for( i=1; i < MAX_GDI_HANDLES; i++ ){
- GDIHandles[ i ].pEngObj = NULL;
- }
-}
-/* EOF */
reactos/subsys/win32k/eng
diff -N handle.h
--- handle.h 30 May 2004 14:01:12 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,44 +0,0 @@
-/*
- * ReactOS kernel
- * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-/* $Id: handle.h,v 1.6 2004/05/30 14:01:12 weiden Exp $
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * PURPOSE: Manage GDI Handle definitions
- * FILE: subsys/win32k/eng/handle.h
- * PROGRAMER: Jason Filby
- * REVISION HISTORY:
- * 29/8/1999: Created
- */
-#ifndef __ENG_HANDLE_H
-#define __ENG_HANDLE_H
-
-#include "objects.h"
-#include <include/object.h>
-
-typedef struct _GDI_HANDLE {
- PENGOBJ pEngObj;
-} GDI_HANDLE, *PGDI_HANDLE;
-
-#define INVALID_HANDLE 0
-#define MAX_GDI_HANDLES 4096
-
-#define ValidEngHandle( x ) (!( (x) == INVALID_HANDLE ))
-
-#endif
reactos/subsys/win32k/include
diff -N intddraw.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ intddraw.h 13 Dec 2004 09:39:17 -0000 1.2.2.1
@@ -0,0 +1,67 @@
+#ifndef _INT_W32k_DDRAW
+#define _INT_W32k_DDRAW
+
+#define GDI_OBJECT_TYPE_DIRECTDRAW 0x00600000
+#define GDI_OBJECT_TYPE_DD_SURFACE 0x00610000
+#define GDI_OBJECT_TYPE_DD_VIDEOPORT 0x00620000
+#define GDI_OBJECT_TYPE_DD_PALETTE 0x00630000
+#define GDI_OBJECT_TYPE_DD_CLIPPER 0x00640000
+#define GDI_OBJECT_TYPE_DD_MOTIONCOMP 0x00650000
+
+typedef struct
+{
+ DD_SURFACE_LOCAL Local;
+ DD_SURFACE_MORE More;
+ DD_SURFACE_GLOBAL Global;
+ DD_ATTACHLIST AttachList;
+ DD_ATTACHLIST AttachListFrom;
+ BOOL bComplete;
+} DD_SURFACE, *PDD_SURFACE;
+
+typedef struct
+{
+ DD_DIRECTDRAW_LOCAL Local;
+ DD_DIRECTDRAW_GLOBAL Global;
+ // Drv callbacks
+ PGD_GETDIRECTDRAWINFO DrvGetDirectDrawInfo;
+ PGD_DISABLEDIRECTDRAW DrvDisableDirectDraw;
+ // DD callbacks
+ PDD_CREATESURFACE DdCreateSurface;
+ PDD_SETCOLORKEY DdDrvSetColorKey; // ?????
+ PDD_WAITFORVERTICALBLANK DdWaitForVerticalBlank;
+ PDD_CANCREATESURFACE DdCanCreateSurface;
+ PDD_CREATEPALETTE DdCreatePalette;
+ PDD_GETSCANLINE DdGetScanLine;
+ PDD_MAPMEMORY DdMapMemory;
+ // Surface callbacks
+ PDD_SURFCB_DESTROYSURFACE DdDestroySurface;
+ PDD_SURFCB_FLIP DdFlip;
+ PDD_SURFCB_SETCLIPLIST DdSetClipList;
+ PDD_SURFCB_LOCK DdLock;
+ PDD_SURFCB_UNLOCK DdUnlock;
+ PDD_SURFCB_BLT DdBlt;
+ PDD_SURFCB_SETCOLORKEY DdSetColorKey;
+ PDD_SURFCB_ADDATTACHEDSURFACE DdAddAttachedSurface;
+ PDD_SURFCB_GETBLTSTATUS DdGetBltStatus;
+ PDD_SURFCB_GETFLIPSTATUS DdGetFlipStatus;
+ PDD_SURFCB_UPDATEOVERLAY DdUpdateOverlay;
+ PDD_SURFCB_SETOVERLAYPOSITION DdSetOverlayPosition;
+ PDD_SURFCB_SETPALETTE DdSetPalette;
+ // Palette callbacks
+ PDD_PALCB_DESTROYPALETTE DdDestroyPalette;
+ PDD_PALCB_SETENTRIES DdSetEntries;
+ // D3D Device context callbacks
+ PD3DNTHAL_CONTEXTCREATECB D3dContextCreate;
+ PD3DNTHAL_CONTEXTDESTROYCB D3dContextDestroy;
+ // D3D Buffer callbacks
+ PDD_CANCREATESURFACE DdCanCreateD3DBuffer;
+ PDD_CREATESURFACE DdCreateD3DBuffer;
+ PDD_SURFCB_DESTROYSURFACE DdDestroyD3DBuffer;
+ PDD_SURFCB_LOCK DdLockD3DBuffer;
+ PDD_SURFCB_UNLOCK DdUnlockD3DBuffer;
+} DD_DIRECTDRAW, *PDD_DIRECTDRAW;
+
+BOOL FASTCALL DD_Cleanup(PDD_DIRECTDRAW pDD);
+BOOL FASTCALL DDSURF_Cleanup(PDD_SURFACE pDDSurf);
+
+#endif /* _INT_W32k_DDRAW */
reactos/subsys/win32k/include
diff -u -r1.24 -r1.24.20.1
--- class.h 27 May 2004 11:47:42 -0000 1.24
+++ class.h 13 Dec 2004 09:39:17 -0000 1.24.20.1
@@ -27,6 +27,7 @@
BOOL Unicode;
BOOL Global;
LIST_ENTRY ListEntry;
+ LIST_ENTRY GlobalListEntry; /* HACK!!! */
PCHAR ExtraData;
/* list of windows */
FAST_MUTEX ClassWindowsListLock;
reactos/subsys/win32k/include
diff -u -r1.8 -r1.8.20.1
--- cursoricon.h 14 May 2004 23:57:32 -0000 1.8
+++ cursoricon.h 13 Dec 2004 09:39:17 -0000 1.8.20.1
@@ -31,12 +31,6 @@
BOOL SwapButtons;
UINT ButtonsDown;
LONG x, y;
- BOOL SafetySwitch;
- UINT SafetyRemoveCount;
- LONG PointerRectLeft;
- LONG PointerRectTop;
- LONG PointerRectRight;
- LONG PointerRectBottom;
FAST_MUTEX CursorMutex;
CURSORCLIP_INFO CursorClipInfo;
PCURICON_OBJECT CurrentCursorObject;
reactos/subsys/win32k/include
diff -u -r1.14 -r1.14.24.1
--- dce.h 4 Feb 2004 22:59:04 -0000 1.14
+++ dce.h 13 Dec 2004 09:39:17 -0000 1.14.24.1
@@ -37,10 +37,11 @@
} DCE; /* PDCE already declared at top of file */
#define DCEOBJ_AllocDCE() \
- ((HDCE) GDIOBJ_AllocObj (sizeof (DCE), GDI_OBJECT_TYPE_DCE, (GDICLEANUPPROC) DCE_InternalDelete))
-#define DCEOBJ_FreeDCE(hDCE) GDIOBJ_FreeObj((HGDIOBJ)hDCE, GDI_OBJECT_TYPE_DCE, GDIOBJFLAG_DEFAULT)
+ ((HDCE) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_DCE))
+#define DCEOBJ_FreeDCE(hDCE) GDIOBJ_FreeObj((HGDIOBJ)hDCE, GDI_OBJECT_TYPE_DCE)
#define DCEOBJ_LockDCE(hDCE) ((PDCE)GDIOBJ_LockObj((HGDIOBJ)hDCE, GDI_OBJECT_TYPE_DCE))
-#define DCEOBJ_UnlockDCE(hDCE) GDIOBJ_UnlockObj((HGDIOBJ)hDCE, GDI_OBJECT_TYPE_DCE)
+#define DCEOBJ_UnlockDCE(hDCE) GDIOBJ_UnlockObj((HGDIOBJ)hDCE)
+BOOL INTERNAL_CALL DCE_Cleanup(PVOID ObjectBody);
PDCE FASTCALL DceAllocDCE(HWND hWnd, DCE_TYPE Type);
PDCE FASTCALL DCE_FreeDCE(PDCE dce);
@@ -48,9 +49,8 @@
HRGN STDCALL DceGetVisRgn(HWND hWnd, ULONG Flags, HWND hWndChild, ULONG CFlags);
INT FASTCALL DCE_ExcludeRgn(HDC, HWND, HRGN);
BOOL FASTCALL DCE_InvalidateDCE(HWND, const PRECTL);
-BOOL FASTCALL DCE_InternalDelete(PDCE dce);
HWND FASTCALL IntWindowFromDC(HDC hDc);
-PDCE FASTCALL DceFreeDCE(PDCE dce);
+PDCE FASTCALL DceFreeDCE(PDCE dce, BOOLEAN Force);
void FASTCALL DceFreeWindowDCE(PWINDOW_OBJECT Window);
void FASTCALL DceEmptyCache(void);
VOID FASTCALL DceResetActiveDCEs(PWINDOW_OBJECT Window, int DeltaX, int DeltaY);
reactos/subsys/win32k/include
diff -u -r1.9.2.1 -r1.9.2.2
--- desktop.h 8 Dec 2004 21:57:39 -0000 1.9.2.1
+++ desktop.h 13 Dec 2004 09:39:17 -0000 1.9.2.2
@@ -66,6 +66,9 @@
HWINSTA *hWinSta,
HDESK *hDesktop);
+BOOL FASTCALL
+IntDesktopUpdatePerUserSettings(BOOL bEnable);
+
#define IntIsActiveDesktop(Desktop) \
((Desktop)->WindowStation->ActiveDesktop == (Desktop))
reactos/subsys/win32k/include
diff -u -r1.15 -r1.15.10.1
--- inteng.h 14 Jul 2004 20:48:57 -0000 1.15
+++ inteng.h 13 Dec 2004 09:39:17 -0000 1.15.10.1
@@ -1,6 +1,23 @@
#ifndef _WIN32K_INTENG_H
#define _WIN32K_INTENG_H
+typedef ULONG HCLIP;
+
+#define ENUM_RECT_LIMIT 50
+
+typedef struct _RECT_ENUM
+{
+ ULONG c;
+ RECTL arcl[ENUM_RECT_LIMIT];
+} RECT_ENUM;
+
+typedef struct tagSPAN
+{
+ LONG Y;
+ LONG X;
+ ULONG Width;
+} SPAN, *PSPAN;
+
#define ROP_NOOP 0x00AA0029
/* Definitions of IntEngXxx functions */
@@ -54,19 +71,19 @@
POINTL *pptlDitherOrg,
ULONG ulMode);
-XLATEOBJ * STDCALL
+XLATEOBJ* FASTCALL
IntEngCreateXlate(USHORT DestPalType,
USHORT SourcePalType,
HPALETTE PaletteDest,
HPALETTE PaletteSource);
-XLATEOBJ * STDCALL
+XLATEOBJ* FASTCALL
IntEngCreateMonoXlate(USHORT SourcePalType,
HPALETTE PaletteDest,
HPALETTE PaletteSource,
ULONG BackgroundColor);
-XLATEOBJ * STDCALL
+XLATEOBJ* FASTCALL
IntEngCreateSrcMonoXlate(HPALETTE PaletteDest,
ULONG ForegroundColor,
ULONG BackgroundColor);
@@ -79,11 +96,20 @@
LONG dCount,
MIX mix);
-CLIPOBJ* STDCALL
+CLIPOBJ* FASTCALL
IntEngCreateClipRegion(ULONG count,
PRECTL pRect,
PRECTL rcBounds);
+VOID FASTCALL
+IntEngDeleteClipRegion(CLIPOBJ *ClipObj);
+
+BOOLEAN FASTCALL
+ClipobjToSpans(PSPAN *Spans,
+ UINT *Count,
+ CLIPOBJ *ClipRegion,
+ PRECTL Boundary);
+
BOOL FASTCALL
IntEngTransparentBlt(BITMAPOBJ *Dest,
BITMAPOBJ *Source,
reactos/subsys/win32k/include
diff -u -r1.16 -r1.16.2.1
--- intgdi.h 15 Nov 2004 23:10:42 -0000 1.16
+++ intgdi.h 13 Dec 2004 09:39:17 -0000 1.16.2.1
@@ -165,5 +165,32 @@
BOOL FASTCALL
IntGdiIntersectRect(PRECT Dest, const RECT* Src1, const RECT* Src2);
+/* Stock objects */
+
+BOOL FASTCALL
+IntSetSysColors(UINT nColors, INT *Elements, COLORREF *Colors);
+
+BOOL FASTCALL
+IntGetSysColorBrushes(HBRUSH *Brushes, UINT nBrushes);
+
+BOOL FASTCALL
+IntGetSysColorPens(HPEN *Pens, UINT nPens);
+
+BOOL FASTCALL
+IntGetSysColors(COLORREF *Colors, UINT nColors);
+
+/* Other Stuff */
+
+INT FASTCALL
+IntGdiGetDeviceCaps(PDC dc, INT Index);
+
+INT
+FASTCALL
+IntGdiEscape(PDC dc,
+ INT Escape,
+ INT InSize,
+ LPCSTR InData,
+ LPVOID OutData);
+
#endif /* _WIN32K_INTGDI_H */
reactos/subsys/win32k/include
diff -u -r1.13 -r1.13.12.1
--- mouse.h 3 Jul 2004 13:55:36 -0000 1.13
+++ mouse.h 13 Dec 2004 09:39:17 -0000 1.13.12.1
@@ -5,14 +5,8 @@
#include <include/winsta.h>
//#include <ddk/ntddmou.h>
-BOOL FASTCALL IntCheckClipCursor(LONG *x, LONG *y, PSYSTEM_CURSORINFO CurInfo);
-BOOL FASTCALL IntSwapMouseButton(PWINSTATION_OBJECT WinStaObject, BOOL Swap);
-INT FASTCALL MouseSafetyOnDrawStart(SURFOBJ *SurfObj, LONG HazardX1, LONG HazardY1, LONG HazardX2, LONG HazardY2);
-INT FASTCALL MouseSafetyOnDrawEnd(SURFOBJ *SurfObj);
-BOOL FASTCALL MouseMoveCursor(LONG X, LONG Y);
-VOID FASTCALL EnableMouse(HDC hDisplayDC);
-VOID MouseGDICallBack(PMOUSE_INPUT_DATA Data, ULONG InputCount);
-VOID FASTCALL SetPointerRect(PSYSTEM_CURSORINFO CurInfo, PRECTL PointerRect);
+INT INTERNAL_CALL MouseSafetyOnDrawStart(SURFOBJ *SurfObj, LONG HazardX1, LONG HazardY1, LONG HazardX2, LONG HazardY2);
+INT INTERNAL_CALL MouseSafetyOnDrawEnd(SURFOBJ *SurfObj);
#ifndef XBUTTON1
#define XBUTTON1 (0x01)
reactos/subsys/win32k/include
diff -u -r1.41 -r1.41.8.1
--- msgqueue.h 8 Aug 2004 17:57:34 -0000 1.41
+++ msgqueue.h 13 Dec 2004 09:39:17 -0000 1.41.8.1
@@ -194,8 +194,8 @@
inline BOOL MsqIsSignaled( PUSER_MESSAGE_QUEUE queue );
inline VOID MsqSetQueueBits( PUSER_MESSAGE_QUEUE queue, WORD bits );
inline VOID MsqClearQueueBits( PUSER_MESSAGE_QUEUE queue, WORD bits );
-BOOL IntInitMessagePumpHook();
-BOOL IntUninitMessagePumpHook();
+BOOL STDCALL IntInitMessagePumpHook();
+BOOL STDCALL IntUninitMessagePumpHook();
#define MAKE_LONG(x, y) ((((y) & 0xFFFF) << 16) | ((x) & 0xFFFF))
PHOOKTABLE FASTCALL MsqGetHooks(PUSER_MESSAGE_QUEUE Queue);
@@ -203,6 +203,7 @@
LPARAM FASTCALL MsqSetMessageExtraInfo(LPARAM lParam);
LPARAM FASTCALL MsqGetMessageExtraInfo(VOID);
+VOID STDCALL MsqRemoveWindowMessagesFromQueue(PVOID pWindow); /* F*(&$ headers, will be gone in the rewrite! */
#define IntLockMessageQueue(MsgQueue) \
ExAcquireFastMutex(&(MsgQueue)->Lock)
reactos/subsys/win32k/include
diff -u -r1.25 -r1.25.2.1
--- object.h 16 Nov 2004 17:36:37 -0000 1.25
+++ object.h 13 Dec 2004 09:39:17 -0000 1.25.2.1
@@ -113,23 +113,10 @@
VOID FASTCALL ObmDestroyHandleTable (PUSER_HANDLE_TABLE HandleTable);
-ULONG FASTCALL CreateGDIHandle (ULONG InternalSize, ULONG UserSize, PVOID *InternalObject, PVOID *UserObject);
-VOID FASTCALL FreeGDIHandle (ULONG Handle);
-
-PVOID FASTCALL AccessUserObject (ULONG Handle);
-PVOID FASTCALL AccessInternalObject (ULONG Handle);
-
-ULONG FASTCALL AccessHandleFromUserObject (PVOID UserObject);
-
-#define AccessInternalObjectFromUserObject(UserObj) \
- ((PVOID)( (PCHAR)(UserObj) - sizeof( ENGOBJ ) ) )
-
-VOID FASTCALL InitEngHandleTable (VOID);
-VOID FASTCALL InitGdiObjectHandleTable (VOID);
+VOID INTERNAL_CALL InitGdiObjectHandleTable (VOID);
VOID FASTCALL CreateStockObjects (VOID);
-
-BOOL FASTCALL CleanupForProcess (struct _EPROCESS *Process, INT Pid);
+VOID FASTCALL CreateSysColorObjects (VOID);
PPOINT FASTCALL GDI_Bezier (const POINT *Points, INT count, PINT nPtsOut);
reactos/subsys/win32k/include
diff -u -r1.9 -r1.9.12.1
--- palette.h 22 Jun 2004 20:08:16 -0000 1.9
+++ palette.h 13 Dec 2004 09:39:17 -0000 1.9.12.1
@@ -35,9 +35,10 @@
ULONG Blue);
HPALETTE FASTCALL PALETTE_AllocPaletteIndexedRGB(ULONG NumColors,
CONST RGBQUAD *Colors);
-#define PALETTE_FreePalette(hPalette) GDIOBJ_FreeObj((HGDIOBJ)hPalette, GDI_OBJECT_TYPE_PALETTE, GDIOBJFLAG_DEFAULT)
+#define PALETTE_FreePalette(hPalette) GDIOBJ_FreeObj((HGDIOBJ)hPalette, GDI_OBJECT_TYPE_PALETTE)
#define PALETTE_LockPalette(hPalette) ((PPALGDI)GDIOBJ_LockObj((HGDIOBJ)hPalette, GDI_OBJECT_TYPE_PALETTE))
-#define PALETTE_UnlockPalette(hPalette) GDIOBJ_UnlockObj((HGDIOBJ)hPalette, GDI_OBJECT_TYPE_PALETTE)
+#define PALETTE_UnlockPalette(hPalette) GDIOBJ_UnlockObj((HGDIOBJ)hPalette)
+BOOL INTERNAL_CALL PALETTE_Cleanup(PVOID ObjectBody);
HPALETTE FASTCALL PALETTE_Init (VOID);
VOID FASTCALL PALETTE_ValidateFlags (PALETTEENTRY* lpPalE, INT size);
reactos/subsys/win32k/include
diff -u -r1.6 -r1.6.8.1
--- tags.h 20 Aug 2004 22:38:49 -0000 1.6
+++ tags.h 13 Dec 2004 09:39:17 -0000 1.6.8.1
@@ -42,9 +42,15 @@
#define TAG_PRINT TAG('P', 'R', 'N', 'T') /* print */
#define TAG_REGION TAG('R', 'G', 'N', 'O') /* region */
#define TAG_GDITEXT TAG('T', 'X', 'T', 'O') /* text */
-#define TAG_FONT TAG('F', 'N', 'T', 'O') /* font entry */
+
+/* Eng objects */
+#define TAG_CLIPOBJ TAG('C', 'L', 'P', 'O') /* clip object */
+#define TAG_XLATEOBJ TAG('X', 'L', 'A', 'O') /* xlate object */
+#define TAG_FONT TAG('F', 'N', 'T', 'E') /* font entry */
+#define TAG_FONTOBJ TAG('F', 'N', 'T', 'O') /* font object */
/* misc */
-#define TAG_DRIVER TAG('G', 'D', 'R', 'V') /* video drivers */
+#define TAG_DRIVER TAG('G', 'D', 'R', 'V') /* video drivers */
+#define TAG_FNTFILE TAG('F', 'N', 'T', 'F') /* font file */
#endif /* _WIN32K_TAGS_H */
reactos/subsys/win32k/include
diff -u -r1.61 -r1.61.2.1
--- window.h 20 Nov 2004 16:46:05 -0000 1.61
+++ window.h 13 Dec 2004 09:39:17 -0000 1.61.2.1
@@ -212,7 +212,7 @@
IntGetWindowInfo(PWINDOW_OBJECT WindowObject, PWINDOWINFO pwi);
VOID FASTCALL
-IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject, INT *cx, INT *cy);
+IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject, UINT *cx, UINT *cy);
BOOL FASTCALL
IntAnyPopup(VOID);
reactos/subsys/win32k/main
diff -u -r1.82 -r1.82.2.1
--- dllmain.c 20 Nov 2004 16:46:05 -0000 1.82
+++ dllmain.c 13 Dec 2004 09:39:17 -0000 1.82.2.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: dllmain.c,v 1.82 2004/11/20 16:46:05 weiden Exp $
+/* $Id: dllmain.c,v 1.82.2.1 2004/12/13 09:39:17 hyperion Exp $
*
* Entry Point for win32k.sys
*/
@@ -45,6 +45,8 @@
ULONG W32ProcessSize);
#endif
+BOOL INTERNAL_CALL GDI_CleanupForProcess (struct _EPROCESS *Process);
+
extern SSDT Win32kSSDT[];
extern SSPT Win32kSSPT[];
extern ULONG Win32kNumberOfSysCalls;
@@ -85,7 +87,7 @@
IntCleanupCurIcons(Process, Win32Process);
CleanupMonitorImpl();
- CleanupForProcess(Process, Process->UniqueProcessId);
+ GDI_CleanupForProcess(Process);
IntGraphicsCheck(FALSE);
@@ -331,6 +333,7 @@
/* Create stock objects, ie. precreated objects commonly
used by win32 applications */
CreateStockObjects();
+ CreateSysColorObjects();
PREPARE_TESTS
reactos/subsys/win32k
diff -u -r1.105.2.1 -r1.105.2.2
--- makefile 8 Dec 2004 21:57:39 -0000 1.105.2.1
+++ makefile 13 Dec 2004 09:39:18 -0000 1.105.2.2
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.105.2.1 2004/12/08 21:57:39 hyperion Exp $
+# $Id: makefile,v 1.105.2.2 2004/12/13 09:39:18 hyperion Exp $
PATH_TO_TOP = ../..
@@ -40,6 +40,7 @@
-DUNICODE \
-Wall -Werror \
-D__USE_W32API -D_WIN32_WINNT=0x0501 \
+ -DGDI_DEBUG \
-DWINVER=0x600 -D_WIN32K_ \
$(CFLAGS_OPT)
@@ -49,7 +50,7 @@
--disable-stdcall-fixup
ENG_OBJECTS= eng/debug.o eng/error.o eng/mem.o eng/brush.o eng/bitblt.o \
- eng/clip.o eng/copybits.o eng/device.o eng/handle.o eng/lineto.o \
+ eng/clip.o eng/copybits.o eng/device.o eng/lineto.o \
eng/paint.o eng/palette.o eng/perfcnt.o eng/semaphor.o eng/surface.o \
eng/xlate.o eng/transblt.o eng/mouse.o eng/misc.o eng/sort.o \
eng/gradient.o eng/event.o eng/float.o
@@ -61,7 +62,7 @@
LDR_OBJECTS = ldr/loader.o
NTUSER_OBJECTS = ntuser/accelerator.o ntuser/callback.o ntuser/caret.o ntuser/class.o \
- ntuser/clipboard.o ntuser/csr.o ntuser/focus.o ntuser/desktop.o \
+ ntuser/clipboard.o ntuser/csr.o ntuser/cursoricon.o ntuser/focus.o ntuser/desktop.o \
ntuser/guicheck.o ntuser/hook.o ntuser/hotkey.o ntuser/input.o \
ntuser/keyboard.o ntuser/menu.o ntuser/message.o ntuser/metric.o \
ntuser/misc.o ntuser/monitor.o ntuser/msgqueue.o ntuser/painting.o \
@@ -70,13 +71,13 @@
ntuser/winpos.o ntuser/winsta.o
OBJECTS_OBJECTS = objects/bitmaps.o objects/brush.o objects/cliprgn.o \
- objects/color.o objects/coord.o objects/dc.o \
- objects/fillshap.o objects/gdiobj.o objects/icm.o \
- objects/line.o objects/metafile.o objects/paint.o \
+ objects/color.o objects/coord.o \
+ objects/dc.o objects/fillshap.o objects/gdiobj.o \
+ objects/icm.o objects/line.o objects/metafile.o objects/paint.o \
objects/path.o objects/pen.o objects/print.o \
objects/region.o objects/text.o objects/wingl.o \
objects/bezier.o objects/dib.o objects/palette.o \
- objects/rect.o objects/polyfill.o objects/cursoricon.o
+ objects/rect.o objects/polyfill.o objects/stockobj.o
DIB_OBJECTS = dib/dib.o dib/dib1bpp.o dib/dib4bpp.o dib/dib8bpp.o dib/dib16bpp.o \
dib/dib24bpp.o dib/dib32bpp.o
reactos/subsys/win32k
diff -u -r1.6 -r1.6.2.1
--- w32k.h 16 Nov 2004 16:27:49 -0000 1.6
+++ w32k.h 13 Dec 2004 09:39:18 -0000 1.6.2.1
@@ -74,8 +74,6 @@
#include <eng/objects.h>
#include <eng/misc.h>
-#include <eng/handle.h>
-#include <eng/clip.h>
#include <dib/dib.h>
reactos/subsys/win32k/misc
diff -u -r1.12 -r1.12.16.1
--- object.c 20 Jun 2004 00:45:36 -0000 1.12
+++ object.c 13 Dec 2004 09:39:19 -0000 1.12.16.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: object.c,v 1.12 2004/06/20 00:45:36 navaraf Exp $
+/* $Id: object.c,v 1.12.16.1 2004/12/13 09:39:19 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -29,8 +29,7 @@
*/
/* INCLUDES ******************************************************************/
-#include <ddk/ntddk.h>
-#include <include/object.h>
+#include <w32k.h>
#define NDEBUG
#include <debug.h>
reactos/subsys/win32k/ntddraw
diff -u -r1.2 -r1.2.20.1
--- ddraw.c 10 May 2004 17:07:18 -0000 1.2
+++ ddraw.c 13 Dec 2004 09:39:19 -0000 1.2.20.1
@@ -8,71 +8,24 @@
* REVISION HISTORY:
* 25-10-2003 PB Created
*/
+
#include <ddk/ntddk.h>
#include <win32k/ntddraw.h>
#include <win32k/win32k.h>
+#include <include/intddraw.h>
#include <win32k/gdiobj.h>
#define NDEBUG
#include <debug.h>
-#define GDI_OBJECT_TYPE_DIRECTDRAW 0x00600000
-#define GDI_OBJECT_TYPE_DD_SURFACE 0x00610000
-#define GDI_OBJECT_TYPE_DD_VIDEOPORT 0x00620000
-#define GDI_OBJECT_TYPE_DD_PALETTE 0x00630000
-#define GDI_OBJECT_TYPE_DD_CLIPPER 0x00640000
-#define GDI_OBJECT_TYPE_DD_MOTIONCOMP 0x00650000
-
/************************************************************************/
/* DIRECT DRAW OBJECT */
/************************************************************************/
-typedef struct
-{
- DD_DIRECTDRAW_LOCAL Local;
- DD_DIRECTDRAW_GLOBAL Global;
- // Drv callbacks
- PGD_GETDIRECTDRAWINFO DrvGetDirectDrawInfo;
- PGD_DISABLEDIRECTDRAW DrvDisableDirectDraw;
- // DD callbacks
- PDD_CREATESURFACE DdCreateSurface;
- PDD_SETCOLORKEY DdDrvSetColorKey; // ?????
- PDD_WAITFORVERTICALBLANK DdWaitForVerticalBlank;
- PDD_CANCREATESURFACE DdCanCreateSurface;
- PDD_CREATEPALETTE DdCreatePalette;
- PDD_GETSCANLINE DdGetScanLine;
- PDD_MAPMEMORY DdMapMemory;
- // Surface callbacks
- PDD_SURFCB_DESTROYSURFACE DdDestroySurface;
- PDD_SURFCB_FLIP DdFlip;
- PDD_SURFCB_SETCLIPLIST DdSetClipList;
- PDD_SURFCB_LOCK DdLock;
- PDD_SURFCB_UNLOCK DdUnlock;
- PDD_SURFCB_BLT DdBlt;
- PDD_SURFCB_SETCOLORKEY DdSetColorKey;
- PDD_SURFCB_ADDATTACHEDSURFACE DdAddAttachedSurface;
- PDD_SURFCB_GETBLTSTATUS DdGetBltStatus;
- PDD_SURFCB_GETFLIPSTATUS DdGetFlipStatus;
- PDD_SURFCB_UPDATEOVERLAY DdUpdateOverlay;
- PDD_SURFCB_SETOVERLAYPOSITION DdSetOverlayPosition;
- PDD_SURFCB_SETPALETTE DdSetPalette;
- // Palette callbacks
- PDD_PALCB_DESTROYPALETTE DdDestroyPalette;
- PDD_PALCB_SETENTRIES DdSetEntries;
- // D3D Device context callbacks
- PD3DNTHAL_CONTEXTCREATECB D3dContextCreate;
- PD3DNTHAL_CONTEXTDESTROYCB D3dContextDestroy;
- // D3D Buffer callbacks
- PDD_CANCREATESURFACE DdCanCreateD3DBuffer;
- PDD_CREATESURFACE DdCreateD3DBuffer;
- PDD_SURFCB_DESTROYSURFACE DdDestroyD3DBuffer;
- PDD_SURFCB_LOCK DdLockD3DBuffer;
- PDD_SURFCB_UNLOCK DdUnlockD3DBuffer;
-} DD_DIRECTDRAW, *PDD_DIRECTDRAW;
-
-static BOOL FASTCALL DirectDrawCleanup(PDD_DIRECTDRAW pDirectDraw)
+BOOL FASTCALL
+DD_Cleanup(PDD_DIRECTDRAW pDD)
{
- pDirectDraw->DrvDisableDirectDraw(pDirectDraw->Global.dhpdev);
+ pDD->DrvDisableDirectDraw(pDD->Global.dhpdev);
return TRUE;
}
@@ -112,7 +65,7 @@
return NULL;
}
- HANDLE hDirectDraw = GDIOBJ_AllocObj(sizeof(DD_DIRECTDRAW), GDI_OBJECT_TYPE_DIRECTDRAW, (GDICLEANUPPROC)DirectDrawCleanup);
+ HANDLE hDirectDraw = GDIOBJ_AllocObj(GDI_OBJECT_TYPE_DIRECTDRAW);
PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(hDirectDraw, GDI_OBJECT_TYPE_DIRECTDRAW);
pDirectDraw->Global.dhpdev = pDC->PDev;
@@ -121,54 +74,54 @@
pDirectDraw->DrvGetDirectDrawInfo = pDC->DriverFunctions.GetDirectDrawInfo;
pDirectDraw->DrvDisableDirectDraw = pDC->DriverFunctions.DisableDirectDraw;
- if (callbacks.dwFlags && DDHAL_CB32_CREATESURFACE)
+ if (callbacks.dwFlags & DDHAL_CB32_CREATESURFACE)
pDirectDraw->DdCreateSurface = callbacks.CreateSurface;
- if (callbacks.dwFlags && DDHAL_CB32_SETCOLORKEY)
+ if (callbacks.dwFlags & DDHAL_CB32_SETCOLORKEY)
pDirectDraw->DdDrvSetColorKey = callbacks.SetColorKey;
- if (callbacks.dwFlags && DDHAL_CB32_WAITFORVERTICALBLANK)
+ if (callbacks.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK)
pDirectDraw->DdWaitForVerticalBlank = callbacks.WaitForVerticalBlank;
- if (callbacks.dwFlags && DDHAL_CB32_CANCREATESURFACE)
+ if (callbacks.dwFlags & DDHAL_CB32_CANCREATESURFACE)
pDirectDraw->DdCanCreateSurface = callbacks.CanCreateSurface;
- if (callbacks.dwFlags && DDHAL_CB32_CREATEPALETTE)
+ if (callbacks.dwFlags & DDHAL_CB32_CREATEPALETTE)
pDirectDraw->DdCreatePalette = callbacks.CreatePalette;
- if (callbacks.dwFlags && DDHAL_CB32_GETSCANLINE)
+ if (callbacks.dwFlags & DDHAL_CB32_GETSCANLINE)
pDirectDraw->DdGetScanLine = callbacks.GetScanLine;
- if (callbacks.dwFlags && DDHAL_CB32_MAPMEMORY)
+ if (callbacks.dwFlags & DDHAL_CB32_MAPMEMORY)
pDirectDraw->DdMapMemory = callbacks.MapMemory;
- if (surface_callbacks.dwFlags && DDHAL_SURFCB32_DESTROYSURFACE)
+ if (surface_callbacks.dwFlags & DDHAL_SURFCB32_DESTROYSURFACE)
pDirectDraw->DdDestroySurface = surface_callbacks.DestroySurface;
- if (surface_callbacks.dwFlags && DDHAL_SURFCB32_FLIP)
+ if (surface_callbacks.dwFlags & DDHAL_SURFCB32_FLIP)
pDirectDraw->DdFlip = surface_callbacks.Flip;
- if (surface_callbacks.dwFlags && DDHAL_SURFCB32_SETCLIPLIST)
+ if (surface_callbacks.dwFlags & DDHAL_SURFCB32_SETCLIPLIST)
pDirectDraw->DdSetClipList = surface_callbacks.SetClipList;
- if (surface_callbacks.dwFlags && DDHAL_SURFCB32_LOCK)
+ if (surface_callbacks.dwFlags & DDHAL_SURFCB32_LOCK)
pDirectDraw->DdLock = surface_callbacks.Lock;
- if (surface_callbacks.dwFlags && DDHAL_SURFCB32_UNLOCK)
+ if (surface_callbacks.dwFlags & DDHAL_SURFCB32_UNLOCK)
pDirectDraw->DdUnlock = surface_callbacks.Unlock;
- if (surface_callbacks.dwFlags && DDHAL_SURFCB32_BLT)
+ if (surface_callbacks.dwFlags & DDHAL_SURFCB32_BLT)
pDirectDraw->DdBlt = surface_callbacks.Blt;
- if (surface_callbacks.dwFlags && DDHAL_SURFCB32_SETCOLORKEY)
+ if (surface_callbacks.dwFlags & DDHAL_SURFCB32_SETCOLORKEY)
pDirectDraw->DdSetColorKey = surface_callbacks.SetColorKey;
- if (surface_callbacks.dwFlags && DDHAL_SURFCB32_ADDATTACHEDSURFACE)
+ if (surface_callbacks.dwFlags & DDHAL_SURFCB32_ADDATTACHEDSURFACE)
pDirectDraw->DdAddAttachedSurface = surface_callbacks.AddAttachedSurface;
- if (surface_callbacks.dwFlags && DDHAL_SURFCB32_GETBLTSTATUS)
+ if (surface_callbacks.dwFlags & DDHAL_SURFCB32_GETBLTSTATUS)
pDirectDraw->DdGetBltStatus = surface_callbacks.GetBltStatus;
- if (surface_callbacks.dwFlags && DDHAL_SURFCB32_GETFLIPSTATUS)
+ if (surface_callbacks.dwFlags & DDHAL_SURFCB32_GETFLIPSTATUS)
pDirectDraw->DdGetFlipStatus = surface_callbacks.GetFlipStatus;
- if (surface_callbacks.dwFlags && DDHAL_SURFCB32_UPDATEOVERLAY)
+ if (surface_callbacks.dwFlags & DDHAL_SURFCB32_UPDATEOVERLAY)
pDirectDraw->DdUpdateOverlay = surface_callbacks.UpdateOverlay;
- if (surface_callbacks.dwFlags && DDHAL_SURFCB32_SETOVERLAYPOSITION)
+ if (surface_callbacks.dwFlags & DDHAL_SURFCB32_SETOVERLAYPOSITION)
pDirectDraw->DdSetOverlayPosition = surface_callbacks.SetOverlayPosition;
- if (surface_callbacks.dwFlags && DDHAL_SURFCB32_SETPALETTE)
+ if (surface_callbacks.dwFlags & DDHAL_SURFCB32_SETPALETTE)
pDirectDraw->DdSetPalette = surface_callbacks.SetPalette;
- if (palette_callbacks.dwFlags && DDHAL_PALCB32_DESTROYPALETTE)
+ if (palette_callbacks.dwFlags & DDHAL_PALCB32_DESTROYPALETTE)
pDirectDraw->DdDestroyPalette = palette_callbacks.DestroyPalette;
- if (palette_callbacks.dwFlags && DDHAL_PALCB32_SETENTRIES)
+ if (palette_callbacks.dwFlags & DDHAL_PALCB32_SETENTRIES)
pDirectDraw->DdSetEntries = palette_callbacks.SetEntries;
- GDIOBJ_UnlockObj(hDirectDraw, GDI_OBJECT_TYPE_DIRECTDRAW);
+ GDIOBJ_UnlockObj(hDirectDraw);
DC_UnlockDc(hdc);
return hDirectDraw;
@@ -178,7 +131,7 @@
HANDLE hDirectDrawLocal
)
{
- return GDIOBJ_FreeObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW, 0);
+ return GDIOBJ_FreeObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
}
BOOL STDCALL NtGdiDdQueryDirectDrawObject(
@@ -209,7 +162,7 @@
if (!success)
{
- GDIOBJ_UnlockObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
+ GDIOBJ_UnlockObj(hDirectDrawLocal);
return FALSE;
}
@@ -235,7 +188,7 @@
pDirectDraw->DdUnlockD3DBuffer = puD3dBufferCallbacks->UnlockD3DBuffer;
}
- GDIOBJ_UnlockObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
+ GDIOBJ_UnlockObj(hDirectDrawLocal);
return TRUE;
}
@@ -244,17 +197,8 @@
/* SURFACE OBJECT */
/************************************************************************/
-typedef struct
-{
- DD_SURFACE_LOCAL Local;
- DD_SURFACE_MORE More;
- DD_SURFACE_GLOBAL Global;
- DD_ATTACHLIST AttachList;
- DD_ATTACHLIST AttachListFrom;
- BOOL bComplete;
-} DD_SURFACE, *PDD_SURFACE;
-
-static BOOL FASTCALL DDSurfaceCleanup(PDD_SURFACE pSurface)
+BOOL FASTCALL
+DDSURF_Cleanup(PDD_SURFACE pDDSurf)
{
//FIXME: implement
return TRUE;
@@ -274,10 +218,11 @@
return NULL;
if (!hSurface)
- hSurface = GDIOBJ_AllocObj(sizeof(DD_SURFACE), GDI_OBJECT_TYPE_DD_SURFACE, (GDICLEANUPPROC)DDSurfaceCleanup);
+ hSurface = GDIOBJ_AllocObj(GDI_OBJECT_TYPE_DD_SURFACE);
PDD_SURFACE pSurface = GDIOBJ_LockObj(hSurface, GDI_OBJECT_TYPE_DD_SURFACE);
-
+ /* FIXME - Handle pSurface == NULL!!!! */
+
RtlMoveMemory(&pSurface->Local, puSurfaceLocal, sizeof(DD_SURFACE_LOCAL));
RtlMoveMemory(&pSurface->More, puSurfaceMore, sizeof(DD_SURFACE_MORE));
RtlMoveMemory(&pSurface->Global, puSurfaceGlobal, sizeof(DD_SURFACE_GLOBAL));
@@ -289,8 +234,8 @@
// FIXME: figure out how to use this
pSurface->bComplete = bComplete;
- GDIOBJ_UnlockObj(hSurface, GDI_OBJECT_TYPE_DD_SURFACE);
- GDIOBJ_UnlockObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
+ GDIOBJ_UnlockObj(hSurface);
+ GDIOBJ_UnlockObj(hDirectDrawLocal);
return hSurface;
}
@@ -299,7 +244,7 @@
HANDLE hSurface
)
{
- return GDIOBJ_FreeObj(hSurface, GDI_OBJECT_TYPE_DD_SURFACE, 0);
+ return GDIOBJ_FreeObj(hSurface, GDI_OBJECT_TYPE_DD_SURFACE);
}
/*
@@ -314,7 +259,7 @@
PDD_SURFACE pSurfaceTo = GDIOBJ_LockObj(hSurfaceTo, GDI_OBJECT_TYPE_DD_SURFACE);
if (!pSurfaceTo)
{
- GDIOBJ_UnlockObj(hSurfaceTo, GDI_OBJECT_TYPE_DD_SURFACE);
+ GDIOBJ_UnlockObj(hSurfaceFrom);
return FALSE;
}
@@ -323,8 +268,8 @@
pSurfaceFrom->Local.lpAttachListFrom = pSurfaceFrom->AttachListFrom;
}
- GDIOBJ_UnlockObj(hSurfaceFrom, GDI_OBJECT_TYPE_DD_SURFACE);
- GDIOBJ_UnlockObj(hSurfaceTo, GDI_OBJECT_TYPE_DD_SURFACE);
+ GDIOBJ_UnlockObj(hSurfaceFrom);
+ GDIOBJ_UnlockObj(hSurfaceTo);
return TRUE;
}
*/
reactos/subsys/win32k/ntuser
diff -N cursoricon.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ cursoricon.c 13 Dec 2004 09:39:20 -0000 1.2.2.1
@@ -0,0 +1,1212 @@
+/*
+ * ReactOS W32 Subsystem
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/* $Id: cursoricon.c,v 1.2.2.1 2004/12/13 09:39:20 hyperion Exp $ */
+#include <w32k.h>
+
+PCURICON_OBJECT FASTCALL
+IntGetCurIconObject(PWINSTATION_OBJECT WinStaObject, HANDLE Handle)
+{
+ PCURICON_OBJECT Object;
+ NTSTATUS Status;
+
+ Status = ObmReferenceObjectByHandle(WinStaObject->HandleTable,
+ Handle, otCursorIcon, (PVOID*)&Object);
+ if (!NT_SUCCESS(Status))
+ {
+ return NULL;
+ }
+ return Object;
+}
+
+#define COLORCURSORS_ALLOWED FALSE
+HCURSOR FASTCALL
+IntSetCursor(PWINSTATION_OBJECT WinStaObject, PCURICON_OBJECT NewCursor,
+ BOOL ForceChange)
+{
+ BITMAPOBJ *BitmapObj;
+ SURFOBJ *SurfObj;
+ PDEVINFO DevInfo;
+ PBITMAPOBJ MaskBmpObj = NULL;
+ PSYSTEM_CURSORINFO CurInfo;
+ PCURICON_OBJECT OldCursor;
+ HCURSOR Ret = (HCURSOR)0;
+ HBITMAP dcbmp, hColor = (HBITMAP)0;
+ HBITMAP hMask = 0;
+ SURFOBJ *soMask = NULL, *soColor = NULL;
+ XLATEOBJ *XlateObj = NULL;
+ HDC Screen;
+
+ CurInfo = IntGetSysCursorInfo(WinStaObject);
+ OldCursor = CurInfo->CurrentCursorObject;
+ if (OldCursor)
+ {
+ Ret = (HCURSOR)OldCursor->Self;
+ }
+
+ if (!ForceChange && OldCursor == NewCursor)
+ {
+ return Ret;
+ }
+ else
+ {
+ if(!(Screen = IntGetScreenDC()))
+ {
+ return (HCURSOR)0;
+ }
+ /* FIXME use the desktop's HDC instead of using ScreenDeviceContext */
+ PDC dc = DC_LockDc(Screen);
+
+ if (!dc)
+ {
+ return Ret;
+ }
+ dcbmp = dc->w.hBitmap;
+ DevInfo = dc->DevInfo;
+ DC_UnlockDc(Screen);
+
+ BitmapObj = BITMAPOBJ_LockBitmap(dcbmp);
+ /* FIXME - BitmapObj can be NULL!!!!! */
+ SurfObj = &BitmapObj->SurfObj;
+ }
+
+ if (!NewCursor && (CurInfo->CurrentCursorObject || ForceChange))
+ {
+ if (NULL != CurInfo->CurrentCursorObject && CurInfo->ShowingCursor)
+ {
+ /* Remove the cursor if it was displayed */
+ if (GDIDEV(SurfObj)->Pointer.MovePointer)
+ GDIDEV(SurfObj)->Pointer.MovePointer(SurfObj, -1, -1, NULL);
+ else
+ EngMovePointer(SurfObj, -1, -1, NULL);
+ GDIDEV(SurfObj)->Pointer.Exclude.right = -1;
+ }
+
+ GDIDEV(SurfObj)->Pointer.Status = SPS_ACCEPT_NOEXCLUDE;
+
+ CurInfo->CurrentCursorObject = NewCursor; /* i.e. CurrentCursorObject = NULL */
+ CurInfo->ShowingCursor = 0;
+ BITMAPOBJ_UnlockBitmap(dcbmp);
+ return Ret;
+ }
+
+ if (!NewCursor)
+ {
+ BITMAPOBJ_UnlockBitmap(dcbmp);
+ return Ret;
+ }
+
+ /* TODO: Fixme. Logic is screwed above */
+
+ ASSERT(NewCursor);
+ MaskBmpObj = BITMAPOBJ_LockBitmap(NewCursor->IconInfo.hbmMask);
+ if (MaskBmpObj)
+ {
+ const int maskBpp = BitsPerFormat(MaskBmpObj->SurfObj.iBitmapFormat);
+ BITMAPOBJ_UnlockBitmap(NewCursor->IconInfo.hbmMask);
+ if (maskBpp != 1)
+ {
+ DPRINT1("SetCursor: The Mask bitmap must have 1BPP!\n");
+ BITMAPOBJ_UnlockBitmap(dcbmp);
+ return Ret;
+ }
+
+ if ((DevInfo->flGraphicsCaps2 & GCAPS2_ALPHACURSOR) &&
+ SurfObj->iBitmapFormat >= BMF_16BPP &&
+ SurfObj->iBitmapFormat <= BMF_32BPP &&
+ NewCursor->Shadow && COLORCURSORS_ALLOWED)
+ {
+ /* FIXME - Create a color pointer, only 32bit bitmap, set alpha bits!
+ Do not pass a mask bitmap to DrvSetPointerShape()!
+ Create a XLATEOBJ that describes the colors of the bitmap. */
+ DPRINT1("SetCursor: (Colored) alpha cursors are not supported!\n");
+ }
+ else
+ {
+ if(NewCursor->IconInfo.hbmColor
+ && COLORCURSORS_ALLOWED)
+ {
+ /* FIXME - Create a color pointer, create only one 32bit bitmap!
+ Do not pass a mask bitmap to DrvSetPointerShape()!
+ Create a XLATEOBJ that describes the colors of the bitmap.
+ (16bit bitmaps are propably allowed) */
+ DPRINT1("SetCursor: Cursors with colors are not supported!\n");
+ }
+ else
+ {
+ MaskBmpObj = BITMAPOBJ_LockBitmap(NewCursor->IconInfo.hbmMask);
+ if(MaskBmpObj)
+ {
+ RECTL DestRect = {0, 0, MaskBmpObj->SurfObj.sizlBitmap.cx, MaskBmpObj->SurfObj.sizlBitmap.cy};
+ POINTL SourcePoint = {0, 0};
+
+ /*
+ * NOTE: For now we create the cursor in top-down bitmap,
+ * because VMware driver rejects it otherwise. This should
+ * be fixed later.
+ */
+ hMask = EngCreateBitmap(
+ MaskBmpObj->SurfObj.sizlBitmap, abs(MaskBmpObj->SurfObj.lDelta),
+ MaskBmpObj->SurfObj.iBitmapFormat, BMF_TOPDOWN,
+ NULL);
+ ASSERT(hMask);
+ soMask = EngLockSurface((HSURF)hMask);
+ EngCopyBits(soMask, &MaskBmpObj->SurfObj, NULL, NULL,
+ &DestRect, &SourcePoint);
+ BITMAPOBJ_UnlockBitmap(NewCursor->IconInfo.hbmMask);
+ }
+ }
+ }
+ CurInfo->ShowingCursor = CURSOR_SHOWING;
+ CurInfo->CurrentCursorObject = NewCursor;
+ }
+ else
+ {
+ CurInfo->ShowingCursor = 0;
+ CurInfo->CurrentCursorObject = NULL;
+ }
+
+ if (GDIDEVFUNCS(SurfObj).SetPointerShape)
+ {
+ GDIDEV(SurfObj)->Pointer.Status =
+ GDIDEVFUNCS(SurfObj).SetPointerShape(
+ SurfObj, soMask, soColor, XlateObj,
+ NewCursor->IconInfo.xHotspot,
+ NewCursor->IconInfo.yHotspot,
+ CurInfo->x,
+ CurInfo->y,
+ NULL,
+ SPS_CHANGE);
+ DPRINT("SetCursor: DrvSetPointerShape() returned %x\n",
+ GDIDEV(SurfObj)->Pointer.Status);
+ }
+ else
+ {
+ GDIDEV(SurfObj)->Pointer.Status = SPS_DECLINE;
+ }
+
+ if(GDIDEV(SurfObj)->Pointer.Status == SPS_DECLINE)
+ {
+ GDIDEV(SurfObj)->Pointer.Status = EngSetPointerShape(
+ SurfObj, soMask, soColor, XlateObj,
+ NewCursor->IconInfo.xHotspot,
+ NewCursor->IconInfo.yHotspot,
+ CurInfo->x,
+ CurInfo->y,
+ NULL,
+ SPS_CHANGE);
+ GDIDEV(SurfObj)->Pointer.MovePointer = EngMovePointer;
+ }
+ else
+ {
+ GDIDEV(SurfObj)->Pointer.MovePointer = GDIDEVFUNCS(SurfObj).MovePointer;
+ }
+
+ BITMAPOBJ_UnlockBitmap(dcbmp);
+ if(hMask)
+ {
+ EngUnlockSurface(soMask);
+ EngDeleteSurface((HSURF)hMask);
+ }
+ if(hColor)
+ {
+ EngDeleteSurface((HSURF)hColor);
+ }
+ if(XlateObj)
+ {
+ EngDeleteXlate(XlateObj);
+ }
+
+ if(GDIDEV(SurfObj)->Pointer.Status == SPS_ERROR)
+ DPRINT1("SetCursor: DrvSetPointerShape() returned SPS_ERROR\n");
+
+ return Ret;
+}
+
+BOOL FASTCALL
+IntSetupCurIconHandles(PWINSTATION_OBJECT WinStaObject)
+{
+ return TRUE;
+}
+
+PCURICON_OBJECT FASTCALL
+IntFindExistingCurIconObject(PWINSTATION_OBJECT WinStaObject, HMODULE hModule,
+ HRSRC hRsrc, LONG cx, LONG cy)
+{
+ PUSER_HANDLE_TABLE HandleTable;
+ PLIST_ENTRY CurrentEntry;
+ PUSER_HANDLE_BLOCK Current;
+ PCURICON_OBJECT Object;
+ ULONG i;
+
+ HandleTable = (PUSER_HANDLE_TABLE)WinStaObject->HandleTable;
+ ObmpLockHandleTable(HandleTable);
+
+ CurrentEntry = HandleTable->ListHead.Flink;
+ while(CurrentEntry != &HandleTable->ListHead)
+ {
+ Current = CONTAINING_RECORD(CurrentEntry, USER_HANDLE_BLOCK, ListEntry);
+ for(i = 0; i < HANDLE_BLOCK_ENTRIES; i++)
+ {
+ Object = (PCURICON_OBJECT)Current->Handles[i].ObjectBody;
+ if(Object && (ObmReferenceObjectByPointer(Object, otCursorIcon) == STATUS_SUCCESS))
+ {
+ if((Object->hModule == hModule) && (Object->hRsrc == hRsrc))
+ {
+ if(cx && ((cx != Object->Size.cx) || (cy != Object->Size.cy)))
+ {
+ ObmDereferenceObject(Object);
+ continue;
+ }
+ ObmpUnlockHandleTable(HandleTable);
+ return Object;
+ }
+ ObmDereferenceObject(Object);
+ }
+ }
+ CurrentEntry = CurrentEntry->Flink;
+ }
+
+ ObmpUnlockHandleTable(HandleTable);
+ return NULL;
+}
+
+PCURICON_OBJECT FASTCALL
+IntCreateCurIconHandle(PWINSTATION_OBJECT WinStaObject)
+{
+ PCURICON_OBJECT Object;
+ HANDLE Handle;
+ PW32PROCESS Win32Process;
+
+ Object = ObmCreateObject(WinStaObject->HandleTable, &Handle, otCursorIcon, sizeof(CURICON_OBJECT));
+
+ if(!Object)
+ {
+ SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
+ return FALSE;
+ }
+
+ Win32Process = PsGetWin32Process();
+
+ IntLockProcessCursorIcons(Win32Process);
+ InsertTailList(&Win32Process->CursorIconListHead, &Object->ListEntry);
+ IntUnLockProcessCursorIcons(Win32Process);
+
+ Object->Self = Handle;
+ Object->Process = PsGetWin32Process();
+
+ return Object;
+}
+
+BOOL FASTCALL
+IntDestroyCurIconObject(PWINSTATION_OBJECT WinStaObject, HANDLE Handle, BOOL RemoveFromProcess)
+{
+ PSYSTEM_CURSORINFO CurInfo;
+ PCURICON_OBJECT Object;
+ HBITMAP bmpMask, bmpColor;
+ NTSTATUS Status;
+ BOOL Ret;
+
+ Status = ObmReferenceObjectByHandle(WinStaObject->HandleTable, Handle, otCursorIcon, (PVOID*)&Object);
+ if(!NT_SUCCESS(Status))
+ {
+ return FALSE;
+ }
+
+ if (Object->Process != PsGetWin32Process())
+ {
+ ObmDereferenceObject(Object);
+ return FALSE;
+ }
+
+ CurInfo = IntGetSysCursorInfo(WinStaObject);
+
+ if (CurInfo->CurrentCursorObject == Object)
+ {
+ /* Hide the cursor if we're destroying the current cursor */
+ IntSetCursor(WinStaObject, NULL, TRUE);
+ }
+
+ bmpMask = Object->IconInfo.hbmMask;
+ bmpColor = Object->IconInfo.hbmColor;
+
+ if (Object->Process && RemoveFromProcess)
+ {
+ IntLockProcessCursorIcons(Object->Process);
+ RemoveEntryList(&Object->ListEntry);
+ IntUnLockProcessCursorIcons(Object->Process);
+ }
+
+ Ret = NT_SUCCESS(ObmCloseHandle(WinStaObject->HandleTable, Handle));
+
+ /* delete bitmaps */
+ if(bmpMask)
+ {
+ GDIOBJ_SetOwnership(bmpMask, PsGetCurrentProcess());
+ NtGdiDeleteObject(bmpMask);
+ }
+ if(bmpColor)
+ {
+ GDIOBJ_SetOwnership(bmpColor, PsGetCurrentProcess());
+ NtGdiDeleteObject(bmpColor);
+ }
+
+ ObmDereferenceObject(Object);
+
+ return Ret;
+}
+
+VOID FASTCALL
+IntCleanupCurIcons(struct _EPROCESS *Process, PW32PROCESS Win32Process)
+{
+ PWINSTATION_OBJECT WinStaObject;
+ PCURICON_OBJECT Current;
+ PLIST_ENTRY CurrentEntry, NextEntry;
+
+ WinStaObject = IntGetWinStaObj();
+ if(WinStaObject != NULL)
+ {
+ CurrentEntry = Win32Process->CursorIconListHead.Flink;
+ while(CurrentEntry != &Win32Process->CursorIconListHead)
+ {
+ NextEntry = CurrentEntry->Flink;
+ Current = CONTAINING_RECORD(CurrentEntry, CURICON_OBJECT, ListEntry);
+ RemoveEntryList(&Current->ListEntry);
+ IntDestroyCurIconObject(WinStaObject, Current->Self, FALSE);
+ CurrentEntry = NextEntry;
+ }
+ ObDereferenceObject(WinStaObject);
+ }
+}
+
+/*
+ * @implemented
+ */
+HANDLE
+STDCALL
+NtUserCreateCursorIconHandle(PICONINFO IconInfo, BOOL Indirect)
+{
+ PCURICON_OBJECT CurIconObject;
+ PWINSTATION_OBJECT WinStaObject;
+ PBITMAPOBJ bmp;
+ NTSTATUS Status;
+ HANDLE Ret;
+
+ WinStaObject = IntGetWinStaObj();
+ if(WinStaObject == NULL)
+ {
+ return (HANDLE)0;
+ }
+
+ CurIconObject = IntCreateCurIconHandle(WinStaObject);
+ if(CurIconObject)
+ {
+ Ret = CurIconObject->Self;
+
+ if(IconInfo)
+ {
+ Status = MmCopyFromCaller(&CurIconObject->IconInfo, IconInfo, sizeof(ICONINFO));
+ if(NT_SUCCESS(Status))
+ {
+ if(Indirect)
+ {
+ CurIconObject->IconInfo.hbmMask = BITMAPOBJ_CopyBitmap(CurIconObject->IconInfo.hbmMask);
+ CurIconObject->IconInfo.hbmColor = BITMAPOBJ_CopyBitmap(CurIconObject->IconInfo.hbmColor);
+ }
+ if(CurIconObject->IconInfo.hbmColor &&
+ (bmp = BITMAPOBJ_LockBitmap(CurIconObject->IconInfo.hbmColor)))
+ {
+ CurIconObject->Size.cx = bmp->SurfObj.sizlBitmap.cx;
+ CurIconObject->Size.cy = bmp->SurfObj.sizlBitmap.cy;
+ BITMAPOBJ_UnlockBitmap(CurIconObject->IconInfo.hbmColor);
+ GDIOBJ_SetOwnership(CurIconObject->IconInfo.hbmColor, NULL);
+ }
+ else
+ {
+ if(CurIconObject->IconInfo.hbmMask &&
+ (bmp = BITMAPOBJ_LockBitmap(CurIconObject->IconInfo.hbmMask)))
+ {
+ CurIconObject->Size.cx = bmp->SurfObj.sizlBitmap.cx;
+ CurIconObject->Size.cy = bmp->SurfObj.sizlBitmap.cy / 2;
+ BITMAPOBJ_UnlockBitmap(CurIconObject->IconInfo.hbmMask);
+ GDIOBJ_SetOwnership(CurIconObject->IconInfo.hbmMask, NULL);
+ }
+ }
+ }
+ else
+ {
+ SetLastNtError(Status);
+ /* FIXME - Don't exit here */
+ }
+ }
+
+ ObDereferenceObject(WinStaObject);
+ return Ret;
+ }
+
+ SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
+ ObDereferenceObject(WinStaObject);
+ return (HANDLE)0;
+}
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+NtUserGetCursorIconInfo(
+ HANDLE Handle,
+ PICONINFO IconInfo)
+{
+ ICONINFO ii;
+ PCURICON_OBJECT CurIconObject;
+ PWINSTATION_OBJECT WinStaObject;
+ NTSTATUS Status;
+ BOOL Ret = FALSE;
+
+ WinStaObject = IntGetWinStaObj();
+ if(WinStaObject == NULL)
+ {
+ return FALSE;
+ }
+
+ CurIconObject = IntGetCurIconObject(WinStaObject, Handle);
+ if(CurIconObject)
+ {
+ if(IconInfo)
+ {
+ RtlCopyMemory(&ii, &CurIconObject->IconInfo, sizeof(ICONINFO));
+
+ /* Copy bitmaps */
+ ii.hbmMask = BITMAPOBJ_CopyBitmap(ii.hbmMask);
+ ii.hbmColor = BITMAPOBJ_CopyBitmap(ii.hbmColor);
+
+ /* Copy fields */
+ Status = MmCopyToCaller(IconInfo, &ii, sizeof(ICONINFO));
+ if(NT_SUCCESS(Status))
+ Ret = TRUE;
+ else
+ SetLastNtError(Status);
+ }
+ else
+ {
+ SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ }
+
+ IntReleaseCurIconObject(CurIconObject);
+ ObDereferenceObject(WinStaObject);
+ return Ret;
+ }
+
+ SetLastWin32Error(ERROR_INVALID_CURSOR_HANDLE);
+ ObDereferenceObject(WinStaObject);
+ return FALSE;
+}
+
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+NtUserGetCursorIconSize(
+ HANDLE Handle,
+ BOOL *fIcon,
+ SIZE *Size)
+{
+ PCURICON_OBJECT CurIconObject;
+ PBITMAPOBJ bmp;
+ PWINSTATION_OBJECT WinStaObject;
+ NTSTATUS Status;
+ BOOL Ret = FALSE;
+ SIZE SafeSize;
+
+ WinStaObject = IntGetWinStaObj();
+ if(WinStaObject == NULL)
+ {
+ return FALSE;
+ }
+
+ CurIconObject = IntGetCurIconObject(WinStaObject, Handle);
+ if(CurIconObject)
+ {
+ /* Copy fields */
+ Status = MmCopyToCaller(fIcon, &CurIconObject->IconInfo.fIcon, sizeof(BOOL));
+ if(!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ goto done;
+ }
+
+ bmp = BITMAPOBJ_LockBitmap(CurIconObject->IconInfo.hbmColor);
+ if(!bmp)
+ goto done;
+
+ SafeSize.cx = bmp->SurfObj.sizlBitmap.cx;
+ SafeSize.cy = bmp->SurfObj.sizlBitmap.cy;
+ Status = MmCopyToCaller(Size, &SafeSize, sizeof(SIZE));
+ if(NT_SUCCESS(Status))
+ Ret = TRUE;
+ else
+ SetLastNtError(Status);
+
+ BITMAPOBJ_UnlockBitmap(CurIconObject->IconInfo.hbmColor);
+
+ done:
+ IntReleaseCurIconObject(CurIconObject);
+ ObDereferenceObject(WinStaObject);
+ return Ret;
+ }
+
+ SetLastWin32Error(ERROR_INVALID_CURSOR_HANDLE);
+ ObDereferenceObject(WinStaObject);
+ return FALSE;
+}
+
+
+/*
+ * @unimplemented
+ */
+DWORD
+STDCALL
+NtUserGetCursorFrameInfo(
+ DWORD Unknown0,
+ DWORD Unknown1,
+ DWORD Unknown2,
+ DWORD Unknown3)
+{
+ UNIMPLEMENTED
+
+ return 0;
+}
+
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+NtUserGetCursorInfo(
+ PCURSORINFO pci)
+{
+ CURSORINFO SafeCi;
+ PSYSTEM_CURSORINFO CurInfo;
+ PWINSTATION_OBJECT WinStaObject;
+ NTSTATUS Status;
+ PCURICON_OBJECT CursorObject;
+
+ Status = MmCopyFromCaller(&SafeCi.cbSize, pci, sizeof(DWORD));
+ if(!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ return FALSE;
+ }
+
+ if(SafeCi.cbSize != sizeof(CURSORINFO))
+ {
+ SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ WinStaObject = IntGetWinStaObj();
+ if(WinStaObject == NULL)
+ {
+ return FALSE;
+ }
+
+ CurInfo = IntGetSysCursorInfo(WinStaObject);
+ CursorObject = (PCURICON_OBJECT)CurInfo->CurrentCursorObject;
+
+ SafeCi.flags = ((CurInfo->ShowingCursor && CursorObject) ? CURSOR_SHOWING : 0);
+ SafeCi.hCursor = (CursorObject ? (HCURSOR)CursorObject->Self : (HCURSOR)0);
+ SafeCi.ptScreenPos.x = CurInfo->x;
+ SafeCi.ptScreenPos.y = CurInfo->y;
+
+ Status = MmCopyToCaller(pci, &SafeCi, sizeof(CURSORINFO));
+ if(!NT_SUCCESS(Status))
+ {
+ ObDereferenceObject(WinStaObject);
+ SetLastNtError(Status);
+ return FALSE;
+ }
+
+ ObDereferenceObject(WinStaObject);
+ return TRUE;
+}
+
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+NtUserClipCursor(
+ RECT *UnsafeRect)
+{
+ /* FIXME - check if process has WINSTA_WRITEATTRIBUTES */
+
+ PWINSTATION_OBJECT WinStaObject;
+ PSYSTEM_CURSORINFO CurInfo;
+ RECT Rect;
+ PWINDOW_OBJECT DesktopWindow = NULL;
+
+ WinStaObject = IntGetWinStaObj();
+ if (WinStaObject == NULL)
+ {
+ return FALSE;
+ }
+
+ if (NULL != UnsafeRect && ! NT_SUCCESS(MmCopyFromCaller(&Rect, UnsafeRect, sizeof(RECT))))
+ {
+ ObDereferenceObject(WinStaObject);
+ SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ CurInfo = IntGetSysCursorInfo(WinStaObject);
+ if(WinStaObject->ActiveDesktop)
+ DesktopWindow = IntGetWindowObject(WinStaObject->ActiveDesktop->DesktopWindow);
+
+ if((Rect.right > Rect.left) && (Rect.bottom > Rect.top)
+ && DesktopWindow && UnsafeRect != NULL)
+ {
+ MOUSEINPUT mi;
+
+ CurInfo->CursorClipInfo.IsClipped = TRUE;
+ CurInfo->CursorClipInfo.Left = max(Rect.left, DesktopWindow->WindowRect.left);
+ CurInfo->CursorClipInfo.Top = max(Rect.top, DesktopWindow->WindowRect.top);
+ CurInfo->CursorClipInfo.Right = min(Rect.right - 1, DesktopWindow->WindowRect.right - 1);
+ CurInfo->CursorClipInfo.Bottom = min(Rect.bottom - 1, DesktopWindow->WindowRect.bottom - 1);
+ IntReleaseWindowObject(DesktopWindow);
+
+ mi.dx = CurInfo->x;
+ mi.dy = CurInfo->y;
+ mi.mouseData = 0;
+ mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE;
+ mi.time = 0;
+ mi.dwExtraInfo = 0;
+ IntMouseInput(&mi);
+
+ return TRUE;
+ }
+
+ CurInfo->CursorClipInfo.IsClipped = FALSE;
+ ObDereferenceObject(WinStaObject);
+
+ return TRUE;
+}
+
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+NtUserDestroyCursorIcon(
+ HANDLE Handle,
+ DWORD Unknown)
+{
+ PWINSTATION_OBJECT WinStaObject;
+
+ WinStaObject = IntGetWinStaObj();
+ if(WinStaObject == NULL)
+ {
+ return FALSE;
+ }
+
+ if(IntDestroyCurIconObject(WinStaObject, Handle, TRUE))
+ {
+ ObDereferenceObject(WinStaObject);
+ return TRUE;
+ }
+
+ SetLastWin32Error(ERROR_INVALID_CURSOR_HANDLE);
+ ObDereferenceObject(WinStaObject);
+ return FALSE;
+}
+
+
+/*
+ * @implemented
+ */
+HICON
+STDCALL
+NtUserFindExistingCursorIcon(
+ HMODULE hModule,
+ HRSRC hRsrc,
+ LONG cx,
+ LONG cy)
+{
+ PCURICON_OBJECT CurIconObject;
+ PWINSTATION_OBJECT WinStaObject;
+ HANDLE Ret = (HANDLE)0;
+
+ WinStaObject = IntGetWinStaObj();
+ if(WinStaObject == NULL)
+ {
+ return Ret;
+ }
+
+ CurIconObject = IntFindExistingCurIconObject(WinStaObject, hModule, hRsrc, cx, cy);
+ if(CurIconObject)
+ {
+ Ret = CurIconObject->Self;
+
+ IntReleaseCurIconObject(CurIconObject);
+ ObDereferenceObject(WinStaObject);
+ return Ret;
+ }
+
+ SetLastWin32Error(ERROR_INVALID_CURSOR_HANDLE);
+ ObDereferenceObject(WinStaObject);
+ return (HANDLE)0;
+}
+
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+NtUserGetClipCursor(
+ RECT *lpRect)
+{
+ /* FIXME - check if process has WINSTA_READATTRIBUTES */
+ PSYSTEM_CURSORINFO CurInfo;
+ PWINSTATION_OBJECT WinStaObject;
+ RECT Rect;
+ NTSTATUS Status;
+
+ if(!lpRect)
+ return FALSE;
+
+ WinStaObject = IntGetWinStaObj();
+ if (WinStaObject == NULL)
+ {
+ DPRINT("Validation of window station handle (0x%X) failed\n",
+ PROCESS_WINDOW_STATION());
+ return FALSE;
+ }
+
+ CurInfo = IntGetSysCursorInfo(WinStaObject);
+ if(CurInfo->CursorClipInfo.IsClipped)
+ {
+ Rect.left = CurInfo->CursorClipInfo.Left;
+ Rect.top = CurInfo->CursorClipInfo.Top;
+ Rect.right = CurInfo->CursorClipInfo.Right;
+ Rect.bottom = CurInfo->CursorClipInfo.Bottom;
+ }
+ else
+ {
+ Rect.left = 0;
+ Rect.top = 0;
+ Rect.right = NtUserGetSystemMetrics(SM_CXSCREEN);
+ Rect.bottom = NtUserGetSystemMetrics(SM_CYSCREEN);
+ }
+
+ Status = MmCopyToCaller((PRECT)lpRect, &Rect, sizeof(RECT));
+ if(!NT_SUCCESS(Status))
+ {
+ ObDereferenceObject(WinStaObject);
+ SetLastNtError(Status);
+ return FALSE;
+ }
+
+ ObDereferenceObject(WinStaObject);
+
+ return TRUE;
+}
+
+
+/*
+ * @implemented
+ */
+HCURSOR
+STDCALL
+NtUserSetCursor(
+ HCURSOR hCursor)
+{
+ PCURICON_OBJECT CurIconObject;
+ HICON OldCursor = (HCURSOR)0;
+ PWINSTATION_OBJECT WinStaObject;
+
+ WinStaObject = IntGetWinStaObj();
+ if(WinStaObject == NULL)
+ {
+ return (HCURSOR)0;
+ }
+
+ CurIconObject = IntGetCurIconObject(WinStaObject, hCursor);
+ if(CurIconObject)
+ {
+ OldCursor = IntSetCursor(WinStaObject, CurIconObject, FALSE);
+ IntReleaseCurIconObject(CurIconObject);
+ }
+ else
+ SetLastWin32Error(ERROR_INVALID_CURSOR_HANDLE);
+
+ ObDereferenceObject(WinStaObject);
+ return OldCursor;
+}
+
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+NtUserSetCursorIconContents(
+ HANDLE Handle,
+ PICONINFO IconInfo)
+{
+ PCURICON_OBJECT CurIconObject;
+ PBITMAPOBJ bmp;
+ PWINSTATION_OBJECT WinStaObject;
+ NTSTATUS Status;
+ BOOL Ret = FALSE;
+
+ WinStaObject = IntGetWinStaObj();
+ if(WinStaObject == NULL)
+ {
+ return FALSE;
+ }
+
+ CurIconObject = IntGetCurIconObject(WinStaObject, Handle);
+ if(CurIconObject)
+ {
+ /* Copy fields */
+ Status = MmCopyFromCaller(&CurIconObject->IconInfo, IconInfo, sizeof(ICONINFO));
+ if(!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ goto done;
+ }
+
+ bmp = BITMAPOBJ_LockBitmap(CurIconObject->IconInfo.hbmColor);
+ if(bmp)
+ {
+ CurIconObject->Size.cx = bmp->SurfObj.sizlBitmap.cx;
+ CurIconObject->Size.cy = bmp->SurfObj.sizlBitmap.cy;
+ BITMAPOBJ_UnlockBitmap(CurIconObject->IconInfo.hbmColor);
+ GDIOBJ_SetOwnership(CurIconObject->IconInfo.hbmColor, NULL);
+ }
+ else
+ {
+ bmp = BITMAPOBJ_LockBitmap(CurIconObject->IconInfo.hbmMask);
+ if(!bmp)
+ goto done;
+
+ CurIconObject->Size.cx = bmp->SurfObj.sizlBitmap.cx;
+ CurIconObject->Size.cy = bmp->SurfObj.sizlBitmap.cy / 2;
+
+ BITMAPOBJ_UnlockBitmap(CurIconObject->IconInfo.hbmMask);
+ GDIOBJ_SetOwnership(CurIconObject->IconInfo.hbmMask, NULL);
+ }
+
+ Ret = TRUE;
+
+ done:
+ IntReleaseCurIconObject(CurIconObject);
+ ObDereferenceObject(WinStaObject);
+ return Ret;
+ }
+
+ SetLastWin32Error(ERROR_INVALID_CURSOR_HANDLE);
+ ObDereferenceObject(WinStaObject);
+ return FALSE;
+}
+
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+NtUserSetCursorIconData(
+ HANDLE Handle,
+ PBOOL fIcon,
+ POINT *Hotspot,
+ HMODULE hModule,
+ HRSRC hRsrc,
+ HRSRC hGroupRsrc)
+{
+ PCURICON_OBJECT CurIconObject;
+ PWINSTATION_OBJECT WinStaObject;
+ NTSTATUS Status;
+ POINT SafeHotspot;
+ BOOL Ret = FALSE;
+
+ WinStaObject = IntGetWinStaObj();
+ if(WinStaObject == NULL)
+ {
+ return FALSE;
+ }
+
+ CurIconObject = IntGetCurIconObject(WinStaObject, Handle);
+ if(CurIconObject)
+ {
+ CurIconObject->hModule = hModule;
+ CurIconObject->hRsrc = hRsrc;
+ CurIconObject->hGroupRsrc = hGroupRsrc;
+
+ /* Copy fields */
+ if(fIcon)
+ {
+ Status = MmCopyFromCaller(&CurIconObject->IconInfo.fIcon, fIcon, sizeof(BOOL));
+ if(!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ goto done;
+ }
+ }
+ else
+ {
+ if(!Hotspot)
+ Ret = TRUE;
+ }
+
+ if(Hotspot)
+ {
+ Status = MmCopyFromCaller(&SafeHotspot, Hotspot, sizeof(POINT));
+ if(NT_SUCCESS(Status))
+ {
+ CurIconObject->IconInfo.xHotspot = SafeHotspot.x;
+ CurIconObject->IconInfo.yHotspot = SafeHotspot.y;
+
+ Ret = TRUE;
+ }
+ else
+ SetLastNtError(Status);
+ }
+
[truncated at 1000 lines; 216 more skipped]
reactos/subsys/win32k/ntuser
diff -u -r1.60 -r1.60.2.1
--- class.c 20 Nov 2004 16:46:06 -0000 1.60
+++ class.c 13 Dec 2004 09:39:19 -0000 1.60.2.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: class.c,v 1.60 2004/11/20 16:46:06 weiden Exp $
+/* $Id: class.c,v 1.60.2.1 2004/12/13 09:39:19 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -33,11 +33,22 @@
#define NDEBUG
#include <debug.h>
+/* FIXME: Just a bad hack for now... */
+LIST_ENTRY GlobalClassListHead;
+FAST_MUTEX GlobalClassListLock;
+#define IntLockGlobalClassList() \
+ ExAcquireFastMutex(&GlobalClassListLock)
+#define IntUnlockGlobalClassList() \
+ ExReleaseFastMutex(&GlobalClassListLock)
+
+
/* FUNCTIONS *****************************************************************/
NTSTATUS FASTCALL
InitClassImpl(VOID)
{
+ ExInitializeFastMutex(&GlobalClassListLock);
+ InitializeListHead(&GlobalClassListHead);
return(STATUS_SUCCESS);
}
@@ -55,19 +66,19 @@
{
PWNDCLASS_OBJECT Current, BestMatch = NULL;
PLIST_ENTRY CurrentEntry;
- PW32PROCESS Process = PsGetWin32Process();
- IntLockProcessClasses(Process);
- CurrentEntry = Process->ClassListHead.Flink;
- while (CurrentEntry != &Process->ClassListHead)
+ /* HACK!! */
+ IntLockGlobalClassList();
+ CurrentEntry = GlobalClassListHead.Flink;
+ while (CurrentEntry != &GlobalClassListHead)
{
- Current = CONTAINING_RECORD(CurrentEntry, WNDCLASS_OBJECT, ListEntry);
+ Current = CONTAINING_RECORD(CurrentEntry, WNDCLASS_OBJECT, GlobalListEntry);
if (Current->Atom == Atom && (hInstance == NULL || Current->hInstance == hInstance))
{
*Class = Current;
ObmReferenceObject(Current);
- IntUnLockProcessClasses(Process);
+ IntUnlockGlobalClassList();
return TRUE;
}
@@ -76,7 +87,7 @@
CurrentEntry = CurrentEntry->Flink;
}
- IntUnLockProcessClasses(Process);
+ IntUnlockGlobalClassList();
if (BestMatch != NULL)
{
@@ -111,6 +122,7 @@
if (!NT_SUCCESS(Status))
{
+ DPRINT1("Failed to lookup class atom!\n");
return FALSE;
}
@@ -413,7 +425,7 @@
WinStaObject = PsGetWin32Thread()->Desktop->WindowStation;
- if (ClassName->Length)
+ if (ClassName->Length > 0)
{
DPRINT("NtUserRegisterClassExWOW(%S)\n", ClassName->Buffer);
/* FIXME - Safely copy/verify the buffer first!!! */
@@ -422,7 +434,7 @@
&Atom);
if (!NT_SUCCESS(Status))
{
- DPRINT("Failed adding class name (%S) to atom table\n",
+ DPRINT1("Failed adding class name (%S) to atom table\n",
ClassName->Buffer);
SetLastNtError(Status);
return((RTL_ATOM)0);
@@ -445,6 +457,11 @@
IntLockProcessClasses(PsGetWin32Process());
InsertTailList(&PsGetWin32Process()->ClassListHead, &ClassObject->ListEntry);
IntUnLockProcessClasses(PsGetWin32Process());
+
+ /* HACK!!! */
+ IntLockGlobalClassList();
+ InsertTailList(&GlobalClassListHead, &ClassObject->GlobalListEntry);
+ IntUnlockGlobalClassList();
return(Atom);
}
@@ -681,6 +698,10 @@
ClassDereferenceObject(Class);
RemoveEntryList(&Class->ListEntry);
+
+ IntLockGlobalClassList();
+ RemoveEntryList(&Class->GlobalListEntry);
+ IntUnlockGlobalClassList();
RtlDeleteAtomFromAtomTable(WinStaObject->AtomTable, Class->Atom);
reactos/subsys/win32k/ntuser
diff -u -r1.24.2.1 -r1.24.2.2
--- desktop.c 8 Dec 2004 21:57:39 -0000 1.24.2.1
+++ desktop.c 13 Dec 2004 09:39:19 -0000 1.24.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: desktop.c,v 1.24.2.1 2004/12/08 21:57:39 hyperion Exp $
+ * $Id: desktop.c,v 1.24.2.2 2004/12/13 09:39:19 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -287,6 +287,7 @@
PDC dc;
BITMAPOBJ *BitmapObj;
dc = DC_LockDc(ScreenDeviceContext);
+ /* FIXME - Handle dc == NULL!!!! */
BitmapObj = BITMAPOBJ_LockBitmap(dc->w.hBitmap);
if(BitmapObj)
{
@@ -408,6 +409,42 @@
return pdo->DesktopWindow;
}
+BOOL FASTCALL IntDesktopUpdatePerUserSettings(BOOL bEnable)
+{
+ if (bEnable)
+ {
+ RTL_QUERY_REGISTRY_TABLE QueryTable[2];
+ NTSTATUS Status;
+
+ RtlZeroMemory(QueryTable, sizeof(QueryTable));
+
+ QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT;
+ QueryTable[0].Name = L"PaintDesktopVersion";
+ QueryTable[0].EntryContext = &g_PaintDesktopVersion;
+
+ /* Query the "PaintDesktopVersion" flag in the "Control Panel\Desktop" key */
+ Status = RtlQueryRegistryValues(RTL_REGISTRY_USER,
+ L"Control Panel\\Desktop",
+ QueryTable, NULL, NULL);
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("RtlQueryRegistryValues failed for PaintDesktopVersion (%x)\n",
+ Status);
+ g_PaintDesktopVersion = FALSE;
+ return FALSE;
+ }
+
+ DPRINT("PaintDesktopVersion = %d\n", g_PaintDesktopVersion);
+
+ return TRUE;
+ }
+ else
+ {
+ g_PaintDesktopVersion = FALSE;
+ return TRUE;
+ }
+}
+
/* PUBLIC FUNCTIONS ***********************************************************/
NTSTATUS FASTCALL
reactos/subsys/win32k/ntuser
diff -u -r1.25.2.1 -r1.25.2.2
--- focus.c 8 Dec 2004 21:57:39 -0000 1.25.2.1
+++ focus.c 13 Dec 2004 09:39:19 -0000 1.25.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: focus.c,v 1.25.2.1 2004/12/08 21:57:39 hyperion Exp $
+ * $Id: focus.c,v 1.25.2.2 2004/12/13 09:39:19 hyperion Exp $
*/
#include <w32k.h>
reactos/subsys/win32k/ntuser
diff -u -r1.38 -r1.38.6.1
--- input.c 28 Sep 2004 15:02:30 -0000 1.38
+++ input.c 13 Dec 2004 09:39:19 -0000 1.38.6.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: input.c,v 1.38 2004/09/28 15:02:30 weiden Exp $
+/* $Id: input.c,v 1.38.6.1 2004/12/13 09:39:19 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -543,7 +543,6 @@
BITMAPOBJ *BitmapObj;
SURFOBJ *SurfObj;
PDC dc;
- RECTL PointerRect;
PWINDOW_OBJECT DesktopWindow;
NTSTATUS Status;
@@ -649,16 +648,17 @@
{
SurfObj = &BitmapObj->SurfObj;
- if (GDIDEV(SurfObj)->MovePointer)
+ if (GDIDEV(SurfObj)->Pointer.MovePointer)
{
- GDIDEV(SurfObj)->MovePointer(SurfObj, MousePos.x, MousePos.y, &PointerRect);
+ GDIDEV(SurfObj)->Pointer.MovePointer(SurfObj, MousePos.x, MousePos.y, &(GDIDEV(SurfObj)->Pointer.Exclude));
}
+ /* FIXME - That's a bad thing! We should't access private gdi pointer fields
+ from here. However it is required so MouseSafetyOnDrawEnd() can
+ properly paint the mouse cursor to the screen again. See the
+ comment in MouseSafetyOnDrawEnd() to fix this problem! */
+ GDIDEV(SurfObj)->Pointer.Pos = MousePos;
BITMAPOBJ_UnlockBitmap(hBitmap);
-
- ExAcquireFastMutex(&CurInfo->CursorMutex);
- SetPointerRect(CurInfo, &PointerRect);
- ExReleaseFastMutex(&CurInfo->CursorMutex);
}
}
}
reactos/subsys/win32k/ntuser
diff -u -r1.75 -r1.75.2.1
--- message.c 20 Nov 2004 16:46:06 -0000 1.75
+++ message.c 13 Dec 2004 09:39:19 -0000 1.75.2.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: message.c,v 1.75 2004/11/20 16:46:06 weiden Exp $
+/* $Id: message.c,v 1.75.2.1 2004/12/13 09:39:19 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -519,7 +519,10 @@
{
/* post the message to the other window */
Msg->hwnd = Wnd->Self;
- MsqPostMessage(Wnd->MessageQueue, Msg, FALSE);
+ if(!(Wnd->Status & WINDOWSTATUS_DESTROYING))
+ {
+ MsqPostMessage(Wnd->MessageQueue, Msg, FALSE);
+ }
/* eat the message */
IntReleaseWindowObject(Wnd);
@@ -1114,6 +1117,13 @@
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
return FALSE;
}
+ if(Window->Status & WINDOWSTATUS_DESTROYING)
+ {
+ IntReleaseWindowObject(Window);
+ DPRINT1("Attempted to post message to window 0x%x that is being destroyed!\n", Wnd);
+ /* FIXME - last error code? */
+ return FALSE;
+ }
UserModeMsg.hwnd = Wnd;
UserModeMsg.message = Msg;
@@ -1293,6 +1303,14 @@
return FALSE;
}
+ if(Window->Status & WINDOWSTATUS_DESTROYING)
+ {
+ IntReleaseWindowObject(Window);
+ /* FIXME - last error? */
+ DPRINT1("Attempted to send message to window 0x%x that is being destroyed!\n", hWnd);
+ return FALSE;
+ }
+
Status = MsqSendMessage(Window->MessageQueue, hWnd, Msg, wParam, lParam,
uTimeout, (uFlags & SMTO_BLOCK), uResult);
IntReleaseWindowObject(Window);
reactos/subsys/win32k/ntuser
diff -u -r1.88.2.1 -r1.88.2.2
--- misc.c 8 Dec 2004 21:57:40 -0000 1.88.2.1
+++ misc.c 13 Dec 2004 09:39:19 -0000 1.88.2.2
@@ -1,4 +1,4 @@
-/* $Id: misc.c,v 1.88.2.1 2004/12/08 21:57:40 hyperion Exp $
+/* $Id: misc.c,v 1.88.2.2 2004/12/13 09:39:19 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -130,9 +130,9 @@
case NOPARAM_ROUTINE_CSRSS_INITIALIZED:
Result = (DWORD)CsrInit();
break;
-
+
case NOPARAM_ROUTINE_GDI_QUERY_TABLE:
- /* not used yet */
+ Result = (DWORD)GDI_MapHandleTable(NtCurrentProcess());
break;
default:
@@ -222,7 +222,9 @@
if (!NT_SUCCESS(Status))
return (DWORD)FALSE;
- Result = (DWORD)IntSwapMouseButton(WinStaObject, (BOOL)Param);
+ /* FIXME
+ Result = (DWORD)IntSwapMouseButton(WinStaObject, (BOOL)Param); */
+ Result = 0;
ObDereferenceObject(WinStaObject);
return Result;
@@ -512,6 +514,100 @@
case TWOPARAM_ROUTINE_REGISTERLOGONPROC:
return (DWORD)IntRegisterLogonProcess(Param1, (BOOL)Param2);
+
+ case TWOPARAM_ROUTINE_SETSYSCOLORS:
+ {
+ DWORD Ret = 0;
+ PVOID Buffer;
+ struct
+ {
+ INT *Elements;
+ COLORREF *Colors;
+ } ChangeSysColors;
+
+ /* FIXME - we should make use of SEH here... */
+
+ Status = MmCopyFromCaller(&ChangeSysColors, (PVOID)Param1, sizeof(ChangeSysColors));
+ if(!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ return 0;
+ }
+
+ Buffer = ExAllocatePool(PagedPool, (Param2 * sizeof(INT)) + (Param2 * sizeof(COLORREF)));
+ if(Buffer != NULL)
+ {
+ INT *Elements = (INT*)Buffer;
+ COLORREF *Colors = (COLORREF*)Buffer + Param2;
+
+ Status = MmCopyFromCaller(Elements, ChangeSysColors.Elements, Param2 * sizeof(INT));
+ if(NT_SUCCESS(Status))
+ {
+ Status = MmCopyFromCaller(Colors, ChangeSysColors.Colors, Param2 * sizeof(COLORREF));
+ if(NT_SUCCESS(Status))
+ {
+ Ret = (DWORD)IntSetSysColors((UINT)Param2, Elements, Colors);
+ }
+ else
+ SetLastNtError(Status);
+ }
+ else
+ SetLastNtError(Status);
+
+ ExFreePool(Buffer);
+ }
+ return Ret;
+ }
+
+ case TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES:
+ case TWOPARAM_ROUTINE_GETSYSCOLORPENS:
+ case TWOPARAM_ROUTINE_GETSYSCOLORS:
+ {
+ DWORD Ret = 0;
+ union
+ {
+ PVOID Pointer;
+ HBRUSH *Brushes;
+ HPEN *Pens;
+ COLORREF *Colors;
+ } Buffer;
+
+ /* FIXME - we should make use of SEH here... */
+
+ Buffer.Pointer = ExAllocatePool(PagedPool, Param2 * sizeof(HANDLE));
+ if(Buffer.Pointer != NULL)
+ {
+ switch(Routine)
+ {
+ case TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES:
+ Ret = (DWORD)IntGetSysColorBrushes(Buffer.Brushes, (UINT)Param2);
+ break;
+ case TWOPARAM_ROUTINE_GETSYSCOLORPENS:
+ Ret = (DWORD)IntGetSysColorPens(Buffer.Pens, (UINT)Param2);
+ break;
+ case TWOPARAM_ROUTINE_GETSYSCOLORS:
+ Ret = (DWORD)IntGetSysColors(Buffer.Colors, (UINT)Param2);
+ break;
+ default:
+ Ret = 0;
+ break;
+ }
+
+ if(Ret > 0)
+ {
+ Status = MmCopyToCaller((PVOID)Param1, Buffer.Pointer, Param2 * sizeof(HANDLE));
+ if(!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ Ret = 0;
+ }
+ }
+
+ ExFreePool(Buffer.Pointer);
+ }
+
+ return Ret;
+ }
}
DPRINT1("Calling invalid routine number 0x%x in NtUserCallTwoParam(), Param1=0x%x Parm2=0x%x\n",
@@ -1330,44 +1426,14 @@
}
}
-
BOOL STDCALL
NtUserUpdatePerUserSystemParameters(
- DWORD dwUnknown,
+ DWORD dwReserved,
BOOL bEnable)
{
- if (bEnable)
- {
- RTL_QUERY_REGISTRY_TABLE QueryTable[2];
- NTSTATUS Status;
-
- RtlZeroMemory(QueryTable, sizeof(QueryTable));
-
- QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT;
- QueryTable[0].Name = L"PaintDesktopVersion";
- QueryTable[0].EntryContext = &g_PaintDesktopVersion;
-
- /* Query the "PaintDesktopVersion" flag in the "Control Panel\Desktop" key */
- Status = RtlQueryRegistryValues(RTL_REGISTRY_USER,
- L"Control Panel\\Desktop",
- QueryTable, NULL, NULL);
- if (!NT_SUCCESS(Status))
- {
- DPRINT1("RtlQueryRegistryValues failed for PaintDesktopVersion (%x)\n",
- Status);
- g_PaintDesktopVersion = FALSE;
- return FALSE;
- }
-
- DPRINT1("PaintDesktopVersion = %d\n", g_PaintDesktopVersion);
-
- return TRUE;
- }
- else
- {
- g_PaintDesktopVersion = FALSE;
- return TRUE;
- }
+ BOOL Result = TRUE;
+ Result &= IntDesktopUpdatePerUserSettings(bEnable);
+ return Result;
}
/* EOF */
reactos/subsys/win32k/ntuser
diff -u -r1.108 -r1.108.2.1
--- msgqueue.c 20 Nov 2004 16:46:06 -0000 1.108
+++ msgqueue.c 13 Dec 2004 09:39:19 -0000 1.108.2.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: msgqueue.c,v 1.108 2004/11/20 16:46:06 weiden Exp $
+/* $Id: msgqueue.c,v 1.108.2.1 2004/12/13 09:39:19 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -719,7 +719,7 @@
PUSER_SENT_MESSAGE Message;
PLIST_ENTRY Entry;
LRESULT Result;
- BOOL Freed;
+ BOOL SenderReturned;
PUSER_SENT_MESSAGE_NOTIFY NotifyMessage;
IntLockMessageQueue(MessageQueue);
@@ -755,8 +755,8 @@
/* remove the message from the dispatching list, so lock the sender's message queue */
IntLockMessageQueue(Message->SenderQueue);
- Freed = (Message->DispatchingListEntry.Flink == NULL);
- if(!Freed)
+ SenderReturned = (Message->DispatchingListEntry.Flink == NULL);
+ if(!SenderReturned)
{
/* only remove it from the dispatching list if not already removed by a timeout */
RemoveEntryList(&Message->DispatchingListEntry);
@@ -780,7 +780,7 @@
IntUnLockMessageQueue(Message->SenderQueue);
/* Notify the sender if they specified a callback. */
- if (!Freed && Message->CompletionCallback != NULL)
+ if (!SenderReturned && Message->CompletionCallback != NULL)
{
if(!(NotifyMessage = ExAllocatePoolWithTag(NonPagedPool,
sizeof(USER_SENT_MESSAGE_NOTIFY), TAG_USRMSG)))
@@ -799,18 +799,94 @@
}
Notified:
- if(!Freed)
- {
- /* only dereference our message queue if the message has not been timed out */
- IntDereferenceMessageQueue(MessageQueue);
- IntDereferenceMessageQueue(Message->SenderQueue);
- }
+
+ /* dereference both sender and our queue */
+ IntDereferenceMessageQueue(MessageQueue);
+ IntDereferenceMessageQueue(Message->SenderQueue);
- /* only free the message if not freed already */
+ /* free the message */
ExFreePool(Message);
return(TRUE);
}
+VOID STDCALL
+MsqRemoveWindowMessagesFromQueue(PVOID pWindow)
+{
+ PUSER_SENT_MESSAGE SentMessage;
+ PUSER_MESSAGE PostedMessage;
+ PUSER_MESSAGE_QUEUE MessageQueue;
+ PLIST_ENTRY CurrentEntry, ListHead;
+ PWINDOW_OBJECT Window = pWindow;
+
+ ASSERT(Window);
+
+ MessageQueue = Window->MessageQueue;
+ ASSERT(MessageQueue);
+
+ IntLockMessageQueue(MessageQueue);
+
+ /* remove the posted messages for this window */
+ CurrentEntry = MessageQueue->PostedMessagesListHead.Flink;
+ ListHead = &MessageQueue->PostedMessagesListHead;
+ while (CurrentEntry != ListHead)
+ {
+ PostedMessage = CONTAINING_RECORD(CurrentEntry, USER_MESSAGE,
+ ListEntry);
+ if (PostedMessage->Msg.hwnd == Window->Self)
+ {
+ RemoveEntryList(&PostedMessage->ListEntry);
+ MsqDestroyMessage(PostedMessage);
+ CurrentEntry = MessageQueue->PostedMessagesListHead.Flink;
+ }
+ else
+ {
+ CurrentEntry = CurrentEntry->Flink;
+ }
+ }
+
+ /* remove the sent messages for this window */
+ CurrentEntry = MessageQueue->SentMessagesListHead.Flink;
+ ListHead = &MessageQueue->SentMessagesListHead;
+ while (CurrentEntry != ListHead)
+ {
+ CurrentEntry = RemoveHeadList(&MessageQueue->SentMessagesListHead);
+ SentMessage = CONTAINING_RECORD(CurrentEntry, USER_SENT_MESSAGE,
+ ListEntry);
+ if(SentMessage->Msg.hwnd == Window->Self)
+ {
+ IntLockMessageQueue(SentMessage->SenderQueue);
+ DPRINT("Notify the sender and remove a message from the queue that had not been dispatched\n");
+
+ /* remove the message from the dispatching list */
+ if(SentMessage->DispatchingListEntry.Flink != NULL)
+ {
+ RemoveEntryList(&SentMessage->DispatchingListEntry);
+ }
+
+ /* wake the sender's thread */
+ if (SentMessage->CompletionEvent != NULL)
+ {
+ KeSetEvent(SentMessage->CompletionEvent, IO_NO_INCREMENT, FALSE);
+ }
+ IntUnLockMessageQueue(SentMessage->SenderQueue);
+
+ /* dereference our and the sender's message queue */
+ IntDereferenceMessageQueue(MessageQueue);
+ IntDereferenceMessageQueue(SentMessage->SenderQueue);
+
+ /* free the message */
+ ExFreePool(SentMessage);
+
+ CurrentEntry = MessageQueue->SentMessagesListHead.Flink;
+ }
+ else
+ {
+ CurrentEntry = CurrentEntry->Flink;
+ }
+ }
+ IntUnLockMessageQueue(MessageQueue);
+}
+
VOID FASTCALL
MsqSendNotifyMessage(PUSER_MESSAGE_QUEUE MessageQueue,
PUSER_SENT_MESSAGE_NOTIFY NotifyMessage)
@@ -919,8 +995,6 @@
Message->CompletionEvent = NULL;
Message->Result = NULL;
RemoveEntryList(&Message->DispatchingListEntry);
- IntDereferenceMessageQueue(MessageQueue);
- IntDereferenceMessageQueue(ThreadQueue);
break;
}
Entry = Entry->Flink;
@@ -978,8 +1052,6 @@
Message->CompletionEvent = NULL;
Message->Result = NULL;
RemoveEntryList(&Message->DispatchingListEntry);
- IntDereferenceMessageQueue(MessageQueue);
- IntDereferenceMessageQueue(ThreadQueue);
break;
}
Entry = Entry->Flink;
@@ -1144,6 +1216,7 @@
CurrentSentMessage = CONTAINING_RECORD(CurrentEntry, USER_SENT_MESSAGE,
ListEntry);
+ IntLockMessageQueue(CurrentSentMessage->SenderQueue);
DPRINT("Notify the sender and remove a message from the queue that had not been dispatched\n");
/* remove the message from the dispatching list */
@@ -1157,9 +1230,11 @@
{
KeSetEvent(CurrentSentMessage->CompletionEvent, IO_NO_INCREMENT, FALSE);
}
+ IntUnLockMessageQueue(CurrentSentMessage->SenderQueue);
- /* dereference our message queue */
+ /* dereference our and the sender's message queue */
IntDereferenceMessageQueue(MessageQueue);
+ IntDereferenceMessageQueue(CurrentSentMessage->SenderQueue);
/* free the message */
ExFreePool(CurrentSentMessage);
@@ -1181,8 +1256,9 @@
KeSetEvent(CurrentSentMessage->CompletionEvent, IO_NO_INCREMENT, FALSE);
}
- /* dereference our message queue */
+ /* dereference our and the sender's message queue */
IntDereferenceMessageQueue(MessageQueue);
+ IntDereferenceMessageQueue(CurrentSentMessage->SenderQueue);
/* free the message */
ExFreePool(CurrentSentMessage);
@@ -1196,7 +1272,9 @@
DispatchingListEntry);
CurrentSentMessage->CompletionEvent = NULL;
CurrentSentMessage->Result = NULL;
- IntDereferenceMessageQueue(MessageQueue);
+
+ /* do NOT dereference our message queue as it might get attempted to be
+ locked later */
}
IntUnLockMessageQueue(MessageQueue);
reactos/subsys/win32k/ntuser
diff -u -r1.87.2.1 -r1.87.2.2
--- painting.c 8 Dec 2004 21:57:40 -0000 1.87.2.1
+++ painting.c 13 Dec 2004 09:39:19 -0000 1.87.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: painting.c,v 1.87.2.1 2004/12/08 21:57:40 hyperion Exp $
+ * $Id: painting.c,v 1.87.2.2 2004/12/13 09:39:19 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/subsys/win32k/ntuser
diff -u -r1.47.2.1 -r1.47.2.2
--- stubs.c 8 Dec 2004 21:57:40 -0000 1.47.2.1
+++ stubs.c 13 Dec 2004 09:39:20 -0000 1.47.2.2
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.47.2.1 2004/12/08 21:57:40 hyperion Exp $
+/* $Id: stubs.c,v 1.47.2.2 2004/12/13 09:39:20 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -8,8 +8,7 @@
* REVISION HISTORY:
* 04-06-2001 CSH Created
*/
-#include <ddk/ntddk.h>
-#include <windows.h>
+#include <w32k.h>
#define NDEBUG
#include <debug.h>
reactos/subsys/win32k/ntuser
diff -u -r1.67 -r1.67.8.1
--- windc.c 3 Aug 2004 19:55:57 -0000 1.67
+++ windc.c 13 Dec 2004 09:39:20 -0000 1.67.8.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: windc.c,v 1.67 2004/08/03 19:55:57 blight Exp $
+/* $Id: windc.c,v 1.67.8.1 2004/12/13 09:39:20 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -586,25 +586,26 @@
return(Dce->hDC);
}
-BOOL FASTCALL
-DCE_InternalDelete(PDCE Dce)
+BOOL INTERNAL_CALL
+DCE_Cleanup(PVOID ObjectBody)
{
PDCE PrevInList;
+ PDCE pDce = (PDCE)ObjectBody;
DCE_LockList();
- if (Dce == FirstDce)
+ if (pDce == FirstDce)
{
- FirstDce = Dce->next;
- PrevInList = Dce;
+ FirstDce = pDce->next;
+ PrevInList = pDce;
}
else
{
for (PrevInList = FirstDce; NULL != PrevInList; PrevInList = PrevInList->next)
{
- if (Dce == PrevInList->next)
+ if (pDce == PrevInList->next)
{
- PrevInList->next = Dce->next;
+ PrevInList->next = pDce->next;
break;
}
}
@@ -665,7 +666,7 @@
* DceFreeDCE
*/
PDCE FASTCALL
-DceFreeDCE(PDCE dce)
+DceFreeDCE(PDCE dce, BOOLEAN Force)
{
DCE *ret;
HANDLE hDce;
@@ -681,6 +682,13 @@
SetDCHook(dce->hDC, NULL, 0L);
#endif
+ if(Force && !GDIOBJ_OwnedByCurrentProcess(dce->hDC))
+ {
+ /* FIXME - changing ownership to current process only works for global objects! */
+ GDIOBJ_SetOwnership(dce->hDC, PsGetCurrentProcess());
+ DC_SetOwnership(dce->hDC, PsGetCurrentProcess());
+ }
+
NtGdiDeleteDC(dce->hDC);
if (dce->hClipRgn && ! (dce->DCXFlags & DCX_KEEPCLIPRGN))
{
@@ -688,6 +696,11 @@
}
hDce = dce->Self;
+ if(Force && !GDIOBJ_OwnedByCurrentProcess(hDce))
+ {
+ /* FIXME - changing ownership to current process only works for global objects! */
+ GDIOBJ_SetOwnership(hDce, PsGetCurrentProcess());
+ }
DCEOBJ_FreeDCE(hDce);
return ret;
@@ -715,7 +728,7 @@
{
if (Window->Class->style & CS_OWNDC) /* owned DCE*/
{
- pDCE = DceFreeDCE(pDCE);
+ pDCE = DceFreeDCE(pDCE, FALSE);
Window->Dce = NULL;
continue;
}
@@ -756,7 +769,7 @@
DCE_LockList();
while (FirstDce != NULL)
{
- DceFreeDCE(FirstDce);
+ DceFreeDCE(FirstDce, TRUE);
}
DCE_UnlockList();
}
@@ -793,9 +806,16 @@
continue;
}
}
+ if (!GDIOBJ_OwnedByCurrentProcess(pDCE->hDC))
+ {
+ /* skip DCs we don't even own */
+ goto skip;
+ }
+
dc = DC_LockDc(pDCE->hDC);
if (dc == NULL)
{
+skip:
if (Window->Self != pDCE->hwndCurrent)
{
IntReleaseWindowObject(CurrentWindow);
reactos/subsys/win32k/ntuser
diff -u -r1.250 -r1.250.2.1
--- window.c 20 Nov 2004 19:08:37 -0000 1.250
+++ window.c 13 Dec 2004 09:39:20 -0000 1.250.2.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: window.c,v 1.250 2004/11/20 19:08:37 weiden Exp $
+/* $Id: window.c,v 1.250.2.1 2004/12/13 09:39:20 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -264,7 +264,7 @@
HWND *ChildHandle;
PWINDOW_OBJECT Child;
PMENU_OBJECT Menu;
- BOOL BelongsToThreadData;
+ BOOLEAN BelongsToThreadData;
ASSERT(Window);
@@ -278,6 +278,7 @@
return 0;
}
Window->Status |= WINDOWSTATUS_DESTROYING;
+ Window->Flags &= ~WS_VISIBLE;
/* remove the window already at this point from the thread window list so we
don't get into trouble when destroying the thread windows while we're still
in IntDestroyWindow() */
@@ -313,22 +314,27 @@
ExFreePool(Children);
}
- if (SendMessages)
- {
- /*
- * Clear the update region to make sure no WM_PAINT messages will be
- * generated for this window while processing the WM_NCDESTROY.
- */
- IntRedrawWindow(Window, NULL, 0,
- RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE |
- RDW_NOINTERNALPAINT | RDW_NOCHILDREN);
-
- /*
- * Send the WM_NCDESTROY to the window being destroyed.
- */
- if(BelongsToThreadData)
- IntSendMessage(Window->Self, WM_NCDESTROY, 0, 0);
- }
+ if(SendMessages)
+ {
+ /*
+ * Clear the update region to make sure no WM_PAINT messages will be
+ * generated for this window while processing the WM_NCDESTROY.
+ */
+ IntRedrawWindow(Window, NULL, 0,
+ RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE |
+ RDW_NOINTERNALPAINT | RDW_NOCHILDREN);
+ if(BelongsToThreadData)
+ IntSendMessage(Window->Self, WM_NCDESTROY, 0, 0);
+ }
+
+ /* flush the message queue */
+ MsqRemoveWindowMessagesFromQueue(Window);
+
+ /* from now on no messages can be sent to this window anymore */
+ IntLockThreadWindows(Window->OwnerThread->Tcb.Win32Thread);
+ Window->Status |= WINDOWSTATUS_DESTROYED;
+ /* don't remove the WINDOWSTATUS_DESTROYING bit */
+ IntUnLockThreadWindows(Window->OwnerThread->Tcb.Win32Thread);
/* reset shell window handles */
if(ThreadData->Desktop)
@@ -385,11 +391,6 @@
IntDestroyScrollBars(Window);
- IntLockThreadWindows(Window->OwnerThread->Tcb.Win32Thread);
- Window->Status |= WINDOWSTATUS_DESTROYED;
- /* don't remove the WINDOWSTATUS_DESTROYING bit */
- IntUnLockThreadWindows(Window->OwnerThread->Tcb.Win32Thread);
-
/* remove the window from the class object */
IntLockClassWindows(Window->Class);
RemoveEntryList(&Window->ClassListEntry);
@@ -412,7 +413,7 @@
}
VOID FASTCALL
-IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject, INT *cx, INT *cy)
+IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject, UINT *cx, UINT *cy)
{
if(HAS_DLGFRAME(WindowObject->Style, WindowObject->ExStyle) && !(WindowObject->Style & WS_MINIMIZE))
{
@@ -1337,7 +1338,7 @@
IntCalcDefPosSize(PWINDOW_OBJECT Parent, PWINDOW_OBJECT WindowObject, RECT *rc, BOOL IncPos)
{
SIZE Sz;
- POINT Pos;
+ POINT Pos = {0, 0};
if(Parent != NULL)
{
@@ -1403,7 +1404,6 @@
HWND ParentWindowHandle;
HWND OwnerWindowHandle;
PMENU_OBJECT SystemMenu;
- NTSTATUS Status;
HANDLE Handle;
POINT Pos;
SIZE Size;
@@ -1417,7 +1417,6 @@
LRESULT Result;
BOOL MenuChanged;
BOOL ClassFound;
- PWSTR ClassNameString;
ParentWindowHandle = PsGetWin32Thread()->Desktop->DesktopWindow;
OwnerWindowHandle = NULL;
@@ -1454,24 +1453,7 @@
/* FIXME: parent must belong to the current process */
/* Check the class. */
- if (IS_ATOM(ClassName->Buffer))
- {
- ClassFound = ClassReferenceClassByNameOrAtom(&ClassObject, ClassName->Buffer, hInstance);
- }
- else
- {
- Status = IntUnicodeStringToNULLTerminated(&ClassNameString, ClassName);
- if (! NT_SUCCESS(Status))
- {
- if (NULL != ParentWindow)
- {
- IntReleaseWindowObject(ParentWindow);
- }
- return NULL;
- }
- ClassFound = ClassReferenceClassByNameOrAtom(&ClassObject, ClassNameString, hInstance);
- IntFreeNULLTerminatedFromUnicodeString(ClassNameString, ClassName);
- }
+ ClassFound = ClassReferenceClassByNameOrAtom(&ClassObject, ClassName->Buffer, hInstance);
if (!ClassFound)
{
if (IS_ATOM(ClassName->Buffer))
@@ -1486,6 +1468,7 @@
{
IntReleaseWindowObject(ParentWindow);
}
+ SetLastWin32Error(ERROR_CANNOT_FIND_WND_CLASS);
return((HWND)0);
}
@@ -2045,7 +2028,7 @@
}
if (! IS_ATOM(ClassName.Buffer))
{
- Status = IntSafeCopyUnicodeString(&ClassName, UnsafeClassName);
+ Status = IntSafeCopyUnicodeStringTerminateNULL(&ClassName, UnsafeClassName);
if (! NT_SUCCESS(Status))
{
SetLastNtError(Status);
@@ -2398,7 +2381,7 @@
ChildAfter = NULL;
if(hwndChildAfter && !(ChildAfter = IntGetWindowObject(hwndChildAfter)))
{
- IntReleaseWindowObject(hwndParent);
+ IntReleaseWindowObject(Parent);
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
return NULL;
}
@@ -2453,7 +2436,7 @@
DPRINT1("Window class not found (%lx)\n", (ULONG_PTR)ClassName.Buffer);
else
DPRINT1("Window class not found (%S)\n", ClassName.Buffer);
- SetLastWin32Error(ERROR_CLASS_DOES_NOT_EXIST);
+ SetLastWin32Error(ERROR_FILE_NOT_FOUND);
goto Cleanup;
}
}
@@ -2534,7 +2517,10 @@
}
#endif
- ClassDereferenceObject(ClassObject);
+ if (ClassObject != NULL)
+ {
+ ClassDereferenceObject(ClassObject);
+ }
Cleanup:
if(ClassName.Length > 0 && ClassName.Buffer)
reactos/subsys/win32k/ntuser
diff -u -r1.124 -r1.124.2.1
--- winpos.c 21 Nov 2004 12:14:34 -0000 1.124
+++ winpos.c 13 Dec 2004 09:39:20 -0000 1.124.2.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: winpos.c,v 1.124 2004/11/21 12:14:34 navaraf Exp $
+/* $Id: winpos.c,v 1.124.2.1 2004/12/13 09:39:20 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -175,7 +175,7 @@
WinPosInitInternalPos(PWINDOW_OBJECT WindowObject, POINT *pt, PRECT RestoreRect)
{
PWINDOW_OBJECT Parent;
- INT XInc, YInc;
+ UINT XInc, YInc;
if (WindowObject->InternalPos == NULL)
{
@@ -331,7 +331,7 @@
VOID FASTCALL
WinPosFillMinMaxInfoStruct(PWINDOW_OBJECT Window, MINMAXINFO *Info)
{
- INT XInc, YInc;
+ UINT XInc, YInc;
RECT WorkArea;
PDESKTOP_OBJECT Desktop = PsGetWin32Thread()->Desktop; /* Or rather get it from the window? */
@@ -1046,7 +1046,6 @@
* there's nothing to copy. Also, it's no use copying bits onto
* themselves.
*/
- VisRgn = NULL;
if ((VisRgn = (PROSRGNDATA)RGNDATA_LockRgn(CopyRgn)) &&
UnsafeIntGetRgnBox(VisRgn, &CopyRect) == NULLREGION)
{
@@ -1321,7 +1320,8 @@
/* FIXME: Check for window destruction. */
- if (Window->Flags & WINDOWOBJECT_NEED_SIZE)
+ if ((Window->Flags & WINDOWOBJECT_NEED_SIZE) &&
+ !(Window->Status & WINDOWSTATUS_DESTROYING))
{
WPARAM wParam = SIZE_RESTORED;
reactos/subsys/win32k/ntuser
diff -u -r1.67 -r1.67.2.1
--- winsta.c 21 Nov 2004 13:02:02 -0000 1.67
+++ winsta.c 13 Dec 2004 09:39:20 -0000 1.67.2.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: winsta.c,v 1.67 2004/11/21 13:02:02 weiden Exp $
+ * $Id: winsta.c,v 1.67.2.1 2004/12/13 09:39:20 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -197,8 +197,6 @@
}
DC_SetOwnership(ScreenDeviceContext, NULL);
- EnableMouse(ScreenDeviceContext);
-
NtUserAcquireOrReleaseInputOwnership(FALSE);
return TRUE;
@@ -208,7 +206,6 @@
IntEndDesktopGraphics(VOID)
{
NtUserAcquireOrReleaseInputOwnership(TRUE);
- EnableMouse(FALSE);
if (NULL != ScreenDeviceContext)
{
DC_SetOwnership(ScreenDeviceContext, PsGetCurrentProcess());
@@ -401,8 +398,6 @@
/* FIXME: Obtain the following information from the registry */
CurInfo->SwapButtons = FALSE;
- CurInfo->SafetySwitch = FALSE;
- CurInfo->SafetyRemoveCount = 0;
CurInfo->DblClickSpeed = 500;
CurInfo->DblClickWidth = 4;
CurInfo->DblClickHeight = 4;
reactos/subsys/win32k/objects
diff -N stockobj.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ stockobj.c 13 Dec 2004 09:39:24 -0000 1.2.2.1
@@ -0,0 +1,319 @@
+/*
+ * ReactOS W32 Subsystem
+ * Copyright (C) 1998 - 2004 ReactOS Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * STOCKOBJ.C - GDI Stock Objects
+ *
+ * $Id: stockobj.c,v 1.2.2.1 2004/12/13 09:39:24 hyperion Exp $
+ *
+ */
+#include <w32k.h>
+
+#define NDEBUG
+#include <debug.h>
+
+static COLORREF SysColors[] =
+{
+ RGB(212, 208, 200), /* COLOR_SCROLLBAR */
+ RGB(58, 110, 165), /* COLOR_BACKGROUND */
+ RGB(10, 36, 106), /* COLOR_ACTIVECAPTION */
+ RGB(128, 128, 128), /* COLOR_INACTIVECAPTION */
+ RGB(212, 208, 200), /* COLOR_MENU */
+ RGB(255, 255, 255), /* COLOR_WINDOW */
+ RGB(0, 0, 0), /* COLOR_WINDOWFRAME */
+ RGB(0, 0, 0), /* COLOR_MENUTEXT */
+ RGB(0, 0, 0), /* COLOR_WINDOWTEXT */
+ RGB(255, 255, 255), /* COLOR_CAPTIONTEXT */
+ RGB(212, 208, 200), /* COLOR_ACTIVEBORDER */
+ RGB(212, 208, 200), /* COLOR_INACTIVEBORDER */
+ RGB(128, 128, 128), /* COLOR_APPWORKSPACE */
+ RGB(10, 36, 106), /* COLOR_HIGHLIGHT */
+ RGB(255, 255, 255), /* COLOR_HIGHLIGHTTEXT */
+ RGB(212, 208, 200), /* COLOR_BTNFACE */
+ RGB(128, 128, 128), /* COLOR_BTNSHADOW */
+ RGB(128, 128, 128), /* COLOR_GRAYTEXT */
+ RGB(0, 0, 0), /* COLOR_BTNTEXT */
+ RGB(212, 208, 200), /* COLOR_INACTIVECAPTIONTEXT */
+ RGB(255, 255, 255), /* COLOR_BTNHIGHLIGHT */
+ RGB(64, 64, 64), /* COLOR_3DDKSHADOW */
+ RGB(212, 208, 200), /* COLOR_3DLIGHT */
+ RGB(0, 0, 0), /* COLOR_INFOTEXT */
+ RGB(255, 255, 225), /* COLOR_INFOBK */
+ RGB(181, 181, 181), /* COLOR_UNKNOWN */
+ RGB(0, 0, 128), /* COLOR_HOTLIGHT */
+ RGB(166, 202, 240), /* COLOR_GRADIENTACTIVECAPTION */
+ RGB(192, 192, 192), /* COLOR_GRADIENTINACTIVECAPTION */
+ RGB(49, 106, 197), /* COLOR_MENUHILIGHT */
+ RGB(236, 233, 216) /* COLOR_MENUBAR */
+};
+#define NUM_SYSCOLORS (sizeof(SysColors) / sizeof(SysColors[0]))
+
+static HPEN SysColorPens[NUM_SYSCOLORS];
+static HBRUSH SysColorBrushes[NUM_SYSCOLORS];
+
+/* GDI stock objects */
+
+static LOGBRUSH WhiteBrush =
+{ BS_SOLID, RGB(255,255,255), 0 };
+
+static LOGBRUSH LtGrayBrush =
+/* FIXME : this should perhaps be BS_HATCHED, at least for 1 bitperpixel */
+{ BS_SOLID, RGB(192,192,192), 0 };
+
+static LOGBRUSH GrayBrush =
+/* FIXME : this should perhaps be BS_HATCHED, at least for 1 bitperpixel */
+{ BS_SOLID, RGB(128,128,128), 0 };
+
+static LOGBRUSH DkGrayBrush =
+/* This is BS_HATCHED, for 1 bitperpixel. This makes the spray work in pbrush */
+/* NB_HATCH_STYLES is an index into HatchBrushes */
+{ BS_HATCHED, RGB(0,0,0), NB_HATCH_STYLES };
+
+static LOGBRUSH BlackBrush =
+{ BS_SOLID, RGB(0,0,0), 0 };
+
+static LOGBRUSH NullBrush =
+{ BS_NULL, 0, 0 };
+
+static LOGPEN WhitePen =
+{ PS_SOLID, { 0, 0 }, RGB(255,255,255) };
+
+static LOGPEN BlackPen =
+{ PS_SOLID, { 0, 0 }, RGB(0,0,0) };
+
+static LOGPEN NullPen =
+{ PS_NULL, { 0, 0 }, 0 };
+
+static LOGFONTW OEMFixedFont =
+{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, OEM_CHARSET,
+ 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Bitstream Vera Sans Mono" };
+
+static LOGFONTW AnsiFixedFont =
+{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
+ 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Bitstream Vera Sans Mono" };
+
+/*static LOGFONTW AnsiVarFont =
+ *{ 10, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
+ * 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif" }; */
+
+static LOGFONTW SystemFont =
+{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
+ 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"Bitstream Vera Sans" };
+
+static LOGFONTW DeviceDefaultFont =
+{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
+ 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"Bitstream Vera Sans" };
+
+static LOGFONTW SystemFixedFont =
+{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
+ 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Bitstream Vera Sans Mono" };
+
+/* FIXME: Is this correct? */
+static LOGFONTW DefaultGuiFont =
+{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
+ 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"Bitstream Vera Sans" };
+
+#define NB_STOCK_OBJECTS (DEFAULT_GUI_FONT + 1)
+
+static HGDIOBJ StockObjects[NB_STOCK_OBJECTS];
+
+/*!
+ * Creates a bunch of stock objects: brushes, pens, fonts.
+*/
+VOID FASTCALL
+CreateStockObjects(void)
+{
+ UINT Object;
+
+ DPRINT("Beginning creation of stock objects\n");
+
+ /* Create GDI Stock Objects from the logical structures we've defined */
+
+ StockObjects[WHITE_BRUSH] = IntGdiCreateBrushIndirect(&WhiteBrush);
+ StockObjects[LTGRAY_BRUSH] = IntGdiCreateBrushIndirect(&LtGrayBrush);
+ StockObjects[GRAY_BRUSH] = IntGdiCreateBrushIndirect(&GrayBrush);
+ StockObjects[DKGRAY_BRUSH] = IntGdiCreateBrushIndirect(&DkGrayBrush);
+ StockObjects[BLACK_BRUSH] = IntGdiCreateBrushIndirect(&BlackBrush);
+ StockObjects[NULL_BRUSH] = IntGdiCreateBrushIndirect(&NullBrush);
+
+ StockObjects[WHITE_PEN] = IntGdiCreatePenIndirect(&WhitePen);
+ StockObjects[BLACK_PEN] = IntGdiCreatePenIndirect(&BlackPen);
+ StockObjects[NULL_PEN] = IntGdiCreatePenIndirect(&NullPen);
+
+ (void) TextIntCreateFontIndirect(&OEMFixedFont, (HFONT*)&StockObjects[OEM_FIXED_FONT]);
+ (void) TextIntCreateFontIndirect(&AnsiFixedFont, (HFONT*)&StockObjects[ANSI_FIXED_FONT]);
+ (void) TextIntCreateFontIndirect(&SystemFont, (HFONT*)&StockObjects[SYSTEM_FONT]);
+ (void) TextIntCreateFontIndirect(&DeviceDefaultFont, (HFONT*)&StockObjects[DEVICE_DEFAULT_FONT]);
+ (void) TextIntCreateFontIndirect(&SystemFixedFont, (HFONT*)&StockObjects[SYSTEM_FIXED_FONT]);
+ (void) TextIntCreateFontIndirect(&DefaultGuiFont, (HFONT*)&StockObjects[DEFAULT_GUI_FONT]);
+
+ StockObjects[DEFAULT_PALETTE] = (HGDIOBJ*)PALETTE_Init();
+
+ for (Object = 0; Object < NB_STOCK_OBJECTS; Object++)
+ {
+ if (NULL != StockObjects[Object])
+ {
+ GDIOBJ_ConvertToStockObj(&StockObjects[Object]);
+ }
+ }
+
+ DPRINT("Completed creation of stock objects\n");
+}
+
+/*!
+ * Return stock object.
+ * \param Object - stock object id.
+ * \return Handle to the object.
+*/
+HGDIOBJ STDCALL
+NtGdiGetStockObject(INT Object)
+{
+ DPRINT("NtGdiGetStockObject index %d\n", Object);
+
+ return ((Object < 0) || (NB_STOCK_OBJECTS <= Object)) ? NULL : StockObjects[Object];
+}
+
+BOOL FASTCALL
+IntSetSysColors(UINT nColors, INT *Elements, COLORREF *Colors)
+{
+ UINT i;
+
+ ASSERT(Elements);
+ ASSERT(Colors);
+
+ for(i = 0; i < nColors; i++)
+ {
+ if((*Elements) >= 0 && (*Elements) < NUM_SYSCOLORS)
+ {
+ SysColors[*Elements] = *Colors;
+ /* FIXME - update the syscolor pens and brushes */
+ }
+ Elements++;
+ Colors++;
+ }
+
+ return nColors > 0;
+}
+
+BOOL FASTCALL
+IntGetSysColorBrushes(HBRUSH *Brushes, UINT nBrushes)
+{
+ UINT i;
+
+ ASSERT(Brushes);
+
+ if(nBrushes > NUM_SYSCOLORS)
+ {
+ SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ for(i = 0; i < nBrushes; i++)
+ {
+ *(Brushes++) = SysColorBrushes[i];
+ }
+
+ return nBrushes > 0;
+}
+
+BOOL FASTCALL
+IntGetSysColorPens(HPEN *Pens, UINT nPens)
+{
+ UINT i;
+
+ ASSERT(Pens);
+
+ if(nPens > NUM_SYSCOLORS)
+ {
+ SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ for(i = 0; i < nPens; i++)
+ {
+ *(Pens++) = SysColorPens[i];
+ }
+
+ return nPens > 0;
+}
+
+BOOL FASTCALL
+IntGetSysColors(COLORREF *Colors, UINT nColors)
+{
+ UINT i;
+ COLORREF *col;
+
+ ASSERT(Colors);
+
+ if(nColors > NUM_SYSCOLORS)
+ {
+ SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ col = &SysColors[0];
+ for(i = 0; i < nColors; i++)
+ {
+ *(Colors++) = *(col++);
+ }
+
+ return nColors > 0;
+}
+
+VOID FASTCALL
+CreateSysColorObjects(VOID)
+{
+ UINT i;
+ LOGBRUSH Brush;
+ LOGPEN Pen;
+
+ /* Create the syscolor brushes */
+ Brush.lbStyle = BS_SOLID;
+ Brush.lbHatch = 0;
+ for(i = 0; i < NUM_SYSCOLORS; i++)
+ {
+ if(SysColorBrushes[i] == NULL)
+ {
+ Brush.lbColor = SysColors[i];
+ SysColorBrushes[i] = IntGdiCreateBrushIndirect(&Brush);
+ if(SysColorBrushes[i] != NULL)
+ {
+ GDIOBJ_ConvertToStockObj((HGDIOBJ*)&SysColorBrushes[i]);
+ }
+ }
+ }
+
+ /* Create the syscolor pens */
+ Pen.lopnStyle = PS_SOLID;
+ Pen.lopnWidth.x = 0;
+ Pen.lopnWidth.y = 0;
+ for(i = 0; i < NUM_SYSCOLORS; i++)
+ {
+ if(SysColorPens[i] == NULL)
+ {
+ Pen.lopnColor = SysColors[i];
+ SysColorPens[i] = IntGdiCreatePenIndirect(&Pen);
+ if(SysColorPens[i] != NULL)
+ {
+ GDIOBJ_ConvertToStockObj((HGDIOBJ*)&SysColorPens[i]);
+ }
+ }
+ }
+}
+
+/* EOF */
reactos/subsys/win32k/objects
diff -u -r1.81 -r1.81.2.1
--- bitmaps.c 21 Nov 2004 10:55:29 -0000 1.81
+++ bitmaps.c 13 Dec 2004 09:39:21 -0000 1.81.2.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: bitmaps.c,v 1.81 2004/11/21 10:55:29 navaraf Exp $ */
+/* $Id: bitmaps.c,v 1.81.2.1 2004/12/13 09:39:21 hyperion Exp $ */
#include <w32k.h>
#define IN_RECT(r,x,y) \
@@ -126,6 +126,14 @@
{
DC_UnlockDc(hDCSrc);
}
+ if(BitmapDest != NULL)
+ {
+ BITMAPOBJ_UnlockBitmap(DCDest->w.hBitmap);
+ }
+ if(BitmapSrc != NULL && BitmapSrc != BitmapDest)
+ {
+ BITMAPOBJ_UnlockBitmap(DCSrc->w.hBitmap);
+ }
DC_UnlockDc(hDCDest);
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
@@ -148,7 +156,7 @@
SourcePalette = DCSrc->w.hPalette;
/* KB41464 details how to convert between mono and color */
- if (DCDest->w.bitsPerPixel == DCSrc->w.bitsPerPixel == 1)
+ if (DCDest->w.bitsPerPixel == 1 && DCSrc->w.bitsPerPixel == 1)
{
XlateObj = NULL;
}
@@ -173,6 +181,18 @@
DC_UnlockDc(hDCSrc);
}
DC_UnlockDc(hDCDest);
+ if(BitmapDest != NULL)
+ {
+ BITMAPOBJ_UnlockBitmap(DCDest->w.hBitmap);
+ }
+ if(BitmapSrc != NULL && BitmapSrc != BitmapDest)
+ {
+ BITMAPOBJ_UnlockBitmap(DCSrc->w.hBitmap);
+ }
+ if(BrushObj != NULL)
+ {
+ BRUSHOBJ_UnlockBrush(DCDest->w.hBrush);
+ }
SetLastWin32Error(ERROR_NO_SYSTEM_RESOURCES);
return FALSE;
}
@@ -185,12 +205,16 @@
if (UsesSource && XlateObj != NULL)
EngDeleteXlate(XlateObj);
- BITMAPOBJ_UnlockBitmap(DCDest->w.hBitmap);
- if (UsesSource && DCSrc->w.hBitmap != DCDest->w.hBitmap)
+
+ if(BitmapDest != NULL)
+ {
+ BITMAPOBJ_UnlockBitmap(DCDest->w.hBitmap);
+ }
+ if (UsesSource && BitmapSrc != BitmapDest)
{
BITMAPOBJ_UnlockBitmap(DCSrc->w.hBitmap);
}
- if (UsesPattern)
+ if (BrushObj != NULL)
{
BRUSHOBJ_UnlockBrush(DCDest->w.hBrush);
}
@@ -296,8 +320,10 @@
XlateObj = (XLATEOBJ*)IntEngCreateXlate(PalDestMode, PalSrcMode, DestPalette, SourcePalette);
BitmapDest = BITMAPOBJ_LockBitmap(DCDest->w.hBitmap);
+ /* FIXME - BitmapDest can be NULL!!!! Don't assert here! */
ASSERT(BitmapDest);
BitmapSrc = BITMAPOBJ_LockBitmap(DCSrc->w.hBitmap);
+ /* FIXME - BitmapSrc can be NULL!!!! Don't assert here! */
ASSERT(BitmapSrc);
rcDest.left = xDst;
@@ -374,6 +400,7 @@
Size.cx, Size.cy, BitsPerPel, hBitmap);
bmp = BITMAPOBJ_LockBitmap( hBitmap );
+ /* FIXME - bmp can be NULL!!!!!! */
bmp->flFlags = BITMAPOBJ_IS_APIBITMAP;
BITMAPOBJ_UnlockBitmap( hBitmap );
@@ -391,11 +418,10 @@
return hBitmap;
}
-BOOL FASTCALL
-Bitmap_InternalDelete( PBITMAPOBJ pBmp )
+BOOL INTERNAL_CALL
+BITMAP_Cleanup(PVOID ObjectBody)
{
- ASSERT( pBmp );
-
+ PBITMAPOBJ pBmp = (PBITMAPOBJ)ObjectBody;
if (pBmp->SurfObj.pvBits != NULL &&
(pBmp->flFlags & BITMAPOBJ_IS_APIBITMAP))
{
@@ -572,8 +598,8 @@
}
EngDeleteXlate(XlateObj);
}
+ BITMAPOBJ_UnlockBitmap(dc->w.hBitmap);
}
- BITMAPOBJ_UnlockBitmap(dc->w.hBitmap);
}
DC_UnlockDc(hDC);
@@ -1059,7 +1085,7 @@
BitmapDest = BITMAPOBJ_LockBitmap(DCDest->w.hBitmap);
if (UsesSource)
{
- if (DCSrc->w.hBitmap == DCDest->w.hBitmap)
+ if (DCSrc->w.hBitmap == DCDest->w.hBitmap)
BitmapSrc = BitmapDest;
else
BitmapSrc = BITMAPOBJ_LockBitmap(DCSrc->w.hBitmap);
@@ -1069,6 +1095,60 @@
BitmapSrc = NULL;
}
+ if ( UsesSource )
+ {
+ int sw = BitmapSrc->SurfObj.sizlBitmap.cx;
+ int sh = BitmapSrc->SurfObj.sizlBitmap.cy;
+ if ( SourceRect.left < 0 )
+ {
+ DestRect.left = DestRect.right - (DestRect.right-DestRect.left) * (SourceRect.right)/abs(SourceRect.right-SourceRect.left);
+ SourceRect.left = 0;
+ }
+ if ( SourceRect.top < 0 )
+ {
+ DestRect.top = DestRect.bottom - (DestRect.bottom-DestRect.top) * (SourceRect.bottom)/abs(SourceRect.bottom-SourceRect.top);
+ SourceRect.top = 0;
+ }
+ if ( SourceRect.right < -1 )
+ {
+ DestRect.right = DestRect.left + (DestRect.right-DestRect.left) * (-1-SourceRect.left)/abs(SourceRect.right-SourceRect.left);
+ SourceRect.right = -1;
+ }
+ if ( SourceRect.bottom < -1 )
+ {
+ DestRect.bottom = DestRect.top + (DestRect.bottom-DestRect.top) * (-1-SourceRect.top)/abs(SourceRect.bottom-SourceRect.top);
+ SourceRect.bottom = -1;
+ }
+ if ( SourceRect.right > sw )
+ {
+ DestRect.right = DestRect.left + (DestRect.right-DestRect.left) * abs(sw-SourceRect.left) / abs(SourceRect.right-SourceRect.left);
+ SourceRect.right = sw;
+ }
+ if ( SourceRect.bottom > sh )
+ {
+ DestRect.bottom = DestRect.top + (DestRect.bottom-DestRect.top) * abs(sh-SourceRect.top) / abs(SourceRect.bottom-SourceRect.top);
+ SourceRect.bottom = sh;
+ }
+ sw--;
+ sh--;
+ if ( SourceRect.left > sw )
+ {
+ DestRect.left = DestRect.right - (DestRect.right-DestRect.left) * (SourceRect.right-sw) / abs(SourceRect.right-SourceRect.left);
+ SourceRect.left = 0;
+ }
+ if ( SourceRect.top > sh )
+ {
+ DestRect.top = DestRect.bottom - (DestRect.bottom-DestRect.top) * (SourceRect.bottom-sh) / abs(SourceRect.bottom-SourceRect.top);
+ SourceRect.top = 0;
+ }
+ if (0 == (DestRect.right-DestRect.left) || 0 == (DestRect.bottom-DestRect.top) || 0 == (SourceRect.right-SourceRect.left) || 0 == (SourceRect.bottom-SourceRect.top))
+ {
+ SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ Status = FALSE;
+ goto failed;
+ }
+ }
+
if (UsesPattern)
{
BrushObj = BRUSHOBJ_LockBrush(DCDest->w.hBrush);
@@ -1117,15 +1197,16 @@
if (UsesSource)
EngDeleteXlate(XlateObj);
- BITMAPOBJ_UnlockBitmap(DCDest->w.hBitmap);
- if (UsesSource && DCSrc->w.hBitmap != DCDest->w.hBitmap)
- {
- BITMAPOBJ_UnlockBitmap(DCSrc->w.hBitmap);
- }
if (UsesPattern)
{
BRUSHOBJ_UnlockBrush(DCDest->w.hBrush);
}
+failed:
+ if (UsesSource && DCSrc->w.hBitmap != DCDest->w.hBitmap)
+ {
+ BITMAPOBJ_UnlockBitmap(DCSrc->w.hBitmap);
+ }
+ BITMAPOBJ_UnlockBitmap(DCDest->w.hBitmap);
if (UsesSource && hDCSrc != hDCDest)
{
DC_UnlockDc(hDCSrc);
reactos/subsys/win32k/objects
diff -u -r1.40.10.1 -r1.40.10.2
--- brush.c 8 Dec 2004 21:57:41 -0000 1.40.10.1
+++ brush.c 13 Dec 2004 09:39:21 -0000 1.40.10.2
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: brush.c,v 1.40.10.1 2004/12/08 21:57:41 hyperion Exp $
+ * $Id: brush.c,v 1.40.10.2 2004/12/13 09:39:21 hyperion Exp $
*/
#include <w32k.h>
@@ -31,11 +31,10 @@
{0x81, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x81} /* HS_DIAGCROSS */
};
-BOOL FASTCALL
-Brush_InternalDelete( PGDIBRUSHOBJ pBrush )
+BOOL INTERNAL_CALL
+BRUSH_Cleanup(PVOID ObjectBody)
{
- ASSERT(pBrush);
-
+ PGDIBRUSHOBJ pBrush = (PGDIBRUSHOBJ)ObjectBody;
if(pBrush->flAttrs & (GDIBRUSH_IS_HATCH | GDIBRUSH_IS_BITMAP))
{
ASSERT(pBrush->hbmPattern);
@@ -132,40 +131,44 @@
}
BrushObject = BRUSHOBJ_LockBrush(hBrush);
-
- switch (LogBrush->lbStyle)
+ if(BrushObject != NULL)
{
- case BS_NULL:
- BrushObject->flAttrs |= GDIBRUSH_IS_NULL;
- break;
-
- case BS_SOLID:
- BrushObject->flAttrs |= GDIBRUSH_IS_SOLID;
- BrushObject->BrushAttr.lbColor = LogBrush->lbColor & 0xFFFFFF;
- /* FIXME: Fill in the rest of fields!!! */
- break;
-
- case BS_HATCHED:
- BrushObject->flAttrs |= GDIBRUSH_IS_HATCH;
- BrushObject->hbmPattern = hPattern;
- BrushObject->BrushAttr.lbColor = LogBrush->lbColor & 0xFFFFFF;
- break;
-
- case BS_PATTERN:
- BrushObject->flAttrs |= GDIBRUSH_IS_BITMAP;
- BrushObject->hbmPattern = hPattern;
- /* FIXME: Fill in the rest of fields!!! */
- break;
-
- default:
- DPRINT1("Brush Style: %d\n", LogBrush->lbStyle);
- UNIMPLEMENTED;
+ switch (LogBrush->lbStyle)
+ {
+ case BS_NULL:
+ BrushObject->flAttrs |= GDIBRUSH_IS_NULL;
+ break;
+
+ case BS_SOLID:
+ BrushObject->flAttrs |= GDIBRUSH_IS_SOLID;
+ BrushObject->BrushAttr.lbColor = LogBrush->lbColor & 0xFFFFFF;
+ /* FIXME: Fill in the rest of fields!!! */
+ break;
+
+ case BS_HATCHED:
+ BrushObject->flAttrs |= GDIBRUSH_IS_HATCH;
+ BrushObject->hbmPattern = hPattern;
+ BrushObject->BrushAttr.lbColor = LogBrush->lbColor & 0xFFFFFF;
+ break;
+
+ case BS_PATTERN:
+ BrushObject->flAttrs |= GDIBRUSH_IS_BITMAP;
+ BrushObject->hbmPattern = hPattern;
+ /* FIXME: Fill in the rest of fields!!! */
+ break;
+
+ default:
+ DPRINT1("Brush Style: %d\n", LogBrush->lbStyle);
+ UNIMPLEMENTED;
+ break;
+ }
+
+ BRUSHOBJ_UnlockBrush(hBrush);
}
if (hPattern != 0)
GDIOBJ_SetOwnership(hPattern, NULL);
- BRUSHOBJ_UnlockBrush(hBrush);
return hBrush;
}
@@ -185,6 +188,8 @@
POINTL BrushOrigin;
BOOL ret = TRUE;
+ ASSERT(BrushObj);
+
BitmapObj = BITMAPOBJ_LockBitmap(dc->w.hBitmap);
if (BitmapObj == NULL)
{
@@ -192,7 +197,6 @@
return FALSE;
}
- ASSERT(BrushObj);
if (!(BrushObj->flAttrs & GDIBRUSH_IS_NULL))
{
if (Width > 0)
@@ -264,15 +268,18 @@
for (r = pRects, i = 0; i < cRects; i++)
{
BrushObj = BRUSHOBJ_LockBrush(r->hBrush);
- IntPatBlt(
- dc,
- r->r.left,
- r->r.top,
- r->r.right,
- r->r.bottom,
- dwRop,
- BrushObj);
- BRUSHOBJ_UnlockBrush(r->hBrush);
+ if(BrushObj != NULL)
+ {
+ IntPatBlt(
+ dc,
+ r->r.left,
+ r->r.top,
+ r->r.right,
+ r->r.bottom,
+ dwRop,
+ BrushObj);
+ BRUSHOBJ_UnlockBrush(r->hBrush);
+ }
r++;
}
reactos/subsys/win32k/objects
diff -u -r1.42.10.1 -r1.42.10.2
--- cliprgn.c 8 Dec 2004 21:57:41 -0000 1.42.10.1
+++ cliprgn.c 13 Dec 2004 09:39:21 -0000 1.42.10.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: cliprgn.c,v 1.42.10.1 2004/12/08 21:57:41 hyperion Exp $ */
+/* $Id: cliprgn.c,v 1.42.10.2 2004/12/13 09:39:21 hyperion Exp $ */
#include <w32k.h>
int FASTCALL
@@ -33,35 +33,38 @@
NtGdiCombineRgn(Dc->w.hGCClipRgn, Dc->w.hClipRgn, Dc->w.hVisRgn, RGN_AND);
NtGdiOffsetRgn(Dc->w.hGCClipRgn, Dc->w.DCOrgX, Dc->w.DCOrgY);
- CombinedRegion = RGNDATA_LockRgn(Dc->w.hGCClipRgn);
- ASSERT(CombinedRegion != NULL);
+ if((CombinedRegion = RGNDATA_LockRgn(Dc->w.hGCClipRgn)))
+ {
+ if (Dc->CombinedClip != NULL)
+ IntEngDeleteClipRegion(Dc->CombinedClip);
- if (Dc->CombinedClip != NULL)
- IntEngDeleteClipRegion(Dc->CombinedClip);
+ Dc->CombinedClip = IntEngCreateClipRegion(
+ CombinedRegion->rdh.nCount,
+ (PRECTL)CombinedRegion->Buffer,
+ (PRECTL)&CombinedRegion->rdh.rcBound);
- Dc->CombinedClip = IntEngCreateClipRegion(
- CombinedRegion->rdh.nCount,
- (PRECTL)CombinedRegion->Buffer,
- (PRECTL)&CombinedRegion->rdh.rcBound);
+ RGNDATA_UnlockRgn(Dc->w.hGCClipRgn);
+ }
- RGNDATA_UnlockRgn(Dc->w.hGCClipRgn);
if ( NULL == Dc->CombinedClip )
{
DPRINT1("IntEngCreateClipRegion() failed\n");
return ERROR;
}
+
return NtGdiOffsetRgn(Dc->w.hGCClipRgn, -Dc->w.DCOrgX, -Dc->w.DCOrgY);
}
HRGN WINAPI SaveVisRgn(HDC hdc)
{
HRGN copy;
- PROSRGNDATA obj, copyObj;
+ PROSRGNDATA obj;/*, copyObj;*/
PDC dc = DC_LockDc(hdc);
if (!dc) return 0;
obj = RGNDATA_LockRgn(dc->w.hVisRgn);
+ /* FIXME - Handle obj == NULL!!! */
if(!(copy = NtGdiCreateRectRgn(0, 0, 0, 0)))
{
@@ -70,10 +73,10 @@
return 0;
}
NtGdiCombineRgn(copy, dc->w.hVisRgn, 0, RGN_COPY);
- copyObj = RGNDATA_LockRgn(copy);
+ /* copyObj = RGNDATA_LockRgn(copy); */
/* copyObj->header.hNext = obj->header.hNext;
header.hNext = copy; */
-
+ DC_UnlockDc(hdc);
return copy;
}
@@ -104,7 +107,7 @@
retval = NtGdiCombineRgn(dc->w.hVisRgn, hrgn, 0, RGN_COPY);
if ( retval != ERROR )
- retval = CLIPPING_UpdateGCRegion(dc);
+ CLIPPING_UpdateGCRegion(dc);
DC_UnlockDc( hdc );
return retval;
reactos/subsys/win32k/objects
diff -u -r1.50 -r1.50.10.1
--- color.c 14 Jul 2004 20:48:58 -0000 1.50
+++ color.c 13 Dec 2004 09:39:21 -0000 1.50.10.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: color.c,v 1.50 2004/07/14 20:48:58 navaraf Exp $ */
+/* $Id: color.c,v 1.50.10.1 2004/12/13 09:39:21 hyperion Exp $ */
#include <w32k.h>
// FIXME: Use PXLATEOBJ logicalToSystem instead of int *mapping
@@ -123,6 +123,7 @@
0, 0, 0);
PalGDI = (PPALGDI) PALETTE_LockPalette(NewPalette);
+ /* FIXME - Handle PalGDI == NULL!!!! */
PALETTE_ValidateFlags(PalGDI->IndexedColors, PalGDI->NumColors);
PalGDI->logicalToSystem = NULL;
@@ -333,6 +334,7 @@
systemPalette = NtGdiGetStockObject((INT)DEFAULT_PALETTE);
palGDI = PALETTE_LockPalette(dc->w.hPalette);
palPtr = (PALOBJ*) palGDI;
+ /* FIXME - Handle palGDI == NULL!!!! */
// Step 1: Create mapping of system palette\DC palette
#ifndef NO_MAPPING
@@ -345,6 +347,7 @@
sysGDI = PALETTE_LockPalette(systemPalette);
sysPtr = (PALOBJ*) sysGDI;
+ /* FIXME - Handle sysGDI == NULL!!!!! */
// Step 2:
// The RealizePalette function modifies the palette for the device associated with the specified device context. If the
reactos/subsys/win32k/objects
diff -u -r1.147.2.1 -r1.147.2.2
--- dc.c 8 Dec 2004 21:57:41 -0000 1.147.2.1
+++ dc.c 13 Dec 2004 09:39:21 -0000 1.147.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: dc.c,v 1.147.2.1 2004/12/08 21:57:41 hyperion Exp $
+/* $Id: dc.c,v 1.147.2.2 2004/12/13 09:39:21 hyperion Exp $
*
* DC.C - Device context functions
*
@@ -465,6 +465,7 @@
BOOL GotDriver;
BOOL DoDefault;
ULONG DisplayNumber;
+ RECTL SurfaceRect;
for (DisplayNumber = 0; ; DisplayNumber++)
{
@@ -621,6 +622,8 @@
DPRINT("Adjusting GDIInfo.ulLogPixelsY\n");
PrimarySurface.GDIInfo.ulLogPixelsY = 96;
}
+
+ PrimarySurface.Pointer.Exclude.right = -1;
DPRINT("calling completePDev\n");
@@ -654,6 +657,12 @@
SurfObj = EngLockSurface((HSURF)PrimarySurface.Handle);
SurfObj->dhpdev = PrimarySurface.PDev;
SurfSize = SurfObj->sizlBitmap;
+ SurfSize = SurfObj->sizlBitmap;
+ SurfaceRect.left = SurfaceRect.top = 0;
+ SurfaceRect.right = SurfObj->sizlBitmap.cx;
+ SurfaceRect.bottom = SurfObj->sizlBitmap.cy;
+ /* FIXME - why does EngEraseSurface() sometimes crash?
+ EngEraseSurface(SurfObj, &SurfaceRect, 0); */
EngUnlockSurface(SurfObj);
IntShowDesktop(IntGetActiveDesktop(), SurfSize.cx, SurfSize.cy);
break;
@@ -728,7 +737,12 @@
}
NewDC = DC_LockDc( hNewDC );
- ASSERT( NewDC );
+ /* FIXME - NewDC can be NULL!!! Don't assert here! */
+ if ( !NewDC )
+ {
+ DC_FreeDC( hNewDC );
+ return NULL;
+ }
NewDC->DMW = PrimarySurface.DMW;
NewDC->DevInfo = &PrimarySurface.DevInfo;
@@ -747,6 +761,12 @@
NewDC->DMW.dmLogPixels = 96;
SurfObj = EngLockSurface((HSURF)PrimarySurface.Handle);
+ if ( !SurfObj )
+ {
+ DC_UnlockDc ( hNewDC );
+ DC_FreeDC ( hNewDC) ;
+ return NULL;
+ }
NewDC->DMW.dmBitsPerPel = BitsPerFormat(SurfObj->iBitmapFormat);
NewDC->DMW.dmPelsWidth = SurfObj->sizlBitmap.cx;
NewDC->DMW.dmPelsHeight = SurfObj->sizlBitmap.cy;
@@ -846,8 +866,7 @@
{
return FALSE;
}
- DPRINT( "Deleting DC\n" );
- CHECKPOINT;
+
/* First delete all saved DCs */
while (DCToDelete->saveLevel)
{
@@ -862,7 +881,7 @@
}
DC_SetNextDC (DCToDelete, DC_GetNextDC (savedDC));
DCToDelete->saveLevel--;
- DC_UnlockDc( savedHDC );
+ DC_UnlockDc( savedHDC );
NtGdiDeleteDC (savedHDC);
}
@@ -1064,6 +1083,7 @@
return 0;
}
newdc = DC_LockDc( hnewdc );
+ /* FIXME - newdc can be NULL!!!! Don't assert here!!! */
ASSERT( newdc );
newdc->w.flags = dc->w.flags | DC_SAVED;
@@ -1247,7 +1267,7 @@
GDISelectPalette16( hDC, dcs->w.hPalette, FALSE );
#endif
} else {
- DC_UnlockDc(hDC);
+ DC_UnlockDc(hDC);
}
DC_UnlockDc ( hDCSave );
} else {
@@ -1259,21 +1279,12 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
}
-INT STDCALL
-NtGdiGetDeviceCaps(HDC hDC,
- INT Index)
+INT FASTCALL
+IntGdiGetDeviceCaps(PDC dc, INT Index)
{
- PDC dc;
- INT ret;
+ INT ret;
POINT pt;
- dc = DC_LockDc(hDC);
- if (dc == NULL)
- {
- SetLastWin32Error(ERROR_INVALID_HANDLE);
- return 0;
- }
-
/* Retrieve capability */
switch (Index)
{
@@ -1366,7 +1377,7 @@
break;
case PHYSICALWIDTH:
- if(NtGdiEscape(hDC, GETPHYSPAGESIZE, 0, NULL, (LPVOID)&pt) > 0)
+ if(IntGdiEscape(dc, GETPHYSPAGESIZE, 0, NULL, (LPVOID)&pt) > 0)
{
ret = pt.x;
}
@@ -1377,7 +1388,7 @@
break;
case PHYSICALHEIGHT:
- if(NtGdiEscape(hDC, GETPHYSPAGESIZE, 0, NULL, (LPVOID)&pt) > 0)
+ if(IntGdiEscape(dc, GETPHYSPAGESIZE, 0, NULL, (LPVOID)&pt) > 0)
{
ret = pt.y;
}
@@ -1388,7 +1399,7 @@
break;
case PHYSICALOFFSETX:
- if(NtGdiEscape(hDC, GETPRINTINGOFFSET, 0, NULL, (LPVOID)&pt) > 0)
+ if(IntGdiEscape(dc, GETPRINTINGOFFSET, 0, NULL, (LPVOID)&pt) > 0)
{
ret = pt.x;
}
@@ -1399,7 +1410,7 @@
break;
case PHYSICALOFFSETY:
- if(NtGdiEscape(hDC, GETPRINTINGOFFSET, 0, NULL, (LPVOID)&pt) > 0)
+ if(IntGdiEscape(dc, GETPRINTINGOFFSET, 0, NULL, (LPVOID)&pt) > 0)
{
ret = pt.y;
}
@@ -1414,7 +1425,7 @@
break;
case SCALINGFACTORX:
- if(NtGdiEscape(hDC, GETSCALINGFACTOR, 0, NULL, (LPVOID)&pt) > 0)
+ if(IntGdiEscape(dc, GETSCALINGFACTOR, 0, NULL, (LPVOID)&pt) > 0)
{
ret = pt.x;
}
@@ -1425,7 +1436,7 @@
break;
case SCALINGFACTORY:
- if(NtGdiEscape(hDC, GETSCALINGFACTOR, 0, NULL, (LPVOID)&pt) > 0)
+ if(IntGdiEscape(dc, GETSCALINGFACTOR, 0, NULL, (LPVOID)&pt) > 0)
{
ret = pt.y;
}
@@ -1460,6 +1471,25 @@
break;
}
+ return ret;
+}
+
+INT STDCALL
+NtGdiGetDeviceCaps(HDC hDC,
+ INT Index)
+{
+ PDC dc;
+ INT ret;
+
+ dc = DC_LockDc(hDC);
+ if (dc == NULL)
+ {
+ SetLastWin32Error(ERROR_INVALID_HANDLE);
+ return 0;
+ }
+
+ ret = IntGdiGetDeviceCaps(dc, Index);
+
DPRINT("(%04x,%d): returning %d\n", hDC, Index, ret);
DC_UnlockDc( hDC );
@@ -1472,7 +1502,7 @@
INT FASTCALL
IntGdiGetObject(HANDLE Handle, INT Count, LPVOID Buffer)
{
- PGDIOBJHDR GdiObject;
+ PVOID GdiObject;
INT Result = 0;
DWORD ObjectType;
@@ -1517,7 +1547,7 @@
break;
}
- GDIOBJ_UnlockObj(Handle, GDI_OBJECT_TYPE_DONTCARE);
+ GDIOBJ_UnlockObj(Handle);
return Result;
}
@@ -1558,7 +1588,7 @@
NtGdiGetObjectType(HANDLE handle)
{
GDIOBJHDR * ptr;
- INT result = 0;
+ INT result;
DWORD objectType;
ptr = GDIOBJ_LockObj(handle, GDI_OBJECT_TYPE_DONTCARE);
@@ -1610,11 +1640,13 @@
case GDI_OBJECT_TYPE_MEMDC:
result = OBJ_MEMDC;
break;
+
default:
DPRINT1("Magic 0x%08x not implemented\n", objectType);
+ result = 0;
break;
}
- GDIOBJ_UnlockObj(handle, GDI_OBJECT_TYPE_DONTCARE);
+ GDIOBJ_UnlockObj(handle);
return result;
}
@@ -1723,7 +1755,7 @@
dc = DC_LockDc (hDC);
if (dc == NULL)
{
- DC_UnlockDc(dc);
+ DC_UnlockDc(hdcs);
SetLastWin32Error(ERROR_INVALID_HANDLE);
return 0;
}
@@ -1788,7 +1820,7 @@
}
XlateObj = IntGdiCreateBrushXlate(dc, pen, &Failed);
- PENOBJ_UnlockPen((HPEN) hGDIObj);
+ PENOBJ_UnlockPen(hGDIObj);
if (Failed)
{
SetLastWin32Error(ERROR_NO_SYSTEM_RESOURCES);
@@ -1811,7 +1843,7 @@
}
XlateObj = IntGdiCreateBrushXlate(dc, brush, &Failed);
- BRUSHOBJ_UnlockBrush((HPEN) hGDIObj);
+ BRUSHOBJ_UnlockBrush(hGDIObj);
if (Failed)
{
SetLastWin32Error(ERROR_NO_SYSTEM_RESOURCES);
@@ -1826,9 +1858,11 @@
break;
case GDI_OBJECT_TYPE_FONT:
- objOrg = (HGDIOBJ)dc->w.hFont;
- dc->w.hFont = (HFONT) hGDIObj;
- TextIntRealizeFont(dc->w.hFont);
+ if(NT_SUCCESS(TextIntRealizeFont((HFONT)hGDIObj)))
+ {
+ objOrg = (HGDIOBJ)dc->w.hFont;
+ dc->w.hFont = (HFONT) hGDIObj;
+ }
break;
case GDI_OBJECT_TYPE_BITMAP:
@@ -1882,9 +1916,9 @@
DC_UnlockDc ( hDC );
hVisRgn = NtGdiCreateRectRgn ( 0, 0, pb->SurfObj.sizlBitmap.cx, pb->SurfObj.sizlBitmap.cy );
+ BITMAPOBJ_UnlockBitmap( hGDIObj );
NtGdiSelectVisRgn ( hDC, hVisRgn );
NtGdiDeleteObject ( hVisRgn );
- BITMAPOBJ_UnlockBitmap(hGDIObj);
return objOrg;
@@ -1963,7 +1997,7 @@
RtlCopyMemory(Buf, Driver->Buffer, Driver->MaximumLength);
}
- hDC = (HDC) GDIOBJ_AllocObj(sizeof(DC), GDI_OBJECT_TYPE_DC, (GDICLEANUPPROC) DC_InternalDeleteDC);
+ hDC = (HDC) GDIOBJ_AllocObj(GDI_OBJECT_TYPE_DC);
if (hDC == NULL)
{
if(Buf)
@@ -1974,6 +2008,7 @@
}
NewDC = DC_LockDc(hDC);
+ /* FIXME - Handle NewDC == NULL! */
if (Driver != NULL)
{
@@ -2038,17 +2073,17 @@
VOID FASTCALL
DC_FreeDC(HDC DCToFree)
{
- if (!GDIOBJ_FreeObj(DCToFree, GDI_OBJECT_TYPE_DC, GDIOBJFLAG_DEFAULT))
+ if (!GDIOBJ_FreeObj(DCToFree, GDI_OBJECT_TYPE_DC))
{
DPRINT("DC_FreeDC failed\n");
}
}
-BOOL FASTCALL
-DC_InternalDeleteDC( PDC DCToDelete )
+BOOL INTERNAL_CALL
+DC_Cleanup(PVOID ObjectBody)
{
-
- RtlFreeUnicodeString(&DCToDelete->DriverName);
+ PDC pDC = (PDC)ObjectBody;
+ RtlFreeUnicodeString(&pDC->DriverName);
return TRUE;
}
@@ -2237,6 +2272,7 @@
{
if (iModeNum == 0 || CachedDevModes == NULL) /* query modes from drivers */
{
+ BOOL PrimarySurfaceCreated = FALSE;
UNICODE_STRING DriverFileNames;
LPWSTR CurrentName;
DRVENABLEDATA DrvEnableData;
@@ -2248,6 +2284,12 @@
DPRINT1("FindDriverFileNames failed\n");
return FALSE;
}
+
+ if (!HalQueryDisplayOwnership())
+ {
+ IntCreatePrimarySurface();
+ PrimarySurfaceCreated = TRUE;
+ }
/*
* DriverFileNames may be a list of drivers in REG_SZ_MULTI format,
@@ -2313,6 +2355,10 @@
SizeOfCachedDevModes = 0;
CachedDevModes = NULL;
CachedDevModesEnd = NULL;
+ if (PrimarySurfaceCreated)
+ {
+ IntDestroyPrimarySurface();
+ }
SetLastWin32Error(STATUS_NO_MEMORY);
return FALSE;
}
@@ -2340,6 +2386,11 @@
break;
}
}
+
+ if (PrimarySurfaceCreated)
+ {
+ IntDestroyPrimarySurface();
+ }
RtlFreeUnicodeString(&DriverFileNames);
}
reactos/subsys/win32k/objects
diff -u -r1.56 -r1.56.12.1
--- dib.c 3 Jul 2004 13:55:36 -0000 1.56
+++ dib.c 13 Dec 2004 09:39:22 -0000 1.56.12.1
@@ -1,5 +1,5 @@
/*
- * $Id: dib.c,v 1.56 2004/07/03 13:55:36 navaraf Exp $
+ * $Id: dib.c,v 1.56.12.1 2004/12/13 09:39:22 hyperion Exp $
*
* ReactOS W32 Subsystem
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
@@ -385,11 +385,13 @@
DestSurfObj = EngLockSurface((HSURF)DestBitmap);
SourcePalette = PALETTE_LockPalette(hSourcePalette);
+ /* FIXME - SourcePalette can be NULL!!! Don't assert here! */
ASSERT(SourcePalette);
SourcePaletteType = SourcePalette->Mode;
PALETTE_UnlockPalette(hSourcePalette);
DestPalette = PALETTE_LockPalette(hDestPalette);
+ /* FIXME - DestPalette can be NULL!!!! Don't assert here!!! */
ASSERT(DestPalette);
DestPaletteType = DestPalette->Mode;
reactos/subsys/win32k/objects
diff -u -r1.52 -r1.52.10.1
--- fillshap.c 14 Jul 2004 20:48:58 -0000 1.52
+++ fillshap.c 13 Dec 2004 09:39:22 -0000 1.52.10.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: fillshap.c,v 1.52 2004/07/14 20:48:58 navaraf Exp $ */
+/* $Id: fillshap.c,v 1.52.10.1 2004/12/13 09:39:22 hyperion Exp $ */
#include <w32k.h>
/*
@@ -59,6 +59,7 @@
}
BitmapObj = BITMAPOBJ_LockBitmap(dc->w.hBitmap);
+ /* FIXME - BitmapObj can be NULL!!!! don't assert but handle this case gracefully! */
ASSERT(BitmapObj);
/* Convert to screen coordinates */
@@ -87,6 +88,7 @@
/* Now fill the polygon with the current brush. */
FillBrushObj = BRUSHOBJ_LockBrush(dc->w.hBrush);
+ /* FIXME - FillBrushObj can be NULL!!!!!!!! Don't Assert! */
ASSERT(FillBrushObj);
if (!(FillBrushObj->flAttrs & GDIBRUSH_IS_NULL))
{
@@ -97,6 +99,7 @@
/* get BRUSHOBJ from current pen. */
PenBrushObj = PENOBJ_LockPen(dc->w.hPen);
+ /* FIXME - handle PenBrushObj == NULL !!!!! */
IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->XlatePen);
// Draw the Polygon Edges with the current pen ( if not a NULL pen )
@@ -128,10 +131,10 @@
dc->w.ROPmode); /* MIX */
}
}
+ PENOBJ_UnlockPen( dc->w.hPen );
}
BITMAPOBJ_UnlockBitmap(dc->w.hBitmap);
- PENOBJ_UnlockPen( dc->w.hPen );
return ret;
}
@@ -250,13 +253,14 @@
PenBrush = PENOBJ_LockPen(dc->w.hPen);
if (NULL == PenBrush)
{
- PENOBJ_UnlockPen(dc->w.hPen);
+ BRUSHOBJ_UnlockBrush(dc->w.hBrush);
DC_UnlockDc(hDC);
SetLastWin32Error(ERROR_INTERNAL_ERROR);
return FALSE;
}
BitmapObj = BITMAPOBJ_LockBitmap(dc->w.hBitmap);
+ /* FIXME - BitmapObj can be NULL!!!! Don't assert but handle this case gracefully! */
ASSERT(BitmapObj);
IntGdiInitBrushInstance(&FillBrushInst, FillBrush, dc->XlateBrush);
@@ -937,6 +941,7 @@
RECTL DestRect;
ASSERT ( dc ); // caller's responsibility to set this up
+ /* FIXME - BitmapObj can be NULL!!! Don't assert but handle this case gracefully! */
ASSERT ( BitmapObj );
if ( PATH_IsPathOpen(dc->w.path) )
@@ -956,6 +961,7 @@
DestRect.bottom = BottomRect;
FillBrushObj = BRUSHOBJ_LockBrush(dc->w.hBrush);
+ /* FIXME - Handle FillBrushObj == NULL !!!! */
IntGdiInitBrushInstance(&FillBrushInst, FillBrushObj, dc->XlateBrush);
if ( FillBrushObj )
@@ -1105,9 +1111,11 @@
RectBounds.bottom = bottom;
BitmapObj = BITMAPOBJ_LockBitmap(dc->w.hBitmap);
+ /* FIXME - BitmapObj can be NULL!!!! Handle this case gracefully instead of ASSERT! */
ASSERT(BitmapObj);
FillBrushObj = BRUSHOBJ_LockBrush(dc->w.hBrush);
+ /* FIXME - Don't assert if FillBrushObj == NULL, handle this case !!!! */
ASSERT(FillBrushObj);
if (FillBrushObj->flAttrs & GDIBRUSH_IS_NULL)
{
@@ -1116,6 +1124,7 @@
}
PenBrushObj = PENOBJ_LockPen(dc->w.hPen);
+ /* FIXME - PenBrushObject can be NULL!!! Don't assert!!!! */
ASSERT(PenBrushObj);
if (PenBrushObj->flAttrs & GDIBRUSH_IS_NULL)
{
@@ -1304,7 +1313,8 @@
}
BITMAPOBJ_UnlockBitmap(dc->w.hBitmap);
- PENOBJ_UnlockPen(dc->w.hPen);
+ if(PenBrushObj != NULL)
+ PENOBJ_UnlockPen(dc->w.hPen);
BRUSHOBJ_UnlockBrush(dc->w.hBrush);
return ret;
@@ -1410,9 +1420,11 @@
Extent.bottom += DitherOrg.y;
BitmapObj = BITMAPOBJ_LockBitmap(dc->w.hBitmap);
+ /* FIXME - BitmapObj can be NULL!!! Don't assert but handle this case gracefully! */
ASSERT(BitmapObj);
PalDestGDI = PALETTE_LockPalette(dc->w.hPalette);
+ /* FIXME - PalDestGDI can be NULL!!! Don't assert but handle this case gracefully! */
ASSERT(PalDestGDI);
Mode = PalDestGDI->Mode;
PALETTE_UnlockPalette(dc->w.hPalette);
reactos/subsys/win32k/objects
diff -u -r1.73 -r1.73.6.1
--- gdiobj.c 2 Oct 2004 16:48:12 -0000 1.73
+++ gdiobj.c 13 Dec 2004 09:39:22 -0000 1.73.6.1
@@ -1,6 +1,6 @@
/*
* ReactOS W32 Subsystem
- * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
+ * Copyright (C) 1998 - 2004 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,348 +19,290 @@
/*
* GDIOBJ.C - GDI object manipulation routines
*
- * $Id: gdiobj.c,v 1.73 2004/10/02 16:48:12 navaraf Exp $
- *
+ * $Id: gdiobj.c,v 1.73.6.1 2004/12/13 09:39:22 hyperion Exp $
*/
#include <w32k.h>
-/* count all gdi objects */
-#define GDI_COUNT_OBJECTS 1
+#define NDEBUG
+#include <debug.h>
-/*! Size of the GDI handle table
- * http://www.windevnet.com/documents/s=7290/wdj9902b/9902b.htm
- * gdi handle table can hold 0x4000 handles
-*/
-#define GDI_HANDLE_COUNT 0x4000
+#ifdef __USE_W32API
+/* F*(&#$ header mess!!!! */
+HANDLE
+STDCALL PsGetProcessId(
+ PEPROCESS Process
+ );
+#endif /* __USE_W32API */
-#define GDI_GLOBAL_PROCESS ((HANDLE) 0xffffffff)
-#define GDI_HANDLE_INDEX_MASK (GDI_HANDLE_COUNT - 1)
-#define GDI_HANDLE_TYPE_MASK 0x007f0000
-#define GDI_HANDLE_STOCK_MASK 0x00800000
-
-#define GDI_HANDLE_CREATE(i, t) ((HANDLE)(((i) & GDI_HANDLE_INDEX_MASK) | ((t) & GDI_HANDLE_TYPE_MASK)))
-#define GDI_HANDLE_GET_INDEX(h) (((DWORD)(h)) & GDI_HANDLE_INDEX_MASK)
-#define GDI_HANDLE_GET_TYPE(h) (((DWORD)(h)) & GDI_HANDLE_TYPE_MASK)
-#define GDI_HANDLE_IS_TYPE(h, t) ((t) == (((DWORD)(h)) & GDI_HANDLE_TYPE_MASK))
-#define GDI_HANDLE_IS_STOCKOBJ(h) (0 != (((DWORD)(h)) & GDI_HANDLE_STOCK_MASK))
-#define GDI_HANDLE_SET_STOCKOBJ(h) ((h) = (HANDLE)(((DWORD)(h)) | GDI_HANDLE_STOCK_MASK))
-
-#define GDI_TYPE_TO_MAGIC(t) ((WORD) ((t) >> 16))
-#define GDI_MAGIC_TO_TYPE(m) ((DWORD)(m) << 16)
-
-/* FIXME Ownership of GDI objects by processes not properly implemented yet */
-#if 0
-#define GDI_VALID_OBJECT(h, obj, t, f) \
- (NULL != (obj) \
- && (GDI_MAGIC_TO_TYPE((obj)->Magic) == (t) || GDI_OBJECT_TYPE_DONTCARE == (t)) \
- && (GDI_HANDLE_GET_TYPE((h)) == GDI_MAGIC_TO_TYPE((obj)->Magic)) \
- && (((obj)->hProcessId == PsGetCurrentProcessId()) \
- || (GDI_GLOBAL_PROCESS == (obj)->hProcessId) \
- || ((f) & GDIOBJFLAG_IGNOREPID)))
-#else
-#define GDI_VALID_OBJECT(h, obj, t, f) \
- (NULL != (obj) \
- && (GDI_MAGIC_TO_TYPE((obj)->Magic) == (t) || GDI_OBJECT_TYPE_DONTCARE == (t)) \
- && (GDI_HANDLE_GET_TYPE((h)) == GDI_MAGIC_TO_TYPE((obj)->Magic)))
-#endif
+
+
+#define GDI_ENTRY_TO_INDEX(ht, e) \
+ (((ULONG_PTR)(e) - (ULONG_PTR)&((ht)->Entries[0])) / sizeof(GDI_TABLE_ENTRY))
+#define GDI_HANDLE_GET_ENTRY(HandleTable, h) \
+ (&(HandleTable)->Entries[GDI_HANDLE_GET_INDEX((h))])
+
+#define GDIBdyToHdr(body) \
+ ((PGDIOBJHDR)(body) - 1)
+#define GDIHdrToBdy(hdr) \
+ (PGDIOBJ)((PGDIOBJHDR)(hdr) + 1)
+
+/* apparently the first 10 entries are never used in windows as they are empty */
+#define RESERVE_ENTRIES_COUNT 10
typedef struct _GDI_HANDLE_TABLE
{
- WORD wTableSize;
- WORD AllocationHint;
- #if GDI_COUNT_OBJECTS
- ULONG HandlesCount;
- #endif
+ LONG HandlesCount;
+ LONG nEntries;
PPAGED_LOOKASIDE_LIST LookasideLists;
- PGDIOBJHDR Handles[1];
+
+ PGDI_TABLE_ENTRY EntriesEnd;
+
+ GDI_TABLE_ENTRY Entries[1];
} GDI_HANDLE_TABLE, *PGDI_HANDLE_TABLE;
typedef struct
{
ULONG Type;
ULONG Size;
-} GDI_OBJ_SIZE;
+ GDICLEANUPPROC CleanupProc;
+} GDI_OBJ_INFO, *PGDI_OBJ_INFO;
+
+/*
+ * Dummy GDI Cleanup Callback
+ */
+BOOL INTERNAL_CALL
+GDI_CleanupDummy(PVOID ObjectBody)
+{
+ return TRUE;
+}
+/* Testing shows that regions are the most used GDIObj type,
+ so put that one first for performance */
const
-GDI_OBJ_SIZE ObjSizes[] =
+GDI_OBJ_INFO ObjInfo[] =
{
- /* Testing shows that regions are the most used GDIObj type,
- so put that one first for performance */
- {GDI_OBJECT_TYPE_REGION, sizeof(ROSRGNDATA)},
- {GDI_OBJECT_TYPE_BITMAP, sizeof(BITMAPOBJ)},
- {GDI_OBJECT_TYPE_DC, sizeof(DC)},
- {GDI_OBJECT_TYPE_PALETTE, sizeof(PALGDI)},
- {GDI_OBJECT_TYPE_BRUSH, sizeof(GDIBRUSHOBJ)},
- {GDI_OBJECT_TYPE_PEN, sizeof(GDIBRUSHOBJ)},
- {GDI_OBJECT_TYPE_FONT, sizeof(TEXTOBJ)},
- {GDI_OBJECT_TYPE_DCE, sizeof(DCE)},
-/*
- {GDI_OBJECT_TYPE_DIRECTDRAW, sizeof(DD_DIRECTDRAW)},
- {GDI_OBJECT_TYPE_DD_SURFACE, sizeof(DD_SURFACE)},
-*/
- {GDI_OBJECT_TYPE_EXTPEN, 0},
- {GDI_OBJECT_TYPE_METADC, 0},
- {GDI_OBJECT_TYPE_METAFILE, 0},
- {GDI_OBJECT_TYPE_ENHMETAFILE, 0},
- {GDI_OBJECT_TYPE_ENHMETADC, 0},
- {GDI_OBJECT_TYPE_MEMDC, 0},
- {GDI_OBJECT_TYPE_EMF, 0}
+ /* Type */ /* Size */ /* CleanupProc */
+ {GDI_OBJECT_TYPE_REGION, sizeof(ROSRGNDATA), RGNDATA_Cleanup},
+ {GDI_OBJECT_TYPE_BITMAP, sizeof(BITMAPOBJ), BITMAP_Cleanup},
+ {GDI_OBJECT_TYPE_DC, sizeof(DC), DC_Cleanup},
+ {GDI_OBJECT_TYPE_PALETTE, sizeof(PALGDI), PALETTE_Cleanup},
+ {GDI_OBJECT_TYPE_BRUSH, sizeof(GDIBRUSHOBJ), BRUSH_Cleanup},
+ {GDI_OBJECT_TYPE_PEN, sizeof(GDIBRUSHOBJ), GDI_CleanupDummy},
+ {GDI_OBJECT_TYPE_FONT, sizeof(TEXTOBJ), GDI_CleanupDummy},
+ {GDI_OBJECT_TYPE_DCE, sizeof(DCE), DCE_Cleanup},
+/*{GDI_OBJECT_TYPE_DIRECTDRAW, sizeof(DD_DIRECTDRAW), DD_Cleanup},
+ {GDI_OBJECT_TYPE_DD_SURFACE, sizeof(DD_SURFACE), DDSURF_Cleanup},*/
+ {GDI_OBJECT_TYPE_EXTPEN, 0, GDI_CleanupDummy},
+ {GDI_OBJECT_TYPE_METADC, 0, GDI_CleanupDummy},
+ {GDI_OBJECT_TYPE_METAFILE, 0, GDI_CleanupDummy},
+ {GDI_OBJECT_TYPE_ENHMETAFILE, 0, GDI_CleanupDummy},
+ {GDI_OBJECT_TYPE_ENHMETADC, 0, GDI_CleanupDummy},
+ {GDI_OBJECT_TYPE_MEMDC, 0, GDI_CleanupDummy},
+ {GDI_OBJECT_TYPE_EMF, 0, GDI_CleanupDummy}
};
-#define OBJTYPE_COUNT (sizeof(ObjSizes) / sizeof(ObjSizes[0]))
-
-/* GDI stock objects */
-
-static LOGBRUSH WhiteBrush =
-{ BS_SOLID, RGB(255,255,255), 0 };
-
-static LOGBRUSH LtGrayBrush =
-/* FIXME : this should perhaps be BS_HATCHED, at least for 1 bitperpixel */
-{ BS_SOLID, RGB(192,192,192), 0 };
-
-static LOGBRUSH GrayBrush =
-/* FIXME : this should perhaps be BS_HATCHED, at least for 1 bitperpixel */
-{ BS_SOLID, RGB(128,128,128), 0 };
-
-static LOGBRUSH DkGrayBrush =
-/* This is BS_HATCHED, for 1 bitperpixel. This makes the spray work in pbrush */
-/* NB_HATCH_STYLES is an index into HatchBrushes */
-{ BS_HATCHED, RGB(0,0,0), NB_HATCH_STYLES };
-
-static LOGBRUSH BlackBrush =
-{ BS_SOLID, RGB(0,0,0), 0 };
-
-static LOGBRUSH NullBrush =
-{ BS_NULL, 0, 0 };
-
-static LOGPEN WhitePen =
-{ PS_SOLID, { 0, 0 }, RGB(255,255,255) };
-
-static LOGPEN BlackPen =
-{ PS_SOLID, { 0, 0 }, RGB(0,0,0) };
-
-static LOGPEN NullPen =
-{ PS_NULL, { 0, 0 }, 0 };
-
-static LOGFONTW OEMFixedFont =
-{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, OEM_CHARSET,
- 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Bitstream Vera Sans Mono" };
+#define OBJTYPE_COUNT (sizeof(ObjInfo) / sizeof(ObjInfo[0]))
-static LOGFONTW AnsiFixedFont =
-{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
- 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Bitstream Vera Sans Mono" };
+static PGDI_HANDLE_TABLE HandleTable = NULL;
+static LARGE_INTEGER ShortDelay;
-/*static LOGFONTW AnsiVarFont =
- *{ 10, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
- * 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif" }; */
-
-static LOGFONTW SystemFont =
-{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
- 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"Bitstream Vera Sans" };
-
-static LOGFONTW DeviceDefaultFont =
-{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
- 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"Bitstream Vera Sans" };
-
-static LOGFONTW SystemFixedFont =
-{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
- 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Bitstream Vera Sans Mono" };
-
-/* FIXME: Is this correct? */
-static LOGFONTW DefaultGuiFont =
-{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
- 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"Bitstream Vera Sans" };
-
-#define NB_STOCK_OBJECTS (DEFAULT_GUI_FONT + 1)
-
-static HGDIOBJ StockObjects[NB_STOCK_OBJECTS];
-static PGDI_HANDLE_TABLE HandleTable = 0;
-static FAST_MUTEX HandleTableMutex;
-static FAST_MUTEX RefCountHandling;
-static LARGE_INTEGER ShortDelay;
+#define DelayExecution() \
+ DPRINT("%s:%i: Delay\n", __FILE__, __LINE__); \
+ KeDelayExecutionThread(KernelMode, FALSE, &ShortDelay)
/*!
* Allocate GDI object table.
* \param Size - number of entries in the object table.
- * Notes:: Must be called at IRQL < DISPATCH_LEVEL.
*/
-static PGDI_HANDLE_TABLE FASTCALL
-GDIOBJ_iAllocHandleTable (WORD Size)
+static PGDI_HANDLE_TABLE INTERNAL_CALL
+GDIOBJ_iAllocHandleTable(ULONG Entries)
{
- PGDI_HANDLE_TABLE handleTable;
- ULONG MemSize;
+ PGDI_HANDLE_TABLE handleTable;
UINT ObjType;
-
- MemSize = sizeof(GDI_HANDLE_TABLE) + sizeof(PGDIOBJ) * Size;
+ ULONG MemSize = sizeof(GDI_HANDLE_TABLE) + (sizeof(GDI_TABLE_ENTRY) * (Entries - 1));
- ExAcquireFastMutex(&HandleTableMutex);
- handleTable = ExAllocatePoolWithTag(PagedPool, MemSize, TAG_GDIHNDTBLE);
+ handleTable = ExAllocatePoolWithTag(NonPagedPool, MemSize, TAG_GDIHNDTBLE);
ASSERT( handleTable );
- memset (handleTable, 0, MemSize);
-#if GDI_COUNT_OBJECTS
+ RtlZeroMemory(handleTable, MemSize);
+
handleTable->HandlesCount = 0;
-#endif
- handleTable->wTableSize = Size;
- handleTable->AllocationHint = 1;
- handleTable->LookasideLists = ExAllocatePoolWithTag(PagedPool,
+ handleTable->nEntries = Entries;
+
+ handleTable->EntriesEnd = &handleTable->Entries[Entries];
+
+ handleTable->LookasideLists = ExAllocatePoolWithTag(NonPagedPool,
OBJTYPE_COUNT * sizeof(PAGED_LOOKASIDE_LIST),
TAG_GDIHNDTBLE);
- if (NULL == handleTable->LookasideLists)
- {
- ExFreePool(handleTable);
- ExReleaseFastMutex(&HandleTableMutex);
- return NULL;
- }
- for (ObjType = 0; ObjType < OBJTYPE_COUNT; ObjType++)
- {
- ExInitializePagedLookasideList(handleTable->LookasideLists + ObjType, NULL, NULL, 0,
- ObjSizes[ObjType].Size + sizeof(GDIOBJHDR), TAG_GDIOBJ, 0);
- }
- ExReleaseFastMutex(&HandleTableMutex);
+ if(handleTable->LookasideLists == NULL)
+ {
+ ExFreePool(handleTable);
+ return NULL;
+ }
+
+ for(ObjType = 0; ObjType < OBJTYPE_COUNT; ObjType++)
+ {
+ ExInitializePagedLookasideList(handleTable->LookasideLists + ObjType, NULL, NULL, 0,
+ ObjInfo[ObjType].Size + sizeof(GDIOBJHDR), TAG_GDIOBJ, 0);
+ }
+
+ ShortDelay.QuadPart = -5000LL; /* FIXME - 0.5 ms? */
return handleTable;
}
-/*!
- * Returns the entry into the handle table by index.
-*/
-static PGDIOBJHDR FASTCALL
-GDIOBJ_iGetObjectForIndex(WORD TableIndex)
+static inline PPAGED_LOOKASIDE_LIST
+FindLookasideList(DWORD ObjectType)
{
- if (0 == TableIndex || HandleTable->wTableSize < TableIndex)
+ int Index;
+
+ for (Index = 0; Index < OBJTYPE_COUNT; Index++)
+ {
+ if (ObjInfo[Index].Type == ObjectType)
{
- DPRINT1("Invalid TableIndex %u\n", (unsigned) TableIndex);
- return NULL;
+ return HandleTable->LookasideLists + Index;
}
+ }
+
+ DPRINT1("Can't find lookaside list for object type 0x%08x\n", ObjectType);
- return HandleTable->Handles[TableIndex];
+ return NULL;
}
-/*!
- * Finds next free entry in the GDI handle table.
- * \return index into the table is successful, zero otherwise.
-*/
-static WORD FASTCALL
-GDIOBJ_iGetNextOpenHandleIndex (void)
+static inline BOOL
+RunCleanupCallback(PGDIOBJ pObj, DWORD ObjectType)
{
- WORD tableIndex;
-
- for (tableIndex = HandleTable->AllocationHint;
- tableIndex < HandleTable->wTableSize;
- tableIndex++)
- {
- if (HandleTable->Handles[tableIndex] == NULL)
- {
- HandleTable->AllocationHint = tableIndex + 1;
- return tableIndex;
- }
- }
+ int Index;
- for (tableIndex = 1;
- tableIndex < HandleTable->AllocationHint;
- tableIndex++)
- {
- if (HandleTable->Handles[tableIndex] == NULL)
- {
- HandleTable->AllocationHint = tableIndex + 1;
- return tableIndex;
- }
- }
+ for (Index = 0; Index < OBJTYPE_COUNT; Index++)
+ {
+ if (ObjInfo[Index].Type == ObjectType)
+ {
+ return ((GDICLEANUPPROC)ObjInfo[Index].CleanupProc)(pObj);
+ }
+ }
- return 0;
+ DPRINT1("Can't find cleanup callback for object type 0x%08x\n", ObjectType);
+ return TRUE;
}
-static PPAGED_LOOKASIDE_LIST FASTCALL
-FindLookasideList(DWORD ObjectType)
+static inline ULONG
+GetObjectSize(DWORD ObjectType)
{
int Index;
for (Index = 0; Index < OBJTYPE_COUNT; Index++)
+ {
+ if (ObjInfo[Index].Type == ObjectType)
{
- if (ObjSizes[Index].Type == ObjectType)
- {
- return HandleTable->LookasideLists + Index;
- }
+ return ObjInfo[Index].Size;
}
+ }
- DPRINT1("Can't find lookaside list for object type 0x%08x\n", ObjectType);
-
- return NULL;
+ DPRINT1("Can't find size for object type 0x%08x\n", ObjectType);
+ return 0;
}
/*!
* Allocate memory for GDI object and return handle to it.
*
- * \param Size - size of the GDI object. This shouldn't to include the size of GDIOBJHDR.
- * The actual amount of allocated memory is sizeof(GDIOBJHDR)+Size
* \param ObjectType - type of object \ref GDI object types
- * \param CleanupProcPtr - Routine to be called on destruction of object
*
* \return Handle of the allocated object.
*
* \note Use GDIOBJ_Lock() to obtain pointer to the new object.
+ * \todo return the object pointer and lock it by default.
*/
-HGDIOBJ FASTCALL
-GDIOBJ_AllocObj(WORD Size, DWORD ObjectType, GDICLEANUPPROC CleanupProc)
+HGDIOBJ INTERNAL_CALL
+GDIOBJ_AllocObj(ULONG ObjectType)
{
PW32PROCESS W32Process;
PGDIOBJHDR newObject;
- WORD Index;
PPAGED_LOOKASIDE_LIST LookasideList;
+ LONG CurrentProcessId, LockedProcessId;
- ExAcquireFastMutex(&HandleTableMutex);
- Index = GDIOBJ_iGetNextOpenHandleIndex ();
- if (0 == Index)
- {
- ExReleaseFastMutex(&HandleTableMutex);
- DPRINT1("Out of GDI handles\n");
- return NULL;
- }
+ ASSERT(ObjectType != GDI_OBJECT_TYPE_DONTCARE);
LookasideList = FindLookasideList(ObjectType);
- if (NULL == LookasideList)
+ if(LookasideList != NULL)
+ {
+ newObject = ExAllocateFromPagedLookasideList(LookasideList);
+ if(newObject != NULL)
{
- ExReleaseFastMutex(&HandleTableMutex);
- return NULL;
+ PGDI_TABLE_ENTRY Entry;
+ PGDIOBJ ObjectBody;
+ LONG TypeInfo;
+
+ /* shift the process id to the left so we can use the first bit to lock
+ the object.
+ FIXME - don't shift once ROS' PIDs match with nt! */
+ CurrentProcessId = (LONG)PsGetCurrentProcessId() << 1;
+ LockedProcessId = CurrentProcessId | 0x1;
+ W32Process = PsGetWin32Process();
+
+ newObject->LockingThread = NULL;
+ newObject->Locks = 0;
+
+#ifdef GDI_DEBUG
+ newObject->lockfile = NULL;
+ newObject->lockline = 0;
+#endif
+
+ ObjectBody = GDIHdrToBdy(newObject);
+
+ RtlZeroMemory(ObjectBody, GetObjectSize(ObjectType));
+
+ TypeInfo = (ObjectType & 0xFFFF0000) | (ObjectType >> 16);
+
+ /* Search for a free handle entry */
+ for(Entry = &HandleTable->Entries[RESERVE_ENTRIES_COUNT];
+ Entry < HandleTable->EntriesEnd;
+ Entry++)
+ {
+ LONG PrevProcId = InterlockedCompareExchange(&Entry->ProcessId, LockedProcessId, 0);
+ if(PrevProcId == 0)
+ {
+ if(InterlockedCompareExchangePointer(&Entry->KernelData, ObjectBody, NULL) == NULL)
+ {
+ HGDIOBJ Handle;
+ UINT Index = GDI_ENTRY_TO_INDEX(HandleTable, Entry);
+
+ Handle = (HGDIOBJ)((Index & 0xFFFF) | (ObjectType & 0xFFFF0000));
+
+ /* we found a free entry, no need to exchange this field atomically
+ since we're holding the lock */
+ Entry->Type = TypeInfo;
+
+ InterlockedExchange(&Entry->ProcessId, CurrentProcessId);
+
+ if(W32Process != NULL)
+ {
+ InterlockedIncrement(&W32Process->GDIObjects);
+ }
+
+ DPRINT("GDIOBJ_AllocObj: 0x%x ob: 0x%x\n", Handle, ObjectBody);
+ return Handle;
+ }
+ else
+ {
+ InterlockedExchange(&Entry->ProcessId, PrevProcId);
+ }
+ }
+ }
+
+ ExFreeToPagedLookasideList(LookasideList, newObject);
+ DPRINT1("Failed to insert gdi object into the handle table, no handles left!\n");
}
- newObject = ExAllocateFromPagedLookasideList(LookasideList);
- if (NULL == newObject)
+ else
{
- ExReleaseFastMutex(&HandleTableMutex);
- DPRINT1("Unable to allocate GDI object from lookaside list\n");
- return NULL;
- }
- RtlZeroMemory (newObject, Size + sizeof(GDIOBJHDR));
-
- newObject->wTableIndex = Index;
-
- newObject->dwCount = 0;
- newObject->hProcessId = PsGetCurrentProcessId ();
- newObject->CleanupProc = CleanupProc;
- newObject->Magic = GDI_TYPE_TO_MAGIC(ObjectType);
- newObject->lockfile = NULL;
- newObject->lockline = 0;
-#ifdef GDIOBJ_USE_FASTMUTEX
- ExInitializeFastMutex(&newObject->Lock);
- newObject->RecursiveLockCount = 0;
-#else
- newObject->LockTid = 0;
- newObject->LockCount = 0;
-#endif
- HandleTable->Handles[Index] = newObject;
-#if GDI_COUNT_OBJECTS
- HandleTable->HandlesCount++;
-#endif
- ExReleaseFastMutex(&HandleTableMutex);
-
- W32Process = PsGetCurrentProcess()->Win32Process;
- if(W32Process)
+ DPRINT1("Not enough memory to allocate gdi object!\n");
+ }
+ }
+ else
{
- W32Process->GDIObjects++;
+ DPRINT1("Failed to find lookaside list for object type 0x%x\n", ObjectType);
}
-
- return GDI_HANDLE_CREATE(Index, ObjectType);
+ return NULL;
}
/*!
@@ -368,77 +310,137 @@
* appropriate cleanup routine.
*
* \param hObj - handle of the object to be deleted.
- * \param ObjectType - one of the \ref GDI object types
- * or GDI_OBJECT_TYPE_DONTCARE.
- * \param Flag - if set to GDIOBJFLAG_IGNOREPID then the routine doesn't check if the process that
- * tries to delete the object is the same one that created it.
*
* \return Returns TRUE if succesful.
- *
- * \note You should only use GDIOBJFLAG_IGNOREPID if you are cleaning up after the process that terminated.
- * \note This function deferres object deletion if it is still in use.
+ * \return Returns FALSE if the cleanup routine returned FALSE or the object doesn't belong
+ * to the calling process.
*/
-BOOL STDCALL
-GDIOBJ_FreeObj(HGDIOBJ hObj, DWORD ObjectType, DWORD Flag)
+BOOL INTERNAL_CALL
+#ifdef GDI_DEBUG
+GDIOBJ_FreeObjDbg(const char* file, int line, HGDIOBJ hObj, DWORD ObjectType)
+#else /* !GDI_DEBUG */
+GDIOBJ_FreeObj(HGDIOBJ hObj, DWORD ObjectType)
+#endif /* GDI_DEBUG */
{
- PW32PROCESS W32Process;
- PGDIOBJHDR objectHeader;
- PGDIOBJ Obj;
+ PGDI_TABLE_ENTRY Entry;
PPAGED_LOOKASIDE_LIST LookasideList;
- BOOL bRet = TRUE;
+ LONG ProcessId, LockedProcessId, PrevProcId, ExpectedType;
+#ifdef GDI_DEBUG
+ ULONG Attempts = 0;
+#endif
- objectHeader = GDIOBJ_iGetObjectForIndex(GDI_HANDLE_GET_INDEX(hObj));
- DPRINT("GDIOBJ_FreeObj: hObj: 0x%08x, object: %x\n", hObj, objectHeader);
+ DPRINT("GDIOBJ_FreeObj: hObj: 0x%08x\n", hObj);
+
+ if(GDI_HANDLE_IS_STOCKOBJ(hObj))
+ {
+ DPRINT1("GDIOBJ_FreeObj() failed, can't delete stock object handle: 0x%x !!!\n", hObj);
+#ifdef GDI_DEBUG
+ DPRINT1("-> called from %s:%i\n", file, line);
+#endif
+ return FALSE;
+ }
+
+ /* shift the process id to the left so we can use the first bit to lock the object.
+ FIXME - don't shift once ROS' PIDs match with nt! */
+ ProcessId = (LONG)PsGetCurrentProcessId() << 1;
+ LockedProcessId = ProcessId | 0x1;
+
+ ExpectedType = ((ObjectType != GDI_OBJECT_TYPE_DONTCARE) ? ObjectType : 0);
+
+ Entry = GDI_HANDLE_GET_ENTRY(HandleTable, hObj);
+
+LockHandle:
+ /* lock the object, we must not delete global objects, so don't exchange the locking
+ process ID to zero when attempting to lock a global object... */
+ PrevProcId = InterlockedCompareExchange(&Entry->ProcessId, LockedProcessId, ProcessId);
+ if(PrevProcId == ProcessId)
+ {
+ if(Entry->Type != 0 && Entry->KernelData != NULL && (ExpectedType == 0 || ((Entry->Type << 16) == ExpectedType)))
+ {
+ PGDIOBJHDR GdiHdr;
+
+ GdiHdr = GDIBdyToHdr(Entry->KernelData);
+
+ if(GdiHdr->LockingThread == NULL)
+ {
+ BOOL Ret;
+ ULONG Type = Entry->Type << 16;
+
+ /* Clear the type field so when unlocking the handle it gets finally deleted */
+ Entry->Type = 0;
+ Entry->KernelData = NULL;
+
+ /* unlock the handle slot */
+ InterlockedExchange(&Entry->ProcessId, 0);
+
+ /* call the cleanup routine. */
+ Ret = RunCleanupCallback(GDIHdrToBdy(GdiHdr), Type);
+
+ /* Now it's time to free the memory */
+ LookasideList = FindLookasideList(Type);
+ if(LookasideList != NULL)
+ {
+ ExFreeToPagedLookasideList(LookasideList, GdiHdr);
+ }
- if (! GDI_VALID_OBJECT(hObj, objectHeader, ObjectType, Flag)
- || GDI_GLOBAL_PROCESS == objectHeader->hProcessId)
+ return Ret;
+ }
+ else
+ {
+ /* the object is currently locked. just clear the type field so when the
+ object gets unlocked it will be finally deleted from the table. */
+ Entry->Type = 0;
+
+ /* unlock the handle slot */
+ InterlockedExchange(&Entry->ProcessId, 0);
+ /* report a successful deletion as the object is actually removed from the table */
+ return TRUE;
+ }
+ }
+ else
{
- DPRINT1("Can't delete hObj:0x%08x, type:0x%08x, flag:%d\n", hObj, ObjectType, Flag);
- return FALSE;
+ if(Entry->Type != 0)
+ {
+ DPRINT1("Attempted to delete object 0x%x, type mismatch (0x%x : 0x%x)\n", hObj, ObjectType, ExpectedType);
+ }
+ else
+ {
+ DPRINT1("Attempted to delete object 0x%x which was already deleted!\n", hObj);
+ }
+ InterlockedExchange(&Entry->ProcessId, PrevProcId);
}
-
- DPRINT("FreeObj: locks: %x\n", objectHeader->dwCount );
- if (!(Flag & GDIOBJFLAG_IGNORELOCK))
+ }
+ else if(PrevProcId == LockedProcessId)
+ {
+#ifdef GDI_DEBUG
+ if(++Attempts > 20)
{
- /* check that the reference count is zero. if not then set flag
- * and delete object when releaseobj is called */
- ExAcquireFastMutex(&RefCountHandling);
- if ((objectHeader->dwCount & ~0x80000000) > 0 )
- {
- DPRINT("GDIOBJ_FreeObj: delayed object deletion: count %d\n", objectHeader->dwCount);
- objectHeader->dwCount |= 0x80000000;
- ExReleaseFastMutex(&RefCountHandling);
- return TRUE;
- }
- ExReleaseFastMutex(&RefCountHandling);
+ DPRINT1("[%d]Waiting on 0x%x\n", Attempts, hObj);
}
-
- /* allow object to delete internal data */
- if (NULL != objectHeader->CleanupProc)
+#endif
+ /* the object is currently locked, wait some time and try again.
+ FIXME - we shouldn't loop forever! Give up after some time! */
+ DelayExecution();
+ /* try again */
+ goto LockHandle;
+ }
+ else
+ {
+ if((PrevProcId >> 1) == 0)
{
- Obj = (PGDIOBJ)((PCHAR)objectHeader + sizeof(GDIOBJHDR));
- bRet = (*(objectHeader->CleanupProc))(Obj);
+ DPRINT1("Attempted to free global gdi handle 0x%x, caller needs to get ownership first!!!", hObj);
}
- LookasideList = FindLookasideList(GDI_MAGIC_TO_TYPE(objectHeader->Magic));
- if (NULL != LookasideList)
+ else
{
- ExFreeToPagedLookasideList(LookasideList, objectHeader);
+ DPRINT1("Attempted to free foreign handle: 0x%x Owner: 0x%x from Caller: 0x%x\n", hObj, PrevProcId >> 1, ProcessId >> 1);
}
- ExAcquireFastMutexUnsafe (&HandleTableMutex);
- HandleTable->Handles[GDI_HANDLE_GET_INDEX(hObj)] = NULL;
-#if GDI_COUNT_OBJECTS
- HandleTable->HandlesCount--;
+#ifdef GDI_DEBUG
+ DPRINT1("-> called from %s:%i\n", file, line);
#endif
- ExReleaseFastMutexUnsafe (&HandleTableMutex);
-
- W32Process = PsGetCurrentProcess()->Win32Process;
- if(W32Process)
- {
- W32Process->GDIObjects--;
}
- return bRet;
+ return FALSE;
}
/*!
@@ -451,7 +453,7 @@
*
* \note this function uses an O(n^2) algoritm because we shouldn't need to call it with more than 3 or 4 objects.
*/
-BOOL FASTCALL
+BOOL INTERNAL_CALL
GDIOBJ_LockMultipleObj(PGDIMULTILOCK pList, INT nObj)
{
INT i, j;
@@ -493,7 +495,7 @@
*
* \note this function uses O(n^2) algoritm because we shouldn't need to call it with more than 3 or 4 objects.
*/
-BOOL FASTCALL
+BOOL INTERNAL_CALL
GDIOBJ_UnlockMultipleObj(PGDIMULTILOCK pList, INT nObj)
{
INT i, j;
@@ -512,7 +514,7 @@
pList[j].pObj = NULL;
}
}
- GDIOBJ_UnlockObj(pList[i].hObj, pList[i].ObjectType);
+ GDIOBJ_UnlockObj(pList[i].hObj);
pList[i].pObj = NULL;
}
}
@@ -521,101 +523,15 @@
}
/*!
- * Get the type of the object.
- * \param ObjectHandle - handle of the object.
- * \return One of the \ref GDI object types
-*/
-DWORD FASTCALL
-GDIOBJ_GetObjectType(HGDIOBJ ObjectHandle)
-{
- PGDIOBJHDR ObjHdr;
-
- ObjHdr = GDIOBJ_iGetObjectForIndex(GDI_HANDLE_GET_INDEX(ObjectHandle));
- if (NULL == ObjHdr
- || ! GDI_VALID_OBJECT(ObjectHandle, ObjHdr, GDI_MAGIC_TO_TYPE(ObjHdr->Magic), 0))
- {
- DPRINT1("Invalid ObjectHandle 0x%08x\n", ObjectHandle);
- return 0;
- }
- DPRINT("GDIOBJ_GetObjectType for handle 0x%08x returns 0x%08x\n", ObjectHandle,
- GDI_MAGIC_TO_TYPE(ObjHdr->Magic));
-
- return GDI_MAGIC_TO_TYPE(ObjHdr->Magic);
-}
-
-/*!
* Initialization of the GDI object engine.
*/
-VOID FASTCALL
+VOID INTERNAL_CALL
InitGdiObjectHandleTable (VOID)
{
DPRINT("InitGdiObjectHandleTable\n");
- ExInitializeFastMutex (&HandleTableMutex);
- ExInitializeFastMutex (&RefCountHandling);
-
- ShortDelay.QuadPart = -100;
HandleTable = GDIOBJ_iAllocHandleTable (GDI_HANDLE_COUNT);
- DPRINT("HandleTable: %x\n", HandleTable );
-
- InitEngHandleTable();
-}
-
-/*!
- * Creates a bunch of stock objects: brushes, pens, fonts.
-*/
-VOID FASTCALL
-CreateStockObjects(void)
-{
- unsigned Object;
-
- DPRINT("Beginning creation of stock objects\n");
-
- /* Create GDI Stock Objects from the logical structures we've defined */
-
- StockObjects[WHITE_BRUSH] = IntGdiCreateBrushIndirect(&WhiteBrush);
- StockObjects[LTGRAY_BRUSH] = IntGdiCreateBrushIndirect(&LtGrayBrush);
- StockObjects[GRAY_BRUSH] = IntGdiCreateBrushIndirect(&GrayBrush);
- StockObjects[DKGRAY_BRUSH] = IntGdiCreateBrushIndirect(&DkGrayBrush);
- StockObjects[BLACK_BRUSH] = IntGdiCreateBrushIndirect(&BlackBrush);
- StockObjects[NULL_BRUSH] = IntGdiCreateBrushIndirect(&NullBrush);
-
- StockObjects[WHITE_PEN] = IntGdiCreatePenIndirect(&WhitePen);
- StockObjects[BLACK_PEN] = IntGdiCreatePenIndirect(&BlackPen);
- StockObjects[NULL_PEN] = IntGdiCreatePenIndirect(&NullPen);
-
- (void) TextIntCreateFontIndirect(&OEMFixedFont, (HFONT*)&StockObjects[OEM_FIXED_FONT]);
- (void) TextIntCreateFontIndirect(&AnsiFixedFont, (HFONT*)&StockObjects[ANSI_FIXED_FONT]);
- (void) TextIntCreateFontIndirect(&SystemFont, (HFONT*)&StockObjects[SYSTEM_FONT]);
- (void) TextIntCreateFontIndirect(&DeviceDefaultFont, (HFONT*)&StockObjects[DEVICE_DEFAULT_FONT]);
- (void) TextIntCreateFontIndirect(&SystemFixedFont, (HFONT*)&StockObjects[SYSTEM_FIXED_FONT]);
- (void) TextIntCreateFontIndirect(&DefaultGuiFont, (HFONT*)&StockObjects[DEFAULT_GUI_FONT]);
-
- StockObjects[DEFAULT_PALETTE] = (HGDIOBJ*)PALETTE_Init();
-
- for (Object = 0; Object < NB_STOCK_OBJECTS; Object++)
- {
- if (NULL != StockObjects[Object])
- {
- GDIOBJ_SetOwnership(StockObjects[Object], NULL);
-/* GDI_HANDLE_SET_STOCKOBJ(StockObjects[Object]);*/
- }
- }
-
- DPRINT("Completed creation of stock objects\n");
-}
-
-/*!
- * Return stock object.
- * \param Object - stock object id.
- * \return Handle to the object.
-*/
-HGDIOBJ STDCALL
-NtGdiGetStockObject(INT Object)
-{
- DPRINT("NtGdiGetStockObject index %d\n", Object);
-
- return ((Object < 0) || (NB_STOCK_OBJECTS <= Object)) ? NULL : StockObjects[Object];
+ DPRINT("HandleTable: %x\n", HandleTable);
}
/*!
@@ -629,19 +545,21 @@
DPRINT("NtGdiDeleteObject handle 0x%08x\n", hObject);
return NULL != hObject
- ? GDIOBJ_FreeObj(hObject, GDI_OBJECT_TYPE_DONTCARE, GDIOBJFLAG_DEFAULT) : FALSE;
+ ? GDIOBJ_FreeObj(hObject, GDI_OBJECT_TYPE_DONTCARE) : FALSE;
}
/*!
* Internal function. Called when the process is destroyed to free the remaining GDI handles.
* \param Process - PID of the process that will be destroyed.
*/
-BOOL FASTCALL
-CleanupForProcess (struct _EPROCESS *Process, INT Pid)
+BOOL INTERNAL_CALL
+GDI_CleanupForProcess (struct _EPROCESS *Process)
{
- DWORD i;
- PGDIOBJHDR objectHeader;
+ PGDI_TABLE_ENTRY Entry;
PEPROCESS CurrentProcess;
+ PW32PROCESS W32Process;
+ LONG ProcId;
+ ULONG Index = RESERVE_ENTRIES_COUNT;
DPRINT("Starting CleanupForProcess prochandle %x Pid %d\n", Process, Pid);
CurrentProcess = PsGetCurrentProcess();
@@ -649,366 +567,767 @@
{
KeAttachProcess(Process);
}
+ W32Process = Process->Win32Process;
+ ASSERT(W32Process);
- for(i = 1; i < HandleTable->wTableSize; i++)
- {
- objectHeader = GDIOBJ_iGetObjectForIndex(i);
- if (NULL != objectHeader &&
- (INT) objectHeader->hProcessId == Pid)
- {
- DPRINT("CleanupForProcess: %d, process: %d, locks: %d, magic: 0x%x", i, objectHeader->hProcessId, objectHeader->dwCount, objectHeader->Magic);
- GDIOBJ_FreeObj(GDI_HANDLE_CREATE(i, GDI_MAGIC_TO_TYPE(objectHeader->Magic)),
- GDI_MAGIC_TO_TYPE(objectHeader->Magic),
- GDIOBJFLAG_IGNOREPID | GDIOBJFLAG_IGNORELOCK);
- }
- }
-
- if (CurrentProcess != Process)
+ if(W32Process->GDIObjects > 0)
+ {
+ /* FIXME - Instead of building the handle here and delete it using GDIOBJ_FreeObj
+ we should delete it directly here! */
+ ProcId = ((LONG)Process->UniqueProcessId << 1);
+
+ for(Entry = &HandleTable->Entries[RESERVE_ENTRIES_COUNT];
+ Entry < HandleTable->EntriesEnd;
+ Entry++, Index++)
{
- KeDetachProcess();
- }
-
- DPRINT("Completed cleanup for process %d\n", Pid);
-
- return TRUE;
-}
+ /* ignore the lock bit */
+ if((Entry->ProcessId & ~0x1) == ProcId && Entry->Type != 0)
+ {
+ HGDIOBJ ObjectHandle;
-#define GDIOBJ_TRACKLOCKS
+ /* Create the object handle for the entry, the upper 16 bit of the
+ Type field includes the type of the object including the stock
+ object flag - but since stock objects don't have a process id we can
+ simply ignore this fact here. */
+ ObjectHandle = (HGDIOBJ)(Index | (Entry->Type & 0xFFFF0000));
-#ifdef GDIOBJ_LockObj
-#undef GDIOBJ_LockObj
-PGDIOBJ FASTCALL
-GDIOBJ_LockObjDbg (const char* file, int line, HGDIOBJ hObj, DWORD ObjectType)
-{
- PGDIOBJHDR ObjHdr = GDIOBJ_iGetObjectForIndex(GDI_HANDLE_GET_INDEX(hObj));
-#ifndef GDIOBJ_USE_FASTMUTEX
- DWORD CurrentTid = (DWORD)PsGetCurrentThreadId();
-#endif
-
- DPRINT("(%s:%i) GDIOBJ_LockObjDbg(0x%08x,0x%08x)\n", file, line, hObj, ObjectType);
- if (! GDI_VALID_OBJECT(hObj, ObjHdr, ObjectType, GDIOBJFLAG_DEFAULT))
- {
- int reason = 0;
- if (NULL == ObjHdr)
- {
- reason = 1;
- }
- else if (GDI_MAGIC_TO_TYPE(ObjHdr->Magic) != ObjectType && ObjectType != GDI_OBJECT_TYPE_DONTCARE)
- {
- reason = 2;
- }
- else if (ObjHdr->hProcessId != GDI_GLOBAL_PROCESS
- && ObjHdr->hProcessId != PsGetCurrentProcessId())
- {
- reason = 3;
- }
- else if (GDI_HANDLE_GET_TYPE(hObj) != ObjectType && ObjectType != GDI_OBJECT_TYPE_DONTCARE)
- {
- reason = 4;
- }
- DPRINT1("GDIOBJ_LockObj failed for 0x%08x, reqtype 0x%08x reason %d\n",
- hObj, ObjectType, reason );
- DPRINT1("\tcalled from: %s:%i\n", file, line );
- return NULL;
- }
-
-#ifdef GDIOBJ_USE_FASTMUTEX
[truncated at 1000 lines; 949 more skipped]
reactos/subsys/win32k/objects
diff -u -r1.37 -r1.37.10.1
--- line.c 14 Jul 2004 20:48:58 -0000 1.37
+++ line.c 13 Dec 2004 09:39:22 -0000 1.37.10.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: line.c,v 1.37 2004/07/14 20:48:58 navaraf Exp $ */
+/* $Id: line.c,v 1.37.10.1 2004/12/13 09:39:22 hyperion Exp $ */
#include <w32k.h>
// Some code from the WINE project source (www.winehq.com)
@@ -98,6 +98,7 @@
/* get BRUSHOBJ from current pen. */
PenBrushObj = PENOBJ_LockPen( dc->w.hPen );
+ /* FIXME - PenBrushObj can be NULL!!!! Don't assert here! */
ASSERT(PenBrushObj);
if (!(PenBrushObj->flAttrs & GDIBRUSH_IS_NULL))
@@ -202,6 +203,7 @@
/* Get BRUSHOBJ from current pen. */
PenBrushObj = PENOBJ_LockPen(dc->w.hPen);
+ /* FIXME - PenBrushObj can be NULL! Don't assert here! */
ASSERT(PenBrushObj);
if (!(PenBrushObj->flAttrs & GDIBRUSH_IS_NULL))
@@ -210,6 +212,7 @@
if (Points != NULL)
{
BitmapObj = BITMAPOBJ_LockBitmap(dc->w.hBitmap);
+ /* FIXME - BitmapObj can be NULL!!!! Don't assert but handle this case gracefully! */
ASSERT(BitmapObj);
RtlCopyMemory(Points, pt, Count * sizeof(POINT));
reactos/subsys/win32k/objects
diff -u -r1.20 -r1.20.12.1
--- palette.c 22 Jun 2004 20:08:17 -0000 1.20
+++ palette.c 13 Dec 2004 09:39:22 -0000 1.20.12.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: palette.c,v 1.20 2004/06/22 20:08:17 gvg Exp $ */
+/* $Id: palette.c,v 1.20.12.1 2004/12/13 09:39:22 hyperion Exp $ */
#include <w32k.h>
#ifndef NO_MAPPING
@@ -36,12 +36,13 @@
return COLOR_sysPal;
}
-static BOOL FASTCALL
-PALETTE_InternalDelete(PPALGDI Palette)
+BOOL INTERNAL_CALL
+PALETTE_Cleanup(PVOID ObjectBody)
{
- if (NULL != Palette->IndexedColors)
+ PPALGDI pPal = (PPALGDI)ObjectBody;
+ if (NULL != pPal->IndexedColors)
{
- ExFreePool(Palette->IndexedColors);
+ ExFreePool(pPal->IndexedColors);
}
return TRUE;
@@ -58,13 +59,14 @@
HPALETTE NewPalette;
PPALGDI PalGDI;
- NewPalette = (HPALETTE) GDIOBJ_AllocObj(sizeof(PALGDI), GDI_OBJECT_TYPE_PALETTE, (GDICLEANUPPROC) PALETTE_InternalDelete);
+ NewPalette = (HPALETTE) GDIOBJ_AllocObj(GDI_OBJECT_TYPE_PALETTE);
if (NULL == NewPalette)
{
return NULL;
}
PalGDI = PALETTE_LockPalette(NewPalette);
+ /* FIXME - PalGDI can be NULL!!! Don't assert here! */
ASSERT( PalGDI );
PalGDI->Self = NewPalette;
@@ -106,13 +108,14 @@
PPALGDI PalGDI;
unsigned i;
- NewPalette = (HPALETTE) GDIOBJ_AllocObj(sizeof(PALGDI), GDI_OBJECT_TYPE_PALETTE, (GDICLEANUPPROC) PALETTE_InternalDelete);
+ NewPalette = (HPALETTE) GDIOBJ_AllocObj(GDI_OBJECT_TYPE_PALETTE);
if (NULL == NewPalette)
{
return NULL;
}
PalGDI = PALETTE_LockPalette(NewPalette);
+ /* FIXME - PalGDI can be NULL!!! Don't assert here! */
ASSERT( PalGDI );
PalGDI->Self = NewPalette;
@@ -227,6 +230,7 @@
HPALETTE hSysPal = NtGdiGetStockObject(DEFAULT_PALETTE);
PPALGDI pSysPal = PALETTE_LockPalette(hSysPal);
PPALGDI palGDI = (PPALGDI) palPtr;
+ /* FIXME - handle pSysPal == NULL!!!!!!! */
COLOR_sysPal = pSysPal->IndexedColors;
PALETTE_UnlockPalette(hSysPal); // FIXME: Is this a right way to obtain pointer to the system palette?
reactos/subsys/win32k/objects
diff -u -r1.16 -r1.16.10.1
--- pen.c 14 Jul 2004 20:48:58 -0000 1.16
+++ pen.c 13 Dec 2004 09:39:22 -0000 1.16.10.1
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: pen.c,v 1.16 2004/07/14 20:48:58 navaraf Exp $
+ * $Id: pen.c,v 1.16.10.1 2004/12/13 09:39:22 hyperion Exp $
*/
#include <w32k.h>
@@ -42,6 +42,7 @@
}
PenObject = PENOBJ_LockPen(hPen);
+ /* FIXME - Handle PenObject == NULL!!! */
PenObject->ptPenWidth = LogPen->lopnWidth;
PenObject->ulPenStyle = LogPen->lopnStyle;
PenObject->BrushAttr.lbColor = LogPen->lopnColor;
reactos/subsys/win32k/objects
diff -u -r1.23 -r1.23.8.1
--- print.c 17 Jul 2004 17:37:41 -0000 1.23
+++ print.c 13 Dec 2004 09:39:22 -0000 1.23.8.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: print.c,v 1.23 2004/07/17 17:37:41 blight Exp $ */
+/* $Id: print.c,v 1.23.8.1 2004/12/13 09:39:22 hyperion Exp $ */
#include <w32k.h>
INT
@@ -44,6 +44,18 @@
}
INT
+FASTCALL
+IntGdiEscape(PDC dc,
+ INT Escape,
+ INT InSize,
+ LPCSTR InData,
+ LPVOID OutData)
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+
+INT
STDCALL
NtGdiEscape(HDC hDC,
INT Escape,
@@ -51,8 +63,21 @@
LPCSTR InData,
LPVOID OutData)
{
- UNIMPLEMENTED;
- return 0;
+ PDC dc;
+ INT ret;
+
+ dc = DC_LockDc(hDC);
+ if (dc == NULL)
+ {
+ SetLastWin32Error(ERROR_INVALID_HANDLE);
+ return 0;
+ }
+
+ /* TODO FIXME - don't pass umode buffer to an Int function */
+ ret = IntGdiEscape(dc, Escape, InSize, InData, OutData);
+
+ DC_UnlockDc( hDC );
+ return ret;
}
INT
@@ -85,6 +110,8 @@
BITMAPOBJ *BitmapObj = BITMAPOBJ_LockBitmap(dc->w.hBitmap);
INT Result;
+ /* FIXME - Handle BitmapObj == NULL !!!!!! */
+
if ( NULL == dc->DriverFunctions.Escape )
{
Result = IntEngExtEscape(
reactos/subsys/win32k/objects
diff -u -r1.62 -r1.62.10.1
--- region.c 14 Jul 2004 20:48:58 -0000 1.62
+++ region.c 13 Dec 2004 09:39:22 -0000 1.62.10.1
@@ -113,12 +113,26 @@
* the y-x-banding that's so nice to have...
*/
-/* $Id: region.c,v 1.62 2004/07/14 20:48:58 navaraf Exp $ */
+/* $Id: region.c,v 1.62.10.1 2004/12/13 09:39:22 hyperion Exp $ */
#include <w32k.h>
#include <win32k/float.h>
// Internal Functions
+#if 1
+#define COPY_RECTS(dest, src, nRects) \
+ do { \
+ PRECT xDest = (dest); \
+ PRECT xSrc = (src); \
+ UINT xRects = (nRects); \
+ while(xRects-- > 0) { \
+ *(xDest++) = *(xSrc++); \
+ } \
+ } while(0)
+#else
+#define COPY_RECTS(dest, src, nRects) RtlCopyMemory(dest, src, (nRects) * sizeof(RECT))
+#endif
+
#define EMPTY_REGION(pReg) { \
(pReg)->rdh.nCount = 0; \
(pReg)->rdh.rcBound.left = (pReg)->rdh.rcBound.top = 0; \
@@ -382,8 +396,6 @@
#define LARGE_COORDINATE 0x7fffffff /* FIXME */
#define SMALL_COORDINATE 0x80000000
-
-
/*
* Check to see if there is enough memory in the present region.
*/
@@ -394,7 +406,10 @@
if (temp == 0)
return 0;
- RtlCopyMemory( temp, *firstrect, reg->rdh.nRgnSize );
+
+ /* copy the rectangles */
+ COPY_RECTS(temp, *firstrect, reg->rdh.nCount);
+
reg->rdh.nRgnSize *= 2;
if (*firstrect != ®->rdh.rcBound)
ExFreePool( *firstrect );
@@ -473,7 +488,7 @@
dst->rdh.rcBound.right = src->rdh.rcBound.right;
dst->rdh.rcBound.bottom = src->rdh.rcBound.bottom;
dst->rdh.iType = src->rdh.iType;
- RtlCopyMemory(dst->Buffer, src->Buffer, (int)(src->rdh.nCount * sizeof(RECT)));
+ COPY_RECTS(dst->Buffer, src->Buffer, src->rdh.nCount);
}
return TRUE;
}
@@ -546,7 +561,9 @@
ULONG i;
if(rgnDst != rgnSrc)
- RtlCopyMemory(rgnDst, rgnSrc, sizeof(ROSRGNDATA));
+ {
+ *rgnDst = *rgnSrc;
+ }
if(off->x || off->y)
{
@@ -563,7 +580,9 @@
rgnDst->rdh.rcBound.bottom += off->y;
}
else
- RtlCopyMemory(xrect, rgnSrc->Buffer, rgnDst->rdh.nCount * sizeof(RECT));
+ {
+ COPY_RECTS(xrect, rgnSrc->Buffer, rgnDst->rdh.nCount);
+ }
rgnDst->Buffer = xrect;
} else
@@ -1137,7 +1156,7 @@
newReg->Buffer = prev_rects;
else{
newReg->rdh.nRgnSize = newReg->rdh.nCount*sizeof(RECT);
- RtlCopyMemory( newReg->Buffer, prev_rects, newReg->rdh.nRgnSize );
+ COPY_RECTS(newReg->Buffer, prev_rects, newReg->rdh.nCount);
if (prev_rects != &newReg->rdh.rcBound)
ExFreePool( prev_rects );
}
@@ -1883,8 +1902,7 @@
PROSRGNDATA pReg;
BOOL bRet;
- if ((hReg = (HRGN) GDIOBJ_AllocObj(sizeof(ROSRGNDATA), GDI_OBJECT_TYPE_REGION,
- (GDICLEANUPPROC) RGNDATA_InternalDelete)))
+ if ((hReg = (HRGN) GDIOBJ_AllocObj(GDI_OBJECT_TYPE_REGION)))
{
if (NULL != (pReg = RGNDATA_LockRgn(hReg)))
{
@@ -1921,9 +1939,10 @@
return NULL;
}
-BOOL FASTCALL RGNDATA_InternalDelete( PROSRGNDATA pRgn )
+BOOL INTERNAL_CALL
+RGNDATA_Cleanup(PVOID ObjectBody)
{
- ASSERT(pRgn);
+ PROSRGNDATA pRgn = (PROSRGNDATA)ObjectBody;
if(pRgn->Buffer && pRgn->Buffer != &pRgn->rdh.rcBound)
ExFreePool(pRgn->Buffer);
return TRUE;
@@ -2237,8 +2256,8 @@
NtGdiPatBlt(hDC, r->left, r->top, r->right - r->left, r->bottom - r->top, PATCOPY);
}
- NtGdiSelectObject(hDC, oldhBrush);
RGNDATA_UnlockRgn( hRgn );
+ NtGdiSelectObject(hDC, oldhBrush);
return TRUE;
}
@@ -2438,6 +2457,7 @@
BrushOrigin.x = dc->w.brushOrgX;
BrushOrigin.y = dc->w.brushOrgY;
BitmapObj = BITMAPOBJ_LockBitmap(dc->w.hBitmap);
+ /* FIXME - Handle BitmapObj == NULL !!!! */
bRet = IntEngPaint(BitmapObj,
ClipRegion,
@@ -2446,7 +2466,7 @@
0xFFFF);//FIXME:don't know what to put here
BITMAPOBJ_UnlockBitmap(dc->w.hBitmap);
- RGNDATA_UnlockRgn( tmpVisRgn );
+ RGNDATA_UnlockRgn( hRgn );
// Fill the region
DC_UnlockDc( hDC );
@@ -2571,7 +2591,7 @@
RECT SafeRect;
PROSRGNDATA Rgn;
- if(!(Rgn = (PROSRGNDATA)RGNDATA_UnlockRgn(hDest)))
+ if(!(Rgn = (PROSRGNDATA)RGNDATA_LockRgn(hDest)))
{
SetLastWin32Error(ERROR_INVALID_HANDLE);
return NULL;
@@ -2870,7 +2890,7 @@
}
if(reg->Buffer != NULL)
{
- RtlCopyMemory(temp, reg->Buffer, reg->rdh.nCount * sizeof(RECT));
+ COPY_RECTS(temp, reg->Buffer, reg->rdh.nCount);
if(reg->Buffer != ®->rdh.rcBound)
ExFreePool(reg->Buffer);
}
@@ -3130,7 +3150,7 @@
tmpPtBlock = ExAllocatePoolWithTag( PagedPool, sizeof(POINTBLOCK), TAG_REGION);
if(!tmpPtBlock) {
DPRINT1("Can't alloc tPB\n");
- /* FIXME - free memory */
+ ExFreePool(pETEs);
return 0;
}
curPtBlock->next = tmpPtBlock;
@@ -3182,7 +3202,7 @@
sizeof(POINTBLOCK), TAG_REGION );
if(!tmpPtBlock) {
DPRINT1("Can't alloc tPB\n");
- /* FIXME - free resources */
+ ExFreePool(pETEs);
NtGdiDeleteObject( hrgn );
return 0;
}
reactos/subsys/win32k/objects
diff -u -r1.112 -r1.112.4.1
--- text.c 7 Oct 2004 05:26:54 -0000 1.112
+++ text.c 13 Dec 2004 09:39:22 -0000 1.112.4.1
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: text.c,v 1.112 2004/10/07 05:26:54 sedwards Exp $ */
+/* $Id: text.c,v 1.112.4.1 2004/12/13 09:39:22 hyperion Exp $ */
#include <w32k.h>
#include <ft2build.h>
@@ -33,7 +33,7 @@
typedef struct _FONT_ENTRY {
LIST_ENTRY ListEntry;
- HFONT hFont;
+ FONTGDI *Font;
UNICODE_STRING FaceName;
BYTE NotEnum;
} FONT_ENTRY, *PFONT_ENTRY;
@@ -247,9 +247,7 @@
INT FASTCALL
IntGdiAddFontResource(PUNICODE_STRING FileName, DWORD Characteristics)
{
- HFONT NewFont;
- FONTOBJ *FontObj;
- PFONTGDI FontGDI;
+ FONTGDI *FontGDI;
NTSTATUS Status;
HANDLE FileHandle;
OBJECT_ATTRIBUTES ObjectAttributes;
@@ -261,20 +259,6 @@
ANSI_STRING AnsiFaceName;
PFONT_ENTRY Entry;
- /* Create handle for the font */
-
- NewFont = (HFONT)CreateGDIHandle(
- sizeof(FONTGDI),
- sizeof(FONTOBJ),
- (PVOID*)&FontGDI,
- (PVOID*)&FontObj);
-
- if (NewFont == 0)
- {
- DPRINT("Could not allocate a new GDI font object\n");
- return 0;
- }
-
/* Open the font file */
InitializeObjectAttributes(&ObjectAttributes, FileName, 0, NULL, NULL);
@@ -289,7 +273,6 @@
if (!NT_SUCCESS(Status))
{
DPRINT("Could not font file: %wZ\n", FileName);
- NtGdiDeleteObject(NewFont);
return 0;
}
@@ -305,7 +288,6 @@
if (!NT_SUCCESS(Status))
{
DPRINT("Could not get file size\n");
- NtGdiDeleteObject(NewFont);
ZwClose(FileHandle);
return 0;
}
@@ -315,12 +297,11 @@
Buffer = ExAllocatePoolWithTag(
PagedPool,
FileStdInfo.EndOfFile.u.LowPart,
- TAG_GDITEXT);
+ TAG_FNTFILE);
if (Buffer == NULL)
{
DPRINT("Could not allocate memory for font");
- NtGdiDeleteObject(NewFont);
ZwClose(FileHandle);
return 0;
}
@@ -342,7 +323,6 @@
{
DPRINT("Could not read the font file into memory");
ExFreePool(Buffer);
- NtGdiDeleteObject(NewFont);
ZwClose(FileHandle);
return 0;
}
@@ -365,7 +345,6 @@
else
DPRINT("Error reading font file (error code: %u)\n", Error);
ExFreePool(Buffer);
- NtGdiDeleteObject(NewFont);
return 0;
}
@@ -378,6 +357,16 @@
return 0;
}
+ FontGDI = EngAllocMem(0, sizeof(FONTGDI), TAG_FONTOBJ);
+ if(FontGDI == NULL)
+ {
+ FT_Done_Face(Face);
+ ExFreePool(Buffer);
+ ExFreePool(Entry);
+ SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
+ return 0;
+ }
+
/* FontGDI->Filename = FileName; perform strcpy */
FontGDI->face = Face;
@@ -392,7 +381,7 @@
/* Add this font resource to the font table */
- Entry->hFont = NewFont;
+ Entry->Font = FontGDI;
Entry->NotEnum = (Characteristics & FR_NOT_ENUM);
RtlInitAnsiString(&AnsiFaceName, (LPSTR)Face->family_name);
RtlAnsiStringToUnicodeString(&Entry->FaceName, &AnsiFaceName, TRUE);
@@ -451,39 +440,6 @@
}
return FT_RENDER_MODE_MONO;
}
-static NTSTATUS STDCALL
-GetFontObjectsFromTextObj(PTEXTOBJ TextObj, HFONT *FontHandle, FONTOBJ **FontObj, PFONTGDI *FontGDI)
-{
- FONTOBJ *FntObj;
- NTSTATUS Status = STATUS_SUCCESS;
-
- ASSERT(NULL != TextObj && NULL != TextObj->GDIFontHandle);
- if (NULL != TextObj && NULL != TextObj->GDIFontHandle)
- {
- if (NULL != FontHandle)
- {
- *FontHandle = TextObj->GDIFontHandle;
- }
- FntObj = (FONTOBJ*)AccessUserObject((ULONG) TextObj->GDIFontHandle);
- if (NULL != FontObj)
- {
- *FontObj = FntObj;
- if (NULL == *FontObj)
- {
- ASSERT(FALSE);
- Status = STATUS_INVALID_HANDLE;
- }
- }
- if (NT_SUCCESS(Status) && NULL != FontGDI)
- {
- *FontGDI = AccessInternalObjectFromUserObject(FntObj);
- }
-
- return Status;
- }
-
- return STATUS_INVALID_HANDLE;
-}
int
STDCALL
@@ -1007,18 +963,16 @@
PFONT_ENTRY CurrentEntry;
ANSI_STRING EntryFaceNameA;
UNICODE_STRING EntryFaceNameW;
- PFONTGDI FontGDI;
+ FONTGDI *FontGDI;
Entry = Head->Flink;
while (Entry != Head)
{
CurrentEntry = (PFONT_ENTRY) CONTAINING_RECORD(Entry, FONT_ENTRY, ListEntry);
- if (NULL == (FontGDI = AccessInternalObject((ULONG) CurrentEntry->hFont)))
- {
- Entry = Entry->Flink;
- continue;
- }
+ FontGDI = CurrentEntry->Font;
+ ASSERT(FontGDI);
+
RtlInitAnsiString(&EntryFaceNameA, FontGDI->face->family_name);
RtlAnsiStringToUnicodeString(&EntryFaceNameW, &EntryFaceNameA, TRUE);
if ((LF_FACESIZE - 1) * sizeof(WCHAR) < EntryFaceNameW.Length)
@@ -1275,18 +1229,16 @@
PFONT_ENTRY CurrentEntry;
ANSI_STRING EntryFaceNameA;
UNICODE_STRING EntryFaceNameW;
- PFONTGDI FontGDI;
+ FONTGDI *FontGDI;
Entry = Head->Flink;
while (Entry != Head)
{
CurrentEntry = (PFONT_ENTRY) CONTAINING_RECORD(Entry, FONT_ENTRY, ListEntry);
- if (NULL == (FontGDI = AccessInternalObject((ULONG) CurrentEntry->hFont)))
- {
- Entry = Entry->Flink;
- continue;
- }
+ FontGDI = CurrentEntry->Font;
+ ASSERT(FontGDI);
+
RtlInitAnsiString(&EntryFaceNameA, FontGDI->face->family_name);
RtlAnsiStringToUnicodeString(&EntryFaceNameW, &EntryFaceNameA, TRUE);
if ((LF_FACESIZE - 1) * sizeof(WCHAR) < EntryFaceNameW.Length)
@@ -1545,7 +1497,7 @@
INT yoff;
FONTOBJ *FontObj;
PFONTGDI FontGDI;
- PTEXTOBJ TextObj;
+ PTEXTOBJ TextObj = NULL;
PPALGDI PalDestGDI;
XLATEOBJ *XlateObj, *XlateObj2;
ULONG Mode;
@@ -1605,6 +1557,7 @@
if (hBrushBg)
{
BrushBg = BRUSHOBJ_LockBrush(hBrushBg);
+ /* FIXME - Handle BrushBg == NULL !!!!! */
IntGdiInitBrushInstance(&BrushBgInst, BrushBg, NULL);
}
else
@@ -1652,12 +1605,14 @@
}
TextObj = TEXTOBJ_LockText(dc->w.hFont);
-
- if (!NT_SUCCESS(GetFontObjectsFromTextObj(TextObj, NULL, &FontObj, &FontGDI)))
+ if(TextObj == NULL)
{
- goto fail;
+ goto fail;
}
+ FontObj = TextObj->Font;
+ FontGDI = ObjToGDI(FontObj, FONT);
+
face = FontGDI->face;
if (face->charmap == NULL)
{
@@ -1913,7 +1868,8 @@
EngDeleteXlate(XlateObj);
EngDeleteXlate(XlateObj2);
BITMAPOBJ_UnlockBitmap(dc->w.hBitmap);
- TEXTOBJ_UnlockText(dc->w.hFont);
+ if(TextObj != NULL)
+ TEXTOBJ_UnlockText(dc->w.hFont);
if (hBrushBg != NULL)
{
BRUSHOBJ_UnlockBrush(hBrushBg);
@@ -1925,12 +1881,13 @@
{
ExFreePool(Dx);
}
- DC_UnlockDc(hDC);
+ DC_UnlockDc( hDC );
return TRUE;
fail:
- TEXTOBJ_UnlockText(dc->w.hFont);
+ if(TextObj != NULL)
+ TEXTOBJ_UnlockText(dc->w.hFont);
BITMAPOBJ_UnlockBitmap(dc->w.hBitmap);
if (hBrushBg != NULL)
{
@@ -2043,13 +2000,7 @@
return FALSE;
}
- if (!NT_SUCCESS(GetFontObjectsFromTextObj(TextObj, NULL, NULL, &FontGDI)))
- {
- ExFreePool(SafeBuffer);
- SetLastWin32Error(ERROR_INVALID_HANDLE);
- TEXTOBJ_UnlockText(hFont);
- return FALSE;
- }
+ FontGDI = ObjToGDI(TextObj->Font, FONT);
face = FontGDI->face;
if (face->charmap == NULL)
@@ -2180,7 +2131,7 @@
static BOOL
FASTCALL
-TextIntGetTextExtentPoint(HDC hDC,
+TextIntGetTextExtentPoint(PDC dc,
PTEXTOBJ TextObj,
LPCWSTR String,
int Count,
@@ -2197,10 +2148,7 @@
FT_CharMap charmap, found = NULL;
BOOL use_kerning;
- if (!NT_SUCCESS(GetFontObjectsFromTextObj(TextObj, NULL, NULL, &FontGDI)))
- {
- return FALSE;
- }
+ FontGDI = ObjToGDI(TextObj->Font, FONT);
face = FontGDI->face;
if (NULL != Fit)
@@ -2293,7 +2241,7 @@
Size->cx = (TotalWidth + 32) >> 6;
Size->cy = (TextObj->logfont.lfHeight < 0 ? - TextObj->logfont.lfHeight : TextObj->logfont.lfHeight);
- Size->cy = EngMulDiv(Size->cy, NtGdiGetDeviceCaps(hDC, LOGPIXELSY), 72);
+ Size->cy = EngMulDiv(Size->cy, IntGdiGetDeviceCaps(dc, LOGPIXELSY), 72);
return TRUE;
}
@@ -2381,10 +2329,15 @@
return FALSE;
}
TextObj = TEXTOBJ_LockText(dc->w.hFont);
- DC_UnlockDc(hDC);
- Result = TextIntGetTextExtentPoint(hDC, TextObj, String, Count, MaxExtent,
+ if ( TextObj )
+ {
+ Result = TextIntGetTextExtentPoint(dc, TextObj, String, Count, MaxExtent,
NULL == UnsafeFit ? NULL : &Fit, Dx, &Size);
+ }
+ else
+ Result = FALSE;
TEXTOBJ_UnlockText(dc->w.hFont);
+ DC_UnlockDc(hDC);
ExFreePool(String);
if (! Result)
@@ -2503,12 +2456,14 @@
return FALSE;
}
TextObj = TEXTOBJ_LockText(dc->w.hFont);
- DC_UnlockDc(hDC);
- Result = TextIntGetTextExtentPoint (
- hDC, TextObj, String, Count, 0, NULL, NULL, &Size);
- dc = DC_LockDc(hDC);
- ASSERT(dc); // it succeeded earlier, it should now, too
- TEXTOBJ_UnlockText(dc->w.hFont);
+ if ( TextObj != NULL )
+ {
+ Result = TextIntGetTextExtentPoint (
+ dc, TextObj, String, Count, 0, NULL, NULL, &Size);
+ TEXTOBJ_UnlockText(dc->w.hFont);
+ }
+ else
+ Result = FALSE;
DC_UnlockDc(hDC);
ExFreePool(String);
@@ -2583,9 +2538,8 @@
TextObj = TEXTOBJ_LockText(dc->w.hFont);
if (NULL != TextObj)
{
- Status = GetFontObjectsFromTextObj(TextObj, NULL, NULL, &FontGDI);
- if (NT_SUCCESS(Status))
- {
+ FontGDI = ObjToGDI(TextObj->Font, FONT);
+
Face = FontGDI->face;
IntLockFreeType;
Error = FT_Set_Pixel_Sizes(Face,
@@ -2625,12 +2579,10 @@
}
Status = MmCopyToCaller(tm, &SafeTm, sizeof(TEXTMETRICW));
}
- }
TEXTOBJ_UnlockText(dc->w.hFont);
}
else
{
- ASSERT(FALSE);
Status = STATUS_INVALID_HANDLE;
}
DC_UnlockDc(hDC);
@@ -2748,7 +2700,6 @@
PTEXTOBJ TextObj;
PFONTGDI FontGdi;
DWORD Result = GDI_ERROR;
- NTSTATUS Status;
Dc = DC_LockDc(hDC);
if (Dc == NULL)
@@ -2766,27 +2717,25 @@
return GDI_ERROR;
}
- Status = GetFontObjectsFromTextObj(TextObj, NULL, NULL, &FontGdi);
- if (NT_SUCCESS(Status))
- {
- IntLockFreeType;
-
- if (FT_IS_SFNT(FontGdi->face))
- {
- if (Table)
- Table = Table >> 24 | Table << 24 | (Table >> 8 & 0xFF00) |
- (Table << 8 & 0xFF0000);
+ FontGdi = ObjToGDI(TextObj->Font, FONT);
+
+ IntLockFreeType;
- if (Buffer == NULL)
- Size = 0;
+ if (FT_IS_SFNT(FontGdi->face))
+ {
+ if (Table)
+ Table = Table >> 24 | Table << 24 | (Table >> 8 & 0xFF00) |
+ (Table << 8 & 0xFF0000);
- if (!FT_Load_Sfnt_Table(FontGdi->face, Table, Offset, Buffer, &Size))
- Result = Size;
- }
+ if (Buffer == NULL)
+ Size = 0;
- IntUnLockFreeType;
+ if (!FT_Load_Sfnt_Table(FontGdi->face, Table, Offset, Buffer, &Size))
+ Result = Size;
}
+ IntUnLockFreeType;
+
TEXTOBJ_UnlockText(hFont);
return Result;
@@ -2847,35 +2796,34 @@
return Score;
}
-static VOID FASTCALL
-FindBestFontFromList(HFONT *Font, UINT *MatchScore, LOGFONTW *LogFont,
+static inline VOID
+FindBestFontFromList(FONTOBJ **FontObj, UINT *MatchScore, LOGFONTW *LogFont,
PUNICODE_STRING FaceName, PLIST_ENTRY Head)
{
PLIST_ENTRY Entry;
PFONT_ENTRY CurrentEntry;
- PFONTGDI FontGDI;
+ FONTGDI *FontGDI;
UINT Score;
Entry = Head->Flink;
while (Entry != Head)
{
CurrentEntry = (PFONT_ENTRY) CONTAINING_RECORD(Entry, FONT_ENTRY, ListEntry);
- if (NULL == (FontGDI = AccessInternalObject((ULONG) CurrentEntry->hFont)))
- {
- Entry = Entry->Flink;
- continue;
- }
+
+ FontGDI = CurrentEntry->Font;
+ ASSERT(FontGDI);
+
Score = GetFontScore(LogFont, FaceName, FontGDI);
if (*MatchScore == 0 || *MatchScore < Score)
{
- *Font = CurrentEntry->hFont;
+ *FontObj = GDIToObj(FontGDI, FONT);
*MatchScore = Score;
}
Entry = Entry->Flink;
}
}
-static BOOLEAN FASTCALL
+static inline BOOLEAN
SubstituteFontFamilyKey(PUNICODE_STRING FaceName,
LPCWSTR Key)
{
@@ -2911,7 +2859,7 @@
return NT_SUCCESS(Status);
}
-static void FASTCALL
+static inline void
SubstituteFontFamily(PUNICODE_STRING FaceName, UINT Level)
{
if (10 < Level) /* Enough is enough */
@@ -2948,34 +2896,38 @@
}
SubstituteFontFamily(&FaceName, 0);
MatchScore = 0;
- TextObj->GDIFontHandle = NULL;
+ TextObj->Font = NULL;
/* First search private fonts */
Win32Process = PsGetWin32Process();
IntLockProcessPrivateFonts(Win32Process);
- FindBestFontFromList(&TextObj->GDIFontHandle, &MatchScore,
+ FindBestFontFromList(&TextObj->Font, &MatchScore,
&TextObj->logfont, &FaceName,
&Win32Process->PrivateFontListHead);
IntUnLockProcessPrivateFonts(Win32Process);
/* Search system fonts */
IntLockGlobalFonts;
- FindBestFontFromList(&TextObj->GDIFontHandle, &MatchScore,
+ FindBestFontFromList(&TextObj->Font, &MatchScore,
&TextObj->logfont, &FaceName,
&FontListHead);
IntUnLockGlobalFonts;
- if (NULL == TextObj->GDIFontHandle)
+ if (NULL == TextObj->Font)
{
DPRINT1("Requested font %S not found, no fonts loaded at all\n",
TextObj->logfont.lfFaceName);
Status = STATUS_NOT_FOUND;
}
+ else
+ {
+ Status = STATUS_SUCCESS;
+ }
RtlFreeUnicodeString(&FaceName);
TEXTOBJ_UnlockText(FontHandle);
- ASSERT((NT_SUCCESS(Status) ^ (NULL == TextObj->GDIFontHandle)) != 0);
+ ASSERT((NT_SUCCESS(Status) ^ (NULL == TextObj->Font)) != 0);
return Status;
}
reactos/subsys/win32k/objects
diff -N cursoricon.c
--- cursoricon.c 21 Nov 2004 21:23:24 -0000 1.66
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,1201 +0,0 @@
-/*
- * ReactOS W32 Subsystem
- * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-/* $Id: cursoricon.c,v 1.66 2004/11/21 21:23:24 weiden Exp $ */
-#include <w32k.h>
-
-PCURICON_OBJECT FASTCALL
-IntGetCurIconObject(PWINSTATION_OBJECT WinStaObject, HANDLE Handle)
-{
- PCURICON_OBJECT Object;
- NTSTATUS Status;
-
- Status = ObmReferenceObjectByHandle(WinStaObject->HandleTable,
- Handle, otCursorIcon, (PVOID*)&Object);
- if (!NT_SUCCESS(Status))
- {
- return NULL;
- }
- return Object;
-}
-
-#define COLORCURSORS_ALLOWED FALSE
-HCURSOR FASTCALL
-IntSetCursor(PWINSTATION_OBJECT WinStaObject, PCURICON_OBJECT NewCursor,
- BOOL ForceChange)
-{
- BITMAPOBJ *BitmapObj;
- SURFOBJ *SurfObj;
- PDEVINFO DevInfo;
- PBITMAPOBJ MaskBmpObj = NULL;
- PSYSTEM_CURSORINFO CurInfo;
- PCURICON_OBJECT OldCursor;
- HCURSOR Ret = (HCURSOR)0;
- HBITMAP hColor = (HBITMAP)0;
- HBITMAP hMask = 0;
- SURFOBJ *soMask = NULL, *soColor = NULL;
- XLATEOBJ *XlateObj = NULL;
- RECTL PointerRect;
- HDC Screen;
-
- CurInfo = IntGetSysCursorInfo(WinStaObject);
- OldCursor = CurInfo->CurrentCursorObject;
- if (OldCursor)
- {
- Ret = (HCURSOR)OldCursor->Self;
- }
-
- if (!ForceChange && OldCursor == NewCursor)
- {
- return Ret;
- }
-
- {
- if(!(Screen = IntGetScreenDC()))
- {
- return (HCURSOR)0;
- }
- /* FIXME use the desktop's HDC instead of using ScreenDeviceContext */
- PDC dc = DC_LockDc(Screen);
-
- if (!dc)
- {
- return Ret;
- }
-
- BitmapObj = BITMAPOBJ_LockBitmap(dc->w.hBitmap);
- SurfObj = &BitmapObj->SurfObj;
- DevInfo = dc->DevInfo;
- DC_UnlockDc(Screen);
- }
-
- if (!NewCursor && (CurInfo->CurrentCursorObject || ForceChange))
- {
- if (NULL != CurInfo->CurrentCursorObject && CurInfo->ShowingCursor)
- {
- /* Remove the cursor if it was displayed */
- if (GDIDEV(SurfObj)->MovePointer)
- GDIDEV(SurfObj)->MovePointer(SurfObj, -1, -1, &PointerRect);
- SetPointerRect(CurInfo, &PointerRect);
- }
-
- GDIDEV(SurfObj)->PointerStatus = SPS_ACCEPT_NOEXCLUDE;
-
- CurInfo->CurrentCursorObject = NewCursor; /* i.e. CurrentCursorObject = NULL */
- CurInfo->ShowingCursor = 0;
- BITMAPOBJ_UnlockBitmap(SurfObj->hsurf);
- return Ret;
- }
-
- if (!NewCursor)
- {
- BITMAPOBJ_UnlockBitmap(SurfObj->hsurf);
- return Ret;
- }
-
- /* TODO: Fixme. Logic is screwed above */
-
- ASSERT(NewCursor);
- MaskBmpObj = BITMAPOBJ_LockBitmap(NewCursor->IconInfo.hbmMask);
- if (MaskBmpObj)
- {
- const int maskBpp = BitsPerFormat(MaskBmpObj->SurfObj.iBitmapFormat);
- BITMAPOBJ_UnlockBitmap(NewCursor->IconInfo.hbmMask);
- if (maskBpp != 1)
- {
- DPRINT1("SetCursor: The Mask bitmap must have 1BPP!\n");
- BITMAPOBJ_UnlockBitmap(SurfObj->hsurf);
- return Ret;
- }
-
- if ((DevInfo->flGraphicsCaps2 & GCAPS2_ALPHACURSOR) &&
- SurfObj->iBitmapFormat >= BMF_16BPP &&
- SurfObj->iBitmapFormat <= BMF_32BPP &&
- NewCursor->Shadow && COLORCURSORS_ALLOWED)
- {
- /* FIXME - Create a color pointer, only 32bit bitmap, set alpha bits!
- Do not pass a mask bitmap to DrvSetPointerShape()!
- Create a XLATEOBJ that describes the colors of the bitmap. */
- DPRINT1("SetCursor: (Colored) alpha cursors are not supported!\n");
- }
- else
- {
- if(NewCursor->IconInfo.hbmColor
- && COLORCURSORS_ALLOWED)
- {
- /* FIXME - Create a color pointer, create only one 32bit bitmap!
- Do not pass a mask bitmap to DrvSetPointerShape()!
- Create a XLATEOBJ that describes the colors of the bitmap.
- (16bit bitmaps are propably allowed) */
- DPRINT1("SetCursor: Cursors with colors are not supported!\n");
- }
- else
- {
- MaskBmpObj = BITMAPOBJ_LockBitmap(NewCursor->IconInfo.hbmMask);
- if(MaskBmpObj)
- {
- RECTL DestRect = {0, 0, MaskBmpObj->SurfObj.sizlBitmap.cx, MaskBmpObj->SurfObj.sizlBitmap.cy};
- POINTL SourcePoint = {0, 0};
-
- /*
- * NOTE: For now we create the cursor in top-down bitmap,
- * because VMware driver rejects it otherwise. This should
- * be fixed later.
- */
- hMask = EngCreateBitmap(
- MaskBmpObj->SurfObj.sizlBitmap, abs(MaskBmpObj->SurfObj.lDelta),
- MaskBmpObj->SurfObj.iBitmapFormat, BMF_TOPDOWN,
- NULL);
- ASSERT(hMask);
- soMask = EngLockSurface((HSURF)hMask);
- EngCopyBits(soMask, &MaskBmpObj->SurfObj, NULL, NULL,
- &DestRect, &SourcePoint);
- BITMAPOBJ_UnlockBitmap(NewCursor->IconInfo.hbmMask);
- }
- }
- }
- CurInfo->ShowingCursor = CURSOR_SHOWING;
- CurInfo->CurrentCursorObject = NewCursor;
- }
- else
- {
- CurInfo->ShowingCursor = 0;
- CurInfo->CurrentCursorObject = NULL;
- }
-
- if (GDIDEVFUNCS(SurfObj).SetPointerShape)
- {
- GDIDEV(SurfObj)->PointerStatus =
- GDIDEVFUNCS(SurfObj).SetPointerShape(
- SurfObj, soMask, soColor, XlateObj,
- NewCursor->IconInfo.xHotspot,
- NewCursor->IconInfo.yHotspot,
- CurInfo->x,
- CurInfo->y,
- &PointerRect,
- SPS_CHANGE);
- DPRINT("SetCursor: DrvSetPointerShape() returned %x\n",
- GDIDEV(SurfObj)->PointerStatus);
- }
- else
- {
- GDIDEV(SurfObj)->PointerStatus = SPS_DECLINE;
- }
-
- if(GDIDEV(SurfObj)->PointerStatus == SPS_DECLINE)
- {
- GDIDEV(SurfObj)->PointerStatus = EngSetPointerShape(
- SurfObj, soMask, soColor, XlateObj,
- NewCursor->IconInfo.xHotspot,
- NewCursor->IconInfo.yHotspot,
- CurInfo->x,
- CurInfo->y,
- &PointerRect,
- SPS_CHANGE);
- GDIDEV(SurfObj)->MovePointer = EngMovePointer;
- }
- else
- {
- GDIDEV(SurfObj)->MovePointer = GDIDEVFUNCS(SurfObj).MovePointer;
- }
-
- SetPointerRect(CurInfo, &PointerRect);
-
- BITMAPOBJ_UnlockBitmap(SurfObj->hsurf);
- if(hMask)
- {
- EngUnlockSurface(soMask);
- EngDeleteSurface((HSURF)hMask);
- }
- if(hColor)
- {
- EngDeleteSurface((HSURF)hColor);
- }
- if(XlateObj)
- {
- EngDeleteXlate(XlateObj);
- }
-
- if(GDIDEV(SurfObj)->PointerStatus == SPS_ERROR)
- DPRINT1("SetCursor: DrvSetPointerShape() returned SPS_ERROR\n");
-
- return Ret;
-}
-
-BOOL FASTCALL
-IntSetupCurIconHandles(PWINSTATION_OBJECT WinStaObject)
-{
- return TRUE;
-}
-
-PCURICON_OBJECT FASTCALL
-IntFindExistingCurIconObject(PWINSTATION_OBJECT WinStaObject, HMODULE hModule,
- HRSRC hRsrc, LONG cx, LONG cy)
-{
- PUSER_HANDLE_TABLE HandleTable;
- PLIST_ENTRY CurrentEntry;
- PUSER_HANDLE_BLOCK Current;
- PCURICON_OBJECT Object;
- ULONG i;
-
- HandleTable = (PUSER_HANDLE_TABLE)WinStaObject->HandleTable;
- ObmpLockHandleTable(HandleTable);
-
- CurrentEntry = HandleTable->ListHead.Flink;
- while(CurrentEntry != &HandleTable->ListHead)
- {
- Current = CONTAINING_RECORD(CurrentEntry, USER_HANDLE_BLOCK, ListEntry);
- for(i = 0; i < HANDLE_BLOCK_ENTRIES; i++)
- {
- Object = (PCURICON_OBJECT)Current->Handles[i].ObjectBody;
- if(Object && (ObmReferenceObjectByPointer(Object, otCursorIcon) == STATUS_SUCCESS))
- {
- if((Object->hModule == hModule) && (Object->hRsrc == hRsrc))
- {
- if(cx && ((cx != Object->Size.cx) || (cy != Object->Size.cy)))
- {
- ObmDereferenceObject(Object);
- continue;
- }
- ObmpUnlockHandleTable(HandleTable);
- return Object;
- }
- ObmDereferenceObject(Object);
- }
- }
- CurrentEntry = CurrentEntry->Flink;
- }
-
- ObmpUnlockHandleTable(HandleTable);
- return NULL;
-}
-
-PCURICON_OBJECT FASTCALL
-IntCreateCurIconHandle(PWINSTATION_OBJECT WinStaObject)
-{
- PCURICON_OBJECT Object;
- HANDLE Handle;
- PW32PROCESS Win32Process;
-
- Object = ObmCreateObject(WinStaObject->HandleTable, &Handle, otCursorIcon, sizeof(CURICON_OBJECT));
-
- if(!Object)
- {
- SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
- return FALSE;
- }
-
- Win32Process = PsGetWin32Process();
-
- IntLockProcessCursorIcons(Win32Process);
- InsertTailList(&Win32Process->CursorIconListHead, &Object->ListEntry);
- IntUnLockProcessCursorIcons(Win32Process);
-
- Object->Self = Handle;
- Object->Process = PsGetWin32Process();
-
- return Object;
-}
-
-BOOL FASTCALL
-IntDestroyCurIconObject(PWINSTATION_OBJECT WinStaObject, HANDLE Handle, BOOL RemoveFromProcess)
-{
- PSYSTEM_CURSORINFO CurInfo;
- PCURICON_OBJECT Object;
- HBITMAP bmpMask, bmpColor;
- NTSTATUS Status;
- BOOL Ret;
-
- Status = ObmReferenceObjectByHandle(WinStaObject->HandleTable, Handle, otCursorIcon, (PVOID*)&Object);
- if(!NT_SUCCESS(Status))
- {
- return FALSE;
- }
-
- if (Object->Process != PsGetWin32Process())
- {
- ObmDereferenceObject(Object);
- return FALSE;
- }
-
- CurInfo = IntGetSysCursorInfo(WinStaObject);
-
- if (CurInfo->CurrentCursorObject == Object)
- {
- /* Hide the cursor if we're destroying the current cursor */
- IntSetCursor(WinStaObject, NULL, TRUE);
- }
-
- bmpMask = Object->IconInfo.hbmMask;
- bmpColor = Object->IconInfo.hbmColor;
-
- if (Object->Process && RemoveFromProcess)
- {
- IntLockProcessCursorIcons(Object->Process);
- RemoveEntryList(&Object->ListEntry);
- IntUnLockProcessCursorIcons(Object->Process);
- }
-
- Ret = NT_SUCCESS(ObmCloseHandle(WinStaObject->HandleTable, Handle));
-
- /* delete bitmaps */
- if(bmpMask)
- NtGdiDeleteObject(bmpMask);
- if(bmpColor)
- NtGdiDeleteObject(bmpColor);
-
- ObmDereferenceObject(Object);
-
- return Ret;
-}
-
-VOID FASTCALL
-IntCleanupCurIcons(struct _EPROCESS *Process, PW32PROCESS Win32Process)
-{
- PWINSTATION_OBJECT WinStaObject;
- PCURICON_OBJECT Current;
- PLIST_ENTRY CurrentEntry, NextEntry;
-
- WinStaObject = IntGetWinStaObj();
- if(WinStaObject != NULL)
- {
- CurrentEntry = Win32Process->CursorIconListHead.Flink;
- while(CurrentEntry != &Win32Process->CursorIconListHead)
- {
- NextEntry = CurrentEntry->Flink;
- Current = CONTAINING_RECORD(CurrentEntry, CURICON_OBJECT, ListEntry);
- RemoveEntryList(&Current->ListEntry);
- IntDestroyCurIconObject(WinStaObject, Current->Self, FALSE);
- CurrentEntry = NextEntry;
- }
- ObDereferenceObject(WinStaObject);
- }
-}
-
-/*
- * @implemented
- */
-HANDLE
-STDCALL
-NtUserCreateCursorIconHandle(PICONINFO IconInfo, BOOL Indirect)
-{
- PCURICON_OBJECT CurIconObject;
- PWINSTATION_OBJECT WinStaObject;
- PBITMAPOBJ bmp;
- NTSTATUS Status;
- HANDLE Ret;
-
- WinStaObject = IntGetWinStaObj();
- if(WinStaObject == NULL)
- {
- return (HANDLE)0;
- }
-
- CurIconObject = IntCreateCurIconHandle(WinStaObject);
- if(CurIconObject)
- {
- Ret = CurIconObject->Self;
-
- if(IconInfo)
- {
- Status = MmCopyFromCaller(&CurIconObject->IconInfo, IconInfo, sizeof(ICONINFO));
- if(NT_SUCCESS(Status))
- {
- if(Indirect)
- {
- CurIconObject->IconInfo.hbmMask = BITMAPOBJ_CopyBitmap(CurIconObject->IconInfo.hbmMask);
- CurIconObject->IconInfo.hbmColor = BITMAPOBJ_CopyBitmap(CurIconObject->IconInfo.hbmColor);
- }
- if(CurIconObject->IconInfo.hbmColor &&
- (bmp = BITMAPOBJ_LockBitmap(CurIconObject->IconInfo.hbmColor)))
- {
- CurIconObject->Size.cx = bmp->SurfObj.sizlBitmap.cx;
- CurIconObject->Size.cy = bmp->SurfObj.sizlBitmap.cy;
- BITMAPOBJ_UnlockBitmap(CurIconObject->IconInfo.hbmColor);
- }
- else
- {
- if(CurIconObject->IconInfo.hbmMask &&
- (bmp = BITMAPOBJ_LockBitmap(CurIconObject->IconInfo.hbmMask)))
- {
- CurIconObject->Size.cx = bmp->SurfObj.sizlBitmap.cx;
- CurIconObject->Size.cy = bmp->SurfObj.sizlBitmap.cy / 2;
- BITMAPOBJ_UnlockBitmap(CurIconObject->IconInfo.hbmMask);
- }
- }
- }
- else
- {
- SetLastNtError(Status);
- /* FIXME - Don't exit here */
- }
- }
-
- ObDereferenceObject(WinStaObject);
- return Ret;
- }
-
- SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
- ObDereferenceObject(WinStaObject);
- return (HANDLE)0;
-}
-
-/*
- * @implemented
- */
-BOOL
-STDCALL
-NtUserGetCursorIconInfo(
- HANDLE Handle,
- PICONINFO IconInfo)
-{
- ICONINFO ii;
- PCURICON_OBJECT CurIconObject;
- PWINSTATION_OBJECT WinStaObject;
- NTSTATUS Status;
- BOOL Ret = FALSE;
-
- WinStaObject = IntGetWinStaObj();
- if(WinStaObject == NULL)
- {
- return FALSE;
- }
-
- CurIconObject = IntGetCurIconObject(WinStaObject, Handle);
- if(CurIconObject)
- {
- if(IconInfo)
- {
- RtlCopyMemory(&ii, &CurIconObject->IconInfo, sizeof(ICONINFO));
-
- /* Copy bitmaps */
- ii.hbmMask = BITMAPOBJ_CopyBitmap(ii.hbmMask);
- ii.hbmColor = BITMAPOBJ_CopyBitmap(ii.hbmColor);
-
- /* Copy fields */
- Status = MmCopyToCaller(IconInfo, &ii, sizeof(ICONINFO));
- if(NT_SUCCESS(Status))
- Ret = TRUE;
- else
- SetLastNtError(Status);
- }
- else
- {
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
- }
-
- IntReleaseCurIconObject(CurIconObject);
- ObDereferenceObject(WinStaObject);
- return Ret;
- }
-
- SetLastWin32Error(ERROR_INVALID_CURSOR_HANDLE);
- ObDereferenceObject(WinStaObject);
- return FALSE;
-}
-
-
-/*
- * @implemented
- */
-BOOL
-STDCALL
-NtUserGetCursorIconSize(
- HANDLE Handle,
- BOOL *fIcon,
- SIZE *Size)
-{
- PCURICON_OBJECT CurIconObject;
- PBITMAPOBJ bmp;
- PWINSTATION_OBJECT WinStaObject;
- NTSTATUS Status;
- BOOL Ret = FALSE;
- SIZE SafeSize;
-
- WinStaObject = IntGetWinStaObj();
- if(WinStaObject == NULL)
- {
- return FALSE;
- }
-
- CurIconObject = IntGetCurIconObject(WinStaObject, Handle);
- if(CurIconObject)
- {
- /* Copy fields */
- Status = MmCopyToCaller(fIcon, &CurIconObject->IconInfo.fIcon, sizeof(BOOL));
- if(!NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- goto done;
- }
-
- bmp = BITMAPOBJ_LockBitmap(CurIconObject->IconInfo.hbmColor);
- if(!bmp)
- goto done;
-
- SafeSize.cx = bmp->SurfObj.sizlBitmap.cx;
- SafeSize.cy = bmp->SurfObj.sizlBitmap.cy;
- Status = MmCopyToCaller(Size, &SafeSize, sizeof(SIZE));
- if(NT_SUCCESS(Status))
- Ret = TRUE;
- else
- SetLastNtError(Status);
-
- BITMAPOBJ_UnlockBitmap(CurIconObject->IconInfo.hbmColor);
-
- done:
- IntReleaseCurIconObject(CurIconObject);
- ObDereferenceObject(WinStaObject);
- return Ret;
- }
-
- SetLastWin32Error(ERROR_INVALID_CURSOR_HANDLE);
- ObDereferenceObject(WinStaObject);
- return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-NtUserGetCursorFrameInfo(
- DWORD Unknown0,
- DWORD Unknown1,
- DWORD Unknown2,
- DWORD Unknown3)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-
-/*
- * @implemented
- */
-BOOL
-STDCALL
-NtUserGetCursorInfo(
- PCURSORINFO pci)
-{
- CURSORINFO SafeCi;
- PSYSTEM_CURSORINFO CurInfo;
- PWINSTATION_OBJECT WinStaObject;
- NTSTATUS Status;
- PCURICON_OBJECT CursorObject;
-
- Status = MmCopyFromCaller(&SafeCi.cbSize, pci, sizeof(DWORD));
- if(!NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- return FALSE;
- }
-
- if(SafeCi.cbSize != sizeof(CURSORINFO))
- {
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-
- WinStaObject = IntGetWinStaObj();
- if(WinStaObject == NULL)
- {
- return FALSE;
- }
-
- CurInfo = IntGetSysCursorInfo(WinStaObject);
- CursorObject = (PCURICON_OBJECT)CurInfo->CurrentCursorObject;
-
- SafeCi.flags = ((CurInfo->ShowingCursor && CursorObject) ? CURSOR_SHOWING : 0);
- SafeCi.hCursor = (CursorObject ? (HCURSOR)CursorObject->Self : (HCURSOR)0);
- SafeCi.ptScreenPos.x = CurInfo->x;
- SafeCi.ptScreenPos.y = CurInfo->y;
-
- Status = MmCopyToCaller(pci, &SafeCi, sizeof(CURSORINFO));
- if(!NT_SUCCESS(Status))
- {
- ObDereferenceObject(WinStaObject);
- SetLastNtError(Status);
- return FALSE;
- }
-
- ObDereferenceObject(WinStaObject);
- return TRUE;
-}
-
-
-/*
- * @implemented
- */
-BOOL
-STDCALL
-NtUserClipCursor(
- RECT *UnsafeRect)
-{
- /* FIXME - check if process has WINSTA_WRITEATTRIBUTES */
-
- PWINSTATION_OBJECT WinStaObject;
- PSYSTEM_CURSORINFO CurInfo;
- RECT Rect;
- PWINDOW_OBJECT DesktopWindow = NULL;
-
- WinStaObject = IntGetWinStaObj();
- if (WinStaObject == NULL)
- {
- return FALSE;
- }
-
- if (NULL != UnsafeRect && ! NT_SUCCESS(MmCopyFromCaller(&Rect, UnsafeRect, sizeof(RECT))))
- {
- ObDereferenceObject(WinStaObject);
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-
- CurInfo = IntGetSysCursorInfo(WinStaObject);
- if(WinStaObject->ActiveDesktop)
- DesktopWindow = IntGetWindowObject(WinStaObject->ActiveDesktop->DesktopWindow);
-
- if((Rect.right > Rect.left) && (Rect.bottom > Rect.top)
- && DesktopWindow && UnsafeRect != NULL)
- {
- MOUSEINPUT mi;
-
- CurInfo->CursorClipInfo.IsClipped = TRUE;
- CurInfo->CursorClipInfo.Left = max(Rect.left, DesktopWindow->WindowRect.left);
- CurInfo->CursorClipInfo.Top = max(Rect.top, DesktopWindow->WindowRect.top);
- CurInfo->CursorClipInfo.Right = min(Rect.right - 1, DesktopWindow->WindowRect.right - 1);
- CurInfo->CursorClipInfo.Bottom = min(Rect.bottom - 1, DesktopWindow->WindowRect.bottom - 1);
- IntReleaseWindowObject(DesktopWindow);
-
- mi.dx = CurInfo->x;
- mi.dy = CurInfo->y;
- mi.mouseData = 0;
- mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE;
- mi.time = 0;
- mi.dwExtraInfo = 0;
- IntMouseInput(&mi);
-
- return TRUE;
- }
-
- CurInfo->CursorClipInfo.IsClipped = FALSE;
- ObDereferenceObject(WinStaObject);
-
- return TRUE;
-}
-
-
-/*
- * @implemented
- */
-BOOL
-STDCALL
-NtUserDestroyCursorIcon(
- HANDLE Handle,
- DWORD Unknown)
-{
- PWINSTATION_OBJECT WinStaObject;
-
- WinStaObject = IntGetWinStaObj();
- if(WinStaObject == NULL)
- {
- return FALSE;
- }
-
- if(IntDestroyCurIconObject(WinStaObject, Handle, TRUE))
- {
- ObDereferenceObject(WinStaObject);
- return TRUE;
- }
-
- SetLastWin32Error(ERROR_INVALID_CURSOR_HANDLE);
- ObDereferenceObject(WinStaObject);
- return FALSE;
-}
-
-
-/*
- * @implemented
- */
-HICON
-STDCALL
-NtUserFindExistingCursorIcon(
- HMODULE hModule,
- HRSRC hRsrc,
- LONG cx,
- LONG cy)
-{
- PCURICON_OBJECT CurIconObject;
- PWINSTATION_OBJECT WinStaObject;
- HANDLE Ret = (HANDLE)0;
-
- WinStaObject = IntGetWinStaObj();
- if(WinStaObject == NULL)
- {
- return Ret;
- }
-
- CurIconObject = IntFindExistingCurIconObject(WinStaObject, hModule, hRsrc, cx, cy);
- if(CurIconObject)
- {
- Ret = CurIconObject->Self;
-
- IntReleaseCurIconObject(CurIconObject);
- ObDereferenceObject(WinStaObject);
- return Ret;
- }
-
- SetLastWin32Error(ERROR_INVALID_CURSOR_HANDLE);
- ObDereferenceObject(WinStaObject);
- return (HANDLE)0;
-}
-
-
-/*
- * @implemented
- */
-BOOL
-STDCALL
-NtUserGetClipCursor(
- RECT *lpRect)
-{
- /* FIXME - check if process has WINSTA_READATTRIBUTES */
- PSYSTEM_CURSORINFO CurInfo;
- PWINSTATION_OBJECT WinStaObject;
- RECT Rect;
- NTSTATUS Status;
-
- if(!lpRect)
- return FALSE;
-
- WinStaObject = IntGetWinStaObj();
- if (WinStaObject == NULL)
- {
- DPRINT("Validation of window station handle (0x%X) failed\n",
- PROCESS_WINDOW_STATION());
- return FALSE;
- }
-
- CurInfo = IntGetSysCursorInfo(WinStaObject);
- if(CurInfo->CursorClipInfo.IsClipped)
- {
- Rect.left = CurInfo->CursorClipInfo.Left;
- Rect.top = CurInfo->CursorClipInfo.Top;
- Rect.right = CurInfo->CursorClipInfo.Right;
- Rect.bottom = CurInfo->CursorClipInfo.Bottom;
- }
- else
- {
- Rect.left = 0;
- Rect.top = 0;
- Rect.right = NtUserGetSystemMetrics(SM_CXSCREEN);
- Rect.bottom = NtUserGetSystemMetrics(SM_CYSCREEN);
- }
-
- Status = MmCopyToCaller((PRECT)lpRect, &Rect, sizeof(RECT));
- if(!NT_SUCCESS(Status))
- {
- ObDereferenceObject(WinStaObject);
- SetLastNtError(Status);
- return FALSE;
- }
-
- ObDereferenceObject(WinStaObject);
-
- return TRUE;
-}
-
-
-/*
- * @implemented
- */
-HCURSOR
-STDCALL
-NtUserSetCursor(
- HCURSOR hCursor)
-{
- PCURICON_OBJECT CurIconObject;
- HICON OldCursor = (HCURSOR)0;
- PWINSTATION_OBJECT WinStaObject;
-
- WinStaObject = IntGetWinStaObj();
- if(WinStaObject == NULL)
- {
- return (HCURSOR)0;
- }
-
- CurIconObject = IntGetCurIconObject(WinStaObject, hCursor);
- if(CurIconObject)
- {
- OldCursor = IntSetCursor(WinStaObject, CurIconObject, FALSE);
- IntReleaseCurIconObject(CurIconObject);
- }
- else
- SetLastWin32Error(ERROR_INVALID_CURSOR_HANDLE);
-
- ObDereferenceObject(WinStaObject);
- return OldCursor;
-}
-
-
-/*
- * @implemented
- */
-BOOL
-STDCALL
-NtUserSetCursorIconContents(
- HANDLE Handle,
- PICONINFO IconInfo)
-{
- PCURICON_OBJECT CurIconObject;
- PBITMAPOBJ bmp;
- PWINSTATION_OBJECT WinStaObject;
- NTSTATUS Status;
- BOOL Ret = FALSE;
-
- WinStaObject = IntGetWinStaObj();
- if(WinStaObject == NULL)
- {
- return FALSE;
- }
-
- CurIconObject = IntGetCurIconObject(WinStaObject, Handle);
- if(CurIconObject)
- {
- /* Copy fields */
- Status = MmCopyFromCaller(&CurIconObject->IconInfo, IconInfo, sizeof(ICONINFO));
- if(!NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- goto done;
- }
-
- bmp = BITMAPOBJ_LockBitmap(CurIconObject->IconInfo.hbmColor);
- if(bmp)
- {
- CurIconObject->Size.cx = bmp->SurfObj.sizlBitmap.cx;
- CurIconObject->Size.cy = bmp->SurfObj.sizlBitmap.cy;
- BITMAPOBJ_UnlockBitmap(CurIconObject->IconInfo.hbmColor);
- }
- else
- {
- bmp = BITMAPOBJ_LockBitmap(CurIconObject->IconInfo.hbmMask);
- if(!bmp)
- goto done;
-
- CurIconObject->Size.cx = bmp->SurfObj.sizlBitmap.cx;
- CurIconObject->Size.cy = bmp->SurfObj.sizlBitmap.cy / 2;
-
- BITMAPOBJ_UnlockBitmap(CurIconObject->IconInfo.hbmMask);
- }
-
- Ret = TRUE;
-
- done:
- IntReleaseCurIconObject(CurIconObject);
- ObDereferenceObject(WinStaObject);
- return Ret;
- }
-
- SetLastWin32Error(ERROR_INVALID_CURSOR_HANDLE);
- ObDereferenceObject(WinStaObject);
- return FALSE;
-}
-
-
-/*
- * @implemented
- */
-BOOL
-STDCALL
-NtUserSetCursorIconData(
- HANDLE Handle,
- PBOOL fIcon,
- POINT *Hotspot,
- HMODULE hModule,
- HRSRC hRsrc,
- HRSRC hGroupRsrc)
-{
- PCURICON_OBJECT CurIconObject;
- PWINSTATION_OBJECT WinStaObject;
- NTSTATUS Status;
- POINT SafeHotspot;
- BOOL Ret = FALSE;
-
- WinStaObject = IntGetWinStaObj();
- if(WinStaObject == NULL)
- {
- return FALSE;
- }
-
- CurIconObject = IntGetCurIconObject(WinStaObject, Handle);
- if(CurIconObject)
- {
- CurIconObject->hModule = hModule;
- CurIconObject->hRsrc = hRsrc;
- CurIconObject->hGroupRsrc = hGroupRsrc;
-
- /* Copy fields */
- if(fIcon)
- {
- Status = MmCopyFromCaller(&CurIconObject->IconInfo.fIcon, fIcon, sizeof(BOOL));
- if(!NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- goto done;
- }
- }
- else
- {
- if(!Hotspot)
- Ret = TRUE;
- }
-
- if(Hotspot)
- {
- Status = MmCopyFromCaller(&SafeHotspot, Hotspot, sizeof(POINT));
- if(NT_SUCCESS(Status))
- {
- CurIconObject->IconInfo.xHotspot = SafeHotspot.x;
- CurIconObject->IconInfo.yHotspot = SafeHotspot.y;
-
- Ret = TRUE;
- }
- else
- SetLastNtError(Status);
- }
-
- if(!fIcon && !Hotspot)
- {
- Ret = TRUE;
- }
-
- done:
- IntReleaseCurIconObject(CurIconObject);
- ObDereferenceObject(WinStaObject);
- return Ret;
- }
-
[truncated at 1000 lines; 205 more skipped]
reactos/subsys/win32k/stubs
diff -u -r1.30 -r1.30.20.1
--- stubs.c 11 Apr 2004 09:09:38 -0000 1.30
+++ stubs.c 13 Dec 2004 09:39:25 -0000 1.30.20.1
@@ -2,15 +2,7 @@
* Stubs for unimplemented WIN32K.SYS exports
*/
-#undef WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <stdlib.h>
-#include <win32k/bitmaps.h>
-#include <win32k/debug.h>
-#include <debug.h>
-#include <ddk/winddi.h>
-#include "../eng/objects.h"
-#include <include/error.h>
+#include <w32k.h>
#define STUB(x) void x(void) { DbgPrint("WIN32K: Stub for %s\n", #x); }
reactos/subsys/win32k/stubs
diff -u -r1.5 -r1.5.22.1
--- xpstubs.c 8 Mar 2004 07:04:57 -0000 1.5
+++ xpstubs.c 13 Dec 2004 09:39:25 -0000 1.5.22.1
@@ -3,15 +3,7 @@
* in Windows XP and beyond ( i.e. a low priority for us right now )
*/
-#undef WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <stdlib.h>
-#include <win32k/bitmaps.h>
-#include <win32k/debug.h>
-#include <debug.h>
-#include <ddk/winddi.h>
-#include "../eng/objects.h"
-#include <include/error.h>
+#include <w32k.h>
#define STUB(x) void x(void) { DbgPrint("WIN32K: Stub for %s\n", #x); }
reactos/tools
diff -u -r1.22 -r1.22.6.1
--- depend.mk 7 Sep 2004 08:20:06 -0000 1.22
+++ depend.mk 13 Dec 2004 09:39:25 -0000 1.22.6.1
@@ -32,24 +32,31 @@
endif
.%.d: %.c $(PATH_TO_TOP)/tools/depends$(EXE_POSTFIX) $(GENERATED_HEADER_FILES)
+ $(HALFVERBOSEECHO) [DEPENDS] $@
$(CC) $(CFLAGS) -M $< | $(DEPENDS_PATH)$(SEP)depends$(EXE_POSTFIX) $(@D) $@
.%.d: %.cc $(PATH_TO_TOP)/tools/depends$(EXE_POSTFIX) $(GENERATED_HEADER_FILES)
+ $(HALFVERBOSEECHO) [DEPENDS] $@
$(CC) $(CFLAGS) -M $< | $(DEPENDS_PATH)$(SEP)depends$(EXE_POSTFIX) $(@D) $@
.%.d: %.cpp $(PATH_TO_TOP)/tools/depends$(EXE_POSTFIX) $(GENERATED_HEADER_FILES)
+ $(HALFVERBOSEECHO) [DEPENDS] $@
$(CC) $(CFLAGS) -M $< | $(DEPENDS_PATH)$(SEP)depends$(EXE_POSTFIX) $(@D) $@
.%.d: %.S $(PATH_TO_TOP)/tools/depends$(EXE_POSTFIX) $(GENERATED_HEADER_FILES)
+ $(HALFVERBOSEECHO) [DEPENDS] $@
$(CC) $(CFLAGS) -M $< | $(DEPENDS_PATH)$(SEP)depends$(EXE_POSTFIX) $(@D) $@
.%.d: %.s $(PATH_TO_TOP)/tools/depends$(EXE_POSTFIX) $(GENERATED_HEADER_FILES)
+ $(HALFVERBOSEECHO) [DEPENDS] $@
$(CC) $(CFLAGS) -M $< | $(DEPENDS_PATH)$(SEP)depends$(EXE_POSTFIX) $(@D) $@
.%.d: %.asm $(PATH_TO_TOP)/tools/depends$(EXE_POSTFIX) $(GENERATED_HEADER_FILES)
+ $(HALFVERBOSEECHO) [DEPENDS] $@
$(NASM_CMD) $(NFLAGS) -M $< | $(DEPENDS_PATH)$(SEP)depends$(EXE_POSTFIX) $(@D) $@
.%.d: %.h $(PATH_TO_TOP)/tools/depends$(EXE_POSTFIX) $(GENERATED_HEADER_FILES)
+ $(HALFVERBOSEECHO) [DEPENDS] $@
$(PCH_CC) $(CFLAGS) -M $< | $(DEPENDS_PATH)$(SEP)depends$(EXE_POSTFIX) $(@D) $@
endif
reactos/tools
diff -u -r1.95.2.1 -r1.95.2.2
--- helper.mk 8 Dec 2004 21:57:41 -0000 1.95.2.1
+++ helper.mk 13 Dec 2004 09:39:25 -0000 1.95.2.2
@@ -1,4 +1,4 @@
-# $Id: helper.mk,v 1.95.2.1 2004/12/08 21:57:41 hyperion Exp $
+# $Id: helper.mk,v 1.95.2.2 2004/12/13 09:39:25 hyperion Exp $
#
# Helper makefile for ReactOS modules
# Variables this makefile accepts:
@@ -89,12 +89,12 @@
# MK_CFLAGS = C compiler command-line flags for this target
# MK_CPPFLAGS = C++ compiler command-line flags for this target
# MK_DDKLIBS = Import libraries from the ReactOS DDK to link with
-# MK_DEFENTRY = Module entry point:
+# MK_DEFENTRY = Module entry point:
# _WinMain@16 for windows EXE files that are export libraries
-# _DriverEntry@8 for .SYS files
+# _DriverEntry@8 for .SYS files
# _DllMain@12 for .DLL files
# _DrvEnableDriver@12 for GDI drivers
-# _WinMainCRTStartup for Win32 EXE files
+# _WinMainCRTStartup for Win32 EXE files
# _NtProcessStartup@4 for Native EXE files
# _mainCRTStartup for Console EXE files
# MK_DEFEXT = Extension to give compiled modules (.EXE, .DLL, .SYS, .a)
@@ -712,6 +712,7 @@
all: $(REGTEST_TARGETS) $(MK_IMPLIBPATH)/$(MK_IMPLIB_FULLNAME)
$(MK_IMPLIBPATH)/$(MK_IMPLIB_FULLNAME): $(MK_OBJECTS) $(MK_DEFNAME)
+ $(HALFVERBOSEECHO) [DLLTOOL] $(MK_IMPLIB_FULLNAME)
$(DLLTOOL) \
--dllname $(MK_FULLNAME) \
--def $(MK_DEFNAME) \
@@ -742,9 +743,11 @@
endif
$(MK_BASENAME).a: $(MK_OBJECTS)
+ $(HALFVERBOSEECHO) [AR] $(MK_BASENAME).a
$(AR) -rc $(MK_BASENAME).a $(MK_OBJECTS)
$(MK_NOSTRIPNAME): $(MK_EXTRADEP) $(MK_FULLRES) $(MK_BASENAME).a $(MK_LIBS) $(MK_STUBS_SRC) $(MK_STUBS_OBJ)
+ $(HALFVERBOSEECHO) [LD] $(MK_NOSTRIPNAME)
ifeq ($(MK_EXETYPE),dll)
$(LD_CC) -Wl,--base-file,base.tmp \
-Wl,--entry,$(TARGET_ENTRY) \
@@ -773,14 +776,22 @@
-o $(MK_NOSTRIPNAME) \
$(MK_FULLRES) $(MK_OBJECTS) $(MK_LIBS) $(MK_GCCLIBS)
- $(RM) temp.exp
+ifeq ($(BUILD_SYM),yes)
+ $(HALFVERBOSEECHO) [RSYM] $(MK_BASENAME).sym
- $(RSYM) $(MK_NOSTRIPNAME) $(MK_BASENAME).sym
-ifeq ($(FULL_MAP),yes)
+endif
+ifeq ($(BUILD_MAP),full)
+ $(HALFVERBOSEECHO) [OBJDUMP] $(MK_BASENAME).map
$(OBJDUMP) -d -S $(MK_NOSTRIPNAME) > $(MK_BASENAME).map
else
+ifeq ($(BUILD_MAP),yes)
+ $(HALFVERBOSEECHO) [NM] $(MK_BASENAME).map
$(NM) --numeric-sort $(MK_NOSTRIPNAME) > $(MK_BASENAME).map
endif
+endif
$(MK_FULLNAME): $(MK_NOSTRIPNAME) $(MK_EXTRADEP)
+ $(HALFVERBOSEECHO) [LD] $(MK_FULLNAME)
-
ifneq ($(TARGET_CPPAPP),yes)
$(LD) --strip-debug -r -o $(MK_STRIPPED_OBJECT) $(MK_OBJECTS)
@@ -835,9 +846,11 @@
endif
$(MK_BASENAME).a: $(MK_OBJECTS)
+ $(HALFVERBOSEECHO) [AR] $(MK_BASENAME).a
$(AR) -rc $(MK_BASENAME).a $(MK_OBJECTS)
$(MK_NOSTRIPNAME): $(MK_EXTRADEP) $(MK_FULLRES) $(MK_BASENAME).a $(MK_LIBS)
+ $(HALFVERBOSEECHO) [LD] $(MK_NOSTRIPNAME)
$(LD_CC) -Wl,--base-file,base.tmp \
-Wl,--entry,$(TARGET_ENTRY) \
$(TARGET_LFLAGS) \
@@ -858,15 +871,23 @@
-o $(MK_NOSTRIPNAME) \
$(MK_FULLRES) $(MK_OBJECTS) $(MK_LIBS) $(MK_GCCLIBS)
- $(RM) temp.exp
+ifeq ($(BUILD_SYM),yes)
+ $(HALFVERBOSEECHO) [RSYM] $(MK_BASENAME).sym
$(RSYM) $(MK_NOSTRIPNAME) $(MK_BASENAME).sym
-ifeq ($(FULL_MAP),yes)
+endif
+ifeq ($(BUILD_MAP),full)
+ $(HALFVERBOSEECHO) [OBJDUMP] $(MK_BASENAME).map
$(OBJDUMP) -d -S $(MK_NOSTRIPNAME) > $(MK_BASENAME).map
else
+ifeq ($(BUILD_MAP),yes)
+ $(HALFVERBOSEECHO) [NM] $(MK_BASENAME).map
$(NM) --numeric-sort $(MK_NOSTRIPNAME) > $(MK_BASENAME).map
endif
+endif
$(MK_FULLNAME): $(MK_EXTRADEP) $(MK_FULLRES) $(MK_BASENAME).a $(MK_LIBS) $(MK_NOSTRIPNAME)
-
+ $(HALFVERBOSEECHO) [LD] $(MK_FULLNAME)
ifneq ($(TARGET_CPPAPP),yes)
$(LD) --strip-debug -r -o $(MK_STRIPPED_OBJECT) $(MK_OBJECTS)
endif
@@ -902,6 +923,7 @@
ifeq ($(MK_MODE),static)
$(MK_FULLNAME): $(MK_EXTRADEP) $(MK_OBJECTS)
+ $(HALFVERBOSEECHO) [AR] $(MK_FULLNAME)
$(AR) -rc $(MK_FULLNAME) $(MK_OBJECTS)
ifneq ($(TARGET_TYPE),test)
@echo $(MK_FULLNAME) was successfully built.
@@ -928,6 +950,7 @@
ifeq ($(MK_IMPLIB),yes)
$(MK_IMPLIBPATH)/$(MK_IMPLIB_FULLNAME): $(MK_DEFNAME)
+ $(HALFVERBOSEECHO) [DLLTOOL] $(MK_IMPLIB_FULLNAME)
$(DLLTOOL) --dllname $(MK_FULLNAME) \
--def $(MK_DEFNAME) \
--output-lib $(MK_IMPLIBPATH)/$(MK_IMPLIB_FULLNAME) \
@@ -954,7 +977,7 @@
endif # TARGET_PCH
-else #
+else #
MK_PCHNAME =
endif # ROS_USE_PCH
@@ -994,8 +1017,8 @@
forceinstall:
install:
-
-bootcd:
+
+bootcd:
else # MK_MODE
@@ -1012,6 +1035,8 @@
ifeq ($(INSTALL_SYMBOLS),yes)
forceinstall: $(SUBDIRS:%=%_install) $(MK_FULLNAME) $(MK_BASENAME).sym
+ $(HALFVERBOSEECHO) [INSTALL] $(MK_FULLNAME) to $(MK_INSTALLDIR)/$(MK_INSTALL_FULLNAME)
+ $(HALFVERBOSEECHO) [INSTALL] $(MK_BASENAME).sym to symbols/$(MK_INSTALL_BASENAME).sym
-$(CP) $(MK_FULLNAME) $(INSTALL_DIR)/$(MK_INSTALLDIR)/$(MK_INSTALL_FULLNAME)
-$(CP) $(MK_BASENAME).sym $(INSTALL_DIR)/symbols/$(MK_INSTALL_BASENAME).sym
@echo $(MK_FULLNAME) was successfully installed.
@@ -1019,6 +1044,7 @@
else # INSTALL_SYMBOLS
forceinstall: $(SUBDIRS:%=%_install) $(MK_FULLNAME)
+ $(HALFVERBOSEECHO) [INSTALL] $(MK_FULLNAME) to $(MK_INSTALLDIR)/$(MK_INSTALL_FULLNAME)
-$(CP) $(MK_FULLNAME) $(INSTALL_DIR)/$(MK_INSTALLDIR)/$(MK_INSTALL_FULLNAME)
endif # INSTALL_SYMBOLS
@@ -1039,10 +1065,10 @@
else # TARGET_BOOTSTRAP
bootcd:
-
+
endif # TARGET_BOOTSTRAP
-
-endif # MK_MODE
+
+endif # MK_MODE
endif # MK_IMPLIBONLY
@@ -1114,35 +1140,48 @@
@$(RM) _runtest.exe
endif
-
%.o: %.c $(MK_PCHNAME)
+ $(HALFVERBOSEECHO) [CC] $<
$(CC) $(TARGET_CFLAGS) -c $< -o $@
%.o: %.cc $(MK_PCHNAME)
+ $(HALFVERBOSEECHO) [CXX] $<
$(CXX) $(TARGET_CPPFLAGS) -c $< -o $@
%.o: %.cxx $(MK_PCHNAME)
+ $(HALFVERBOSEECHO) [CXX] $<
$(CXX) $(TARGET_CPPFLAGS) -c $< -o $@
%.o: %.cpp $(MK_PCHNANE)
+ $(HALFVERBOSEECHO) [CXX] $<
$(CXX) $(TARGET_CPPFLAGS) -c $< -o $@
%.o: %.S
+ $(HALFVERBOSEECHO) [AS] $<
$(AS) $(TARGET_ASFLAGS) -c $< -o $@
%.o: %.s
+ $(HALFVERBOSEECHO) [AS] $<
$(AS) $(TARGET_ASFLAGS) -c $< -o $@
%.o: %.asm
+ $(HALFVERBOSEECHO) [NASM] $<
$(NASM_CMD) $(TARGET_NFLAGS) $< -o $@
%.coff: %.rc
+ $(HALFVERBOSEECHO) [RC] $<
$(RC) $(TARGET_RCFLAGS) $< -o $@
%.spec.def: %.spec
+ $(HALFVERBOSEECHO) [DEF] $<
$(WINEBUILD) $(DEFS) -o $@ --def $<
%.drv.spec.def: %.spec
+ $(HALFVERBOSEECHO) [DEF] $<
$(WINEBUILD) $(DEFS) -o $@ --def $<
%.stubs.c: %.spec
+ $(HALFVERBOSEECHO) [STUBS] $<
$(WINEBUILD) $(DEFS) -o $@ --pedll $<
%.i: %.c
+ $(HALFVERBOSEECHO) [CPP] $<
$(CC) $(TARGET_CFLAGS) -E $< > $@
%.h.gch: %.h
+ $(HALFVERBOSEECHO) [PCH] $<
$(PCH_CC) $(CFLAGS) $<
# rule for msvc conversion
%.c: %_msvc.c
+ $(HALFVERBOSEECHO) [MS2PS] $<
$(subst /,$(SEP),$(MS2PS)) -try try -except except -finally finally < $< > $@
# Kill implicit rule
reactos/w32api/include/ddk
diff -u -r1.22 -r1.22.2.1
--- winddk.h 7 Nov 2004 15:40:31 -0000 1.22
+++ winddk.h 13 Dec 2004 09:39:25 -0000 1.22.2.1
@@ -3866,11 +3866,11 @@
#define LOW_LEVEL 0
#define APC_LEVEL 1
#define DISPATCH_LEVEL 2
-#define SYNCH_LEVEL 27
#define PROFILE_LEVEL 27
#define CLOCK1_LEVEL 28
#define CLOCK2_LEVEL 28
#define IPI_LEVEL 29
+#define SYNCH_LEVEL (IPI_LEVEL-1)
#define POWER_LEVEL 30
#define HIGH_LEVEL 31
reactos/w32api/include
diff -u -r1.3.18.1 -r1.3.18.2
--- objidl.h 8 Dec 2004 21:57:42 -0000 1.3.18.1
+++ objidl.h 13 Dec 2004 09:39:26 -0000 1.3.18.2
@@ -868,7 +868,7 @@
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetComparisonData)(THIS_ PVOID,ULONG,PULONG) PURE;
+ STDMETHOD(GetComparisonData)(THIS_ PBYTE,ULONG,PULONG) PURE;
};
#undef INTERFACE
reactos/w32api/include
diff -u -r1.1 -r1.1.20.1
--- wincrypt.h 21 Feb 2004 09:20:34 -0000 1.1
+++ wincrypt.h 13 Dec 2004 09:39:26 -0000 1.1.20.1
@@ -136,6 +136,11 @@
#define CRYPT_READ 8
#define CRYPT_WRITE 16
#define CRYPT_MAC 32
+/* Crypt{Get|Set}Provider */
+#define CRYPT_MACHINE_DEFAULT 0x00000001
+#define CRYPT_USER_DEFAULT 0x00000002
+#define CRYPT_DELETE_DEFAULT 0x00000004
+
#define HP_ALGID 1
#define HP_HASHVAL 2
#define HP_HASHSIZE 4
@@ -143,6 +148,7 @@
#define CRYPT_SUCCEED TRUE
#define RCRYPT_SUCCEEDED(r) ((r)==CRYPT_SUCCEED)
#define RCRYPT_FAILED(r) ((r)==CRYPT_FAILED)
+#define PP_CLIENT_HWND 1
#define PP_ENUMALGS 1
#define PP_ENUMCONTAINERS 2
#define PP_IMPTYPE 3
@@ -349,7 +355,15 @@
#define INTERNATIONAL_USAGE 0x00000001
typedef UINT ALG_ID;
-typedef struct _VTableProvStruc {FARPROC FuncVerifyImage;} VTableProvStruc,*PVTableProvStruc;
+typedef struct _VTableProvStruc {
+ DWORD Version;
+ FARPROC pFuncVerifyImage;
+ FARPROC pFuncReturnhWnd;
+ DWORD dwProvType;
+ BYTE *pbContextInfo;
+ DWORD cbContextInfo;
+ LPSTR pszProvName;
+} VTableProvStruc, *PVTableProvStruc;
typedef ULONG HCRYPTPROV;
typedef ULONG HCRYPTKEY;
typedef ULONG HCRYPTHASH;
@@ -649,7 +663,8 @@
BOOL WINAPI CryptVerifySignatureW(HCRYPTHASH,PBYTE,DWORD,HCRYPTKEY,LPCWSTR,DWORD);
BOOL WINAPI CryptSetProviderA(LPCSTR,DWORD);
BOOL WINAPI CryptSetProviderW(LPCWSTR,DWORD);
-
+BOOL WINAPI CryptSetProviderExA(LPCSTR,DWORD,DWORD*,DWORD);
+BOOL WINAPI CryptSetProviderExW(LPCWSTR,DWORD,DWORD*,DWORD);
#ifdef UNICODE
#define CertNameToStr CertNameToStrW
#define CryptAcquireContext CryptAcquireContextW
reactos/include/msvcrt/internal
diff -N mtdll.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ mtdll.h 13 Dec 2004 09:39:26 -0000 1.1.2.1
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2002, TransGaming Technologies Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef WINE_MTDLL_H
+#define WINE_MTDLL_H
+
+#if defined(_MT)
+
+#define _mlock(locknum) _lock(locknum)
+#define _munlock(locknum) _unlock(locknum)
+
+void _unlock( int locknum );
+void _lock( int locknum );
+
+#else
+
+#define _mlock(locknum) do {} while(0)
+#define _munlock(locknum) do {} while(0)
+
+#endif
+
+
+#define _SIGNAL_LOCK 1
+#define _IOB_SCAN_LOCK 2
+#define _TMPNAM_LOCK 3
+#define _INPUT_LOCK 4
+#define _OUTPUT_LOCK 5
+#define _CSCANF_LOCK 6
+#define _CPRINTF_LOCK 7
+#define _CONIO_LOCK 8
+#define _HEAP_LOCK 9
+#define _BHEAP_LOCK 10 /* No longer used? */
+#define _TIME_LOCK 11
+#define _ENV_LOCK 12
+#define _EXIT_LOCK1 13
+#define _EXIT_LOCK2 14
+#define _THREADDATA_LOCK 15 /* No longer used? */
+#define _POPEN_LOCK 16
+#define _LOCKTAB_LOCK 17
+#define _OSFHND_LOCK 18
+#define _SETLOCALE_LOCK 19
+#define _LC_COLLATE_LOCK 20 /* No longer used? */
+#define _LC_CTYPE_LOCK 21 /* No longer used? */
+#define _LC_MONETARY_LOCK 22 /* No longer used? */
+#define _LC_NUMERIC_LOCK 23 /* No longer used? */
+#define _LC_TIME_LOCK 24 /* No longer used? */
+#define _MB_CP_LOCK 25
+#define _NLG_LOCK 26
+#define _TYPEINFO_LOCK 27
+#define _STREAM_LOCKS 28
+
+/* Must match definition in msvcrt/stdio.h */
+#define _IOB_ENTRIES 20
+#define _LAST_STREAM_LOCK (_STREAM_LOCKS+_IOB_ENTRIES-1)
+#define _TOTAL_LOCKS (_LAST_STREAM_LOCK+1)
+
+#endif /* WINE_MTDLL_H */
reactos/lib/dsound
diff -N .cvsignore
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ .cvsignore 13 Dec 2004 09:39:26 -0000 1.2.2.1
@@ -0,0 +1,11 @@
+*.coff
+*.dll
+*.d
+*.a
+*.o
+*.sym
+*.map
+*.tmp
+Makefile.ros
+dsound.spec.def
+dsound.stubs.c
reactos/lib/dxguid
diff -N dxguid-mingw.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ dxguid-mingw.c 13 Dec 2004 09:39:26 -0000 1.1.2.1
@@ -0,0 +1,617 @@
+/*
+
+ dxguid.c - DirectX GUIDs
+
+ Written by Filip Navara <xnavara@volny.cz>
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+*/
+
+#if defined(__LCC__) || defined(__GNUC__)
+#define INITGUID 1
+#include <windows.h>
+#else
+#include <basetyps.h>
+#endif
+
+// wine own ?
+//DEFINE_GUID(IID_IDsDriver, 0x8C4233C0l, 0xB4CC, 0x11CE, 0x92, 0x94, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
+//DEFINE_GUID(IID_IDsDriverNotify, 0x00363EF44, 0x3B57, 0x11D3, 0xAC, 0x79, 0x00, 0x10, 0x5A, 0x01, 0x7f, 0xe1);
+//DEFINE_GUID(IID_IDsDriverPropertySet, 0x0F6F2E8E0, 0xD842, 0x11D0, 0x8F, 0x75, 0x00, 0xC0, 0x4F, 0xC2, 0x8A, 0xCA);
+//DEFINE_GUID(IID_IDsDriverBuffer, 0x8C4233C1l, 0xB4CC, 0x11CE, 0x92, 0x94, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
+// this is wrong but it keep dinput happy
+
+// ok
+
+DEFINE_GUID(CLSID_CDirect3DRM,0x4516ec41,0x8f20,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(CLSID_CDirect3DRMAnimation,0x4fa35698,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMAnimationSet,0x4fa35699,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMClippedVisual,0x5434e72d,0x6d66,0x11d1,0xbb,0xb,0x0,0x0,0xf8,0x75,0x86,0x5a);
+DEFINE_GUID(CLSID_CDirect3DRMDevice,0x4fa3568e,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMFace,0x4fa35693,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMFrame,0x4fa35690,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMFrameInterpolator,0xde9eaa2,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(CLSID_CDirect3DRMLight,0x4fa35694,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMLightInterpolator,0xde9eaa6,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(CLSID_CDirect3DRMMaterial,0x4fa35697,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMMaterialInterpolator,0xde9eaa7,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(CLSID_CDirect3DRMMesh,0x4fa35691,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMMeshBuilder,0x4fa35692,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMMeshInterpolator,0xde9eaa3,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(CLSID_CDirect3DRMProgressiveMesh,0x4516ec40,0x8f20,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(CLSID_CDirect3DRMShadow,0x4fa3569b,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMTexture,0x4fa35695,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMTextureInterpolator,0xde9eaa8,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(CLSID_CDirect3DRMUserVisual,0x4fa3569a,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMViewport,0x4fa3568f,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMViewportInterpolator,0xde9eaa1,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(CLSID_CDirect3DRMWrap,0x4fa35696,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(CLSID_CDirectXFile,0x4516ec43,0x8f20,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(CLSID_DirectDraw,0xd7b70ee0,0x4340,0x11cf,0xb0,0x63,0x0,0x20,0xaf,0xc2,0xcd,0x35);
+DEFINE_GUID(CLSID_DirectDraw7,0x3c305196,0x50db,0x11d3,0x9c,0xfe,0x00,0xc0,0x4f,0xd9,0x30,0xc5);
+DEFINE_GUID(CLSID_DirectDrawClipper,0x593817a0,0x7db3,0x11cf,0xa2,0xde,0x0,0xaa,0x0,0xb9,0x33,0x56);
+DEFINE_GUID(CLSID_DirectDrawFactory2,0xb9dc4790,0x4af1,0x11d1,0x8c,0x4c,0x0,0xc0,0x4f,0xd9,0x30,0xc5);
+DEFINE_GUID(CLSID_DirectInput,0x25e609e0,0xb259,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x0,0x0);
+DEFINE_GUID(CLSID_DirectInput8,0x25e609e4,0xb259,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(CLSID_DirectInputDevice,0x25e609e1,0xb259,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x0,0x0);
+DEFINE_GUID(CLSID_DirectInputDevice8,0x25e609e5,0xb259,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(CLSID_DirectMusic,0x636b9f10,0xc7d,0x11d1,0x95,0xb2,0x0,0x20,0xaf,0xdc,0x74,0x21);
+DEFINE_GUID(CLSID_DirectMusicAudioPathConfig,0xee0b9ca0,0xa81e,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
+DEFINE_GUID(CLSID_DirectMusicBand,0x79ba9e00,0xb6ee,0x11d1,0x86,0xbe,0x0,0xc0,0x4f,0xbf,0x8f,0xef);
+DEFINE_GUID(CLSID_DirectMusicBandTrack,0xd2ac2894,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicCollection,0x480ff4b0,0x28b2,0x11d1,0xbe,0xf7,0x0,0xc0,0x4f,0xbf,0x8f,0xef);
+DEFINE_GUID(CLSID_DirectMusicCommandTrack,0xd2ac288c,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicComposer,0xd2ac2890,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicContainer,0x9301e380,0x1f22,0x11d3,0x82,0x26,0xd2,0xfa,0x76,0x25,0x5d,0x47);
+DEFINE_GUID(CLSID_DirectMusicGraph,0xd2ac2884,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicChordMap,0xd2ac288f,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicChordMapTrack,0xd2ac2896,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicChordTrack,0xd2ac288b,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicLoader,0xd2ac2892,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicLyricsTrack,0x995c1cf5,0x54ff,0x11d3,0x8b,0xda,0x0,0x60,0x8,0x93,0xb1,0xb6);
+DEFINE_GUID(CLSID_DirectMusicMarkerTrack,0x55a8fd00,0x4288,0x11d3,0x9b,0xd1,0x8a,0xd,0x61,0xc8,0x88,0x35);
+DEFINE_GUID(CLSID_DirectMusicMelodyFormulationTrack,0xb0684266,0xb57f,0x11d2,0x97,0xf9,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
+DEFINE_GUID(CLSID_DirectMusicMotifTrack,0xd2ac288e,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicMuteTrack,0xd2ac2898,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicParamControlTrack,0x4be0537b,0x5c19,0x11d3,0x8b,0xdc,0x0,0x60,0x8,0x93,0xb1,0xb6);
+DEFINE_GUID(CLSID_DirectMusicPatternTrack,0xd2ac2897,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicPerformance,0xd2ac2881,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicScript,0x810b5013,0xe88d,0x11d2,0x8b,0xc1,0x0,0x60,0x8,0x93,0xb1,0xb6);
+DEFINE_GUID(CLSID_DirectMusicScriptTrack,0x4108fa85,0x3586,0x11d3,0x8b,0xd7,0x0,0x60,0x8,0x93,0xb1,0xb6);
+DEFINE_GUID(CLSID_DirectMusicSegment,0xd2ac2882,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicSegmentState,0xd2ac2883,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicSegmentTriggerTrack,0xbae4d665,0x4ea1,0x11d3,0x8b,0xda,0x0,0x60,0x8,0x93,0xb1,0xb6);
+DEFINE_GUID(CLSID_DirectMusicSeqTrack,0xd2ac2886,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicSignPostTrack,0xf17e8672,0xc3b4,0x11d1,0x87,0xb,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicSong,0xaed5f0a5,0xd972,0x483d,0xa3,0x84,0x64,0x9d,0xfe,0xb9,0xc1,0x81);
+DEFINE_GUID(CLSID_DirectMusicStyle,0xd2ac288a,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicStyleTrack,0xd2ac288d,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicSynth,0x58c2b4d0,0x46e7,0x11d1,0x89,0xac,0x0,0xa0,0xc9,0x5,0x41,0x29);
+DEFINE_GUID(CLSID_DirectMusicSysExTrack,0xd2ac2887,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicTempoTrack,0xd2ac2885,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicTimeSigTrack,0xd2ac2888,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(CLSID_DirectMusicWaveTrack,0xeed36461,0x9ea5,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
+DEFINE_GUID(CLSID_DirectPlay,0xd1eb6d20,0x8923,0x11d0,0x9d,0x97,0x0,0xa0,0xc9,0xa,0x43,0xcb);
+DEFINE_GUID(CLSID_DirectPlay8Address,0x934a9523,0xa3ca,0x4bc5,0xad,0xa0,0xd6,0xd9,0x5d,0x97,0x94,0x21);
+DEFINE_GUID(CLSID_DirectPlay8Client,0x743f1dc6,0x5aba,0x429f,0x8b,0xdf,0xc5,0x4d,0x3,0x25,0x3d,0xc2);
+DEFINE_GUID(CLSID_DirectPlay8LobbiedApplication,0x667955ad,0x6b3b,0x43ca,0xb9,0x49,0xbc,0x69,0xb5,0xba,0xff,0x7f);
+DEFINE_GUID(CLSID_DirectPlay8LobbyClient,0x3b2b6775,0x70b6,0x45af,0x8d,0xea,0xa2,0x9,0xc6,0x95,0x59,0xf3);
+DEFINE_GUID(CLSID_DirectPlay8ThreadPool,0xfc47060e,0x6153,0x4b34,0xb9,0x75,0x8e,0x41,0x21,0xeb,0x7f,0x3c);
+DEFINE_GUID(CLSID_DirectPlay8NATResolver,0xe4c1d9a2,0xcbf7,0x48bd,0x9a,0x69,0x34,0xa5,0x5e,0xd,0x89,0x41);
+DEFINE_GUID(CLSID_DirectPlay8Peer,0x286f484d,0x375e,0x4458,0xa2,0x72,0xb1,0x38,0xe2,0xf8,0xa,0x6a);
+DEFINE_GUID(CLSID_DirectPlay8Server,0xda825e1b,0x6830,0x43d7,0x83,0x5d,0xb,0x5a,0xd8,0x29,0x56,0xa2);
+DEFINE_GUID(CLSID_DirectPlayLobby,0x2fe8f810,0xb2a5,0x11d0,0xa7,0x87,0x0,0x0,0xf8,0x3,0xab,0xfc);
+DEFINE_GUID(CLSID_DirectPlayVoiceClient,0xb9f3eb85,0xb781,0x4ac1,0x8d,0x90,0x93,0xa0,0x5e,0xe3,0x7d,0x7d);
+DEFINE_GUID(CLSID_DirectPlayVoiceServer,0xd3f5b8e6,0x9b78,0x4a4c,0x94,0xea,0xca,0x23,0x97,0xb6,0x63,0xd3);
+DEFINE_GUID(CLSID_DirectPlayVoiceTest,0xf0f094b,0xb01c,0x4091,0xa1,0x4d,0xdd,0xc,0xd8,0x7,0x71,0x1a);
+DEFINE_GUID(CLSID_DirectSound,0x47d4d946,0x62e8,0x11cf,0x93,0xbc,0x44,0x45,0x53,0x54,0x0,0x0);
+DEFINE_GUID(CLSID_DirectSound8,0x3901cc3f,0x84b5,0x4fa4,0xba,0x35,0xaa,0x81,0x72,0xb8,0xa0,0x9b);
+DEFINE_GUID(CLSID_DirectSoundCapture,0xb0210780,0x89cd,0x11d0,0xaf,0x8,0x0,0xa0,0xc9,0x25,0xcd,0x16);
+DEFINE_GUID(CLSID_DirectSoundCapture8,0xe4bcac13,0x7f99,0x4908,0x9a,0x8e,0x74,0xe3,0xbf,0x24,0xb6,0xe1);
+DEFINE_GUID(CLSID_DirectSoundFullDuplex,0xfea4300c,0x7959,0x4147,0xb2,0x6a,0x23,0x77,0xb9,0xe7,0xa9,0x1d);
+DEFINE_GUID(CLSID_DirectSoundWave,0x8a667154,0xf9cb,0x11d2,0xad,0x8a,0x0,0x60,0xb0,0x57,0x5a,0xbc);
+// FIXME in wine include files
+// DEFINE_GUID(CLSID_DirectSoundPrivate,0x11ab3ec0,0x25ec,0x11d1,0xa4,0xd8,0x00,0xc0,0x4f,0xc2,0x8a,0xca);
+// DEFINE_GUID(DSPROPSETID_DirectSoundDevice,0x84624f82,0x25ec,0x11d1,0xa4,0xd8,0x00,0xc0,0x4f,0xc2,0x8a,0xca);
+DEFINE_GUID(CLSID_DP8SP_IPX,0x53934290,0x628d,0x11d2,0xae,0xf,0x0,0x60,0x97,0xb0,0x14,0x11);
+DEFINE_GUID(CLSID_DP8SP_MODEM,0x6d4a3650,0x628d,0x11d2,0xae,0xf,0x0,0x60,0x97,0xb0,0x14,0x11);
+DEFINE_GUID(CLSID_DP8SP_SERIAL,0x743b5d60,0x628d,0x11d2,0xae,0xf,0x0,0x60,0x97,0xb0,0x14,0x11);
+DEFINE_GUID(CLSID_DP8SP_TCPIP,0xebfe7ba0,0x628d,0x11d2,0xae,0xf,0x0,0x60,0x97,0xb0,0x14,0x11);
+DEFINE_GUID(CLSID_DP8SP_BLUETOOTH,0x995513af,0x3027,0x4b9a,0x95,0x6e,0xc7,0x72,0xb3,0xf7,0x80,0x6);
+DEFINE_GUID(DDVPTYPE_BROOKTREE,0x1352a560l,0xda61,0x11cf,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
+DEFINE_GUID(DDVPTYPE_CCIR656,0xfca326a0l,0xda60,0x11cf,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
+DEFINE_GUID(DDVPTYPE_E_HREFH_VREFH,0x54f39980l,0xda60,0x11cf,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
+DEFINE_GUID(DDVPTYPE_E_HREFH_VREFL,0x92783220l,0xda60,0x11cf,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
+DEFINE_GUID(DDVPTYPE_E_HREFL_VREFH,0xa07a02e0l,0xda60,0x11cf,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
+DEFINE_GUID(DDVPTYPE_E_HREFL_VREFL,0xe09c77e0l,0xda60,0x11cf,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
+DEFINE_GUID(DDVPTYPE_PHILIPS,0x332cf160l,0xda61,0x11cf,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
+DEFINE_GUID(DPAID_ComPort,0xf2f0ce00,0xe0af,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e);
+DEFINE_GUID(DPAID_INet,0xc4a54da0,0xe0af,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e);
+DEFINE_GUID(DPAID_INetPort,0xe4524541,0x8ea5,0x11d1,0x8a,0x96,0x0,0x60,0x97,0xb0,0x14,0x11);
+DEFINE_GUID(DPAID_INetW,0xe63232a0,0x9dbf,0x11d0,0x9c,0xc1,0x0,0xa0,0xc9,0x5,0x42,0x5e);
+DEFINE_GUID(DPAID_LobbyProvider,0x59b95640,0x9667,0x11d0,0xa7,0x7d,0x0,0x0,0xf8,0x3,0xab,0xfc);
+DEFINE_GUID(DPAID_Modem,0xf6dcc200,0xa2fe,0x11d0,0x9c,0x4f,0x0,0xa0,0xc9,0x5,0x42,0x5e);
+DEFINE_GUID(DPAID_ModemW,0x1fd92e0,0xa2ff,0x11d0,0x9c,0x4f,0x0,0xa0,0xc9,0x5,0x42,0x5e);
+DEFINE_GUID(DPAID_Phone,0x78ec89a0,0xe0af,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e);
+DEFINE_GUID(DPAID_PhoneW,0xba5a7a70,0x9dbf,0x11d0,0x9c,0xc1,0x0,0xa0,0xc9,0x5,0x42,0x5e);
+DEFINE_GUID(DPAID_ServiceProvider,0x7d916c0,0xe0af,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e);
+DEFINE_GUID(DPAID_TotalSize,0x1318f560,0x912c,0x11d0,0x9d,0xaa,0x0,0xa0,0xc9,0xa,0x43,0xcb);
+DEFINE_GUID(DPLPROPERTY_LobbyGuid,0xf56920a0,0xd218,0x11d0,0xba,0x39,0x0,0xc0,0x4f,0xd7,0xed,0x67);
+DEFINE_GUID(DPLPROPERTY_MessagesSupported,0x762ccda1,0xd916,0x11d0,0xba,0x39,0x0,0xc0,0x4f,0xd7,0xed,0x67);
+DEFINE_GUID(DPLPROPERTY_PlayerGuid,0xb4319322,0xd20d,0x11d0,0xba,0x39,0x0,0xc0,0x4f,0xd7,0xed,0x67);
+DEFINE_GUID(DPLPROPERTY_PlayerScore,0x48784000,0xd219,0x11d0,0xba,0x39,0x0,0xc0,0x4f,0xd7,0xed,0x67);
+DEFINE_GUID(DPSPGUID_IPX,0x685bc400,0x9d2c,0x11cf,0xa9,0xcd,0x0,0xaa,0x0,0x68,0x86,0xe3);
+DEFINE_GUID(DPSPGUID_TCPIP,0x36e95ee0,0x8577,0x11cf,0x96,0xc,0x0,0x80,0xc7,0x53,0x4e,0x82);
+DEFINE_GUID(DPSPGUID_SERIAL,0xf1d6860,0x88d9,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e);
+DEFINE_GUID(DPSPGUID_MODEM,0x44eaa760,0xcb68,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e);
+DEFINE_GUID(DPVCTGUID_ADPCM,0x699b52c1,0xa885,0x46a8,0xa3,0x8,0x97,0x17,0x24,0x19,0xad,0xc7);
+DEFINE_GUID(DPVCTGUID_GSM,0x24768c60,0x5a0d,0x11d3,0x9b,0xe4,0x52,0x54,0x0,0xd9,0x85,0xe7);
+DEFINE_GUID(DPVCTGUID_NONE,0x8de12fd4,0x7cb3,0x48ce,0xa7,0xe8,0x9c,0x47,0xa2,0x2e,0x8a,0xc5);
+DEFINE_GUID(DPVCTGUID_SC03,0x7d82a29b,0x2242,0x4f82,0x8f,0x39,0x5d,0x11,0x53,0xdf,0x3e,0x41);
+DEFINE_GUID(DPVCTGUID_SC06,0x53def900,0x7168,0x4633,0xb4,0x7f,0xd1,0x43,0x91,0x6a,0x13,0xc7);
+DEFINE_GUID(DPVCTGUID_TRUESPEECH,0xd7954361,0x5a0b,0x11d3,0x9b,0xe4,0x52,0x54,0x0,0xd9,0x85,0xe7);
+DEFINE_GUID(DPVCTGUID_VR12,0xfe44a9fe,0x8ed4,0x48bf,0x9d,0x66,0x1b,0x1a,0xdf,0xf9,0xff,0x6d);
+DEFINE_GUID(DS3DALG_HRTF_FULL,0xc2413340,0x1c1b,0x11d2,0x94,0xf5,0x0,0xc0,0x4f,0xc2,0x8a,0xca);
+DEFINE_GUID(DS3DALG_HRTF_LIGHT,0xc2413342,0x1c1b,0x11d2,0x94,0xf5,0x0,0xc0,0x4f,0xc2,0x8a,0xca);
+DEFINE_GUID(DS3DALG_NO_VIRTUALIZATION,0xc241333f,0x1c1b,0x11d2,0x94,0xf5,0x0,0xc0,0x4f,0xc2,0x8a,0xca);
+DEFINE_GUID(DSDEVID_DefaultCapture,0xdef00001,0x9c6d,0x47ed,0xaa,0xf1,0x4d,0xda,0x8f,0x2b,0x5c,0x03);
+DEFINE_GUID(DSDEVID_DefaultPlayback,0xdef00000,0x9c6d,0x47ed,0xaa,0xf1,0x4d,0xda,0x8f,0x2b,0x5c,0x03);
+DEFINE_GUID(DSDEVID_DefaultVoiceCapture,0xdef00003,0x9c6d,0x47ed,0xaa,0xf1,0x4d,0xda,0x8f,0x2b,0x5c,0x03);
+DEFINE_GUID(DSDEVID_DefaultVoicePlayback,0xdef00002,0x9c6d,0x47ed,0xaa,0xf1,0x4d,0xda,0x8f,0x2b,0x5c,0x03);
+DEFINE_GUID(GUID_All_Objects,0xaa114de5,0xc262,0x4169,0xa1,0xc8,0x23,0xd6,0x98,0xcc,0x73,0xb5);
+DEFINE_GUID(GUID_BandParam,0x2bb1938,0xcb8b,0x11d2,0x8b,0xb9,0x0,0x60,0x8,0x93,0xb1,0xb6);
+DEFINE_GUID(GUID_Buffer_3D_Dry,0x186cc546,0xdb29,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
+DEFINE_GUID(GUID_Buffer_EnvReverb,0x186cc542,0xdb29,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
+DEFINE_GUID(GUID_Buffer_Mono,0x186cc547,0xdb29,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
+DEFINE_GUID(GUID_Buffer_Reverb,0x186cc541,0xdb29,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
+DEFINE_GUID(GUID_Buffer_Stereo,0x186cc545,0xdb29,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
+DEFINE_GUID(GUID_Button,0xa36d02f0,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_Clear_All_Bands,0xd2ac28ab,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_Clear_All_MelodyFragments,0x8509fee6,0xb617,0x11d2,0x97,0xfa,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
+DEFINE_GUID(GUID_ColorControlCallbacks,0xefd60cc2,0x49e7,0x11d0,0x88,0x9d,0x0,0xaa,0x0,0xbb,0xb7,0x6a);
+DEFINE_GUID(GUID_CommandParam,0xd2ac289d,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_CommandParam2,0x28f97ef7,0x9538,0x11d2,0x97,0xa9,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
+DEFINE_GUID(GUID_CommandParamNext,0x472afe7a,0x281b,0x11d3,0x81,0x7d,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
+DEFINE_GUID(GUID_ConnectToDLSCollection,0x1db1ae6b,0xe92e,0x11d1,0xa8,0xc5,0x0,0xc0,0x4f,0xa3,0x72,0x6e);
+DEFINE_GUID(GUID_ConstantForce,0x13541c20,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
+DEFINE_GUID(GUID_CustomForce,0x13541c2b,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
+DEFINE_GUID(GUID_D3DCallbacks2,0xba584e1,0x70b6,0x11d0,0x88,0x9d,0x0,0xaa,0x0,0xbb,0xb7,0x6a);
+DEFINE_GUID(GUID_D3DCallbacks3,0xddf41230,0xec0a,0x11d0,0xa9,0xb6,0x0,0xaa,0x0,0xc0,0x99,0x3e);
+DEFINE_GUID(GUID_D3DExtendedCaps,0x7de41f80,0x9d93,0x11d0,0x89,0xab,0x0,0xa0,0xc9,0x5,0x41,0x29);
+DEFINE_GUID(GUID_D3DParseUnknownCommandCallback,0x2e04ffa0,0x98e4,0x11d1,0x8c,0xe1,0x0,0xa0,0xc9,0x6,0x29,0xa8);
+DEFINE_GUID(GUID_Damper,0x13541c28,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
+DEFINE_GUID(GUID_DDMoreCaps,0x880baf30,0xb030,0x11d0,0x8e,0xa7,0x0,0x60,0x97,0x97,0xea,0x5b);
+DEFINE_GUID(GUID_DDMoreSurfaceCaps,0x3b8a0466,0xf269,0x11d1,0x88,0xb,0x0,0xc0,0x4f,0xd9,0x30,0xc5);
+DEFINE_GUID(GUID_DDStereoMode,0xf828169c,0xa8e8,0x11d2,0xa1,0xf2,0x0,0xa0,0xc9,0x83,0xea,0xf6);
+DEFINE_GUID(GUID_DefaultGMCollection,0xf17e8673,0xc3b4,0x11d1,0x87,0xb,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_DirectDrawPaletteStream,0x730c7ffc,0x5347,0x11d1,0x8c,0x4d,0x0,0xc0,0x4f,0xd9,0x30,0xc5);
+DEFINE_GUID(GUID_DirectDrawSurfaceStream,0xe043bc46,0x5317,0x11d1,0x8c,0x4d,0x0,0xc0,0x4f,0xd9,0x30,0xc5);
+DEFINE_GUID(GUID_DirectMusicAllTypes,0xd2ac2893,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_Disable_Auto_Download,0xd2ac28aa,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_DisableTempo,0x45fc707d,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
+DEFINE_GUID(GUID_DisableTimeSig,0x45fc707b,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
+DEFINE_GUID(GUID_DMUS_PROP_DLS1,0x178f2f27,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
+DEFINE_GUID(GUID_DMUS_PROP_DLS2,0xf14599e5,0x4689,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
+DEFINE_GUID(GUID_DMUS_PROP_Effects,0xcda8d611,0x684a,0x11d2,0x87,0x1e,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_DMUS_PROP_GM_Hardware,0x178f2f24,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
+DEFINE_GUID(GUID_DMUS_PROP_GS_Capable,0x6496aba2,0x61b0,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
+DEFINE_GUID(GUID_DMUS_PROP_GS_Hardware,0x178f2f25,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
+DEFINE_GUID(GUID_DMUS_PROP_INSTRUMENT2,0x865fd372,0x9f67,0x11d2,0x87,0x2a,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_DMUS_PROP_LegacyCaps,0xcfa7cdc2,0x00a1,0x11d2,0xaa,0xd5,0x00,0x00,0xf8,0x75,0xac,0x12);
+DEFINE_GUID(GUID_DMUS_PROP_MemorySize,0x178f2f28,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
+DEFINE_GUID(GUID_DMUS_PROP_SampleMemorySize,0x178f2f28,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
+DEFINE_GUID(GUID_DMUS_PROP_SamplePlaybackRate,0x2a91f713,0xa4bf,0x11d2,0xbb,0xdf,0x0,0x60,0x8,0x33,0xdb,0xd8);
+DEFINE_GUID(GUID_DMUS_PROP_SynthSink_DSOUND,0xaa97844,0xc877,0x11d1,0x87,0xc,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_DMUS_PROP_SynthSink_WAVE,0xaa97845,0xc877,0x11d1,0x87,0xc,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_DMUS_PROP_Volume,0xfedfae25l,0xe46e,0x11d1,0xaa,0xce,0x00,0x00,0xf8,0x75,0xac,0x12);
+DEFINE_GUID(GUID_DMUS_PROP_WavesReverb,0x4cb5622,0x32e5,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
+DEFINE_GUID(GUID_DMUS_PROP_WriteLatency,0x268a0fa0,0x60f2,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
+DEFINE_GUID(GUID_DMUS_PROP_WritePeriod,0x268a0fa1,0x60f2,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
+DEFINE_GUID(GUID_DMUS_PROP_XG_Capable,0x6496aba1,0x61b0,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
+DEFINE_GUID(GUID_DMUS_PROP_XG_Hardware,0x178f2f26,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
+DEFINE_GUID(GUID_Download,0xd2ac28a7,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_DownloadToAudioPath,0x9f2c0341,0xc5c4,0x11d3,0x9b,0xd1,0x44,0x45,0x53,0x54,0x0,0x0);
+DEFINE_GUID(GUID_DSCFX_CLASS_AEC,0xbf963d80l,0xc559,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
+DEFINE_GUID(GUID_DSCFX_CLASS_NS,0xe07f903f,0x62fd,0x4e60,0x8c,0xdd,0xde,0xa7,0x23,0x66,0x65,0xb5);
+DEFINE_GUID(GUID_DSCFX_MS_AEC,0xcdebb919,0x379a,0x488a,0x87,0x65,0xf5,0x3c,0xfd,0x36,0xde,0x40);
+DEFINE_GUID(GUID_DSCFX_MS_NS,0x11c5c73b,0x66e9,0x4ba1,0xa0,0xba,0xe8,0x14,0xc6,0xee,0xd9,0x2d);
+DEFINE_GUID(GUID_DSCFX_SYSTEM_AEC,0x1c22c56d,0x9879,0x4f5b,0xa3,0x89,0x27,0x99,0x6d,0xdc,0x28,0x10);
+DEFINE_GUID(GUID_DSCFX_SYSTEM_NS,0x5ab0882e,0x7274,0x4516,0x87,0x7d,0x4e,0xee,0x99,0xba,0x4f,0xd0);
+DEFINE_GUID(GUID_DSFX_STANDARD_COMPRESSOR,0xef011f79,0x4000,0x406d,0x87,0xaf,0xbf,0xfb,0x3f,0xc3,0x9d,0x57);
+DEFINE_GUID(GUID_DSFX_STANDARD_DISTORTION,0xef114c90,0xcd1d,0x484e,0x96,0xe5,0x09,0xcf,0xaf,0x91,0x2a,0x21);
+DEFINE_GUID(GUID_DSFX_STANDARD_ECHO,0xef3e932c,0xd40b,0x4f51,0x8c,0xcf,0x3f,0x98,0xf1,0xb2,0x9d,0x5d);
+DEFINE_GUID(GUID_DSFX_STANDARD_FLANGER,0xefca3d92,0xdfd8,0x4672,0xa6,0x03,0x74,0x20,0x89,0x4b,0xad,0x98);
+DEFINE_GUID(GUID_DSFX_STANDARD_GARGLE,0xdafd8210,0x5711,0x4b91,0x9f,0xe3,0xf7,0x5b,0x7a,0xe2,0x79,0xbf);
+DEFINE_GUID(GUID_DSFX_STANDARD_CHORUS,0xefe6629c,0x81f7,0x4281,0xbd,0x91,0xc9,0xd6,0x04,0xa9,0x5a,0xf6);
+DEFINE_GUID(GUID_DSFX_STANDARD_I3DL2REVERB,0xef985e71,0xd5c7,0x42d4,0xba,0x4d,0x2d,0x07,0x3e,0x2e,0x96,0xf4);
+DEFINE_GUID(GUID_DSFX_STANDARD_PARAMEQ,0x120ced89,0x3bf4,0x4173,0xa1,0x32,0x3c,0xb4,0x06,0xcf,0x32,0x31);
+DEFINE_GUID(GUID_DSFX_WAVES_REVERB,0x87fc0268,0x9a55,0x4360,0x95,0xaa,0x00,0x4a,0x1d,0x9d,0xe2,0x6c);
+DEFINE_GUID(GUID_Enable_Auto_Download,0xd2ac28a9,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_EnableTempo,0x45fc707e,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
+DEFINE_GUID(GUID_EnableTimeSig,0x45fc707c,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
+DEFINE_GUID(GUID_Friction,0x13541c2a,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
+DEFINE_GUID(GUID_HIDClass,0x745a17a0,0x74d3,0x11d0,0xb6,0xfe,0x00,0xa0,0xc9,0x0f,0x57,0xda);
+DEFINE_GUID(GUID_ChordParam,0xd2ac289e,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_IDirectMusicBand,0xd2ac28ac,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_IDirectMusicChordMap,0xd2ac28ad,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_IDirectMusicStyle,0xd2ac28a1,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_Inertia,0x13541c29,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
+DEFINE_GUID(GUID_Joystick,0x6f1d2b70,0xd5a0,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_KernelCallbacks,0x80863800,0x6b06,0x11d0,0x9b,0x6,0x0,0xa0,0xc9,0x3,0xa3,0xb8);
+DEFINE_GUID(GUID_KernelCaps,0xffaa7540,0x7aa8,0x11d0,0x9b,0x6,0x0,0xa0,0xc9,0x3,0xa3,0xb8);
+DEFINE_GUID(GUID_Key,0x55728220,0xd33c,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_KeyboardClass,0x4d36e96b,0xe325,0x11ce,0xbf,0xc1,0x08,0x00,0x2b,0xe1,0x03,0x18);
+DEFINE_GUID(GUID_MediaClass,0x4d36e96c,0xe325,0x11ce,0xbf,0xc1,0x08,0x00,0x2b,0xe1,0x03,0x18);
+DEFINE_GUID(GUID_MelodyFragment,0xb291c7f2,0xb616,0x11d2,0x97,0xfa,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
+DEFINE_GUID(GUID_Miscellaneous2Callbacks,0x406b2f00,0x3e5a,0x11d1,0xb6,0x40,0x0,0xaa,0x0,0xa1,0xf9,0x6a);
+DEFINE_GUID(GUID_MiscellaneousCallbacks,0xefd60cc0,0x49e7,0x11d0,0x88,0x9d,0x0,0xaa,0x0,0xbb,0xb7,0x6a);
+DEFINE_GUID(GUID_MotionCompCallbacks,0xb1122b40,0x5da5,0x11d1,0x8f,0xcf,0x0,0xc0,0x4f,0xc2,0x9b,0x4e);
+DEFINE_GUID(GUID_MouseClass,0x4d36e96f,0xe325,0x11ce,0xbf,0xc1,0x08,0x00,0x2b,0xe1,0x03,0x18);
+DEFINE_GUID(GUID_MuteParam,0xd2ac28af,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_NonLocalVidMemCaps,0x86c4fa80,0x8d84,0x11d0,0x94,0xe8,0x0,0xc0,0x4f,0xc3,0x41,0x37);
+DEFINE_GUID(GUID_NOTIFICATION_COMMAND,0xd2ac289c,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_NOTIFICATION_CHORD,0xd2ac289b,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_NOTIFICATION_MEASUREANDBEAT,0xd2ac289a,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_NOTIFICATION_PERFORMANCE,0x81f75bc5,0x4e5d,0x11d2,0xbc,0xc7,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
+DEFINE_GUID(GUID_NOTIFICATION_RECOMPOSE,0xd348372b,0x945b,0x45ae,0xa5,0x22,0x45,0xf,0x12,0x5b,0x84,0xa5);
+DEFINE_GUID(GUID_NOTIFICATION_SEGMENT,0xd2ac2899,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_NTCallbacks,0x6fe9ecde,0xdf89,0x11d1,0x9d,0xb0,0,0x60,0x8,0x27,0x71,0xba);
+DEFINE_GUID(GUID_OptSurfaceKmodeInfo,0xe05c8472,0x51d4,0x11d1,0x8c,0xce,0x0,0xa0,0xc9,0x6,0x29,0xa8);
+DEFINE_GUID(GUID_OptSurfaceUmodeInfo,0x9d792804,0x5fa8,0x11d1,0x8c,0xd0,0x0,0xa0,0xc9,0x6,0x29,0xa8);
+DEFINE_GUID(GUID_PerfAutoDownload,0xfb09565b,0x3631,0x11d2,0xbc,0xb8,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
+DEFINE_GUID(GUID_PerfMasterGrooveLevel,0xd2ac28b2,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_PerfMasterTempo,0xd2ac28b0,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_PerfMasterVolume,0xd2ac28b1,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_Play_Marker,0xd8761a41,0x801a,0x11d3,0x9b,0xd1,0xda,0xf7,0xe1,0xc3,0xd8,0x34);
+DEFINE_GUID(GUID_POV,0xa36d02f2,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_RampForce,0x13541c21,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
+DEFINE_GUID(GUID_RhythmParam,0xd2ac289f,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_RxAxis,0xa36d02f4,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_RyAxis,0xa36d02f5,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_RzAxis,0xa36d02e3,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_SawtoothDown,0x13541c26,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
+DEFINE_GUID(GUID_SawtoothUp,0x13541c25,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
+DEFINE_GUID(GUID_SeedVariations,0x65b76fa5,0xff37,0x11d2,0x81,0x4e,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
+DEFINE_GUID(GUID_Sine,0x13541c23,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
+DEFINE_GUID(GUID_Slider,0xa36d02e4,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_Spring,0x13541c27,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
+DEFINE_GUID(GUID_Square,0x13541c22,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
+DEFINE_GUID(GUID_StandardMIDIFile,0x6621075,0xe92e,0x11d1,0xa8,0xc5,0x0,0xc0,0x4f,0xa3,0x72,0x6e);
+DEFINE_GUID(GUID_Synth_Default,0x26bb9432,0x45fe,0x48d3,0xa3,0x75,0x24,0x72,0xc5,0xe3,0xe7,0x86);
+DEFINE_GUID(GUID_SysKeyboard,0x6f1d2b61,0xd5a0,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_SysKeyboardEm,0x6f1d2b82,0xd5a0,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_SysKeyboardEm2,0x6f1d2b83,0xd5a0,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_SysMouse,0x6f1d2b60,0xd5a0,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_SysMouseEm,0x6f1d2b80,0xd5a0,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_SysMouseEm2,0x6f1d2b81,0xd5a0,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_TempoParam,0xd2ac28a5,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_TimeSignature,0xd2ac28a4,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_Triangle,0x13541c24,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
+DEFINE_GUID(GUID_Unknown,0xa36d02f3,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_Unload,0xd2ac28a8,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(GUID_UnloadFromAudioPath,0x9f2c0342,0xc5c4,0x11d3,0x9b,0xd1,0x44,0x45,0x53,0x54,0x0,0x0);
+DEFINE_GUID(GUID_UserModeDriverInfo,0xf0b0e8e2,0x5f97,0x11d1,0x8c,0xd0,0x0,0xa0,0xc9,0x6,0x29,0xa8);
+DEFINE_GUID(GUID_UserModeDriverPassword,0x97f861b6,0x60a1,0x11d1,0x8c,0xd0,0x0,0xa0,0xc9,0x6,0x29,0xa8);
+DEFINE_GUID(GUID_Valid_Start_Time,0x7f6b1760,0x1fdb,0x11d3,0x82,0x26,0x44,0x45,0x53,0x54,0x0,0x0);
+DEFINE_GUID(GUID_Variations,0x11f72cce,0x26e6,0x4ecd,0xaf,0x2e,0xd6,0x68,0xe6,0x67,0x7,0xd8);
+DEFINE_GUID(GUID_VideoPortCallbacks,0xefd60cc1,0x49e7,0x11d0,0x88,0x9d,0x0,0xaa,0x0,0xbb,0xb7,0x6a);
+DEFINE_GUID(GUID_VideoPortCaps,0xefd60cc3,0x49e7,0x11d0,0x88,0x9d,0x0,0xaa,0x0,0xbb,0xb7,0x6a);
+DEFINE_GUID(GUID_XAxis,0xa36d02e0,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_YAxis,0xa36d02e1,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_ZAxis,0xa36d02e2,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_ZPixelFormats,0x93869880,0x36cf,0x11d1,0x9b,0x1b,0x0,0xaa,0x0,0xbb,0xb8,0xae);
+DEFINE_GUID(IID_ID3DXAnimationController,0x3a714d34,0xff61,0x421e,0x90,0x9f,0x63,0x9f,0x38,0x35,0x67,0x8);
+DEFINE_GUID(IID_ID3DXAnimationMixer,0x5eec992b,0x1046,0x44f6,0x92,0x4b,0xd1,0x75,0x96,0xb0,0x48,0x3e);
+DEFINE_GUID(IID_ID3DXAnimationSet,0x54b569ac,0xaef,0x473e,0x97,0x4,0x3f,0xef,0x31,0x7f,0x64,0xab);
+DEFINE_GUID(IID_ID3DXBaseMesh,0x2a835771,0xbf4d,0x43f4,0x8e,0x14,0x82,0xa8,0x9,0xf1,0x7d,0x8a);
+DEFINE_GUID(IID_ID3DXBuffer,0x932e6a7e,0xc68e,0x45dd,0xa7,0xbf,0x53,0xd1,0x9c,0x86,0xdb,0x1f);
+DEFINE_GUID(IID_ID3DXEffect,0x648b1ceb,0x8d4e,0x4d66,0xb6,0xfa,0xe4,0x49,0x69,0xe8,0x2e,0x89);
+DEFINE_GUID(IID_ID3DXEffectCompiler,0xf8ee90d3,0xfcc6,0x4f14,0x8a,0xe8,0x63,0x74,0xae,0x96,0x8e,0x33);
+DEFINE_GUID(IID_ID3DXEffectPool,0x53ca7768,0xc0d0,0x4664,0x8e,0x79,0xd1,0x56,0xe4,0xf5,0xb7,0xe0);
+DEFINE_GUID(IID_ID3DXInterpolator,0xade2c06d,0x3747,0x4b9f,0xa5,0x14,0x34,0x40,0xb8,0x28,0x49,0x80);
+DEFINE_GUID(IID_ID3DXKeyFrameInterpolator,0x6caa71f8,0x972,0x4cdb,0xa5,0x5b,0x43,0xb9,0x68,0x99,0x75,0x15);
+DEFINE_GUID(IID_ID3DXMatrixStack,0xe3357330,0xcc5e,0x11d2,0xa4,0x34,0x0,0xa0,0xc9,0x6,0x29,0xa8);
+DEFINE_GUID(IID_ID3DXMesh,0xccae5c3b,0x4dd1,0x4d0f,0x99,0x7e,0x46,0x84,0xca,0x64,0x55,0x7f);
+DEFINE_GUID(IID_ID3DXPMesh,0x19fbe386,0xc282,0x4659,0x97,0xbd,0xcb,0x86,0x9b,0x8,0x4a,0x6c);
+DEFINE_GUID(IID_ID3DXSkinMesh,0x8db06ecc,0xebfc,0x408a,0x94,0x4,0x30,0x74,0xb4,0x77,0x35,0x15);
+DEFINE_GUID(IID_ID3DXSPMesh,0x4e3ca05c,0xd4ff,0x4d11,0x8a,0x2,0x16,0x45,0x9e,0x8,0xf6,0xf4);
+DEFINE_GUID(IID_ID3DXTechnique,0xa00f378d,0xaf79,0x4917,0x90,0x7e,0x4d,0x63,0x5e,0xe6,0x38,0x44);
+DEFINE_GUID(IID_IDDVideoPortContainer,0x6c142760,0xa733,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
+DEFINE_GUID(IID_IDirect3D,0x3bba0080,0x2421,0x11cf,0xa3,0x1a,0x00,0xaa,0x00,0xb9,0x33,0x56);
+DEFINE_GUID(IID_IDirect3D2,0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a);
+DEFINE_GUID(IID_IDirect3D3,0xbb223240,0xe72b,0x11d0,0xa9,0xb4,0x00,0xaa,0x00,0xc0,0x99,0x3e);
+DEFINE_GUID(IID_IDirect3D7,0xf5049e77,0x4861,0x11d2,0xa4,0x7,0x0,0xa0,0xc9,0x6,0x29,0xa8);
+DEFINE_GUID(IID_IDirect3D8,0x1dd9e8da,0x1c77,0x4d40,0xb0,0xcf,0x98,0xfe,0xfd,0xff,0x95,0x12);
+DEFINE_GUID(IID_IDirect3D9, 0x81bdcbca, 0x64d4, 0x426d, 0xae, 0x8d, 0xad, 0x1, 0x47, 0xf4, 0x27, 0x5c);
+DEFINE_GUID(IID_IDirect3DBaseTexture8,0xb4211cfa,0x51b9,0x4a9f,0xab,0x78,0xdb,0x99,0xb2,0xbb,0x67,0x8e);
+DEFINE_GUID(IID_IDirect3DBaseTexture9, 0x580ca87e, 0x1d3c, 0x4d54, 0x99, 0x1d, 0xb7, 0xd3, 0xe3, 0xc2, 0x98, 0xce);
+DEFINE_GUID(IID_IDirect3DCubeTexture8,0x3ee5b968,0x2aca,0x4c34,0x8b,0xb5,0x7e,0x0c,0x3d,0x19,0xb7,0x50);
+DEFINE_GUID(IID_IDirect3DCubeTexture9, 0xfff32f81, 0xd953, 0x473a, 0x92, 0x23, 0x93, 0xd6, 0x52, 0xab, 0xa9, 0x3f);
+DEFINE_GUID(IID_IDirect3DDevice,0x64108800,0x957d,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29);
+DEFINE_GUID(IID_IDirect3DDevice2,0x93281501,0x8cf8,0x11d0,0x89,0xab,0x0,0xa0,0xc9,0x5,0x41,0x29);
+DEFINE_GUID(IID_IDirect3DDevice3,0xb0ab3b60,0x33d7,0x11d1,0xa9,0x81,0x0,0xc0,0x4f,0xd7,0xb1,0x74);
+DEFINE_GUID(IID_IDirect3DDevice7,0xf5049e79,0x4861,0x11d2,0xa4,0x7,0x0,0xa0,0xc9,0x6,0x29,0xa8);
+DEFINE_GUID(IID_IDirect3DDevice8,0x7385e5df,0x8fe8,0x41d5,0x86,0xb6,0xd7,0xb4,0x85,0x47,0xb6,0xcf);
+DEFINE_GUID(IID_IDirect3DDevice9, 0xd0223b96, 0xbf7a, 0x43fd, 0x92, 0xbd, 0xa4, 0x3b, 0xd, 0x82, 0xb9, 0xeb);
+DEFINE_GUID(IID_IDirect3DExecuteBuffer,0x4417c145,0x33ad,0x11cf,0x81,0x6f,0x00,0x00,0xc0,0x20,0x15,0x6e);
+DEFINE_GUID(IID_IDirect3DHALDevice,0x84e63de0,0x46aa,0x11cf,0x81,0x6f,0x00,0x00,0xc0,0x20,0x15,0x6e);
+DEFINE_GUID(IID_IDirect3DIndexBuffer8,0x0e689c9a,0x053d,0x44a0,0x9d,0x92,0xdb,0x0e,0x3d,0x75,0x0f,0x86);
+DEFINE_GUID(IID_IDirect3DIndexBuffer9, 0x7c9dd65e, 0xd3f7, 0x4529, 0xac, 0xee, 0x78, 0x58, 0x30, 0xac, 0xde, 0x35);
+DEFINE_GUID(IID_IDirect3DLight,0x4417c142,0x33ad,0x11cf,0x81,0x6f,0x00,0x00,0xc0,0x20,0x15,0x6e);
+DEFINE_GUID(IID_IDirect3DMaterial,0x4417c144,0x33ad,0x11cf,0x81,0x6f,0x00,0x00,0xc0,0x20,0x15,0x6e);
+DEFINE_GUID(IID_IDirect3DMaterial2,0x93281503,0x8cf8,0x11d0,0x89,0xab,0x0,0xa0,0xc9,0x5,0x41,0x29);
+DEFINE_GUID(IID_IDirect3DMaterial3,0xca9c46f4,0xd3c5,0x11d1,0xb7,0x5a,0x0,0x60,0x8,0x52,0xb3,0x12);
+DEFINE_GUID(IID_IDirect3DMMXDevice,0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29);
+DEFINE_GUID(IID_IDirect3DNullDevice,0x8767df22,0xbacc,0x11d1,0x89,0x69,0x0,0xa0,0xc9,0x6,0x29,0xa8);
+DEFINE_GUID(IID_IDirect3DPixelShader9, 0x6d3bdbdc, 0x5b02, 0x4415, 0xb8, 0x52, 0xce, 0x5e, 0x8b, 0xcc, 0xb2, 0x89);
+DEFINE_GUID(IID_IDirect3DQuery9, 0xd9771460, 0xa695, 0x4f26, 0xbb, 0xd3, 0x27, 0xb8, 0x40, 0xb5, 0x41, 0xcc);
+DEFINE_GUID(IID_IDirect3DResource9, 0x5eec05d, 0x8f7d, 0x4362, 0xb9, 0x99, 0xd1, 0xba, 0xf3, 0x57, 0xc7, 0x4);
+DEFINE_GUID(IID_IDirect3DRampDevice,0xf2086b20,0x259f,0x11cf,0xa3,0x1a,0x00,0xaa,0x00,0xb9,0x33,0x56);
+DEFINE_GUID(IID_IDirect3DRefDevice,0x50936643,0x13e9,0x11d1,0x89,0xaa,0x0,0xa0,0xc9,0x5,0x41,0x29);
+DEFINE_GUID(IID_IDirect3DResource8,0x1b36bb7b,0x9b7,0x410a,0xb4,0x45,0x7d,0x14,0x30,0xd7,0xb3,0x3f);
+DEFINE_GUID(IID_IDirect3DRGBDevice,0xa4665c60,0x2673,0x11cf,0xa3,0x1a,0x00,0xaa,0x00,0xb9,0x33,0x56);
+DEFINE_GUID(IID_IDirect3DRM,0x2bc49361,0x8327,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRM2,0x4516ecc8,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(IID_IDirect3DRM3,0x4516ec83,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(IID_IDirect3DRMAnimation,0xeb16cb0d,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMAnimation2,0xff6b7f77,0xa40e,0x11d1,0x91,0xf9,0x0,0x0,0xf8,0x75,0x8e,0x66);
+DEFINE_GUID(IID_IDirect3DRMAnimationArray,0xd5f1cae0,0x4bd7,0x11d1,0xb9,0x74,0x0,0x60,0x8,0x3e,0x45,0xf3);
+DEFINE_GUID(IID_IDirect3DRMAnimationSet,0xeb16cb0e,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMAnimationSet2,0xff6b7f79,0xa40e,0x11d1,0x91,0xf9,0x0,0x0,0xf8,0x75,0x8e,0x66);
+DEFINE_GUID(IID_IDirect3DRMClippedVisual,0x5434e733,0x6d66,0x11d1,0xbb,0xb,0x0,0x0,0xf8,0x75,0x86,0x5a);
+DEFINE_GUID(IID_IDirect3DRMDevice,0xe9e19280,0x6e05,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMDevice2,0x4516ec78,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(IID_IDirect3DRMDevice3,0x549f498b,0xbfeb,0x11d1,0x8e,0xd8,0x0,0xa0,0xc9,0x67,0xa4,0x82);
+DEFINE_GUID(IID_IDirect3DRMDeviceArray,0xeb16cb10,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMFace,0xeb16cb07,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMFace2,0x4516ec81,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(IID_IDirect3DRMFaceArray,0xeb16cb17,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMFrame,0xeb16cb03,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMFrame2,0xc3dfbd60,0x3988,0x11d0,0x9e,0xc2,0x0,0x0,0xc0,0x29,0x1a,0xc3);
+DEFINE_GUID(IID_IDirect3DRMFrame3,0xff6b7f70,0xa40e,0x11d1,0x91,0xf9,0x0,0x0,0xf8,0x75,0x8e,0x66);
+DEFINE_GUID(IID_IDirect3DRMFrameArray,0xeb16cb12,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMInterpolator,0x242f6bc1,0x3849,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(IID_IDirect3DRMLight,0xeb16cb08,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMLightArray,0xeb16cb14,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMMaterial,0xeb16cb0b,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMMaterial2,0xff6b7f75,0xa40e,0x11d1,0x91,0xf9,0x0,0x0,0xf8,0x75,0x8e,0x66);
+DEFINE_GUID(IID_IDirect3DRMMesh,0xa3a80d01,0x6e12,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMMeshBuilder,0xa3a80d02,0x6e12,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMMeshBuilder2,0x4516ec77,0x8f20,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(IID_IDirect3DRMMeshBuilder3,0x4516ec82,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(IID_IDirect3DRMObject,0xeb16cb00,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMObject2,0x4516ec7c,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(IID_IDirect3DRMObjectArray,0x242f6bc2,0x3849,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(IID_IDirect3DRMPicked2Array,0x4516ec7b,0x8f20,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(IID_IDirect3DRMPickedArray,0xeb16cb16,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMProgressiveMesh,0x4516ec79,0x8f20,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
+DEFINE_GUID(IID_IDirect3DRMShadow,0xaf359780,0x6ba3,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMShadow2,0x86b44e25,0x9c82,0x11d1,0xbb,0xb,0x0,0xa0,0xc9,0x81,0xa0,0xa6);
+DEFINE_GUID(IID_IDirect3DRMTexture,0xeb16cb09,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMTexture2,0x120f30c0,0x1629,0x11d0,0x94,0x1c,0x0,0x80,0xc8,0xc,0xfa,0x7b);
+DEFINE_GUID(IID_IDirect3DRMTexture3,0xff6b7f73,0xa40e,0x11d1,0x91,0xf9,0x0,0x0,0xf8,0x75,0x8e,0x66);
+DEFINE_GUID(IID_IDirect3DRMUserVisual,0x59163de0,0x6d43,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMViewport,0xeb16cb02,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMViewport2,0x4a1b1be6,0xbfed,0x11d1,0x8e,0xd8,0x0,0xa0,0xc9,0x67,0xa4,0x82);
+DEFINE_GUID(IID_IDirect3DRMViewportArray,0xeb16cb11,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMVisual,0xeb16cb04,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMVisualArray,0xeb16cb13,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMWinDevice,0xc5016cc0,0xd273,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DRMWrap,0xeb16cb0a,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
+DEFINE_GUID(IID_IDirect3DStateBlock9,0xb07c4fe5,0x310d,0x4ba8,0xa2,0x3c,0x4f,0xf,0x20,0x6f,0x21,0x8b);
+DEFINE_GUID(IID_IDirect3DSurface8,0xb96eebca,0xb326,0x4ea5,0x88,0x2f,0x2f,0xf5,0xba,0xe0,0x21,0xdd);
+DEFINE_GUID(IID_IDirect3DSurface9,0xcfbaf3a,0x9ff6,0x429a,0x99,0xb3,0xa2,0x79,0x6a,0xf8,0xb8,0x9b);
+DEFINE_GUID(IID_IDirect3DSwapChain8,0x928c088b,0x76b9,0x4c6b,0xa5,0x36,0xa5,0x90,0x85,0x38,0x76,0xcd);
+DEFINE_GUID(IID_IDirect3DSwapChain9,0x794950f2,0xadfc,0x458a,0x90,0x5e,0x10,0xa1,0xb,0xb,0x50,0x3b);
+DEFINE_GUID(IID_IDirect3DTexture,0x2cdcd9e0,0x25a0,0x11cf,0xa3,0x1a,0x00,0xaa,0x00,0xb9,0x33,0x56);
+DEFINE_GUID(IID_IDirect3DTexture2,0x93281502,0x8cf8,0x11d0,0x89,0xab,0x0,0xa0,0xc9,0x5,0x41,0x29);
+DEFINE_GUID(IID_IDirect3DTexture8,0xe4cdd575,0x2866,0x4f01,0xb1,0x2e,0x7e,0xec,0xe1,0xec,0x93,0x58);
+DEFINE_GUID(IID_IDirect3DTexture9,0x85c31227,0x3de5,0x4f00,0x9b,0x3a,0xf1,0x1a,0xc3,0x8c,0x18,0xb5);
+DEFINE_GUID(IID_IDirect3DTnLHalDevice,0xf5049e78,0x4861,0x11d2,0xa4,0x7,0x0,0xa0,0xc9,0x6,0x29,0xa8);
+DEFINE_GUID(IID_IDirect3DVertexBuffer,0x7a503555,0x4a83,0x11d1,0xa5,0xdb,0x0,0xa0,0xc9,0x3,0x67,0xf8);
+DEFINE_GUID(IID_IDirect3DVertexBuffer7,0xf5049e7d,0x4861,0x11d2,0xa4,0x7,0x0,0xa0,0xc9,0x6,0x29,0xa8);
+DEFINE_GUID(IID_IDirect3DVertexBuffer8,0x8aeeeac7,0x05f9,0x44d4,0xb5,0x91,0x00,0x0b,0x0d,0xf1,0xcb,0x95);
+DEFINE_GUID(IID_IDirect3DVertexBuffer9,0xb64bb1b5,0xfd70,0x4df6,0xbf,0x91,0x19,0xd0,0xa1,0x24,0x55,0xe3);
+DEFINE_GUID(IID_IDirect3DVertexDeclaration9,0xdd13c59c,0x36fa,0x4098,0xa8,0xfb,0xc7,0xed,0x39,0xdc,0x85,0x46);
+DEFINE_GUID(IID_IDirect3DVertexShader9,0xefc5557e,0x6265,0x4613,0x8a,0x94,0x43,0x85,0x78,0x89,0xeb,0x36);
+DEFINE_GUID(IID_IDirect3DViewport,0x4417c146,0x33ad,0x11cf,0x81,0x6f,0x00,0x00,0xc0,0x20,0x15,0x6e);
+DEFINE_GUID(IID_IDirect3DViewport2,0x93281500,0x8cf8,0x11d0,0x89,0xab,0x0,0xa0,0xc9,0x5,0x41,0x29);
+DEFINE_GUID(IID_IDirect3DViewport3,0xb0ab3b61,0x33d7,0x11d1,0xa9,0x81,0x0,0xc0,0x4f,0xd7,0xb1,0x74);
+DEFINE_GUID(IID_IDirect3DVolume8,0xbd7349f5,0x14f1,0x42e4,0x9c,0x79,0x97,0x23,0x80,0xdb,0x40,0xc0);
+DEFINE_GUID(IID_IDirect3DVolume9,0x24f416e6,0x1f67,0x4aa7,0xb8,0x8e,0xd3,0x3f,0x6f,0x31,0x28,0xa1);
+DEFINE_GUID(IID_IDirect3DVolumeTexture8,0x4b8aaafa,0x140f,0x42ba,0x91,0x31,0x59,0x7e,0xaf,0xaa,0x2e,0xad);
+DEFINE_GUID(IID_IDirect3DVolumeTexture9,0x2518526c,0xe789,0x4111,0xa7,0xb9,0x47,0xef,0x32,0x8d,0x13,0xe6);
+DEFINE_GUID(IID_IDirectDraw,0x6c14db80,0xa733,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
+DEFINE_GUID(IID_IDirectDraw2,0xb3a6f3e0,0x2b43,0x11cf,0xa2,0xde,0x00,0xaa,0x00,0xb9,0x33,0x56);
+DEFINE_GUID(IID_IDirectDraw4,0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5);
+DEFINE_GUID(IID_IDirectDraw7,0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b);
+DEFINE_GUID(IID_IDirectDrawClipper,0x6c14db85,0xa733,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
+DEFINE_GUID(IID_IDirectDrawColorControl,0x4b9f0ee0,0x0d7e,0x11d0,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
+DEFINE_GUID(IID_IDirectDrawFactory2,0x89b2c488,0x4af4,0x11d1,0x8c,0x4c,0x0,0xc0,0x4f,0xd9,0x30,0xc5);
+DEFINE_GUID(IID_IDirectDrawGammaControl,0x69c11c3e,0xb46b,0x11d1,0xad,0x7a,0x00,0xc0,0x4f,0xc2,0x9b,0x4e);
+DEFINE_GUID(IID_IDirectDrawOptSurface,0x51191f1e,0x4f2b,0x11d1,0x8c,0xc3,0x0,0xa0,0xc9,0x6,0x29,0xa8);
+DEFINE_GUID(IID_IDirectDrawPalette,0x6c14db84,0xa733,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
+DEFINE_GUID(IID_IDirectDrawPalette2,0xc03c477e,0x6519,0x11d1,0x8c,0x52,0x0,0xc0,0x4f,0xd9,0x30,0xc5);
+DEFINE_GUID(IID_IDirectDrawSurface,0x6c14db81,0xa733,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
+DEFINE_GUID(IID_IDirectDrawSurface2,0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27);
+DEFINE_GUID(IID_IDirectDrawSurface3,0xda044e00,0x69b2,0x11d0,0xa1,0xd5,0x00,0xaa,0x00,0xb8,0xdf,0xbb);
+DEFINE_GUID(IID_IDirectDrawSurface4,0x0b2b8630,0xad35,0x11d0,0x8e,0xa6,0x00,0x60,0x97,0x97,0xea,0x5b);
+DEFINE_GUID(IID_IDirectDrawSurface7,0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b);
+//IID_IDirectDrawSurfaceNew
+DEFINE_GUID(IID_IDirectDrawVideoPort,0xb36d93e0,0x2b43,0x11cf,0xa2,0xde,0x00,0xaa,0x00,0xb9,0x33,0x56);
+DEFINE_GUID(IID_IDirectDrawVideoPortNotify,0xa655fb94,0x0589,0x4e57,0xb3,0x33,0x56,0x7a,0x89,0x46,0x8c,0x88);
+DEFINE_GUID(IID_IDirectInput2A,0x5944e662,0xaa8a,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInput2W,0x5944e663,0xaa8a,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInput7A,0x9a4cb684,0x236d,0x11d3,0x8e,0x9d,0x00,0xc0,0x4f,0x68,0x44,0xae);
+DEFINE_GUID(IID_IDirectInput7W,0x9a4cb685,0x236d,0x11d3,0x8e,0x9d,0x00,0xc0,0x4f,0x68,0x44,0xae);
+DEFINE_GUID(IID_IDirectInput8A,0xbf798030,0x483a,0x4da2,0xaa,0x99,0x5d,0x64,0xed,0x36,0x97,0x00);
+DEFINE_GUID(IID_IDirectInput8W,0xbf798031,0x483a,0x4da2,0xaa,0x99,0x5d,0x64,0xed,0x36,0x97,0x00);
+DEFINE_GUID(IID_IDirectInputA,0x89521360,0xaa8a,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInputDevice2A,0x5944e682,0xc92e,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInputDevice2W,0x5944e683,0xc92e,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInputDevice7A,0x57d7c6bc,0x2356,0x11d3,0x8e,0x9d,0x00,0xc0,0x4f,0x68,0x44,0xae);
+DEFINE_GUID(IID_IDirectInputDevice7W,0x57d7c6bd,0x2356,0x11d3,0x8e,0x9d,0x00,0xc0,0x4f,0x68,0x44,0xae);
+DEFINE_GUID(IID_IDirectInputDevice8A,0x54d41080,0xdc15,0x4833,0xa4,0x1b,0x74,0x8f,0x73,0xa3,0x81,0x79);
+DEFINE_GUID(IID_IDirectInputDevice8W,0x54d41081,0xdc15,0x4833,0xa4,0x1b,0x74,0x8f,0x73,0xa3,0x81,0x79);
+DEFINE_GUID(IID_IDirectInputDeviceA,0x5944e680,0xc92e,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInputDeviceW,0x5944e681,0xc92e,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInputEffect,0xe7e1f7c0,0x88d2,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
+DEFINE_GUID(IID_IDirectInputEffectDriver,0x02538130,0x898f,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
+DEFINE_GUID(IID_IDirectInputJoyConfig,0x1de12ab1,0xc9f5,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInputJoyConfig8,0xeb0d7dfa,0x1990,0x4f27,0xb4,0xd6,0xed,0xf2,0xee,0xc4,0xa4,0x4c);
+DEFINE_GUID(IID_IDirectInputPIDDriver,0xeec6993a,0xb3fd,0x11d2,0xa9,0x16,0x00,0xc0,0x4f,0xb9,0x86,0x38);
+DEFINE_GUID(IID_IDirectInputW,0x89521361,0xaa8a,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectMusic,0x6536115a,0x7b2d,0x11d2,0xba,0x18,0x00,0x00,0xf8,0x75,0xac,0x12);
+DEFINE_GUID(IID_IDirectMusic2,0x6fc2cae1, 0xbc78, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
+DEFINE_GUID(IID_IDirectMusic8,0x2d3629f7,0x813d,0x4939,0x85,0x08,0xf0,0x5c,0x6b,0x75,0xfd,0x97);
+DEFINE_GUID(IID_IDirectMusicAudioPath,0xc87631f5, 0x23be, 0x4986, 0x88, 0x36, 0x5, 0x83, 0x2f, 0xcc, 0x48, 0xf9);
+DEFINE_GUID(IID_IDirectMusicBand,0xd2ac28c0, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
+DEFINE_GUID(IID_IDirectMusicBuffer,0xd2ac2878, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
+DEFINE_GUID(IID_IDirectMusicCollection,0xd2ac287c, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
+DEFINE_GUID(IID_IDirectMusicComposer,0xd2ac28bf,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(IID_IDirectMusicContainer,0x9301e386,0x1f22,0x11d3,0x82,0x26,0xd2,0xfa,0x76,0x25,0x5d,0x47);
+DEFINE_GUID(IID_IDirectMusicDownload,0xd2ac287b,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(IID_IDirectMusicDownloadedInstrument,0xd2ac287e,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(IID_IDirectMusicGetLoader,0x68a04844,0xd13d,0x11d1,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
+DEFINE_GUID(IID_IDirectMusicGraph,0x2befc277,0x5497,0x11d2,0xbc,0xcb,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
+DEFINE_GUID(IID_IDirectMusicChordMap,0xd2ac28be,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(IID_IDirectMusicInstrument,0xd2ac287d,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(IID_IDirectMusicLoader,0x2ffaaca2,0x5dca,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
+DEFINE_GUID(IID_IDirectMusicLoader8,0x19e7c08c,0xa44,0x4e6a,0xa1,0x16,0x59,0x5a,0x7c,0xd5,0xde,0x8c);
+DEFINE_GUID(IID_IDirectMusicObject,0xd2ac28b5,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(IID_IDirectMusicPatternTrack,0x51c22e10,0xb49f,0x46fc,0xbe,0xc2,0xe6,0x28,0x8f,0xb9,0xed,0xe6);
+DEFINE_GUID(IID_IDirectMusicPerformance,0x7d43d03,0x6523,0x11d2,0x87,0x1d,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(IID_IDirectMusicPerformance2,0x6fc2cae0,0xbc78,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
+DEFINE_GUID(IID_IDirectMusicPerformance8,0x679c4137,0xc62e,0x4147,0xb2,0xb4,0x9d,0x56,0x9a,0xcb,0x25,0x4c);
+DEFINE_GUID(IID_IDirectMusicPort,0x08f2d8c9,0x37c2,0x11d2,0xb9,0xf9,0x00,0x00,0xf8,0x75,0xac,0x12);
+DEFINE_GUID(IID_IDirectMusicPortDownload,0xd2ac287a,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(IID_IDirectMusicScript,0x2252373a,0x5814,0x489b,0x82,0x9,0x31,0xfe,0xde,0xba,0xf1,0x37);/*{2252373a-5814-489b-8209-31fedebaf137}*/
+DEFINE_GUID(IID_IDirectMusicSegment,0xf96029a2,0x4282,0x11d2,0x87,0x17,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(IID_IDirectMusicSegment2,0xd38894d1,0xc052,0x11d2,0x87,0x2f,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(IID_IDirectMusicSegment8,0xc6784488,0x41a3,0x418f,0xaa,0x15,0xb3,0x50,0x93,0xba,0x42,0xd4);
+DEFINE_GUID(IID_IDirectMusicSegmentState,0xa3afdcc7,0xd3ee,0x11d1,0xbc,0x8d,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
+DEFINE_GUID(IID_IDirectMusicSegmentState8,0xa50e4730,0xae4,0x48a7,0x98,0x39,0xbc,0x4,0xbf,0xe0,0x77,0x72);
+DEFINE_GUID(IID_IDirectMusicSong,0xa862b2ec,0x3676,0x4982,0x85,0xa,0x78,0x42,0x77,0x5e,0x1d,0x86);
+DEFINE_GUID(IID_IDirectMusicStyle,0xd2ac28bd,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(IID_IDirectMusicStyle8,0xfd24ad8a,0xa260,0x453d,0xbf,0x50,0x6f,0x93,0x84,0xf7,0x9,0x85);
+DEFINE_GUID(IID_IDirectMusicThru,0xced153e7,0x3606,0x11d2,0xb9,0xf9,0x00,0x00,0xf8,0x75,0xac,0x12);
+DEFINE_GUID(IID_IDirectMusicTool,0xd2ac28ba,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(IID_IDirectMusicTrack,0xf96029a1,0x4282,0x11d2,0x87,0x17,0x0,0x60,0x8,0x93,0xb1,0xbd);
+DEFINE_GUID(IID_IDirectMusicTool8,0xe674303,0x3b05,0x11d3,0x9b,0xd1,0xf9,0xe7,0xf0,0xa0,0x15,0x36);
+DEFINE_GUID(IID_IDirectMusicTrack8,0xe674304,0x3b05,0x11d3,0x9b,0xd1,0xf9,0xe7,0xf0,0xa0,0x15,0x36);
+DEFINE_GUID(IID_IDirectPlay,0x5454e9a0,0xdb65,0x11ce,0x92,0x1c,0x00,0xaa,0x00,0x6c,0x49,0x72);
+DEFINE_GUID(IID_IDirectPlay2,0x2b74f7c0,0x9154,0x11cf,0xa9,0xcd,0x0,0xaa,0x0,0x68,0x86,0xe3);
+DEFINE_GUID(IID_IDirectPlay2A,0x9d460580,0xa822,0x11cf,0x96,0xc,0x0,0x80,0xc7,0x53,0x4e,0x82);
+DEFINE_GUID(IID_IDirectPlay3,0x133efe40,0x32dc,0x11d0,0x9c,0xfb,0x0,0xa0,0xc9,0xa,0x43,0xcb);
+DEFINE_GUID(IID_IDirectPlay3A,0x133efe41,0x32dc,0x11d0,0x9c,0xfb,0x0,0xa0,0xc9,0xa,0x43,0xcb);
+DEFINE_GUID(IID_IDirectPlay4,0xab1c530,0x4745,0x11d1,0xa7,0xa1,0x0,0x0,0xf8,0x3,0xab,0xfc);
+DEFINE_GUID(IID_IDirectPlay4A,0xab1c531,0x4745,0x11d1,0xa7,0xa1,0x0,0x0,0xf8,0x3,0xab,0xfc);
+DEFINE_GUID(IID_IDirectPlay8Address,0x83783300,0x4063,0x4c8a,0x9d,0xb3,0x82,0x83,0xa,0x7f,0xeb,0x31);
+DEFINE_GUID(IID_IDirectPlay8AddressIP,0xe5a0e990,0x2bad,0x430b,0x87,0xda,0xa1,0x42,0xcf,0x75,0xde,0x58);
+DEFINE_GUID(IID_IDirectPlay8Client,0x5102dacd,0x241b,0x11d3,0xae,0xa7,0x0,0x60,0x97,0xb0,0x14,0x11);
+DEFINE_GUID(IID_IDirectPlay8LobbiedApplication,0x819074a3,0x16c,0x11d3,0xae,0x14,0x0,0x60,0x97,0xb0,0x14,0x11);
+DEFINE_GUID(IID_IDirectPlay8LobbyClient,0x819074a2,0x16c,0x11d3,0xae,0x14,0x0,0x60,0x97,0xb0,0x14,0x11);
+DEFINE_GUID(IID_IDirectPlay8NATResolver,0xa9e213f2,0x9a60,0x486f,0xbf,0x3b,0x53,0x40,0x8b,0x6d,0x1c,0xbb);
+DEFINE_GUID(IID_IDirectPlay8Peer,0x5102dacf,0x241b,0x11d3,0xae,0xa7,0x0,0x60,0x97,0xb0,0x14,0x11);
+DEFINE_GUID(IID_IDirectPlay8Server,0x5102dace,0x241b,0x11d3,0xae,0xa7,0x0,0x60,0x97,0xb0,0x14,0x11);
+DEFINE_GUID(IID_IDirectPlay8ThreadPool,0xd22ee73,0x4a46,0x4a0d,0x89,0xb2,0x4,0x5b,0x4d,0x66,0x64,0x25);
+DEFINE_GUID(IID_IDirectPlayLobby,0xaf465c71,0x9588,0x11cf,0xa0,0x20,0x0,0xaa,0x0,0x61,0x57,0xac);
+DEFINE_GUID(IID_IDirectPlayLobby2,0x194c220,0xa303,0x11d0,0x9c,0x4f,0x0,0xa0,0xc9,0x5,0x42,0x5e);
+DEFINE_GUID(IID_IDirectPlayLobby2A,0x1bb4af80,0xa303,0x11d0,0x9c,0x4f,0x0,0xa0,0xc9,0x5,0x42,0x5e);
+DEFINE_GUID(IID_IDirectPlayLobby3,0x2db72490,0x652c,0x11d1,0xa7,0xa8,0x0,0x0,0xf8,0x3,0xab,0xfc);
+DEFINE_GUID(IID_IDirectPlayLobby3A,0x2db72491,0x652c,0x11d1,0xa7,0xa8,0x0,0x0,0xf8,0x3,0xab,0xfc);
+DEFINE_GUID(IID_IDirectPlayLobbyA,0x26c66a70,0xb367,0x11cf,0xa0,0x24,0x0,0xaa,0x0,0x61,0x57,0xac);
+DEFINE_GUID(IID_IDirectPlayVoiceClient,0x1dfdc8ea,0xbcf7,0x41d6,0xb2,0x95,0xab,0x64,0xb3,0xb2,0x33,0x6);
+DEFINE_GUID(IID_IDirectPlayVoiceServer,0xfaa1c173,0x468,0x43b6,0x8a,0x2a,0xea,0x8a,0x4f,0x20,0x76,0xc9);
+DEFINE_GUID(IID_IDirectPlayVoiceTest,0xd26af734,0x208b,0x41da,0x82,0x24,0xe0,0xce,0x79,0x81,0xb,0xe1);
+DEFINE_GUID(IID_IDirectSound,0x279afa83,0x4981,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
+DEFINE_GUID(IID_IDirectSound3DBuffer,0x279afa86,0x4981,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
+DEFINE_GUID(IID_IDirectSound3DListener,0x279afa84,0x4981,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
+DEFINE_GUID(IID_IDirectSound8,0xc50a7e93,0xf395,0x4834,0x9e,0xf6,0x7f,0xa9,0x9d,0xe5,0x09,0x66);
+DEFINE_GUID(IID_IDirectSoundBuffer,0x279afa85,0x4981,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
+DEFINE_GUID(IID_IDirectSoundBuffer8,0x6825a449,0x7524,0x4d82,0x92,0x0f,0x50,0xe3,0x6a,0xb3,0xab,0x1e);
+DEFINE_GUID(IID_IDirectSoundCapture,0xb0210781,0x89cd,0x11d0,0xaf,0x8,0x0,0xa0,0xc9,0x25,0xcd,0x16);
+DEFINE_GUID(IID_IDirectSoundCaptureBuffer,0xb0210782,0x89cd,0x11d0,0xaf,0x8,0x0,0xa0,0xc9,0x25,0xcd,0x16);
+DEFINE_GUID(IID_IDirectSoundCaptureBuffer8,0x990df4,0xdbb,0x4872,0x83,0x3e,0x6d,0x30,0x3e,0x80,0xae,0xb6);
+DEFINE_GUID(IID_IDirectSoundCaptureFXAec,0xad74143d,0x903d,0x4ab7,0x80,0x66,0x28,0xd3,0x63,0x03,0x6d,0x65);
+DEFINE_GUID(IID_IDirectSoundCaptureFXNoiseSuppress,0xed311e41,0xfbae,0x4175,0x96,0x25,0xcd,0x8,0x54,0xf6,0x93,0xca);
+DEFINE_GUID(IID_IDirectSoundFullDuplex,0xedcb4c7a,0xdaab,0x4216,0xa4,0x2e,0x6c,0x50,0x59,0x6d,0xdc,0x1d);
+DEFINE_GUID(IID_IDirectSoundFXCompressor,0x4bbd1154,0x62f6,0x4e2c,0xa1,0x5c,0xd3,0xb6,0xc4,0x17,0xf7,0xa0);
+DEFINE_GUID(IID_IDirectSoundFXDistortion,0x8ecf4326,0x455f,0x4d8b,0xbd,0xa9,0x8d,0x5d,0x3e,0x9e,0x3e,0x0b);
+DEFINE_GUID(IID_IDirectSoundFXEcho,0x8bd28edf,0x50db,0x4e92,0xa2,0xbd,0x44,0x54,0x88,0xd1,0xed,0x42);
+DEFINE_GUID(IID_IDirectSoundFXFlanger,0x903e9878,0x2c92,0x4072,0x9b,0x2c,0xea,0x68,0xf5,0x39,0x67,0x83);
+DEFINE_GUID(IID_IDirectSoundFXGargle,0xd616f352,0xd622,0x11ce,0xaa,0xc5,0x00,0x20,0xaf,0x0b,0x99,0xa3);
+DEFINE_GUID(IID_IDirectSoundFXChorus,0x880842e3,0x145f,0x43e6,0xa9,0x34,0xa7,0x18,0x06,0xe5,0x05,0x47);
+DEFINE_GUID(IID_IDirectSoundFXI3DL2Reverb,0x4b166a6a,0x0d66,0x43f3,0x80,0xe3,0xee,0x62,0x80,0xde,0xe1,0xa4);
+DEFINE_GUID(IID_IDirectSoundFXParamEq,0xc03ca9fe,0xfe90,0x4204,0x80,0x78,0x82,0x33,0x4c,0xd1,0x77,0xda);
+DEFINE_GUID(IID_IDirectSoundFXWavesReverb,0x46858c3a,0x0dc6,0x45e3,0xb7,0x60,0xd4,0xee,0xf1,0x6c,0xb3,0x25);
+DEFINE_GUID(IID_IDirectSoundNotify,0xb0210783,0x89cd,0x11d0,0xaf,0x8,0x0,0xa0,0xc9,0x25,0xcd,0x16);
+DEFINE_GUID(IID_IDirectXFile,0x3d82ab40,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(IID_IDirectXFileBinary,0x3d82ab46,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(IID_IDirectXFileData,0x3d82ab44,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(IID_IDirectXFileDataReference,0x3d82ab45,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(IID_IDirectXFileEnumObject,0x3d82ab41,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(IID_IDirectXFileObject,0x3d82ab43,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(IID_IDirectXFileSaveObject,0x3d82ab42,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(IID_IKsControl,0x28f54685l,0x06fd,0x11d2,0xb2,0x7a,0x00,0xa0,0xc9,0x22,0x31,0x96);
+DEFINE_GUID(IID_IKsFastClock,0xc9902485,0xc180,0x11d2,0x84,0x73,0xd4,0x23,0x94,0x45,0x9e,0x5e);
+DEFINE_GUID(IID_IKsPropertySet,0x31efac30,0x515c,0x11d0,0xa9,0xaa,0x00,0xaa,0x00,0x61,0xbe,0x93);
+DEFINE_GUID(IID_IReferenceClock,0x56a86897,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
+DEFINE_GUID(KSDATAFORMAT_SUBTYPE_DIRECTMUSIC,0x1a82f8bc,0x3f8b,0x11d2,0xb7,0x74,0x00,0x60,0x08,0x33,0x16,0xc1);
+DEFINE_GUID(KSDATAFORMAT_SUBTYPE_MIDI,0x1d262760l,0xe957,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
+DEFINE_GUID(TID_D3DRMAnimation,0x3d82ab4f,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(TID_D3DRMAnimationKey,0x10dd46a8,0x775b,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMAnimationOptions,0xe2bf56c0,0x840f,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMAnimationSet,0x3d82ab50,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(TID_D3DRMAppData,0xe5745280,0xb24f,0x11cf,0x9d,0xd5,0x0,0xaa,0x0,0xa7,0x1a,0x2f);
+DEFINE_GUID(TID_D3DRMBoolean,0x537da6a0,0xca37,0x11d0,0x94,0x1c,0x0,0x80,0xc8,0xc,0xfa,0x7b);
+DEFINE_GUID(TID_D3DRMBoolean2d,0x4885ae63,0x78e8,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMCamera,0x3d82ab51,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(TID_D3DRMColorRGB,0xd3e16e81,0x7835,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMColorRGBA,0x35ff44e0,0x6c7c,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMCoords2d,0xf6f23f44,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMExternalVisual,0x98116aa0,0xbdba,0x11d1,0x82,0xc0,0x00,0xa0,0xc9,0x69,0x72,0x71);
+DEFINE_GUID(TID_D3DRMFloatKeys,0x10dd46a9,0x775b,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMFrame,0x3d82ab46,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(TID_D3DRMFramePosition,0xe2bf56c1,0x840f,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMFrameRotation,0xe2bf56c3,0x840f,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMFrameTransformMatrix,0xf6f23f41,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMFrameVelocity,0xe2bf56c2,0x840f,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMGuid,0xa42790e0,0x7810,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMIndexedColor,0x1630b820,0x7842,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMInfo,0x2b957100,0x9e9a,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(TID_D3DRMInlineData,0x3a23eea0,0x94b1,0x11d0,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(TID_D3DRMLight,0x3d82ab4a,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(TID_D3DRMLightAttenuation,0xa8a98ba0,0xc5e5,0x11cf,0xb9,0x41,0x0,0x80,0xc8,0xc,0xfa,0x7b);
+DEFINE_GUID(TID_D3DRMLightPenumbra,0xaed22741,0xb31f,0x11cf,0x9d,0xd5,0x0,0xaa,0x0,0xa7,0x1a,0x2f);
+DEFINE_GUID(TID_D3DRMLightRange,0xaed22742,0xb31f,0x11cf,0x9d,0xd5,0x0,0xaa,0x0,0xa7,0x1a,0x2f);
+DEFINE_GUID(TID_D3DRMLightUmbra,0xaed22740,0xb31f,0x11cf,0x9d,0xd5,0x0,0xaa,0x0,0xa7,0x1a,0x2f);
+DEFINE_GUID(TID_D3DRMMaterial,0x3d82ab4d,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(TID_D3DRMMaterialAmbientColor,0x01411840,0x7786,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMMaterialArray,0x35ff44e1,0x6c7c,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMMaterialDiffuseColor,0x01411841,0x7786,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMMaterialEmissiveColor,0xd3e16e80,0x7835,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMMaterialPower,0x01411843,0x7786,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMMaterialSpecularColor,0x01411842,0x7786,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMMaterialWrap,0x4885ae60,0x78e8,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMMatrix4x4,0xf6f23f45,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMMesh,0x3d82ab44,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(TID_D3DRMMeshFace,0x3d82ab5f,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(TID_D3DRMMeshFaceWraps,0xed1ec5c0,0xc0a8,0x11d0,0x94,0x1c,0x0,0x80,0xc8,0xc,0xfa,0x7b);
+DEFINE_GUID(TID_D3DRMMeshMaterialList,0xf6f23f42,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMMeshNormals,0xf6f23f43,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMMeshTextureCoords,0xf6f23f40,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMMeshVertexColors,0x1630b821,0x7842,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMProgressiveMesh,0x8a63c360,0x997d,0x11d0,0x94,0x1c,0x0,0x80,0xc8,0x0c,0xfa,0x7b);
+DEFINE_GUID(TID_D3DRMPropertyBag,0x7f0f21e1,0xbfe1,0x11d1,0x82,0xc0,0x0,0xa0,0xc9,0x69,0x72,0x71);
+DEFINE_GUID(TID_D3DRMRightHanded,0x7f5d5ea0,0xd53a,0x11d1,0x82,0xc0,0x0,0xa0,0xc9,0x69,0x72,0x71);
+DEFINE_GUID(TID_D3DRMStringProperty,0x7f0f21e0,0xbfe1,0x11d1,0x82,0xc0,0x0,0xa0,0xc9,0x69,0x72,0x71);
+DEFINE_GUID(TID_D3DRMTextureFilename,0xa42790e1,0x7810,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMTextureReference,0xa42790e2,0x7810,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMTimedFloatKeys,0xf406b180,0x7b3b,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
+DEFINE_GUID(TID_D3DRMUrl,0x3a23eea1,0x94b1,0x11d0,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(TID_D3DRMVector,0x3d82ab5e,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
+DEFINE_GUID(TID_DXFILEHeader,0x3d82ab43,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
reactos/lib/dxguid
diff -N makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ makefile 13 Dec 2004 09:39:26 -0000 1.1.2.1
@@ -0,0 +1,26 @@
+# $Id: makefile,v 1.1.2.1 2004/12/13 09:39:26 hyperion Exp $
+
+PATH_TO_TOP = ../..
+
+TARGET_DEFONLY = yes
+
+TARGET_TYPE = library
+
+TARGET_NAME = dxguid
+
+TARGET_CFLAGS = -D__REACTOS__
+
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D_DISABLE_TIDENTS -Werror -Wall
+
+TARGET_LFLAGS = -Wl
+
+TARGET_OBJECTS = \
+ dxguid-mingw.o
+
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
+
+# EOF
\ No newline at end of file
reactos/lib/msvcrt/misc
diff -N lock.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lock.c 13 Dec 2004 09:39:27 -0000 1.1.2.1
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2002, TransGaming Technologies Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "precomp.h"
+
+#define NDEBUG
+#include <msvcrt/msvcrtdbg.h>
+#include <msvcrt/internal/mtdll.h>
+
+typedef struct
+{
+ BOOL bInit;
+ CRITICAL_SECTION crit;
+} LOCKTABLEENTRY;
+
+static LOCKTABLEENTRY lock_table[ _TOTAL_LOCKS ];
+
+static inline void msvcrt_mlock_set_entry_initialized( int locknum, BOOL initialized )
+{
+ lock_table[ locknum ].bInit = initialized;
+}
+
+static inline void msvcrt_initialize_mlock( int locknum )
+{
+ InitializeCriticalSection( &(lock_table[ locknum ].crit) );
+ msvcrt_mlock_set_entry_initialized( locknum, TRUE );
+}
+
+static inline void msvcrt_uninitialize_mlock( int locknum )
+{
+ DeleteCriticalSection( &(lock_table[ locknum ].crit) );
+ msvcrt_mlock_set_entry_initialized( locknum, FALSE );
+}
+
+/**********************************************************************
+ * msvcrt_init_mt_locks (internal)
+ *
+ * Initialize the table lock. All other locks will be initialized
+ * upon first use.
+ *
+ */
+void msvcrt_init_mt_locks(void)
+{
+ int i;
+
+ DPRINT( "initializing mtlocks\n" );
+
+ /* Initialize the table */
+ for( i=0; i < _TOTAL_LOCKS; i++ )
+ {
+ msvcrt_mlock_set_entry_initialized( i, FALSE );
+ }
+
+ /* Initialize our lock table lock */
+ msvcrt_initialize_mlock( _LOCKTAB_LOCK );
+}
+
+/**********************************************************************
+ * msvcrt_free_mt_locks (internal)
+ *
+ * Uninitialize all mt locks. Assume that neither _lock or _unlock will
+ * be called once we're calling this routine (ie _LOCKTAB_LOCK can be deleted)
+ *
+ */
+void msvcrt_free_mt_locks(void)
+{
+ int i;
+
+ DPRINT(": uninitializing all mtlocks\n" );
+
+ /* Uninitialize the table */
+ for( i=0; i < _TOTAL_LOCKS; i++ )
+ {
+ if( lock_table[ i ].bInit == TRUE )
+ {
+ msvcrt_uninitialize_mlock( i );
+ }
+ }
+}
+
+
+/**********************************************************************
+ * _lock (MSVCRT.@)
+ */
+void _lock( int locknum )
+{
+ DPRINT( "(%d)\n", locknum );
+
+ /* If the lock doesn't exist yet, create it */
+ if( lock_table[ locknum ].bInit == FALSE )
+ {
+ /* Lock while we're changing the lock table */
+ _lock( _LOCKTAB_LOCK );
+
+ /* Check again if we've got a bit of a race on lock creation */
+ if( lock_table[ locknum ].bInit == FALSE )
+ {
+ DPRINT( ": creating lock #%d\n", locknum );
+ msvcrt_initialize_mlock( locknum );
+ }
+
+ /* Unlock ourselves */
+ _unlock( _LOCKTAB_LOCK );
+ }
+
+ EnterCriticalSection( &(lock_table[ locknum ].crit) );
+}
+
+/**********************************************************************
+ * _unlock (MSVCRT.@)
+ *
+ * NOTE: There is no error detection to make sure the lock exists and is acquired.
+ */
+void _unlock( int locknum )
+{
+ DPRINT( "(%d)\n", locknum );
+
+ LeaveCriticalSection( &(lock_table[ locknum ].crit) );
+}
+
reactos/lib/msvcrt/misc
diff -N stubs.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ stubs.c 13 Dec 2004 09:39:27 -0000 1.1.2.1
@@ -0,0 +1,10 @@
+#include "precomp.h"
+
+/*********************************************************************
+ * $I10_OUTPUT (MSVCRT.@)
+ * Function not really understood but needed to make the DLL work
+ */
+void MSVCRT_I10_OUTPUT(void)
+{
+ /* FIXME: This is probably data, not a function */
+}
reactos/include
diff -N accctrl.h
--- accctrl.h 10 Jul 2004 23:23:06 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,504 +0,0 @@
-/*
- * Copyright (C) 2002 Alexandre Julliard
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifdef __USE_W32API
-#include_next <accctrl.h>
-#else
-
-#ifndef __WINE_ACCCTRL_H
-#define __WINE_ACCCTRL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum _SE_OBJECT_TYPE
-{
- SE_UNKNOWN_OBJECT_TYPE = 0,
- SE_FILE_OBJECT,
- SE_SERVICE,
- SE_PRINTER,
- SE_REGISTRY_KEY,
- SE_LMSHARE,
- SE_KERNEL_OBJECT,
- SE_WINDOW_OBJECT,
- SE_DS_OBJECT,
- SE_DS_OBJECT_ALL,
- SE_PROVIDER_DEFINED_OBJECT,
- SE_WMIGUID_OBJECT,
- SE_REGISTRY_WOW64_32KEY
-} SE_OBJECT_TYPE;
-
-typedef struct _SI_OBJECT_INFO
-{
- DWORD dwFlags;
- HINSTANCE hInstance;
- LPWSTR pszServerName;
- LPWSTR pszObjectName;
- LPWSTR pszPageTitle;
- GUID guidObjectType;
-} SI_OBJECT_INFO, *PSI_OBJECT_INFO;
-
-typedef struct _SI_ACCESS
-{
- const GUID *pguid;
- ACCESS_MASK mask;
- LPCWSTR pszName;
- DWORD dwFlags;
-} SI_ACCESS, *PSI_ACCESS;
-
-typedef struct _SI_INHERIT_TYPE
-{
- const GUID *pguid;
- ULONG dwFlags;
- LPCWSTR pszName;
-} SI_INHERIT_TYPE, *PSI_INHERIT_TYPE;
-
-typedef enum _SI_PAGE_TYPE
-{
- SI_PAGE_PERM = 0,
- SI_PAGE_ADVPERM,
- SI_PAGE_AUDIT,
- SI_PAGE_OWNER
-} SI_PAGE_TYPE;
-
-typedef enum _TRUSTEE_TYPE
-{
- TRUSTEE_IS_UNKNOWN,
- TRUSTEE_IS_USER,
- TRUSTEE_IS_GROUP,
- TRUSTEE_IS_DOMAIN,
- TRUSTEE_IS_ALIAS,
- TRUSTEE_IS_WELL_KNOWN_GROUP,
- TRUSTEE_IS_DELETED,
- TRUSTEE_IS_INVALID,
- TRUSTEE_IS_COMPUTER
-} TRUSTEE_TYPE;
-
-typedef enum _TRUSTEE_FORM
-{
- TRUSTEE_IS_SID,
- TRUSTEE_IS_NAME,
- TRUSTEE_BAD_FORM,
- TRUSTEE_IS_OBJECTS_AND_SID,
- TRUSTEE_IS_OBJECTS_AND_NAME
-} TRUSTEE_FORM;
-
-typedef enum _MULTIPLE_TRUSTEE_OPERATION
-{
- NO_MULTIPLE_TRUSTEE,
- TRUSTEE_IS_IMPERSONATE,
-} MULTIPLE_TRUSTEE_OPERATION;
-
-typedef struct _OBJECTS_AND_SID
-{
- DWORD ObjectsPresent;
- GUID ObjectTypeGuid;
- GUID InheritedObjectTypeGuid;
- SID *pSid;
-} OBJECTS_AND_SID, *POBJECTS_AND_SID;
-
-typedef struct _OBJECTS_AND_NAME_A
-{
- DWORD ObjectsPresent;
- SE_OBJECT_TYPE ObjectType;
- LPSTR ObjectTypeName;
- LPSTR InheritedObjectTypeName;
- LPSTR ptstrName;
-} OBJECTS_AND_NAME_A, *POBJECTS_AND_NAME_A;
-
-typedef struct _OBJECTS_AND_NAME_W
-{
- DWORD ObjectsPresent;
- SE_OBJECT_TYPE ObjectType;
- LPWSTR ObjectTypeName;
- LPWSTR InheritedObjectTypeName;
- LPWSTR ptstrName;
-} OBJECTS_AND_NAME_W, *POBJECTS_AND_NAME_W;
-
-typedef_tident(OBJECTS_AND_NAME_)
-typedef_tident(POBJECTS_AND_NAME_)
-
-typedef struct _TRUSTEE_A
-{
- struct _TRUSTEE_A *pMultipleTrustee;
- MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;
- TRUSTEE_FORM TrusteeForm;
- TRUSTEE_TYPE TrusteeType;
- LPSTR ptstrName;
-} TRUSTEE_A, *PTRUSTEE_A, TRUSTEEA, *PTRUSTEEA;
-
-typedef struct _TRUSTEE_W
-{
- struct _TRUSTEE_W *pMultipleTrustee;
- MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;
- TRUSTEE_FORM TrusteeForm;
- TRUSTEE_TYPE TrusteeType;
- LPWSTR ptstrName;
-} TRUSTEE_W, *PTRUSTEE_W, TRUSTEEW, *PTRUSTEEW;
-
-typedef_tident(TRUSTEE_)
-typedef_tident(PTRUSTEE_)
-typedef_tident(TRUSTEE)
-typedef_tident(PTRUSTEE)
-
-typedef enum _ACCESS_MODE
-{
- NOT_USED_ACCESS = 0,
- GRANT_ACCESS,
- SET_ACCESS,
- DENY_ACCESS,
- REVOKE_ACCESS,
- SET_AUDIT_SUCCESS,
- SET_AUDIT_FAILURE
-} ACCESS_MODE;
-
-#define NO_INHERITANCE 0x0
-#define SUB_OBJECTS_ONLY_INHERIT 0x1
-#define SUB_CONTAINERS_ONLY_INHERIT 0x2
-#define SUB_CONTAINERS_AND_OBJECTS_INHERIT 0x3
-#define INHERIT_NO_PROPAGATE 0x4
-#define INHERIT_ONLY 0x8
-#define INHERITED_ACCESS_ENTRY 0x10
-#define INHERITED_PARENT 0x10000000
-#define INHERITED_GRANDPARENT 0x20000000
-
-typedef struct _EXPLICIT_ACCESS_A
-{
- DWORD grfAccessPermissions;
- ACCESS_MODE grfAccessMode;
- DWORD grfInheritance;
- TRUSTEE_A Trustee;
-} EXPLICIT_ACCESS_A, *PEXPLICIT_ACCESS_A, EXPLICIT_ACCESSA, *PEXPLICIT_ACCESSA;
-
-typedef struct _EXPLICIT_ACCESS_W
-{
- DWORD grfAccessPermissions;
- ACCESS_MODE grfAccessMode;
- DWORD grfInheritance;
- TRUSTEE_W Trustee;
-} EXPLICIT_ACCESS_W, *PEXPLICIT_ACCESS_W, EXPLICIT_ACCESSW, *PEXPLICIT_ACCESSW;
-
-typedef_tident(EXPLICIT_ACCESS_)
-typedef_tident(PEXPLICIT_ACCESS_)
-typedef_tident(EXPLICIT_ACCESS)
-typedef_tident(PEXPLICIT_ACCESS)
-
-typedef ULONG ACCESS_RIGHTS, *PACCESS_RIGHTS;
-typedef ULONG INHERIT_FLAGS, *PINHERIT_FLAGS;
-
-typedef struct _ACTRL_ACCESS_ENTRYA
-{
- TRUSTEE_A Trustee;
- ULONG fAccessFlags;
- ACCESS_RIGHTS Access;
- ACCESS_RIGHTS ProvSpecificAccess;
- INHERIT_FLAGS Inheritance;
- LPSTR lpInheritProperty;
-} ACTRL_ACCESS_ENTRYA, *PACTRL_ACCESS_ENTRYA;
-
-typedef struct _ACTRL_ACCESS_ENTRYW
-{
- TRUSTEE_W Trustee;
- ULONG fAccessFlags;
- ACCESS_RIGHTS Access;
- ACCESS_RIGHTS ProvSpecificAccess;
- INHERIT_FLAGS Inheritance;
- LPWSTR lpInheritProperty;
-} ACTRL_ACCESS_ENTRYW, *PACTRL_ACCESS_ENTRYW;
-
-typedef_tident(ACTRL_ACCESS_ENTRY)
-typedef_tident(PACTRL_ACCESS_ENTRY)
-
-
-typedef struct _ACTRL_ACCESS_ENTRY_LISTA
-{
- ULONG cEntries;
- ACTRL_ACCESS_ENTRYA *pAccessList;
-} ACTRL_ACCESS_ENTRY_LISTA, *PACTRL_ACCESS_ENTRY_LISTA;
-
-typedef struct _ACTRL_ACCESS_ENTRY_LISTW
-{
- ULONG cEntries;
- ACTRL_ACCESS_ENTRYW *pAccessList;
-} ACTRL_ACCESS_ENTRY_LISTW, *PACTRL_ACCESS_ENTRY_LISTW;
-
-typedef_tident(ACTRL_ACCESS_ENTRY_LIST)
-typedef_tident(PACTRL_ACCESS_ENTRY_LIST)
-
-typedef struct _ACTRL_PROPERTY_ENTRYA
-{
- LPSTR lpProperty;
- PACTRL_ACCESS_ENTRY_LISTA pAccessEntryList;
- ULONG fListFlags;
-} ACTRL_PROPERTY_ENTRYA, *PACTRL_PROPERTY_ENTRYA;
-
-typedef struct _ACTRL_PROPERTY_ENTRYW
-{
- LPWSTR lpProperty;
- PACTRL_ACCESS_ENTRY_LISTW pAccessEntryList;
- ULONG fListFlags;
-} ACTRL_PROPERTY_ENTRYW, *PACTRL_PROPERTY_ENTRYW;
-
-typedef_tident(ACTRL_PROPERTY_ENTRY)
-typedef_tident(PACTRL_PROPERTY_ENTRY)
-
-typedef struct _ACTRL_ALISTA
-{
- ULONG cEntries;
- PACTRL_PROPERTY_ENTRYA pPropertyAccessList;
-} ACTRL_ACCESSA, *PACTRL_ACCESSA, ACTRL_AUDITA, *PACTRL_AUDITA;
-
-typedef struct _ACTRL_ALISTW
-{
- ULONG cEntries;
- PACTRL_PROPERTY_ENTRYW pPropertyAccessList;
-} ACTRL_ACCESSW, *PACTRL_ACCESSW, ACTRL_AUDITW, *PACTRL_AUDITW;
-
-typedef_tident(ACTRL_ACCESS)
-typedef_tident(PACTRL_ACCESS)
-typedef_tident(ACTRL_AUDIT)
-typedef_tident(PACTRL_AUDIT)
-
-#define TRUSTEE_ACCESS_ALLOWED 0x00000001
-#define TRUSTEE_ACCESS_READ 0x00000002
-#define TRUSTEE_ACCESS_WRITE 0x00000004
-
-#define TRUSTEE_ACCESS_EXPLICIT 0x00000001
-#define TRUSTEE_ACCESS_READ_WRITE (TRUSTEE_ACCESS_READ|TRUSTEE_ACCESS_WRITE)
-#define TRUSTEE_ACCESS_ALL 0xFFFFFFFF
-
-typedef struct _TRUSTEE_ACCESSA
-{
- LPSTR lpProperty;
- ACCESS_RIGHTS Access;
- ULONG fAccessFlags;
- ULONG fReturnedAccess;
-} TRUSTEE_ACCESSA, *PTRUSTEE_ACCESSA;
-
-typedef struct _TRUSTEE_ACCESSW
-{
- LPWSTR lpProperty;
- ACCESS_RIGHTS Access;
- ULONG fAccessFlags;
- ULONG fReturnedAccess;
-} TRUSTEE_ACCESSW, *PTRUSTEE_ACCESSW;
-
-typedef_tident(TRUSTEE_ACCESS)
-typedef_tident(PTRUSTEE_ACCESS)
-
-#define ACTRL_RESERVED 0x00000000
-#define ACTRL_PERM_1 0x00000001
-#define ACTRL_PERM_2 0x00000002
-#define ACTRL_PERM_3 0x00000004
-#define ACTRL_PERM_4 0x00000008
-#define ACTRL_PERM_5 0x00000010
-#define ACTRL_PERM_6 0x00000020
-#define ACTRL_PERM_7 0x00000040
-#define ACTRL_PERM_8 0x00000080
-#define ACTRL_PERM_9 0x00000100
-#define ACTRL_PERM_10 0x00000200
-#define ACTRL_PERM_11 0x00000400
-#define ACTRL_PERM_12 0x00000800
-#define ACTRL_PERM_13 0x00001000
-#define ACTRL_PERM_14 0x00002000
-#define ACTRL_PERM_15 0x00004000
-#define ACTRL_PERM_16 0x00008000
-#define ACTRL_PERM_17 0x00010000
-#define ACTRL_PERM_18 0x00020000
-#define ACTRL_PERM_19 0x00040000
-#define ACTRL_PERM_20 0x00080000
-
-#define ACTRL_ACCESS_ALLOWED 0x00000001
-#define ACTRL_ACCESS_DENIED 0x00000002
-#define ACTRL_AUDIT_SUCCESS 0x00000004
-#define ACTRL_AUDIT_FAILURE 0x00000008
-
-#define ACTRL_ACCESS_PROTECTED 0x00000001
-
-#define ACTRL_SYSTEM_ACCESS 0x04000000
-#define ACTRL_DELETE 0x08000000
-#define ACTRL_READ_CONTROL 0x10000000
-#define ACTRL_CHANGE_ACCESS 0x20000000
-#define ACTRL_CHANGE_OWNER 0x40000000
-#define ACTRL_SYNCHRONIZE 0x80000000
-#define ACTRL_STD_RIGHTS_ALL 0xf8000000
-#define ACTRL_STD_RIGHT_REQUIRED (ACTRL_STD_RIGHTS_ALL & ~ACTRL_SYNCHRONIZE)
-
-#define ACTRL_DS_OPEN ACTRL_RESERVED
-#define ACTRL_DS_CREATE_CHILD ACTRL_PERM_1
-#define ACTRL_DS_DELETE_CHILD ACTRL_PERM_2
-#define ACTRL_DS_LIST ACTRL_PERM_3
-#define ACTRL_DS_SELF ACTRL_PERM_4
-#define ACTRL_DS_READ_PROP ACTRL_PERM_5
-#define ACTRL_DS_WRITE_PROP ACTRL_PERM_6
-#define ACTRL_DS_DELETE_TREE ACTRL_PERM_7
-#define ACTRL_DS_LIST_OBJECT ACTRL_PERM_8
-#define ACTRL_DS_CONTROL_ACCESS ACTRL_PERM_9
-
-#define ACTRL_FILE_READ ACTRL_PERM_1
-#define ACTRL_FILE_WRITE ACTRL_PERM_2
-#define ACTRL_FILE_APPEND ACTRL_PERM_3
-#define ACTRL_FILE_READ_PROP ACTRL_PERM_4
-#define ACTRL_FILE_WRITE_PROP ACTRL_PERM_5
-#define ACTRL_FILE_EXECUTE ACTRL_PERM_6
-#define ACTRL_FILE_READ_ATTRIB ACTRL_PERM_8
-#define ACTRL_FILE_WRITE_ATTRIB ACTRL_PERM_9
-#define ACTRL_FILE_CREATE_PIPE ACTRL_PERM_10
-#define ACTRL_DIR_LIST ACTRL_PERM_1
-#define ACTRL_DIR_CREATE_OBJECT ACTRL_PERM_2
-#define ACTRL_DIR_CREATE_CHILD ACTRL_PERM_3
-#define ACTRL_DIR_DELETE_CHILD ACTRL_PERM_7
-#define ACTRL_DIR_TRAVERSE ACTRL_PERM_6
-#define ACTRL_KERNEL_TERMINATE ACTRL_PERM_1
-#define ACTRL_KERNEL_THREAD ACTRL_PERM_2
-#define ACTRL_KERNEL_VM ACTRL_PERM_3
-#define ACTRL_KERNEL_VM_READ ACTRL_PERM_4
-#define ACTRL_KERNEL_VM_WRITE ACTRL_PERM_5
-#define ACTRL_KERNEL_DUP_HANDLE ACTRL_PERM_6
-#define ACTRL_KERNEL_PROCESS ACTRL_PERM_7
-#define ACTRL_KERNEL_SET_INFO ACTRL_PERM_8
-#define ACTRL_KERNEL_GET_INFO ACTRL_PERM_9
-#define ACTRL_KERNEL_CONTROL ACTRL_PERM_10
-#define ACTRL_KERNEL_ALERT ACTRL_PERM_11
-#define ACTRL_KERNEL_GET_CONTEXT ACTRL_PERM_12
-#define ACTRL_KERNEL_SET_CONTEXT ACTRL_PERM_13
-#define ACTRL_KERNEL_TOKEN ACTRL_PERM_14
-#define ACTRL_KERNEL_IMPERSONATE ACTRL_PERM_15
-#define ACTRL_KERNEL_DIMPERSONATE ACTRL_PERM_16
-#define ACTRL_PRINT_SADMIN ACTRL_PERM_1
-#define ACTRL_PRINT_SLIST ACTRL_PERM_2
-#define ACTRL_PRINT_PADMIN ACTRL_PERM_3
-#define ACTRL_PRINT_PUSE ACTRL_PERM_4
-#define ACTRL_PRINT_JADMIN ACTRL_PERM_5
-#define ACTRL_SVC_GET_INFO ACTRL_PERM_1
-#define ACTRL_SVC_SET_INFO ACTRL_PERM_2
-#define ACTRL_SVC_STATUS ACTRL_PERM_3
-#define ACTRL_SVC_LIST ACTRL_PERM_4
-#define ACTRL_SVC_START ACTRL_PERM_5
-#define ACTRL_SVC_STOP ACTRL_PERM_6
-#define ACTRL_SVC_PAUSE ACTRL_PERM_7
-#define ACTRL_SVC_INTERROGATE ACTRL_PERM_8
-#define ACTRL_SVC_UCONTROL ACTRL_PERM_9
-#define ACTRL_REG_QUERY ACTRL_PERM_1
-#define ACTRL_REG_SET ACTRL_PERM_2
-#define ACTRL_REG_CREATE_CHILD ACTRL_PERM_3
-#define ACTRL_REG_LIST ACTRL_PERM_4
-#define ACTRL_REG_NOTIFY ACTRL_PERM_5
-#define ACTRL_REG_LINK ACTRL_PERM_6
-#define ACTRL_WIN_CLIPBRD ACTRL_PERM_1
-#define ACTRL_WIN_GLOBAL_ATOMS ACTRL_PERM_2
-#define ACTRL_WIN_CREATE ACTRL_PERM_3
-#define ACTRL_WIN_LIST_DESK ACTRL_PERM_4
-#define ACTRL_WIN_LIST ACTRL_PERM_5
-#define ACTRL_WIN_READ_ATTRIBS ACTRL_PERM_6
-#define ACTRL_WIN_WRITE_ATTRIBS ACTRL_PERM_7
-#define ACTRL_WIN_SCREEN ACTRL_PERM_8
-#define ACTRL_WIN_EXIT ACTRL_PERM_9
-
-#define ACTRL_ACCESS_NO_OPTIONS 0x00000000
-#define ACTRL_ACCESS_SUPPORTS_OBJECT_ENTRIES 0x00000001
-
-typedef struct _ACTRL_OVERLAPPED
-{
- union {
- PVOID Provider;
- ULONG Reserved1;
- } DUMMYUNIONNAME;
- ULONG Reserved2;
- HANDLE hEvent;
-} ACTRL_OVERLAPPED, *PACTRL_OVERLAPPED;
-
-typedef struct _ACTRL_ACCESS_INFOA
-{
- ULONG fAccessPermission;
- LPSTR lpAccessPermissionName;
-} ACTRL_ACCESS_INFOA, *PACTRL_ACCESS_INFOA;
-
-typedef struct _ACTRL_ACCESS_INFOW
-{
- ULONG fAccessPermission;
- LPWSTR lpAccessPermissionName;
-} ACTRL_ACCESS_INFOW, *PACTRL_ACCESS_INFOW;
-
-typedef_tident(ACTRL_ACCESS_INFO)
-typedef_tident(PACTRL_ACCESS_INFO)
-
-typedef struct _ACTRL_CONTROL_INFOA
-{
- LPSTR lpControlId;
- LPSTR lpControlName;
-} ACTRL_CONTROL_INFOA, *PACTRL_CONTROL_INFOA;
-
-typedef struct _ACTRL_CONTROL_INFOW
-{
- LPWSTR lpControlId;
- LPWSTR lpControlName;
-} ACTRL_CONTROL_INFOW, *PACTRL_CONTROL_INFOW;
-
-typedef_tident(ACTRL_CONTROL_INFO)
-typedef_tident(PACTRL_CONTROL_INFO)
-
-typedef enum _PROGRESS_INVOKE_SETTING {
- ProgressInvokeNever = 1,
- ProgressInvokeEveryObject,
- ProgressInvokeOnError,
- ProgressCancelOperation,
- ProgressRetryOperation
-} PROG_INVOKE_SETTING, *PPROG_INVOKE_SETTING;
-
-typedef struct _INHERITED_FROMA
-{
- LONG GenerationGap;
- LPSTR AncestorName;
-} INHERITED_FROMA, *PINHERITED_FROMA;
-
-typedef struct _INHERITED_FROMW
-{
- LONG GenerationGap;
- LPWSTR AncestorName;
-} INHERITED_FROMW, *PINHERITED_FROMW;
-
-typedef_tident(INHERITED_FROM)
-typedef_tident(PINHERITED_FROM)
-
-#define ACCCTRL_DEFAULT_PROVIDERA "Windows NT Access Provider"
-#define ACCCTRL_DEFAULT_PROVIDERW L"Windows NT Access Provider"
-
-#ifndef _DISABLE_TIDENTS
-#ifdef UNICODE
-#define ACCCTRL_DEFAULT_PROVIDER ACCCTRL_DEFAULT_PROVIDERW
-#else
-#define ACCCTRL_DEFAULT_PROVIDER ACCCTRL_DEFAULT_PROVIDERA
-#endif
-#endif
-
-typedef struct _FN_OBJECT_MGR_FUNCTIONS
-{
- ULONG Placeholder;
-} FN_OBJECT_MGR_FUNCTS, *PFN_OBJECT_MGR_FUNCTS;
-
-#define AccFree LocalFree
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __WINE_ACCCTRL_H */
-
-#endif /* __USE_W32API */
CVSspam 0.2.8