reactos/subsystems/win32/win32k/ntuser/clipboard.c

1204 lines
29 KiB
C
Raw Normal View History

/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: Clipboard routines
* FILE: subsys/win32k/ntuser/clipboard.c
* PROGRAMER: Filip Navara <xnavara@volny.cz>
* Pablo Borobia <pborobia@gmail.com>
*/
#include <win32k.h>
#define NDEBUG
#include <debug.h>
#define DATA_DELAYED_RENDER 0
#define DATA_SYNTHESIZED_RENDER -1
PTHREADINFO ClipboardThread;
PTHREADINFO ClipboardOwnerThread;
PWINDOW_OBJECT ClipboardWindow;
PWINDOW_OBJECT ClipboardViewerWindow;
PWINDOW_OBJECT ClipboardOwnerWindow;
BOOL sendDrawClipboardMsg;
BOOL recentlySetClipboard;
BOOL delayedRender;
UINT lastEnumClipboardFormats;
DWORD ClipboardSequenceNumber = 0;
PCLIPBOARDCHAINELEMENT WindowsChain = NULL;
PCLIPBOARDELEMENT ClipboardData = NULL;
PCHAR synthesizedData;
DWORD synthesizedDataSize;
/*==============================================================*/
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
/* return the pointer to the prev window of the finded window,
if NULL does not exists in the chain */
PCLIPBOARDCHAINELEMENT FASTCALL
IntIsWindowInChain(PWINDOW_OBJECT window)
{
PCLIPBOARDCHAINELEMENT wce = WindowsChain;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
while (wce)
{
if (wce->window == window)
{
break;
}
wce = wce->next;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
}
return wce;
}
VOID FASTCALL printChain(VOID)
{
/*test*/
PCLIPBOARDCHAINELEMENT wce2 = WindowsChain;
while (wce2)
{
DPRINT1("chain: %p\n", wce2->window->hSelf);
wce2 = wce2->next;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
}
}
/* the new window always have to be the first in the chain */
PCLIPBOARDCHAINELEMENT FASTCALL
IntAddWindowToChain(PWINDOW_OBJECT window)
{
PCLIPBOARDCHAINELEMENT wce = NULL;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (!IntIsWindowInChain(window))
{
wce = WindowsChain;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
wce = ExAllocatePool(PagedPool, sizeof(CLIPBOARDCHAINELEMENT));
if (wce == NULL)
{
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
goto exit_addChain;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
}
wce->window = window;
wce->next = WindowsChain;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
WindowsChain = wce;
//printChain();
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
exit_addChain:
/* return the next window to beremoved later */
return wce;
}
PCLIPBOARDCHAINELEMENT FASTCALL
IntRemoveWindowFromChain(PWINDOW_OBJECT window)
{
PCLIPBOARDCHAINELEMENT wce = WindowsChain;
PCLIPBOARDCHAINELEMENT *link = &WindowsChain;
if (IntIsWindowInChain(window))
{
while (wce != NULL)
{
if (wce->window == window)
{
*link = wce->next;
break;
}
link = &wce->next;
wce = wce->next;
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
//printChain();
return wce;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
}
else
{
return NULL;
}
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
/*==============================================================*/
/* if format exists, returns a non zero value (pointing to format object) */
PCLIPBOARDELEMENT FASTCALL
intIsFormatAvailable(UINT format)
{
PCLIPBOARDELEMENT ret = NULL;
PCLIPBOARDELEMENT ce = ClipboardData;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
while(ce)
{
if (ce->format == format)
{
ret = ce;
break;
}
ce = ce->next;
}
return ret;
}
/* counts how many distinct format were are in the clipboard */
DWORD FASTCALL
IntCountClipboardFormats(VOID)
{
DWORD ret = 0;
PCLIPBOARDELEMENT ce = ClipboardData;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
while(ce)
{
ret++;
ce = ce->next;
}
return ret;
}
/* adds a new format and data to the clipboard */
PCLIPBOARDELEMENT FASTCALL
intAddFormatedData(UINT format, HANDLE hData, DWORD size)
{
PCLIPBOARDELEMENT ce = NULL;
ce = ExAllocatePool(PagedPool, sizeof(CLIPBOARDELEMENT));
if (ce == NULL)
{
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
}
else
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
{
ce->format = format;
ce->size = size;
ce->hData = hData;
ce->next = ClipboardData;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
ClipboardData = ce;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
IntIncrementSequenceNumber();
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
return ce;
}
/* removes a format and its data from the clipboard */
BOOL FASTCALL
intRemoveFormatedData(UINT format)
{
BOOL ret = FALSE;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
PCLIPBOARDELEMENT ce = ClipboardData;
PCLIPBOARDELEMENT *link = &ClipboardData;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (intIsFormatAvailable(format))
{
while (ce != NULL)
{
if (ce->format == format)
{
*link = ce->next;
break;
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
link = &ce->next;
ce = ce->next;
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (ce->hData)
{
ExFreePool(ce->hData);
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
ExFreePool(ce);
ret = TRUE;
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
return ret;
}
VOID FASTCALL
IntEmptyClipboardData(VOID)
{
PCLIPBOARDELEMENT ce = ClipboardData;
PCLIPBOARDELEMENT tmp;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
while(ce)
{
tmp = ce->next;
if (ce->hData)
{
ExFreePool(ce->hData);
}
ExFreePool(ce);
ce = tmp;
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
ClipboardData = NULL;
}
/*==============================================================*/
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
HANDLE FASTCALL
renderBITMAPfromDIB(LPBYTE hDIB)
{
HDC hdc;
HBITMAP hbitmap;
unsigned int offset;
BITMAPINFOHEADER *ih;
//hdc = UserGetDCEx(NULL, NULL, DCX_USESTYLE);
hdc = UserGetDCEx(ClipboardWindow, NULL, DCX_USESTYLE);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
ih = (BITMAPINFOHEADER *)hDIB;
offset = sizeof(BITMAPINFOHEADER) + ((ih->biBitCount <= 8) ? (sizeof(RGBQUAD) * (1 << ih->biBitCount)) : 0);
hbitmap = NtGdiCreateDIBitmapInternal(hdc,
ih->biWidth,
ih->biHeight,
CBM_INIT,
(LPBYTE)ih+offset,
(LPBITMAPINFO)ih,
DIB_RGB_COLORS,
ih->biBitCount,
ih->biSizeImage,
0,
0);
//UserReleaseDC(NULL, hdc, FALSE);
UserReleaseDC(ClipboardWindow, hdc, FALSE);
return hbitmap;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
}
BOOL FASTCALL
canSinthesize(UINT format)
{
BOOL ret = FALSE;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
switch(format)
{
case CF_BITMAP:
case CF_METAFILEPICT:
ret = TRUE;
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
return ret;
}
/* returns the size of the sinthesized data */
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
DWORD FASTCALL
synthesizeData(UINT format)
{
DWORD ret = 0;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
synthesizedData = NULL;
synthesizedDataSize = 0;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (!canSinthesize(format))
{
return 0;
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
switch (format)
{
case CF_BITMAP:
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
break;
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
case CF_METAFILEPICT:
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
break;
}
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
ret = 1;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
return ret;
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
VOID FASTCALL
freeSynthesizedData(VOID)
{
ExFreePool(synthesizedData);
}
/*==============================================================*/
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
BOOL FASTCALL
intIsClipboardOpenByMe(VOID)
{
/* check if we open the clipboard */
if (ClipboardThread && ClipboardThread == PsGetCurrentThreadWin32Thread())
{
/* yes, we got a thread and its the same that opens the clipboard */
return TRUE;
}
/* will fail if not thread (closed) or not open by me*/
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
return FALSE;
}
/* IntClipboardFreeWindow it's called when a window was destroyed */
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
VOID FASTCALL
IntClipboardFreeWindow(PWINDOW_OBJECT window)
{
/* called from co_UserFreeWindow in window.c */
/* check if clipboard is not locked by this window, if yes, unlock it */
if (ClipboardThread == PsGetCurrentThreadWin32Thread())
{
/* the window that opens the clipboard was destroyed */
ClipboardThread = NULL;
ClipboardWindow = NULL;
//TODO: free clipboard
}
if (window == ClipboardOwnerWindow)
{
/* the owner window was destroyed */
ClipboardOwnerWindow = NULL;
ClipboardOwnerThread = NULL;
}
/* remove window from window chain */
if (IntIsWindowInChain(window))
{
PCLIPBOARDCHAINELEMENT w = IntRemoveWindowFromChain(window);
if (w)
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
ExFreePool(w);
}
}
}
BOOL APIENTRY
NtUserOpenClipboard(HWND hWnd, DWORD Unknown1)
{
PWINDOW_OBJECT Window;
BOOL ret = FALSE;
UserEnterExclusive();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
sendDrawClipboardMsg = FALSE;
recentlySetClipboard = FALSE;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (ClipboardThread)
{
/* clipboard is already open */
if (ClipboardThread == PsGetCurrentThreadWin32Thread())
{
if (ClipboardOwnerWindow)
{
if (ClipboardOwnerWindow->hSelf == hWnd)
{
ret = TRUE;
}
}
else
{
if (hWnd == NULL)
{
ret = TRUE;
}
}
}
}
else
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (hWnd != NULL)
{
Window = UserGetWindowObject(hWnd);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (Window != NULL)
{
ClipboardWindow = Window;
ClipboardThread = PsGetCurrentThreadWin32Thread();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
ret = TRUE;
}
else
{
ClipboardWindow = NULL;
ClipboardThread = NULL;
ClipboardOwnerWindow = NULL;
ClipboardOwnerThread = NULL;
}
}
else
{
ClipboardWindow = NULL;
ClipboardThread = PsGetCurrentThreadWin32Thread();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
ret = TRUE;
}
}
UserLeave();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
return ret;
}
BOOL APIENTRY
NtUserCloseClipboard(VOID)
{
BOOL ret = FALSE;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
UserEnterExclusive();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (intIsClipboardOpenByMe())
{
ClipboardWindow = NULL;
ClipboardThread = NULL;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
ret = TRUE;
}
else
{
SetLastWin32Error(ERROR_CLIPBOARD_NOT_OPEN);
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
recentlySetClipboard = FALSE;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
UserLeave();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (sendDrawClipboardMsg && WindowsChain)
{
/* only send message to the first window in the chain, then they'll do the chain */
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
/* commented because it makes a crash in co_MsqSendMessage
ASSERT(WindowsChain->window);
ASSERT(WindowsChain->window->hSelf);
DPRINT1("Clipboard: sending WM_DRAWCLIPBOARD to %p\n", WindowsChain->window->hSelf);
co_IntSendMessage(WindowsChain->window->hSelf, WM_DRAWCLIPBOARD, 0, 0);
*/
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
return ret;
}
HWND APIENTRY
NtUserGetOpenClipboardWindow(VOID)
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
HWND ret = NULL;
UserEnterShared();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (ClipboardWindow)
{
ret = ClipboardWindow->hSelf;
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
UserLeave();
return ret;
}
BOOL APIENTRY
NtUserChangeClipboardChain(HWND hWndRemove, HWND hWndNewNext)
{
BOOL ret = FALSE;
PCLIPBOARDCHAINELEMENT w = NULL;
PWINDOW_OBJECT removeWindow;
UserEnterExclusive();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
removeWindow = UserGetWindowObject(hWndRemove);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (removeWindow)
{
if ((ret = !!IntIsWindowInChain(removeWindow)))
{
w = IntRemoveWindowFromChain(removeWindow);
if (w)
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
ExFreePool(w);
}
}
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (ret && WindowsChain)
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
// only send message to the first window in the chain,
// then they do the chain
/* WindowsChain->window may be NULL */
LPARAM lparam = WindowsChain->window == NULL ? 0 : (LPARAM)WindowsChain->window->hSelf;
DPRINT1("Message: WM_CHANGECBCHAIN to %p", WindowsChain->window->hSelf);
co_IntSendMessage(WindowsChain->window->hSelf, WM_CHANGECBCHAIN, (WPARAM)hWndRemove, lparam);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
}
UserLeave();
return ret;
}
DWORD APIENTRY
NtUserCountClipboardFormats(VOID)
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
DWORD ret = 0;
if (ClipboardData)
{
ret = IntCountClipboardFormats();
}
return ret;
}
DWORD APIENTRY
NtUserEmptyClipboard(VOID)
{
BOOL ret = FALSE;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
UserEnterExclusive();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (intIsClipboardOpenByMe())
{
if (ClipboardData)
{
IntEmptyClipboardData();
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
ClipboardOwnerWindow = ClipboardWindow;
ClipboardOwnerThread = ClipboardThread;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
IntIncrementSequenceNumber();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
ret = TRUE;
}
else
{
SetLastWin32Error(ERROR_CLIPBOARD_NOT_OPEN);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
}
if (ret && ClipboardOwnerWindow)
{
DPRINT("Clipboard: WM_DESTROYCLIPBOARD to %p", ClipboardOwnerWindow->hSelf);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
co_IntSendMessage( ClipboardOwnerWindow->hSelf, WM_DESTROYCLIPBOARD, 0, 0);
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
UserLeave();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
return ret;
}
HANDLE APIENTRY
NtUserGetClipboardData(UINT uFormat, PVOID pBuffer)
{
HANDLE ret = NULL;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
UserEnterShared();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (intIsClipboardOpenByMe())
{
/* when Unknown1 is zero, we returns to user32 the data size */
if (!pBuffer)
{
PCLIPBOARDELEMENT data = intIsFormatAvailable(uFormat);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (data)
{
/* format exists in clipboard */
if (data->size == DATA_DELAYED_RENDER)
{
/* tell owner what data needs to be rendered */
if (ClipboardOwnerWindow)
{
ASSERT(ClipboardOwnerWindow->hSelf);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
co_IntSendMessage(ClipboardOwnerWindow->hSelf, WM_RENDERFORMAT, (WPARAM)uFormat, 0);
data = intIsFormatAvailable(uFormat);
ASSERT(data->size);
ret = (HANDLE)(ULONG_PTR)data->size;
}
}
else
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
{
if (data->size == DATA_SYNTHESIZED_RENDER)
{
data->size = synthesizeData(uFormat);
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
}
ret = (HANDLE)(ULONG_PTR)data->size;
}
else
{
/* there is no data in this format */
//ret = (HANDLE)FALSE;
}
}
else
{
PCLIPBOARDELEMENT data = intIsFormatAvailable(uFormat);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (data)
{
if (data->size == DATA_DELAYED_RENDER)
{
// we rendered it in 1st call of getclipboard data
}
else
{
if (data->size == DATA_SYNTHESIZED_RENDER)
{
if (uFormat == CF_BITMAP)
{
/* BITMAP & METAFILEs returns a GDI handle */
PCLIPBOARDELEMENT data = intIsFormatAvailable(CF_DIB);
if (data)
{
ret = renderBITMAPfromDIB(data->hData);
}
}
else
{
ret = (HANDLE)pBuffer;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
_SEH2_TRY
{
ProbeForWrite(pBuffer, synthesizedDataSize, 1);
memcpy(pBuffer, (PCHAR)synthesizedData, synthesizedDataSize);
}
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
ret = NULL;
}
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
_SEH2_END
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
freeSynthesizedData();
}
}
else
{
ret = (HANDLE)pBuffer;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
_SEH2_TRY
{
ProbeForWrite(pBuffer, data->size, 1);
memcpy(pBuffer, (PCHAR)data->hData, data->size);
}
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
ret = NULL;
}
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
_SEH2_END
}
}
}
}
}
else
{
SetLastWin32Error(ERROR_CLIPBOARD_NOT_OPEN);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
}
UserLeave();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
return ret;
}
INT APIENTRY
NtUserGetClipboardFormatName(UINT format, PUNICODE_STRING FormatName,
INT cchMaxCount)
{
UNICODE_STRING sFormatName;
INT ret = 0;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
/* if the format is built-in we fail */
if (format < 0xc000)
{
/* registetrated formats are >= 0xc000 */
return 0;
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if((cchMaxCount < 1) || !FormatName)
{
SetLastWin32Error(ERROR_INVALID_PARAMETER);
return 0;
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
_SEH2_TRY
{
ProbeForWriteUnicodeString(FormatName);
sFormatName = *(volatile UNICODE_STRING *)FormatName;
ProbeForWrite(sFormatName.Buffer, sFormatName.MaximumLength, 1);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
ret = IntGetAtomName((RTL_ATOM)format, sFormatName.Buffer, cchMaxCount * sizeof(WCHAR));
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (ret >= 0)
{
ret = ret / sizeof(WCHAR);
sFormatName.Length = ret;
}
else
{
ret = 0;
}
}
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
SetLastNtError(_SEH2_GetExceptionCode());
}
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
_SEH2_END;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
return ret;
}
HWND APIENTRY
NtUserGetClipboardOwner(VOID)
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
HWND ret = NULL;
UserEnterShared();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (ClipboardOwnerWindow)
{
ret = ClipboardOwnerWindow->hSelf;
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
UserLeave();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
return ret;
}
HWND APIENTRY
NtUserGetClipboardViewer(VOID)
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
HWND ret = NULL;
UserEnterShared();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (WindowsChain)
{
ret = WindowsChain->window->hSelf;
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
UserLeave();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
return ret;
}
INT APIENTRY
NtUserGetPriorityClipboardFormat(UINT *paFormatPriorityList, INT cFormats)
{
INT i;
UINT *priorityList;
INT ret = 0;
UserEnterExclusive();
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
_SEH2_TRY
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (IntCountClipboardFormats() == 0)
{
ret = 0;
}
else
{
ProbeForRead(paFormatPriorityList, cFormats, sizeof(UINT));
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
priorityList = paFormatPriorityList;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
ret = -1;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
for (i = 0; i < cFormats; i++)
{
if (intIsFormatAvailable(priorityList[i]))
{
ret = priorityList[i];
break;
}
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
}
}
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
SetLastNtError(_SEH2_GetExceptionCode());
}
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
_SEH2_END;
UserLeave();
return ret;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
}
BOOL APIENTRY
NtUserIsClipboardFormatAvailable(UINT format)
{
BOOL ret = FALSE;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
UserEnterShared();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
ret = (intIsFormatAvailable(format) != NULL);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
UserLeave();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
return ret;
}
HANDLE APIENTRY
NtUserSetClipboardData(UINT uFormat, HANDLE hMem, DWORD size)
{
HANDLE hCBData = NULL;
UNICODE_STRING unicodeString;
OEM_STRING oemString;
ANSI_STRING ansiString;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
UserEnterExclusive();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
/* to place data here the we need to be the owner */
if (ClipboardOwnerThread == PsGetCurrentThreadWin32Thread())
{
PCLIPBOARDELEMENT data = intIsFormatAvailable(uFormat);
if (data)
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (data->size == DATA_DELAYED_RENDER)
{
intRemoveFormatedData(uFormat);
}
else
{
// we already have this format on clipboard
goto exit_setCB;
}
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (hMem)
{
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
_SEH2_TRY
{
ProbeForRead(hMem, size, 1);
}
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
SetLastNtError(_SEH2_GetExceptionCode());
_SEH2_YIELD(goto exit_setCB);
}
modified include/reactos/probe.h Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 modified ntoskrnl/include/internal/mm.h gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock modified ntoskrnl/include/internal/probe.h Cleaning up after TSVN's buggy "apply patch" modified subsystems/win32/win32k/ntuser/message.c Silence a gcc 4.3.2 warning (possibly incorrectly) modified dll/directx/ddraw/ddraw.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/setupapi/setupapi.rbuild modified dll/win32/syssetup/syssetup.rbuild modified dll/win32/user32/user32.rbuild modified drivers/input/kbdclass/kbdclass.rbuild modified drivers/input/mouclass/mouclass.rbuild modified drivers/network/afd/afd.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/rtl/rtl.rbuild modified subsystems/win32/win32k/win32k.rbuild modified subsystems/win32/win32k/objects/gdiobj.c gcc 4.1.3 workarounds. See embedded comments modified base/services/eventlog/eventlog.h modified dll/win32/advapi32/advapi32.h Removed superfluous includes of pseh/pseh.h modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/rosdraw.h modified dll/directx/ddraw/Surface/surface_main.c ddraw migrated to PSEH 2.0 modified dll/win32/gdi32/include/precomp.h modified dll/win32/gdi32/misc/misc.c modified dll/win32/gdi32/objects/bitmap.c gdi32 migrated to PSEH 2.0 modified dll/win32/kernel32/except/except.c modified dll/win32/kernel32/file/find.c modified dll/win32/kernel32/k32.h modified dll/win32/kernel32/mem/isbad.c modified dll/win32/kernel32/misc/console.c modified dll/win32/kernel32/process/procsup.c modified dll/win32/kernel32/string/lstring.c modified dll/win32/kernel32/thread/thread.c kernel32 migrated to PSEH 2.0 modified dll/win32/psapi/precomp.h modified dll/win32/psapi/psapi.c psapi migrated to PSEH 2.0 modified dll/win32/setupapi/cfgmgr.c modified dll/win32/setupapi/setupapi_private.h setupapi migrated to PSEH 2.0 modified dll/win32/syssetup/wizard.c syssetup migrated to PSEH 2.0 modified dll/win32/user32/include/user32.h modified dll/win32/user32/windows/class.c modified dll/win32/user32/windows/text.c modified dll/win32/user32/windows/window.c user32 migrated to PSEH 2.0 modified drivers/input/kbdclass/kbdclass.c modified drivers/input/kbdclass/kbdclass.h kbdclass migrated to PSEH 2.0 modified drivers/input/mouclass/mouclass.c modified drivers/input/mouclass/mouclass.h mouclass migrated to PSEH 2.0 modified drivers/network/afd/afd/info.c modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified drivers/network/afd/afd/tdiconn.c afd migrated to PSEH 2.0 modified drivers/network/lan/lan/lan.c lan migrated to PSEH 2.0 modified drivers/network/tcpip/tcpip/dispatch.c tcpip migrated to PSEH 2.0 modified lib/rtl/debug.c modified lib/rtl/res.c modified lib/rtl/rtl.h modified lib/rtl/unicode.c modified lib/rtl/workitem.c rtl migrated to PSEH 2.0 modified ntoskrnl/include/precomp.h ntoskrnl migrated to PSEH 2.0 modified subsystems/csr/csrsrv/api.c csrsrv migrated to PSEH 2.0 modified subsystems/win32/win32k/eng/bitblt.c modified subsystems/win32/win32k/eng/mem.c modified subsystems/win32/win32k/include/mmcopy.h modified subsystems/win32/win32k/misc/copy.c modified subsystems/win32/win32k/ntuser/callback.c modified subsystems/win32/win32k/ntuser/class.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/cursoricon.c modified subsystems/win32/win32k/ntuser/display.c modified subsystems/win32/win32k/ntuser/hook.c modified subsystems/win32/win32k/ntuser/input.c modified subsystems/win32/win32k/ntuser/kbdlayout.c modified subsystems/win32/win32k/ntuser/menu.c modified subsystems/win32/win32k/ntuser/misc.c modified subsystems/win32/win32k/ntuser/ntstubs.c modified subsystems/win32/win32k/ntuser/painting.c modified subsystems/win32/win32k/ntuser/simplecall.c modified subsystems/win32/win32k/ntuser/sysparams.c modified subsystems/win32/win32k/ntuser/window.c modified subsystems/win32/win32k/objects/bitblt.c modified subsystems/win32/win32k/objects/bitmaps.c modified subsystems/win32/win32k/objects/brush.c modified subsystems/win32/win32k/objects/cliprgn.c modified subsystems/win32/win32k/objects/color.c modified subsystems/win32/win32k/objects/coord.c modified subsystems/win32/win32k/objects/dc.c modified subsystems/win32/win32k/objects/dcutil.c modified subsystems/win32/win32k/objects/dibobj.c modified subsystems/win32/win32k/objects/fillshap.c modified subsystems/win32/win32k/objects/font.c modified subsystems/win32/win32k/objects/freetype.c modified subsystems/win32/win32k/objects/icm.c modified subsystems/win32/win32k/objects/line.c modified subsystems/win32/win32k/objects/path.c modified subsystems/win32/win32k/objects/pen.c modified subsystems/win32/win32k/objects/print.c modified subsystems/win32/win32k/objects/region.c modified subsystems/win32/win32k/objects/text.c modified subsystems/win32/win32k/pch.h win32k migrated to PSEH 2.0 svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
_SEH2_END;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (intIsClipboardOpenByMe())
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
delayedRender = FALSE;
}
if (!canSinthesize(uFormat))
{
hCBData = ExAllocatePool(PagedPool, size);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
memcpy(hCBData, hMem, size);
intAddFormatedData(uFormat, hCBData, size);
DPRINT1("Data stored\n");
}
sendDrawClipboardMsg = TRUE;
recentlySetClipboard = TRUE;
lastEnumClipboardFormats = uFormat;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
/* conversions */
switch (uFormat)
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
case CF_TEXT:
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
//TODO : sinthesize CF_UNICODETEXT & CF_OEMTEXT
// CF_TEXT -> CF_UNICODETEXT
ansiString.Buffer = hCBData;
ansiString.Length = size;
RtlAnsiStringToUnicodeString(&unicodeString, &ansiString, TRUE);
intAddFormatedData(CF_UNICODETEXT, unicodeString.Buffer, unicodeString.Length * sizeof(WCHAR));
// CF_TEXT -> CF_OEMTEXT
RtlUnicodeStringToOemString(&oemString, &unicodeString, TRUE);
intAddFormatedData(CF_OEMTEXT, oemString.Buffer, oemString.Length);
//HKCU\Control Panel\International\Locale
//intAddFormatedData(CF_LOCALE, oemString.Buffer, oemString.Length);
break;
}
case CF_UNICODETEXT:
{
//TODO : sinthesize CF_TEXT & CF_OEMTEXT
//CF_UNICODETEXT -> CF_TEXT
unicodeString.Buffer = hCBData;
unicodeString.Length = size;
RtlUnicodeStringToAnsiString(&ansiString, &unicodeString, TRUE);
intAddFormatedData(CF_TEXT, ansiString.Buffer, ansiString.Length);
//CF_UNICODETEXT -> CF_OEMTEXT
RtlUnicodeStringToOemString(&oemString, &unicodeString, TRUE);
intAddFormatedData(CF_OEMTEXT, oemString.Buffer, oemString.Length);
break;
}
case CF_OEMTEXT:
{
//TODO : sinthesize CF_TEXT & CF_UNICODETEXT
//CF_OEMTEXT -> CF_UNICODETEXT
oemString.Buffer = hCBData;
oemString.Length = size;
RtlOemStringToUnicodeString(&unicodeString, &oemString, TRUE);
intAddFormatedData(CF_UNICODETEXT, unicodeString.Buffer, unicodeString.Length * sizeof(WCHAR));
//CF_OEMTEXT -> CF_TEXT
RtlUnicodeStringToAnsiString(&ansiString, &unicodeString, TRUE);
intAddFormatedData(CF_TEXT, ansiString.Buffer, ansiString.Length);
break;
}
case CF_BITMAP:
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
// we need to render the DIB or DIBV5 format as soon as possible
// because pallette information may change
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
HDC hdc;
INT ret;
BITMAP bm;
BITMAPINFO bi;
SURFACE *psurf;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
hdc = UserGetDCEx(NULL, NULL, DCX_USESTYLE);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
psurf = SURFACE_LockSurface(hMem);
BITMAP_GetObject(psurf, sizeof(BITMAP), (PVOID)&bm);
if(psurf)
{
SURFACE_UnlockSurface(psurf);
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bi.bmiHeader.biWidth = bm.bmWidth;
bi.bmiHeader.biHeight = bm.bmHeight;
bi.bmiHeader.biPlanes = 1;
bi.bmiHeader.biBitCount = bm.bmPlanes * bm.bmBitsPixel;
bi.bmiHeader.biCompression = BI_RGB;
bi.bmiHeader.biSizeImage = 0;
bi.bmiHeader.biXPelsPerMeter = 0;
bi.bmiHeader.biYPelsPerMeter = 0;
bi.bmiHeader.biClrUsed = 0;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
ret = NtGdiGetDIBitsInternal(hdc, hMem, 0, bm.bmHeight, NULL, &bi, DIB_RGB_COLORS, 0, 0);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
size = bi.bmiHeader.biSizeImage + sizeof(BITMAPINFOHEADER);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
hCBData = ExAllocatePool(PagedPool, size);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
memcpy(hCBData, &bi, sizeof(BITMAPINFOHEADER));
ret = NtGdiGetDIBitsInternal(hdc, hMem, 0, bm.bmHeight, (LPBYTE)hCBData + sizeof(BITMAPINFOHEADER), &bi, DIB_RGB_COLORS, 0, 0);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
UserReleaseDC(NULL, hdc, FALSE);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
intAddFormatedData(CF_DIB, hCBData, size);
intAddFormatedData(CF_BITMAP, 0, DATA_SYNTHESIZED_RENDER);
// intAddFormatedData(CF_DIBV5, hCBData, size);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
break;
}
case CF_DIB:
{
intAddFormatedData(CF_BITMAP, 0, DATA_SYNTHESIZED_RENDER);
// intAddFormatedData(CF_DIBV5, hCBData, size);
/* investigate */
// intAddFormatedData(CF_PALETTE, hCBData, size);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
break;
}
case CF_DIBV5:
// intAddFormatedData(CF_BITMAP, hCBData, size);
// intAddFormatedData(CF_PALETTE, hCBData, size);
// intAddFormatedData(CF_DIB, hCBData, size);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
break;
case CF_ENHMETAFILE:
// intAddFormatedData(CF_METAFILEPICT, hCBData, size);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
break;
case CF_METAFILEPICT:
// intAddFormatedData(CF_ENHMETAFILE, hCBData, size);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
break;
}
}
else
{
// the window provides data in the specified format
delayedRender = TRUE;
sendDrawClipboardMsg = TRUE;
intAddFormatedData(uFormat, NULL, 0);
DPRINT1("SetClipboardData delayed format: %d\n", uFormat);
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
exit_setCB:
UserLeave();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
return hMem;
}
HWND APIENTRY
NtUserSetClipboardViewer(HWND hWndNewViewer)
{
HWND ret = NULL;
PCLIPBOARDCHAINELEMENT newWC = NULL;
PWINDOW_OBJECT window;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
UserEnterExclusive();
window = UserGetWindowObject(hWndNewViewer);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (window)
{
if ((newWC = IntAddWindowToChain(window)))
{
if (newWC)
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
// newWC->next may be NULL if we are the first window in the chain
if (newWC->next)
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
// return the next HWND available window in the chain
ret = newWC->next->window->hSelf;
}
}
}
}
UserLeave();
return ret;
}
UINT APIENTRY
IntEnumClipboardFormats(UINT uFormat)
{
UINT ret = 0;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (intIsClipboardOpenByMe())
{
if (uFormat == 0)
{
if (recentlySetClipboard)
{
ret = lastEnumClipboardFormats;
}
else
{
/* return the first available format */
if (ClipboardData)
{
ret = ClipboardData->format;
}
}
}
else
{
if (recentlySetClipboard)
{
ret = 0;
}
else
{
/* querying nextt available format */
PCLIPBOARDELEMENT data = intIsFormatAvailable(uFormat);
if (data)
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
if (data->next)
{
ret = data->next->format;
}
else
{
/* reached the end */
ret = 0;
}
}
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
}
}
else
{
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
SetLastWin32Error(ERROR_CLIPBOARD_NOT_OPEN);
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
return ret;
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
// This number is incremented whenever the contents of the clipboard change
// or the clipboard is emptied.
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
// If clipboard rendering is delayed,
// the sequence number is not incremented until the changes are rendered.
VOID FASTCALL
IntIncrementSequenceNumber(VOID)
{
PTHREADINFO pti;
PWINSTATION_OBJECT WinStaObj;
pti = PsGetCurrentThreadWin32Thread();
WinStaObj = pti->rpdesk->rpwinstaParent;
WinStaObj->Clipboard->ClipboardSequenceNumber++;
}
DWORD APIENTRY
NtUserGetClipboardSequenceNumber(VOID)
{
//windowstation sequence number
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
//if no WINSTA_ACCESSCLIPBOARD access to the window station,
//the function returns zero.
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
DWORD sn;
HWINSTA WinSta;
PWINSTATION_OBJECT WinStaObj;
NTSTATUS Status;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
WinSta = UserGetProcessWindowStation();
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
Status = IntValidateWindowStationHandle(WinSta, KernelMode, WINSTA_ACCESSCLIPBOARD, &WinStaObj);
if (!NT_SUCCESS(Status))
{
DPRINT1("No WINSTA_ACCESSCLIPBOARD access\n");
SetLastNtError(Status);
return 0;
}
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
sn = WinStaObj->ClipboardSequenceNumber;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
ObDereferenceObject(WinStaObj);
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
//local copy
//sn = ClipboardSequenceNumber;
!!! ATTENTION EVERYONE - do a make clean after getting this revision !!! !!! ATTENTION PSEH USERS - new features & a change in rules !!! modified include/reactos/libs/pseh/framebased.h modified include/reactos/libs/pseh/framebased/internal.h deleted include/reactos/libs/pseh/setjmp.h modified lib/pseh/framebased.c deleted lib/pseh/i386/setjmp.asm modified lib/pseh/pseh.rbuild Big PSEH revamp. If God is kind and merciful, this might be the last revision to PSEH ever !!! RULE CHANGE !!! Obsoleted _SEH_NO_NATIVE_NLG, do NOT use it anymore, it will now cause fatal compile-time errors !!! RULE CHANGE !!! As a side effect to the fix for a bug where a _SEH_TRY nested in a _SEH_HANDLE would lead to stack corruption, using "return" or "goto" from anywhere inside a PSEH block is now FORBIDDEN; all code that already did has been fixed in this revision !!! NEW FEATURE !!! To leave a PSEH block from anywhere inside it, use the new _SEH_YIELD(<statement>) macro; examples: _SEH_YIELD(return value), _SEH_YIELD(goto label), _SEH_YIELD(returnvalue = value; goto label); ALWAYS ensure a _SEH_YIELD() leads outside the top-level _SEH_TRY block - do NOT goto into an ancestor _SEH_TRY block!!! Also note that _SEH_YIELD() disables SEH protection for the enclosed statement, so do NOT perform operations that might throw exceptions inside a _SEH_YIELD(); finally, ensure the enclosed statement does NOT allow execution to continue, or _SEH_YIELD() will get in an infinite loop; bear with me, for I have done the impossible, so don't expect miracles Don't use a fake setjmp/longjmp *ever*, too dangerous; removed _SEHLongJmp & _SEHSetJmp, obsoleted _SEH_NO_NATIVE_NLG On GCC, use __builtin_setjmp/__builtin_longjmp instead of setjmp/longjmp; they produce efficient code that plays well with optimizations, require no external library and are designed specifically for exception handling; should result in faster code and no hidden bugs Use inline code to enter/leave trylevels; yields much better binary code Inline handlers inside _SEH_PortableFrame_t instead of pointing to them; yields better code for the most common usages Turn all top-level statements generated by macros from bare scopes into for loops, to ensure they are used correctly as stand-alone statements Removed bitrotten old syntax, because it wasn't being used nor maintained modified dll/3rdparty/freetype/freetype.rbuild modified dll/win32/kernel32/kernel32.rbuild modified drivers/network/tcpip/tcpip.rbuild modified lib/drivers/ip/ip.rbuild modified lib/rtl/rtl.rbuild modified ntoskrnl/ntoskrnl.rbuild modified subsystems/win32/win32k/win32k.rbuild Removed obsolete _SEH_NO_NATIVE_NLG define modified drivers/network/afd/afd/lock.c modified drivers/network/afd/afd/tdi.c modified subsystems/csr/csrsrv/api.c modified subsystems/win32/win32k/ntuser/clipboard.c modified subsystems/win32/win32k/ntuser/window.c Use the new _SEH_YIELD macro to return/goto from SEH blocks modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/module.cpp modified tools/rbuild/project.dtd modified tools/rbuild/rbuild.h Don't use the obsolete _SEH_NO_NATIVE_NLG flag anymore Only add underscores to imported symbols when module is marked underscoresymbols="true"; fixes debugsup and, indirectly, PSEH tracing modified lib/3rdparty/mingw/mingw.rbuild Build with underscoresymbols="true" svn path=/trunk/; revision=26224
2007-04-01 00:07:25 +00:00
return sn;
}
/**************** VISTA FUNCTIONS******************/
BOOL APIENTRY NtUserAddClipboardFormatListener(
HWND hwnd
)
{
UNIMPLEMENTED;
return FALSE;
}
BOOL APIENTRY NtUserRemoveClipboardFormatListener(
HWND hwnd
)
{
UNIMPLEMENTED;
return FALSE;
}
BOOL APIENTRY NtUserGetUpdatedClipboardFormats(
PUINT lpuiFormats,
UINT cFormats,
PUINT pcFormatsOut
)
{
UNIMPLEMENTED;
return FALSE;
}
/* EOF */