ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
July 2009
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
27 participants
605 discussions
Start a n
N
ew thread
[tkreuzer] 42170: Add license header (LGPL)
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Jul 24 06:30:09 2009 New Revision: 42170 URL:
http://svn.reactos.org/svn/reactos?rev=42170&view=rev
Log: Add license header (LGPL) Modified: trunk/reactos/lib/sdk/delayimp/delayimp.c Modified: trunk/reactos/lib/sdk/delayimp/delayimp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/delayimp/delayimp.…
============================================================================== --- trunk/reactos/lib/sdk/delayimp/delayimp.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/delayimp/delayimp.c [iso-8859-1] Fri Jul 24 06:30:09 2009 @@ -1,3 +1,12 @@ +/* + * PROJECT: ReactOS SDK Library + * LICENSE: LGPL, see LGPL.txt in top level directory. + * FILE: lib/sdk/delayimp/delayimp.c + * PURPOSE: Library for delay importing from dlls + * PROGRAMMERS: Timo Kreuzer <timo.kreuzer(a)reactos.org> + * + */ + #include <windows.h> #include "delayimp.h"
15 years, 5 months
1
0
0
0
[tkreuzer] 42169: Implement delayimp lib This library will allow to delay import from dlls, if used together with the corresponding delayimport lib for that dll. An initial patch for dlltool can be found in bug #4730. Based on Matt Pietrek's "Under the Hood" article: http://www.microsoft.com/msj/1298/hood/hood1298.aspx and msdn documentation.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Jul 24 06:24:36 2009 New Revision: 42169 URL:
http://svn.reactos.org/svn/reactos?rev=42169&view=rev
Log: Implement delayimp lib This library will allow to delay import from dlls, if used together with the corresponding delayimport lib for that dll. An initial patch for dlltool can be found in bug #4730. Based on Matt Pietrek's "Under the Hood" article:
http://www.microsoft.com/msj/1298/hood/hood1298.aspx
and msdn documentation. Added: trunk/reactos/lib/sdk/delayimp/ (with props) trunk/reactos/lib/sdk/delayimp/delayimp.c (with props) trunk/reactos/lib/sdk/delayimp/delayimp.h (with props) trunk/reactos/lib/sdk/delayimp/delayimp.rbuild (with props) Modified: trunk/reactos/lib/sdk/sdk.rbuild Propchange: trunk/reactos/lib/sdk/delayimp/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Fri Jul 24 06:24:36 2009 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/reactos/lib/sdk/delayimp/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/reactos/lib/sdk/delayimp/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/reactos/lib/sdk/delayimp/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: trunk/reactos/lib/sdk/delayimp/delayimp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/delayimp/delayimp.…
============================================================================== --- trunk/reactos/lib/sdk/delayimp/delayimp.c (added) +++ trunk/reactos/lib/sdk/delayimp/delayimp.c [iso-8859-1] Fri Jul 24 06:24:36 2009 @@ -1,0 +1,106 @@ +#include <windows.h> +#include "delayimp.h" + +inline +unsigned +IndexFromPImgThunkData(PCImgThunkData pData, PCImgThunkData pBase) +{ + return pData - pBase; +} + +extern const IMAGE_DOS_HEADER _image_base__; + +inline PVOID +PFromRva(RVA rva) +{ + return (PVOID)(((ULONG_PTR)(rva)) + ((ULONG_PTR)&_image_base__)); +} + +/**** load helper ****/ + +FARPROC WINAPI +__delayLoadHelper2(PCImgDelayDescr pidd, PImgThunkData pIATEntry) +{ + DelayLoadInfo dli; + int index; + PImgThunkData pIAT; + PImgThunkData pINT; + HMODULE *phMod; + FARPROC pProc; + + pIAT = PFromRva(pidd->rvaIAT); + pINT = PFromRva(pidd->rvaINT); + phMod = PFromRva(pidd->rvaHmod); + index = IndexFromPImgThunkData(pIATEntry, pIAT); + + dli.cb = sizeof(dli); + dli.pidd = pidd; + dli.ppfn = (FARPROC*)pIATEntry->u1.Function; + dli.szDll = PFromRva(pidd->rvaDLLName); + dli.dlp.fImportByName = !(pINT[index].u1.Ordinal & IMAGE_ORDINAL_FLAG); + if (dli.dlp.fImportByName) + { + /* u1.AdressOfData points to a IMAGE_IMPORT_BY_NAME struct */ + PIMAGE_IMPORT_BY_NAME piibn = PFromRva((RVA)pINT[index].u1.AddressOfData); + dli.dlp.szProcName = (LPCSTR)&piibn->Name; + } + else + { + dli.dlp.dwOrdinal = pINT[index].u1.Ordinal & ~IMAGE_ORDINAL_FLAG; + } + dli.hmodCur = *phMod; + dli.pfnCur = (FARPROC)pIAT[index].u1.Function; + dli.dwLastError = GetLastError(); + pProc = __pfnDliNotifyHook2(dliStartProcessing, &dli); + if (pProc) + { + pIAT[index].u1.Function = (DWORD)pProc; + return pProc; + } + + if (dli.hmodCur == NULL) + { + dli.hmodCur = LoadLibraryA(dli.szDll); + if (!dli.hmodCur) + { + dli.dwLastError = GetLastError(); + __pfnDliFailureHook2(dliFailLoadLib, &dli); +// if (ret) +// { +// } + // FIXME: raise exception; + return NULL; + } + *phMod = dli.hmodCur; + } + + /* dli.dlp.szProcName might also contain the ordinal */ + pProc = GetProcAddress(dli.hmodCur, dli.dlp.szProcName); + if (!pProc) + { + dli.dwLastError = GetLastError(); + __pfnDliFailureHook2(dliFailGetProc, &dli); + // FIXME: handle return value & raise exception + return NULL; + } + pIAT[index].u1.Function = (DWORD)pProc; + + return pProc; +} + +/*** The default hooks ***/ + +FARPROC WINAPI +DefaultDliNotifyHook2(unsigned dliNotify, PDelayLoadInfo pdli) +{ + return NULL; +} + +FARPROC WINAPI +DefaultDliFailureHook2(unsigned dliNotify, PDelayLoadInfo pdli) +{ + return NULL; +} + +PfnDliHook __pfnDliNotifyHook2 = DefaultDliNotifyHook2; +PfnDliHook __pfnDliFailureHook2 = DefaultDliFailureHook2; Propchange: trunk/reactos/lib/sdk/delayimp/delayimp.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/delayimp/delayimp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/delayimp/delayimp.…
============================================================================== --- trunk/reactos/lib/sdk/delayimp/delayimp.h (added) +++ trunk/reactos/lib/sdk/delayimp/delayimp.h [iso-8859-1] Fri Jul 24 06:24:36 2009 @@ -1,0 +1,65 @@ +#ifndef _DELAYIMP_H_ +#define _DELAYIMP_H_ + +typedef void *RVA; + +typedef IMAGE_THUNK_DATA *PImgThunkData; +typedef const IMAGE_THUNK_DATA *PCImgThunkData; + +enum +{ + dlattrRva +}; + +/* Notification codes */ +enum +{ + dliStartProcessing, + dliNotePreLoadLibrary, + dliNotePreGetProcAddress, + dliFailLoadLib, + dliFailGetProc, + dliNoteEndProcessing, +}; + +typedef struct ImgDelayDescr +{ + DWORD grAttrs; + RVA rvaDLLName; + RVA rvaHmod; + RVA rvaIAT; + RVA rvaINT; + RVA rvaBoundIAT; + RVA rvaUnloadIAT; + DWORD dwTimeStamp; +} ImgDelayDescr, *PImgDelayDescr; +typedef const ImgDelayDescr *PCImgDelayDescr; + +typedef struct DelayLoadProc +{ + BOOL fImportByName; + union + { + LPCSTR szProcName; + DWORD dwOrdinal; + }; +} DelayLoadProc; + +typedef struct DelayLoadInfo +{ + DWORD cb; + PCImgDelayDescr pidd; + FARPROC *ppfn; + LPCSTR szDll; + DelayLoadProc dlp; + HMODULE hmodCur; + FARPROC pfnCur; + DWORD dwLastError; +} DelayLoadInfo, *PDelayLoadInfo; + +typedef FARPROC (WINAPI *PfnDliHook)(unsigned, PDelayLoadInfo); + +extern PfnDliHook __pfnDliNotifyHook2; +extern PfnDliHook __pfnDliFailureHook2; + +#endif /* not _DELAYIMP_H_ */ Propchange: trunk/reactos/lib/sdk/delayimp/delayimp.h ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/delayimp/delayimp.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/delayimp/delayimp.…
============================================================================== --- trunk/reactos/lib/sdk/delayimp/delayimp.rbuild (added) +++ trunk/reactos/lib/sdk/delayimp/delayimp.rbuild [iso-8859-1] Fri Jul 24 06:24:36 2009 @@ -1,0 +1,7 @@ +<?xml version="1.0"?> +<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd"> +<group> + <module name="delayimp" type="staticlibrary" unicode="yes"> + <file>delayimp.c</file> + </module> +</group> Propchange: trunk/reactos/lib/sdk/delayimp/delayimp.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/lib/sdk/sdk.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/sdk.rbuild?rev=421…
============================================================================== --- trunk/reactos/lib/sdk/sdk.rbuild [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/sdk.rbuild [iso-8859-1] Fri Jul 24 06:24:36 2009 @@ -4,6 +4,9 @@ <directory name="crt"> <xi:include href="crt/crt.rbuild" /> <xi:include href="crt/libcntpr.rbuild" /> + </directory> + <directory name="delayimp"> + <xi:include href="delayimp/delayimp.rbuild" /> </directory> <directory name="dxguid"> <xi:include href="dxguid/dxguid.rbuild" />
15 years, 5 months
1
0
0
0
[jimtabor] 42168: - [Win32k] More work on classes. Fixed SEH abuse and implemented NtUserGetWOWClass. Minor bug fixes and modifications that help function compatibility based on wine. - Tested wine (some improvements and losses): Msi seems to be fixed, did not test before these changes. My guess is Jeffrey Morlan fixed it in 42163, so a Big Thank You!!! Tested Firefox 1.15.xx and AbiWord 2.6.8.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Fri Jul 24 03:03:11 2009 New Revision: 42168 URL:
http://svn.reactos.org/svn/reactos?rev=42168&view=rev
Log: - [Win32k] More work on classes. Fixed SEH abuse and implemented NtUserGetWOWClass. Minor bug fixes and modifications that help function compatibility based on wine. - Tested wine (some improvements and losses): Msi seems to be fixed, did not test before these changes. My guess is Jeffrey Morlan fixed it in 42163, so a Big Thank You!!! Tested Firefox 1.15.xx and AbiWord 2.6.8. Modified: trunk/reactos/dll/win32/user32/windows/class.c trunk/reactos/dll/win32/user32/windows/defwnd.c trunk/reactos/include/reactos/win32k/ntuser.h trunk/reactos/subsystems/win32/win32k/ntuser/class.c trunk/reactos/subsystems/win32/win32k/ntuser/window.c Modified: trunk/reactos/dll/win32/user32/windows/class.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/c…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/class.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/class.c [iso-8859-1] Fri Jul 24 03:03:11 2009 @@ -25,6 +25,7 @@ { UNICODE_STRING ClassName = {0}; BOOL Ret; + LPCSTR pszMenuName; TRACE("%p class/atom: %s/%04x %p\n", hInstance, IS_ATOM(lpszClass) ? NULL : lpszClass, @@ -62,8 +63,13 @@ Ret = NtUserGetClassInfo(hInstance, &ClassName, (LPWNDCLASSEXW)lpwcx, - NULL, + (LPWSTR *)&pszMenuName, TRUE); + if (Ret) + { + lpwcx->lpszClassName = lpszClass; +// lpwcx->lpszMenuName = pszMenuName; + } if (!IS_ATOM(lpszClass)) { @@ -85,6 +91,8 @@ LPWNDCLASSEXW lpwcx) { UNICODE_STRING ClassName = {0}; + BOOL Ret; + LPWSTR pszMenuName; TRACE("%p class/atom: %S/%04x %p\n", hInstance, IS_ATOM(lpszClass) ? NULL : lpszClass, @@ -115,11 +123,17 @@ lpszClass); } - return NtUserGetClassInfo(hInstance, + Ret = NtUserGetClassInfo( hInstance, &ClassName, lpwcx, - NULL, + &pszMenuName, FALSE); + if (Ret) + { + lpwcx->lpszClassName = lpszClass; +// lpwcx->lpszMenuName = pszMenuName; + } + return Ret; } @@ -238,7 +252,7 @@ break; case GCL_MENUNAME: - Ret = (ULONG_PTR)Class->AnsiMenuName; + Ret = (ULONG_PTR)Class->lpszClientAnsiMenuName; break; case GCL_STYLE: @@ -351,7 +365,7 @@ break; case GCL_MENUNAME: - Ret = (ULONG_PTR)Class->MenuName; + Ret = (ULONG_PTR)Class->lpszClientUnicodeMenuName; break; case GCL_STYLE: Modified: trunk/reactos/dll/win32/user32/windows/defwnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] Fri Jul 24 03:03:11 2009 @@ -970,7 +970,7 @@ * Client area */ if ( uFlags & PRF_CLIENT) - SendMessageW(hwnd, WM_PRINTCLIENT, (WPARAM)hdc, PRF_CLIENT); + SendMessageW(hwnd, WM_PRINTCLIENT, (WPARAM)hdc, uFlags); } static BOOL CALLBACK Modified: trunk/reactos/include/reactos/win32k/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Fri Jul 24 03:03:11 2009 @@ -116,8 +116,8 @@ struct _DESKTOP *rpdeskParent; PVOID pdce; DWORD CSF_flags; - PSTR lpszClientAnsiMenuName; - PWSTR lpszClientUnicodeMenuName; + PSTR lpszClientAnsiMenuName; // For client use + PWSTR lpszClientUnicodeMenuName; // " " " PCALLPROC spcpdFirst; struct _CLS *pclsBase; struct _CLS *pclsClone; @@ -135,11 +135,11 @@ HANDLE hIcon; /* FIXME - Use pointer! */ HANDLE hCursor; /* FIXME - Use pointer! */ HBRUSH hbrBackground; - PWSTR MenuName; - PSTR AnsiMenuName; + PWSTR lpszMenuName; // kernel use + PSTR lpszAnsiClassName; // " HANDLE hIconSm; /* FIXME - Use pointer! */ - UINT Destroying : 1; + UINT Destroying : 1; // CSF_WOWDEFERDESTROY UINT Unicode : 1; UINT System : 1; // CSF_SYSTEMCLASS UINT Global : 1; // CS_GLOBALCLASS @@ -1962,11 +1962,11 @@ HWND hWnd, WINDOWPLACEMENT *lpwndpl); -DWORD +PCLS NTAPI NtUserGetWOWClass( - DWORD Unknown0, - DWORD Unknown1); + HINSTANCE hInstance, + PUNICODE_STRING ClassName); DWORD NTAPI Modified: trunk/reactos/subsystems/win32/win32k/ntuser/class.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/class.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/class.c [iso-8859-1] Fri Jul 24 03:03:11 2009 @@ -63,11 +63,11 @@ IntFreeClassMenuName(IN OUT PCLS Class) { /* free the menu name, if it was changed and allocated */ - if (Class->MenuName != NULL && Class->MenuNameIsString) - { - UserHeapFree(Class->MenuName); - Class->MenuName = NULL; - Class->AnsiMenuName = NULL; + if (Class->lpszClientUnicodeMenuName != NULL && Class->MenuNameIsString) + { + UserHeapFree(Class->lpszClientUnicodeMenuName); + Class->lpszClientUnicodeMenuName = NULL; + Class->lpszClientAnsiMenuName = NULL; } } @@ -891,30 +891,31 @@ Class->hCursor = lpwcx->hCursor; /* FIXME */ Class->hbrBackground = lpwcx->hbrBackground; + /* make a copy of the string */ if (pszMenuNameBuffer != NULL) { Class->MenuNameIsString = TRUE; - Class->MenuName = pszMenuNameBuffer; - RtlCopyMemory(Class->MenuName, + Class->lpszClientUnicodeMenuName = pszMenuNameBuffer; + RtlCopyMemory(Class->lpszClientUnicodeMenuName, MenuName->Buffer, MenuName->Length); - Class->MenuName[MenuName->Length / sizeof(WCHAR)] = UNICODE_NULL; + Class->lpszClientUnicodeMenuName[MenuName->Length / sizeof(WCHAR)] = UNICODE_NULL; pszMenuNameBuffer += (MenuName->Length / sizeof(WCHAR)) + 1; } else - Class->MenuName = MenuName->Buffer; + Class->lpszClientUnicodeMenuName = MenuName->Buffer; /* save an ansi copy of the string */ if (pszMenuNameBuffer != NULL) { ANSI_STRING AnsiString; - Class->AnsiMenuName = (PSTR)pszMenuNameBuffer; + Class->lpszClientAnsiMenuName = (PSTR)pszMenuNameBuffer; AnsiString.MaximumLength = RtlUnicodeStringToAnsiSize(MenuName); - AnsiString.Buffer = Class->AnsiMenuName; + AnsiString.Buffer = Class->lpszClientAnsiMenuName; Status = RtlUnicodeStringToAnsiString(&AnsiString, MenuName, FALSE); @@ -927,7 +928,11 @@ } } else - Class->AnsiMenuName = (PSTR)MenuName->Buffer; + Class->lpszClientAnsiMenuName = (PSTR)MenuName->Buffer; + + /* Save kernel use menu name and ansi class name */ + Class->lpszMenuName = Class->lpszClientUnicodeMenuName; // Fixme! + //Class->lpszAnsiClassName = Fixme! if (!(dwFlags & CSF_ANSIPROC)) Class->Unicode = TRUE; @@ -1467,9 +1472,9 @@ case GCLP_MENUNAME: /* NOTE: Returns pointer in kernel heap! */ if (Ansi) - Ret = (ULONG_PTR)Class->AnsiMenuName; + Ret = (ULONG_PTR)Class->lpszClientAnsiMenuName; else - Ret = (ULONG_PTR)Class->MenuName; + Ret = (ULONG_PTR)Class->lpszClientUnicodeMenuName; break; case GCL_STYLE: @@ -1547,16 +1552,16 @@ { /* update the base class */ IntFreeClassMenuName(Class); - Class->MenuName = strBufW; - Class->AnsiMenuName = AnsiString.Buffer; + Class->lpszClientUnicodeMenuName = strBufW; + Class->lpszClientAnsiMenuName = AnsiString.Buffer; Class->MenuNameIsString = TRUE; /* update the clones */ Class = Class->pclsClone; while (Class != NULL) { - Class->MenuName = strBufW; - Class->AnsiMenuName = AnsiString.Buffer; + Class->lpszClientUnicodeMenuName = strBufW; + Class->lpszClientAnsiMenuName = AnsiString.Buffer; Class->MenuNameIsString = TRUE; Class = Class->pclsNext; @@ -1577,16 +1582,16 @@ /* update the base class */ IntFreeClassMenuName(Class); - Class->MenuName = MenuName->Buffer; - Class->AnsiMenuName = (PSTR)MenuName->Buffer; + Class->lpszClientUnicodeMenuName = MenuName->Buffer; + Class->lpszClientAnsiMenuName = (PSTR)MenuName->Buffer; Class->MenuNameIsString = FALSE; /* update the clones */ Class = Class->pclsClone; while (Class != NULL) { - Class->MenuName = MenuName->Buffer; - Class->AnsiMenuName = (PSTR)MenuName->Buffer; + Class->lpszClientUnicodeMenuName = MenuName->Buffer; + Class->lpszClientAnsiMenuName = (PSTR)MenuName->Buffer; Class->MenuNameIsString = FALSE; Class = Class->pclsNext; @@ -1810,18 +1815,31 @@ lpwcx->hIcon = Class->hIcon; /* FIXME - get handle from pointer */ lpwcx->hCursor = Class->hCursor; /* FIXME - get handle from pointer */ lpwcx->hbrBackground = Class->hbrBackground; - +/* + FIXME! + Cls: lpszMenuName and lpszAnsiClassName should be used by kernel space. + lpszClientXxxMenuName should already be mapped to user space. + */ if (Ansi) - ((PWNDCLASSEXA)lpwcx)->lpszMenuName = Class->AnsiMenuName; + ((PWNDCLASSEXA)lpwcx)->lpszMenuName = Class->lpszClientAnsiMenuName; else - lpwcx->lpszMenuName = Class->MenuName; + lpwcx->lpszMenuName = Class->lpszClientUnicodeMenuName; + + if ( Class->lpszClientUnicodeMenuName != NULL && + Class->MenuNameIsString) + { + lpwcx->lpszMenuName = UserHeapAddressToUser(Ansi ? + (PVOID)Class->lpszClientAnsiMenuName : + (PVOID)Class->lpszClientUnicodeMenuName); + } if (hInstance == hModClient) lpwcx->hInstance = NULL; else lpwcx->hInstance = hInstance; - lpwcx->lpszClassName = (LPCWSTR)((ULONG_PTR)Class->atomClassName); /* FIXME - return the string? */ + /* FIXME - return the string? Okay! This is performed in User32!*/ + //lpwcx->lpszClassName = (LPCWSTR)((ULONG_PTR)Class->atomClassName); lpwcx->hIconSm = Class->hIconSm; /* FIXME - get handle from pointer */ @@ -2010,7 +2028,6 @@ &CapturedMenuName, wpExtra, Flags); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { @@ -2146,6 +2163,9 @@ INT nIndex, WORD wNewWord) { +/* + * NOTE: Obsoleted in 32-bit windows + */ return(0); } @@ -2195,7 +2215,6 @@ _SEH2_END; UserLeave(); - return Ret; } @@ -2208,107 +2227,134 @@ LPWSTR *ppszMenuName, BOOL Ansi) { - UNICODE_STRING CapturedClassName; - PCLS Class; - RTL_ATOM ClassAtom; - PPROCESSINFO pi; - BOOL Ret = FALSE; - - /* NOTE: need exclusive lock because getting the wndproc might require the - creation of a call procedure handle */ - UserEnterExclusive(); - - pi = GetW32ProcessInfo(); - if (pi == NULL) - { - ERR("GetW32ProcessInfo() returned NULL!\n"); - goto Cleanup; - } - _SEH2_TRY - { - /* probe the paramters */ - CapturedClassName = ProbeForReadUnicodeString(ClassName); - - if (CapturedClassName.Length == 0) - TRACE("hInst %p atom %04X lpWndClassEx %p Ansi %d\n", hInstance, CapturedClassName.Buffer, lpWndClassEx, Ansi); - else - TRACE("hInst %p class %wZ lpWndClassEx %p Ansi %d\n", hInstance, &CapturedClassName, lpWndClassEx, Ansi); - - if (CapturedClassName.Length & 1) - { + UNICODE_STRING CapturedClassName, SafeClassName; + WNDCLASSEXW Safewcexw; + PCLS Class; + RTL_ATOM ClassAtom = 0; + PPROCESSINFO pi; + BOOL Ret = TRUE; + + /* NOTE: need exclusive lock because getting the wndproc might require the + creation of a call procedure handle */ + UserEnterExclusive(); + + pi = GetW32ProcessInfo(); + if (pi == NULL) + { + ERR("GetW32ProcessInfo() returned NULL!\n"); + goto Cleanup; + } + + _SEH2_TRY + { + /* probe the paramters */ + CapturedClassName = ProbeForReadUnicodeString(ClassName); + + if (CapturedClassName.Length == 0) + TRACE("hInst %p atom %04X lpWndClassEx %p Ansi %d\n", hInstance, CapturedClassName.Buffer, lpWndClassEx, Ansi); + else + TRACE("hInst %p class %wZ lpWndClassEx %p Ansi %d\n", hInstance, &CapturedClassName, lpWndClassEx, Ansi); + + if (CapturedClassName.Length & 1) + { + goto InvalidParameter; + } + + if (CapturedClassName.Length != 0) + { + ProbeForRead( CapturedClassName.Buffer, + CapturedClassName.Length, + sizeof(WCHAR)); + + RtlInitUnicodeString( &SafeClassName, CapturedClassName.Buffer); + + SafeClassName.Buffer = ExAllocatePoolWithTag( PagedPool, + SafeClassName.MaximumLength, + TAG_STRING); + RtlCopyMemory( SafeClassName.Buffer, + CapturedClassName.Buffer, + SafeClassName.MaximumLength); + } + else + { + if (!IS_ATOM(CapturedClassName.Buffer)) + { + ERR("NtUserGetClassInfo() got ClassName instead of Atom!\n"); goto InvalidParameter; - } - - if (CapturedClassName.Length != 0) - { - ProbeForRead(CapturedClassName.Buffer, - CapturedClassName.Length, - sizeof(WCHAR)); - } - else - { - if (!IS_ATOM(CapturedClassName.Buffer)) - { - ERR("NtUserGetClassInfo() got ClassName instead of Atom!\n"); - goto InvalidParameter; - } - } - - if (ProbeForReadUint(&lpWndClassEx->cbSize) != sizeof(WNDCLASSEXW)) - { + } + + SafeClassName.Buffer = CapturedClassName.Buffer; + SafeClassName.Length = 0; + SafeClassName.MaximumLength = 0; + } + + if (ProbeForReadUint(&lpWndClassEx->cbSize) != sizeof(WNDCLASSEXW)) + { InvalidParameter: - SetLastWin32Error(ERROR_INVALID_PARAMETER); - _SEH2_LEAVE; - } - - ProbeForWrite(lpWndClassEx, - sizeof(WNDCLASSEXW), - sizeof(ULONG)); - - ClassAtom = IntGetClassAtom(&CapturedClassName, + SetLastWin32Error(ERROR_INVALID_PARAMETER); + Ret = FALSE; + _SEH2_LEAVE; + } + + ProbeForWrite( lpWndClassEx, sizeof(WNDCLASSEXW), sizeof(ULONG)); + + RtlCopyMemory( &Safewcexw, lpWndClassEx, sizeof(WNDCLASSEXW)); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + SetLastWin32Error(ERROR_CLASS_DOES_NOT_EXIST); + Ret = FALSE; + } + _SEH2_END; + + if (Ret) + { + ClassAtom = IntGetClassAtom( &SafeClassName, hInstance, pi, - &Class, + &Class, NULL); - if (ClassAtom != (RTL_ATOM)0) - { - if (hInstance == NULL) - hInstance = hModClient; - - Ret = UserGetClassInfo(Class, - lpWndClassEx, - Ansi, - hInstance); - - if (Ret) - { - lpWndClassEx->lpszClassName = CapturedClassName.Buffer; - /* FIXME - handle Class->Desktop == NULL!!!!! */ - - if (Class->MenuName != NULL && Class->MenuNameIsString) - { - lpWndClassEx->lpszMenuName = UserHeapAddressToUser(Ansi ? - (PVOID)Class->AnsiMenuName : - (PVOID)Class->MenuName); - } - // From Wine: - /* We must return the atom of the class here instead of just TRUE. */ - /* Undocumented behavior! Return the class atom as a BOOL! */ - Ret = (BOOL)ClassAtom; - } - } - else - SetLastWin32Error(ERROR_CLASS_DOES_NOT_EXIST); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { + if (ClassAtom != (RTL_ATOM)0) + { + if (hInstance == NULL) hInstance = hModClient; + + Ret = UserGetClassInfo( Class, + &Safewcexw, + Ansi, + hInstance); + } + else + { SetLastWin32Error(ERROR_CLASS_DOES_NOT_EXIST); - } - _SEH2_END; + Ret = FALSE; + } + } + _SEH2_TRY + { + if (Ret) + { + /* Emulate Function. */ + if (ppszMenuName) *ppszMenuName = (LPWSTR)Safewcexw.lpszMenuName; + + RtlCopyMemory(lpWndClassEx, &Safewcexw, sizeof(WNDCLASSEXW)); + + // From Wine: + /* We must return the atom of the class here instead of just TRUE. */ + /* Undocumented behavior! Return the class atom as a BOOL! */ + Ret = (BOOL)ClassAtom; + } + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + SetLastWin32Error(ERROR_CLASS_DOES_NOT_EXIST); + Ret = FALSE; + } + _SEH2_END; Cleanup: - UserLeave(); - return Ret; + if (SafeClassName.Length) ExFreePoolWithTag(SafeClassName.Buffer, TAG_STRING); + UserLeave(); + return Ret; } @@ -2355,11 +2401,85 @@ return Ret; } -DWORD APIENTRY -NtUserGetWOWClass(DWORD Unknown0, - DWORD Unknown1) -{ - return(0); +/* Return Pointer to Class structure. */ +PCLS APIENTRY +NtUserGetWOWClass(HINSTANCE hInstance, + PUNICODE_STRING ClassName) +{ + UNICODE_STRING SafeClassName; + PPROCESSINFO pi; + PCLS Class = NULL; + RTL_ATOM ClassAtom = 0; + BOOL Hit = FALSE; + + UserEnterExclusive(); + + pi = GetW32ProcessInfo(); + if (pi == NULL) + { + ERR("GetW32ProcessInfo() returned NULL!\n"); + goto Cleanup; + } + + _SEH2_TRY + { + if (ClassName->Length != 0) + { + ProbeForRead( ClassName->Buffer, + ClassName->Length, + sizeof(WCHAR)); + + RtlInitUnicodeString( &SafeClassName, ClassName->Buffer); + + SafeClassName.Buffer = ExAllocatePoolWithTag( PagedPool, + SafeClassName.MaximumLength, + TAG_STRING); + RtlCopyMemory( SafeClassName.Buffer, + ClassName->Buffer, + SafeClassName.MaximumLength); + } + else + { + if (!IS_ATOM(ClassName->Buffer)) + { + ERR("NtUserGetWOWClass() got ClassName instead of Atom!\n"); + Hit = TRUE; + } + else + { + SafeClassName.Buffer = ClassName->Buffer; + SafeClassName.Length = 0; + SafeClassName.MaximumLength = 0; + } + } + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + SetLastWin32Error(ERROR_CLASS_DOES_NOT_EXIST); + Hit = TRUE; + } + _SEH2_END; + + if (!Hit) + { + ClassAtom = IntGetClassAtom( &SafeClassName, + hInstance, + pi, + &Class, + NULL); + if (!ClassAtom) + { + SetLastWin32Error(ERROR_CLASS_DOES_NOT_EXIST); + } + } + +Cleanup: + if (SafeClassName.Length) ExFreePoolWithTag(SafeClassName.Buffer, TAG_STRING); + UserLeave(); +// +// Don't forget to use DesktopPtrToUser( ? ) with return pointer in user space. +// + return Class; } /* EOF */ Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] Fri Jul 24 03:03:11 2009 @@ -1838,7 +1838,7 @@ { UNICODE_STRING MenuName; - RtlInitUnicodeString( &MenuName, Wnd->pcls->MenuName); + RtlInitUnicodeString( &MenuName, Wnd->pcls->lpszMenuName); hMenu = co_IntCallLoadMenu( Wnd->pcls->hModule, &MenuName); if (hMenu) IntSetMenu(Window, hMenu, &MenuChanged);
15 years, 5 months
1
0
0
0
[gedmurphy] 42167: I always forget about RosBE ....
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Fri Jul 24 00:11:06 2009 New Revision: 42167 URL:
http://svn.reactos.org/svn/reactos?rev=42167&view=rev
Log: I always forget about RosBE .... Modified: trunk/reactos/base/shell/explorer-new/lang/en-US.rc trunk/reactos/base/shell/explorer-new/trayprop.c Modified: trunk/reactos/base/shell/explorer-new/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/la…
============================================================================== --- trunk/reactos/base/shell/explorer-new/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/lang/en-US.rc [iso-8859-1] Fri Jul 24 00:11:06 2009 @@ -59,14 +59,14 @@ CAPTION "Taskbar" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - GROUPBOX "Taskbar appearance", IDC_STATIC, 6,6,240,121, - CONTROL "", IDC_TASKBARPROP_TASKBARBITMAP, "Static", SS_BITMAP | SS_SUNKEN, 13,18,224,21, - AUTOCHECKBOX "&Lock the taskbar", IDC_TASKBARPROP_LOCK, 13,45,200,10, - AUTOCHECKBOX "A&uto-hide the taskbar", IDC_TASKBARPROP_HIDE, 13,58,200,10, - AUTOCHECKBOX "Keep the &taskbar on top of other windows", IDC_TASKBARPROP_ONTOP, 13,71,200,10, - AUTOCHECKBOX "&Group similar taskbar buttons", IDC_TASKBARPROP_GROUP, 13,84,200,10, - AUTOCHECKBOX "Show &Quick Launch", IDC_TASKBARPROP_SHOWQL, 13,97,200,10, - AUTOCHECKBOX "&Show window previews (thumbnails)", IDC_TASKBARPROP_WNDPREV, 13,110,200,10, + GROUPBOX "Taskbar appearance", IDC_STATIC, 6,6,240,121 + CONTROL "", IDC_TASKBARPROP_TASKBARBITMAP, "Static", SS_BITMAP | SS_SUNKEN, 13,18,224,21 + AUTOCHECKBOX "&Lock the taskbar", IDC_TASKBARPROP_LOCK, 13,45,200,10 + AUTOCHECKBOX "A&uto-hide the taskbar", IDC_TASKBARPROP_HIDE, 13,58,200,10 + AUTOCHECKBOX "Keep the &taskbar on top of other windows", IDC_TASKBARPROP_ONTOP, 13,71,200,10 + AUTOCHECKBOX "&Group similar taskbar buttons", IDC_TASKBARPROP_GROUP, 13,84,200,10 + AUTOCHECKBOX "Show &Quick Launch", IDC_TASKBARPROP_SHOWQL, 13,97,200,10 + AUTOCHECKBOX "&Show window previews (thumbnails)", IDC_TASKBARPROP_WNDPREV, 13,110,200,10 END IDD_TASKBARPROP_STARTMENU DIALOGEX 0, 0, 252, 218 Modified: trunk/reactos/base/shell/explorer-new/trayprop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/tr…
============================================================================== --- trunk/reactos/base/shell/explorer-new/trayprop.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/trayprop.c [iso-8859-1] Fri Jul 24 00:11:06 2009 @@ -38,8 +38,7 @@ HWND hwndBitmap; BOOL bLock, bHide, bGroup, bShowQL; LPTSTR lpImageName = NULL; - RECT BitmapRect; - BOOL bRet = FALSE; + BOOL bRet = FALSE; hwndLock = GetDlgItem(pPropInfo->hTaskbarWnd, IDC_TASKBARPROP_LOCK); hwndHide = GetDlgItem(pPropInfo->hTaskbarWnd, IDC_TASKBARPROP_HIDE); @@ -318,7 +317,6 @@ PROPSHEETHEADER psh; PROPSHEETPAGE psp[4]; TCHAR szCaption[256]; - HWND hwnd = 0; pPropInfo = (PPROPSHEET_INFO)HeapAlloc(hProcessHeap, HEAP_ZERO_MEMORY,
15 years, 5 months
1
0
0
0
[janderwald] 42166: - fix clobering of stack in the event, property, method and start device routine
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Jul 23 23:48:47 2009 New Revision: 42166 URL:
http://svn.reactos.org/svn/reactos?rev=42166&view=rev
Log: - fix clobering of stack in the event, property, method and start device routine Modified: trunk/reactos/include/ddk/portcls.h Modified: trunk/reactos/include/ddk/portcls.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/portcls.h?rev=…
============================================================================== --- trunk/reactos/include/ddk/portcls.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/portcls.h [iso-8859-1] Thu Jul 23 23:48:47 2009 @@ -239,7 +239,7 @@ typedef struct _PCPROPERTY_REQUEST PCPROPERTY_REQUEST, *PPCPROPERTY_REQUEST; -typedef NTSTATUS (*PCPFNPROPERTY_HANDLER)( +typedef NTSTATUS NTAPI(*PCPFNPROPERTY_HANDLER)( IN PPCPROPERTY_REQUEST PropertyRequest); typedef struct @@ -281,7 +281,7 @@ struct _PCEVENT_REQUEST; -typedef NTSTATUS (*PCPFNEVENT_HANDLER)( +typedef NTSTATUS NTAPI(*PCPFNEVENT_HANDLER)( IN struct _PCEVENT_REQUEST* EventRequest); typedef struct _PCEVENT_ITEM @@ -307,7 +307,7 @@ struct _PCMETHOD_REQUEST; -typedef NTSTATUS (*PCPFNMETHOD_HANDLER)( +typedef NTSTATUS NTAPI(*PCPFNMETHOD_HANDLER)( IN struct _PCMETHOD_REQUEST* MethodRequest); typedef struct _PCMETHOD_ITEM @@ -834,7 +834,7 @@ struct IInterruptSync; -typedef NTSTATUS (*PINTERRUPTSYNCROUTINE)( +typedef NTSTATUS NTAPI(*PINTERRUPTSYNCROUTINE)( IN struct IInterruptSync* InterruptSync, IN PVOID DynamicContext); @@ -2048,7 +2048,7 @@ PortCls API Functions */ -typedef NTSTATUS (*PCPFNSTARTDEVICE)( +typedef NTSTATUS NTAPI(*PCPFNSTARTDEVICE)( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PRESOURCELIST ResourceList);
15 years, 5 months
1
0
0
0
[gedmurphy] 42165: Draw the appropriate taskbar mockup image in the dialog when the user clicks the checkboxes
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Thu Jul 23 23:35:52 2009 New Revision: 42165 URL:
http://svn.reactos.org/svn/reactos?rev=42165&view=rev
Log: Draw the appropriate taskbar mockup image in the dialog when the user clicks the checkboxes Added: trunk/reactos/base/shell/explorer-new/res/auto_hide.bmp (with props) trunk/reactos/base/shell/explorer-new/res/lock_group_noql.bmp (with props) trunk/reactos/base/shell/explorer-new/res/lock_group_ql.bmp (with props) trunk/reactos/base/shell/explorer-new/res/lock_nogroup_noql.bmp (with props) trunk/reactos/base/shell/explorer-new/res/lock_nogroup_ql.bmp (with props) trunk/reactos/base/shell/explorer-new/res/nolock_group_noql.bmp (with props) trunk/reactos/base/shell/explorer-new/res/nolock_nogroup_noql.bmp (with props) trunk/reactos/base/shell/explorer-new/res/nolock_nogroup_ql.bmp (with props) Modified: trunk/reactos/base/shell/explorer-new/explorer.rc trunk/reactos/base/shell/explorer-new/lang/en-US.rc trunk/reactos/base/shell/explorer-new/resource.h trunk/reactos/base/shell/explorer-new/trayprop.c Modified: trunk/reactos/base/shell/explorer-new/explorer.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/ex…
============================================================================== --- trunk/reactos/base/shell/explorer-new/explorer.rc [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/explorer.rc [iso-8859-1] Thu Jul 23 23:35:52 2009 @@ -10,6 +10,16 @@ IDI_START ICON DISCARDABLE res/start.ico IDB_STARTMENU BITMAP DISCARDABLE res/logov.bmp + +IDB_TASKBARPROP_AUTOHIDE BITMAP DISCARDABLE res/auto_hide.bmp +IDB_TASKBARPROP_LOCK_GROUP_NOQL BITMAP DISCARDABLE res/lock_group_noql.bmp +IDB_TASKBARPROP_LOCK_GROUP_QL BITMAP DISCARDABLE res/lock_group_ql.bmp +IDB_TASKBARPROP_LOCK_NOGROUP_NOQL BITMAP DISCARDABLE res/lock_nogroup_noql.bmp +IDB_TASKBARPROP_LOCK_NOGROUP_QL BITMAP DISCARDABLE res/lock_nogroup_ql.bmp +IDB_TASKBARPROP_NOLOCK_GROUP_NOQL BITMAP DISCARDABLE res/nolock_group_noql.bmp +IDB_TASKBARPROP_NOLOCK_NOGROUP_NOQL BITMAP DISCARDABLE res/nolock_nogroup_noql.bmp +IDB_TASKBARPROP_NOLOCK_NOGROUP_QL BITMAP DISCARDABLE res/nolock_nogroup_ql.bmp +IDB_TASKBARPROP_NOLOCK_GROUP_QL BITMAP DISCARDABLE res/nolock_nogroup_ql.bmp #include "lang/bg-BG.rc" #include "lang/cs-CZ.rc" Modified: trunk/reactos/base/shell/explorer-new/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/la…
============================================================================== --- trunk/reactos/base/shell/explorer-new/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/lang/en-US.rc [iso-8859-1] Thu Jul 23 23:35:52 2009 @@ -59,14 +59,14 @@ CAPTION "Taskbar" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - GROUPBOX "Taskbar appearance", IDC_STATIC, 6,6,240,121, WS_DISABLED - CONTROL "", IDC_TASKBARPROP_TASKBARBITMAP, "Static", SS_BITMAP | SS_SUNKEN, 13,18,224,21, WS_DISABLED - AUTOCHECKBOX "&Lock the taskbar", IDC_TASKBARPROP_LOCK, 13,45,200,10, WS_DISABLED - AUTOCHECKBOX "A&uto-hide the taskbar", IDC_TASKBARPROP_HIDE, 13,58,200,10, WS_DISABLED - AUTOCHECKBOX "Keep the &taskbar on top of other windows", IDC_TASKBARPROP_ONTOP, 13,71,200,10, WS_DISABLED - AUTOCHECKBOX "&Group similar taskbar buttons", IDC_TASKBARPROP_GROUP, 13,84,200,10, WS_DISABLED - AUTOCHECKBOX "Show &Quick Launch", IDC_TASKBARPROP_SHOWQL, 13,97,200,10, WS_DISABLED - AUTOCHECKBOX "&Show window previews (thumbnails)", IDC_TASKBARPROP_WNDPREV, 13,110,200,10, WS_DISABLED + GROUPBOX "Taskbar appearance", IDC_STATIC, 6,6,240,121, + CONTROL "", IDC_TASKBARPROP_TASKBARBITMAP, "Static", SS_BITMAP | SS_SUNKEN, 13,18,224,21, + AUTOCHECKBOX "&Lock the taskbar", IDC_TASKBARPROP_LOCK, 13,45,200,10, + AUTOCHECKBOX "A&uto-hide the taskbar", IDC_TASKBARPROP_HIDE, 13,58,200,10, + AUTOCHECKBOX "Keep the &taskbar on top of other windows", IDC_TASKBARPROP_ONTOP, 13,71,200,10, + AUTOCHECKBOX "&Group similar taskbar buttons", IDC_TASKBARPROP_GROUP, 13,84,200,10, + AUTOCHECKBOX "Show &Quick Launch", IDC_TASKBARPROP_SHOWQL, 13,97,200,10, + AUTOCHECKBOX "&Show window previews (thumbnails)", IDC_TASKBARPROP_WNDPREV, 13,110,200,10, END IDD_TASKBARPROP_STARTMENU DIALOGEX 0, 0, 252, 218 Added: trunk/reactos/base/shell/explorer-new/res/auto_hide.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/re…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/base/shell/explorer-new/res/auto_hide.bmp ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/base/shell/explorer-new/res/lock_group_noql.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/re…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/base/shell/explorer-new/res/lock_group_noql.bmp ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/base/shell/explorer-new/res/lock_group_ql.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/re…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/base/shell/explorer-new/res/lock_group_ql.bmp ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/base/shell/explorer-new/res/lock_nogroup_noql.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/re…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/base/shell/explorer-new/res/lock_nogroup_noql.bmp ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/base/shell/explorer-new/res/lock_nogroup_ql.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/re…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/base/shell/explorer-new/res/lock_nogroup_ql.bmp ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/base/shell/explorer-new/res/nolock_group_noql.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/re…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/base/shell/explorer-new/res/nolock_group_noql.bmp ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/base/shell/explorer-new/res/nolock_nogroup_noql.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/re…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/base/shell/explorer-new/res/nolock_nogroup_noql.bmp ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/base/shell/explorer-new/res/nolock_nogroup_ql.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/re…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/base/shell/explorer-new/res/nolock_nogroup_ql.bmp ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Modified: trunk/reactos/base/shell/explorer-new/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/re…
============================================================================== --- trunk/reactos/base/shell/explorer-new/resource.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/resource.h [iso-8859-1] Thu Jul 23 23:35:52 2009 @@ -54,6 +54,7 @@ #define IDD_NOTIFICATIONPAGE 2002 #define IDD_TOOLBARSPAGE 2003 +/* Taskbar properties, taskbar */ #define IDD_TASKBARPROP_TASKBAR 2000 #define IDC_TASKBARPROP_TASKBARBITMAP 2001 #define IDC_TASKBARPROP_LOCK 2002 @@ -63,6 +64,17 @@ #define IDC_TASKBARPROP_SHOWQL 2006 #define IDC_TASKBARPROP_WNDPREV 2007 +#define IDB_TASKBARPROP_AUTOHIDE 2050 +#define IDB_TASKBARPROP_LOCK_GROUP_NOQL 2051 +#define IDB_TASKBARPROP_LOCK_GROUP_QL 2052 +#define IDB_TASKBARPROP_LOCK_NOGROUP_NOQL 2053 +#define IDB_TASKBARPROP_LOCK_NOGROUP_QL 2054 +#define IDB_TASKBARPROP_NOLOCK_GROUP_NOQL 2055 +#define IDB_TASKBARPROP_NOLOCK_NOGROUP_NOQL 2056 +#define IDB_TASKBARPROP_NOLOCK_NOGROUP_QL 2057 +#define IDB_TASKBARPROP_NOLOCK_GROUP_QL 2058 + +/* Taskbar properties, startmenu*/ #define IDD_TASKBARPROP_STARTMENU 2100 #define IDC_TASKBARPROP_STARTMENU 2101 #define IDC_TASKBARPROP_STARTMENUCUST 2102 @@ -71,6 +83,7 @@ #define IDC_TASKBARPROP_RECENTFILES 2105 #define IDC_TASKBARPROP_RECENTFOLDERS 2106 +/* Taskbar properties, notification */ #define IDD_TASKBARPROP_NOTIFICATION 2200 #define IDC_TASKBARPROP_NOTIFICATIONBITMAP 2201 #define IDC_TASKBARPROP_HIDEICONS 2202 @@ -80,6 +93,7 @@ #define IDC_TASKBARPROP_NETWORK 2206 #define IDC_TASKBARPROP_POWER 2207 +/* Taskbar properties, toolbars */ #define IDD_TASKBARPROP_TOOLBARS 2300 #define IDC_TASKBARPROP_DESKBANDLIST 2301 Modified: trunk/reactos/base/shell/explorer-new/trayprop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/tr…
============================================================================== --- trunk/reactos/base/shell/explorer-new/trayprop.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/trayprop.c [iso-8859-1] Thu Jul 23 23:35:52 2009 @@ -20,35 +20,170 @@ #include <precomp.h> +typedef struct _PROPSHEET_INFO +{ + HWND hTaskbarWnd; + HWND hStartWnd; + HWND hNotiWnd; + HWND hToolWnd; + + HBITMAP hTaskbarBitmap; +} PROPSHEET_INFO, *PPROPSHEET_INFO; + + +static BOOL +UpdateTaskbarBitmap(PPROPSHEET_INFO pPropInfo) +{ + HWND hwndLock, hwndHide, hwndGroup, hwndShowQL; + HWND hwndBitmap; + BOOL bLock, bHide, bGroup, bShowQL; + LPTSTR lpImageName = NULL; + RECT BitmapRect; + BOOL bRet = FALSE; + + hwndLock = GetDlgItem(pPropInfo->hTaskbarWnd, IDC_TASKBARPROP_LOCK); + hwndHide = GetDlgItem(pPropInfo->hTaskbarWnd, IDC_TASKBARPROP_HIDE); + hwndGroup = GetDlgItem(pPropInfo->hTaskbarWnd, IDC_TASKBARPROP_GROUP); + hwndShowQL = GetDlgItem(pPropInfo->hTaskbarWnd, IDC_TASKBARPROP_SHOWQL); + + if (hwndLock && hwndHide && hwndGroup && hwndShowQL) + { + bLock = (SendMessage(hwndLock, BM_GETCHECK, 0, 0) == BST_CHECKED); + bHide = (SendMessage(hwndHide, BM_GETCHECK, 0, 0) == BST_CHECKED); + bGroup = (SendMessage(hwndGroup, BM_GETCHECK, 0, 0) == BST_CHECKED); + bShowQL = (SendMessage(hwndShowQL, BM_GETCHECK, 0, 0) == BST_CHECKED); + + if (bHide) + lpImageName = MAKEINTRESOURCE(IDB_TASKBARPROP_AUTOHIDE); + else if (bLock && bGroup && bShowQL) + lpImageName = MAKEINTRESOURCE(IDB_TASKBARPROP_LOCK_GROUP_QL); + else if (bLock && !bGroup && !bShowQL) + lpImageName = MAKEINTRESOURCE(IDB_TASKBARPROP_LOCK_NOGROUP_NOQL); + else if (bLock && bGroup && !bShowQL) + lpImageName = MAKEINTRESOURCE(IDB_TASKBARPROP_LOCK_GROUP_NOQL); + else if (bLock && !bGroup && bShowQL) + lpImageName = MAKEINTRESOURCE(IDB_TASKBARPROP_LOCK_NOGROUP_QL); + else if (!bLock && !bGroup && !bShowQL) + lpImageName = MAKEINTRESOURCE(IDB_TASKBARPROP_NOLOCK_NOGROUP_NOQL); + else if (!bLock && bGroup && !bShowQL) + lpImageName = MAKEINTRESOURCE(IDB_TASKBARPROP_NOLOCK_GROUP_NOQL); + else if (!bLock && !bGroup && bShowQL) + lpImageName = MAKEINTRESOURCE(IDB_TASKBARPROP_NOLOCK_NOGROUP_QL); + else if (!bLock && bGroup && bShowQL) + lpImageName = MAKEINTRESOURCE(IDB_TASKBARPROP_NOLOCK_GROUP_QL); + + if (lpImageName) + { + if (pPropInfo->hTaskbarBitmap) + { + DeleteObject(pPropInfo->hTaskbarBitmap); + } + + pPropInfo->hTaskbarBitmap = LoadImage(hExplorerInstance, + lpImageName, + IMAGE_BITMAP, + 0, + 0, + LR_DEFAULTCOLOR); + if (pPropInfo->hTaskbarBitmap) + { + hwndBitmap = GetDlgItem(pPropInfo->hTaskbarWnd, + IDC_TASKBARPROP_TASKBARBITMAP); + if (hwndBitmap) + { + SendMessage(hwndBitmap, + STM_SETIMAGE, + IMAGE_BITMAP, + (LPARAM)pPropInfo->hTaskbarBitmap); + } + } + } + } + + return bRet; +} + +static VOID +OnCreateTaskbarPage(HWND hwnd, + PPROPSHEET_INFO pPropInfo) +{ + SetWindowLongPtr(hwnd, + GWLP_USERDATA, + (LONG_PTR)pPropInfo); + + pPropInfo->hTaskbarWnd = hwnd; + + // FIXME: check buttons + + UpdateTaskbarBitmap(pPropInfo); +} + INT_PTR CALLBACK TaskbarPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { + PPROPSHEET_INFO pPropInfo; + + /* Get the window context */ + pPropInfo = (PPROPSHEET_INFO)GetWindowLongPtrW(hwndDlg, + GWLP_USERDATA); + if (pPropInfo == NULL && uMsg != WM_INITDIALOG) + { + goto HandleDefaultMessage; + } + switch (uMsg) { case WM_INITDIALOG: - break; + OnCreateTaskbarPage(hwndDlg, (PPROPSHEET_INFO)lParam); + break; + + case WM_COMMAND: + switch(LOWORD(wParam)) + { + case IDC_TASKBARPROP_LOCK: + case IDC_TASKBARPROP_HIDE: + case IDC_TASKBARPROP_GROUP: + case IDC_TASKBARPROP_SHOWQL: + if (HIWORD(wParam) == BN_CLICKED) + { + UpdateTaskbarBitmap(pPropInfo); + + /* Enable the 'Apply' button */ + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + } + break; + } + break; + + case WM_NOTIFY: + { + LPNMHDR pnmh = (LPNMHDR)lParam; + + switch(pnmh->code) + { + case PSN_SETACTIVE: + break; + + case PSN_APPLY: + break; + } + + break; + } case WM_DESTROY: - break; - - case WM_NOTIFY: - { - LPNMHDR pnmh = (LPNMHDR)lParam; - - switch(pnmh->code) - { - case PSN_SETACTIVE: - break; - - case PSN_APPLY: - break; - } - - break; - } + if (pPropInfo->hTaskbarBitmap) + { + DeleteObject(pPropInfo->hTaskbarBitmap); + } + break; + +HandleDefaultMessage: + default: + return FALSE; } return FALSE; @@ -161,13 +296,17 @@ static VOID -InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc) +InitPropSheetPage(PROPSHEETPAGE *psp, + WORD idDlg, + DLGPROC DlgProc, + LPARAM lParam) { ZeroMemory(psp, sizeof(PROPSHEETPAGE)); psp->dwSize = sizeof(PROPSHEETPAGE); psp->dwFlags = PSP_DEFAULT; psp->hInstance = hExplorerInstance; psp->pszTemplate = MAKEINTRESOURCE(idDlg); + psp->lParam = lParam; psp->pfnDlgProc = DlgProc; } @@ -175,9 +314,19 @@ HWND DisplayTrayProperties(ITrayWindow *Tray) { + PPROPSHEET_INFO pPropInfo; PROPSHEETHEADER psh; PROPSHEETPAGE psp[4]; TCHAR szCaption[256]; + HWND hwnd = 0; + + pPropInfo = (PPROPSHEET_INFO)HeapAlloc(hProcessHeap, + HEAP_ZERO_MEMORY, + sizeof(PROPSHEET_INFO)); + if (!pPropInfo) + { + return NULL; + } if (!LoadString(hExplorerInstance, IDS_TASKBAR_STARTMENU_PROP_CAPTION, @@ -198,10 +347,17 @@ psh.nStartPage = 0; psh.ppsp = psp; - InitPropSheetPage(&psp[0], IDD_TASKBARPROP_TASKBAR, (DLGPROC)TaskbarPageProc); - InitPropSheetPage(&psp[1], IDD_TASKBARPROP_STARTMENU, (DLGPROC)StartMenuPageProc); - InitPropSheetPage(&psp[2], IDD_TASKBARPROP_NOTIFICATION, (DLGPROC)NotificationPageProc); - InitPropSheetPage(&psp[3], IDD_TASKBARPROP_TOOLBARS, (DLGPROC)ToolbarsPageProc); - - return (HWND)PropertySheet(&psh); -} + InitPropSheetPage(&psp[0], IDD_TASKBARPROP_TASKBAR, (DLGPROC)TaskbarPageProc, (LPARAM)pPropInfo); + InitPropSheetPage(&psp[1], IDD_TASKBARPROP_STARTMENU, (DLGPROC)StartMenuPageProc, (LPARAM)pPropInfo); + InitPropSheetPage(&psp[2], IDD_TASKBARPROP_NOTIFICATION, (DLGPROC)NotificationPageProc, (LPARAM)pPropInfo); + InitPropSheetPage(&psp[3], IDD_TASKBARPROP_TOOLBARS, (DLGPROC)ToolbarsPageProc, (LPARAM)pPropInfo); + + PropertySheet(&psh); + + HeapFree(hProcessHeap, + 0, + pPropInfo); + + // FIXME: return the HWND + return NULL; +}
15 years, 5 months
1
0
0
0
[janderwald] 42164: - Add calling convention for callback typedefs - Ros needs msvc!
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Jul 23 23:32:39 2009 New Revision: 42164 URL:
http://svn.reactos.org/svn/reactos?rev=42164&view=rev
Log: - Add calling convention for callback typedefs - Ros needs msvc! Modified: trunk/reactos/include/psdk/ks.h Modified: trunk/reactos/include/psdk/ks.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ks.h?rev=4216…
============================================================================== --- trunk/reactos/include/psdk/ks.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ks.h [iso-8859-1] Thu Jul 23 23:32:39 2009 @@ -1104,7 +1104,7 @@ #if defined(_NTDDK_) /* MOVE ME */ -typedef NTSTATUS (*PFNKSCONTEXT_DISPATCH)( +typedef NTSTATUS NTAPI NTAPI (*PFNKSCONTEXT_DISPATCH)( IN PVOID Context, IN PIRP Irp); #endif @@ -1259,13 +1259,15 @@ #define KSPROPERTY_ATTRIBUTES_IRP_STORAGE(Irp) (*(PKSATTRIBUTE_LIST*)&(Irp)->Tail.Overlay.DriverContext[2]) typedef -VOID +VOID +NTAPI (*PFNREFERENCEDEVICEOBJECT)( IN PVOID Context ); typedef -VOID +VOID +NTAPI (*PFNDEREFERENCEDEVICEOBJECT)( IN PVOID Context ); @@ -1436,7 +1438,7 @@ } KSPROPERTY_VALUES, *PKSPROPERTY_VALUES; #if defined(_NTDDK_) -typedef NTSTATUS (*PFNKSHANDLER)( +typedef NTSTATUS NTAPI(*PFNKSHANDLER)( IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data); @@ -1868,13 +1870,14 @@ LONGLONG Interval; } KSEVENT_TIME_INTERVAL, *PKSEVENT_TIME_INTERVAL; -typedef NTSTATUS (*PFNKSADDEVENT)( +typedef NTSTATUS NTAPI (*PFNKSADDEVENT)( IN PIRP Irp, IN PKSEVENTDATA EventData, IN struct _KSEVENT_ENTRY* EventEntry); typedef VOID +NTAPI (*PFNKSREMOVEEVENT)( IN PFILE_OBJECT FileObject, IN struct _KSEVENT_ENTRY* EventEntry @@ -1938,6 +1941,7 @@ typedef NTSTATUS +NTAPI (*PFNKSPINHANDSHAKE)( IN PKSPIN Pin, IN PKSHANDSHAKE In, @@ -1946,6 +1950,7 @@ typedef void +NTAPI (*PFNKSPINPOWER)( IN PKSPIN Pin, IN DEVICE_POWER_STATE State @@ -1953,6 +1958,7 @@ typedef void +NTAPI (*PFNKSPINFRAMERETURN)( IN PKSPIN Pin, IN PVOID Data OPTIONAL, @@ -1964,6 +1970,7 @@ typedef void +NTAPI (*PFNKSPINIRPCOMPLETION)( IN PKSPIN Pin, IN PIRP Irp @@ -1971,6 +1978,7 @@ typedef NTSTATUS +NTAPI (*PFNKSPINIRP)( IN PKSPIN Pin, IN PIRP Irp @@ -1978,18 +1986,21 @@ typedef NTSTATUS +NTAPI (*PFNKSPIN)( IN PKSPIN Pin ); typedef void +NTAPI (*PFNKSPINVOID)( IN PKSPIN Pin ); typedef void +NTAPI (*PFNKSSTREAMPOINTER)( IN PKSSTREAM_POINTER StreamPointer ); @@ -2001,6 +2012,7 @@ typedef NTSTATUS +NTAPI (*PFNKSPINSETDATAFORMAT)( IN PKSPIN Pin, IN PKSDATAFORMAT OldFormat OPTIONAL, @@ -2011,6 +2023,7 @@ typedef NTSTATUS +NTAPI (*PFNKSPINSETDEVICESTATE)( IN PKSPIN Pin, IN KSSTATE ToState, @@ -2036,7 +2049,7 @@ typedef BOOLEAN -(*PFNKSPINSETTIMER)( +NTAPI (*PFNKSPINSETTIMER)( IN PKSPIN Pin, IN PKTIMER Timer, IN LARGE_INTEGER DueTime, @@ -2045,7 +2058,7 @@ typedef BOOLEAN -(*PFNKSPINCANCELTIMER)( +NTAPI (*PFNKSPINCANCELTIMER)( IN PKSPIN Pin, IN PKTIMER Timer ); @@ -2059,7 +2072,7 @@ typedef void -(*PFNKSPINRESOLUTION)( +NTAPI (*PFNKSPINRESOLUTION)( IN PKSPIN Pin, OUT PKSRESOLUTION Resolution ); @@ -2073,19 +2086,19 @@ typedef NTSTATUS -(*PFNKSPININITIALIZEALLOCATOR)( +NTAPI (*PFNKSPININITIALIZEALLOCATOR)( IN PKSPIN Pin, IN PKSALLOCATOR_FRAMING AllocatorFraming, OUT PVOID* Context ); -typedef PVOID (*PFNKSDELETEALLOCATOR)( +typedef PVOID NTAPI (*PFNKSDELETEALLOCATOR)( IN PVOID Context); -typedef PVOID (*PFNKSDEFAULTALLOCATE)( +typedef PVOID NTAPI (*PFNKSDEFAULTALLOCATE)( IN PVOID Context); -typedef PVOID (*PFNKSDEFAULTFREE)( +typedef PVOID NTAPI (*PFNKSDEFAULTFREE)( IN PVOID Context, IN PVOID Buffer); @@ -2137,7 +2150,7 @@ typedef NTSTATUS -(*PFNKSINTERSECTHANDLER)( +NTAPI (*PFNKSINTERSECTHANDLER)( IN PIRP Irp, IN PKSP_PIN Pin, IN PKSDATARANGE DataRange, @@ -2146,7 +2159,7 @@ typedef NTSTATUS -(*PFNKSINTERSECTHANDLEREX)( +NTAPI (*PFNKSINTERSECTHANDLEREX)( IN PVOID Context, IN PIRP Irp, IN PKSP_PIN Pin, @@ -2367,7 +2380,7 @@ typedef void -(*PFNKSFREE)( +NTAPI (*PFNKSFREE)( IN PVOID Data ); @@ -2465,12 +2478,12 @@ OUT PVOID* Context); #if defined(_NTDDK_) -typedef NTSTATUS (*PFNKSALLOCATOR)( +typedef NTSTATUS NTAPI (*PFNKSALLOCATOR)( IN PIRP Irp, IN ULONG BufferSize, IN BOOLEAN InputOperation); -typedef NTSTATUS (*PFNKINTERSECTHANDLEREX)( +typedef NTSTATUS NTAPI (*PFNKINTERSECTHANDLEREX)( IN PVOID Context, IN PIRP Irp, IN PKSP_PIN Pin, @@ -2484,7 +2497,7 @@ typedef NTSTATUS NTAPI -(*PFNALLOCATOR_ALLOCATEFRAME)( +NTAPI (*PFNALLOCATOR_ALLOCATEFRAME)( IN PFILE_OBJECT FileObject, PVOID *Frame ); @@ -2492,7 +2505,7 @@ typedef VOID NTAPI -(*PFNALLOCATOR_FREEFRAME)( +NTAPI (*PFNALLOCATOR_FREEFRAME)( IN PFILE_OBJECT FileObject, IN PVOID Frame ); @@ -2619,32 +2632,32 @@ typedef struct _KSFILTER_DESCRIPTOR KSFILTER_DESCRIPTOR, *PKSFILTER_DESCRIPTOR; typedef struct _KSDEVICE_DESCRIPTOR KSDEVICE_DESCRIPTOR, *PKSDEVICE_DESCRIPTOR; -typedef NTSTATUS (*PFNKSDEVICECREATE)( +typedef NTSTATUS NTAPI (*PFNKSDEVICECREATE)( IN PKSDEVICE Device); -typedef NTSTATUS (*PFNKSDEVICEPNPSTART)( +typedef NTSTATUS NTAPI (*PFNKSDEVICEPNPSTART)( IN PKSDEVICE Device, IN PIRP Irp, IN PCM_RESOURCE_LIST TranslatedResourceList OPTIONAL, IN PCM_RESOURCE_LIST UntranslatedResourceList OPTIONAL); -typedef NTSTATUS (*PFNKSDEVICE)( +typedef NTSTATUS NTAPI (*PFNKSDEVICE)( IN PKSDEVICE Device); -typedef NTSTATUS (*PFNKSDEVICEIRP)( +typedef NTSTATUS NTAPI (*PFNKSDEVICEIRP)( IN PKSDEVICE Device, IN PIRP Irp); -typedef VOID (*PFNKSDEVICEIRPVOID)( +typedef VOID NTAPI (*PFNKSDEVICEIRPVOID)( IN PKSDEVICE Device, IN PIRP Irp); -typedef NTSTATUS (*PFNKSDEVICEQUERYCAPABILITIES)( +typedef NTSTATUS NTAPI (*PFNKSDEVICEQUERYCAPABILITIES)( IN PKSDEVICE Device, IN PIRP Irp, IN OUT PDEVICE_CAPABILITIES Capabilities); -typedef NTSTATUS (*PFNKSDEVICEQUERYPOWER)( +typedef NTSTATUS NTAPI (*PFNKSDEVICEQUERYPOWER)( IN PKSDEVICE Device, IN PIRP Irp, IN DEVICE_POWER_STATE DeviceTo, @@ -2653,7 +2666,7 @@ IN SYSTEM_POWER_STATE SystemFrom, IN POWER_ACTION Action); -typedef VOID (*PFNKSDEVICESETPOWER)( +typedef VOID NTAPI (*PFNKSDEVICESETPOWER)( IN PKSDEVICE Device, IN PIRP Irp, IN DEVICE_POWER_STATE To, @@ -2708,20 +2721,20 @@ typedef void -(*PFNKSFILTERPOWER)( +NTAPI (*PFNKSFILTERPOWER)( IN PKSFILTER Filter, IN DEVICE_POWER_STATE State ); -typedef NTSTATUS (*PFNKSFILTERIRP)( +typedef NTSTATUS NTAPI (*PFNKSFILTERIRP)( IN PKSFILTER Filter, IN PIRP Irp); -typedef NTSTATUS (*PFNKSFILTERPROCESS)( - IN PKSFILTER FIlter, +typedef NTSTATUS NTAPI (*PFNKSFILTERPROCESS)( + IN PKSFILTER Filter, IN PKSPROCESSPIN_INDEXENTRY ProcessPinsIndex); -typedef NTSTATUS (*PFNKSFILTERVOID)( +typedef NTSTATUS NTAPI (*PFNKSFILTERVOID)( IN PKSFILTER Filter); struct _KSFILTER_DISPATCH @@ -2779,12 +2792,12 @@ Minidriver Callbacks */ #if defined(_NTDDK_) -typedef NTSTATUS (*KStrMethodHandler)( +typedef NTSTATUS NTAPI (*KStrMethodHandler)( IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data); -typedef NTSTATUS (*KStrSupportHandler)( +typedef NTSTATUS NTAPI (*KStrSupportHandler)( IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data); @@ -2829,13 +2842,13 @@ Clock Functions */ #if defined(_NTDDK_) -typedef BOOLEAN (*PFNKSSETTIMER)( +typedef BOOLEAN NTAPI (*PFNKSSETTIMER)( IN PVOID Context, IN PKTIMER Timer, IN LARGE_INTEGER DueTime, IN PKDPC Dpc); -typedef BOOLEAN (*PFNKSCANCELTIMER)( +typedef BOOLEAN NTAPI (*PFNKSCANCELTIMER)( IN PVOID Context, IN PKTIMER Timer); @@ -3001,7 +3014,7 @@ typedef BOOLEAN -(*PFNKSGENERATEEVENTCALLBACK)( +NTAPI (*PFNKSGENERATEEVENTCALLBACK)( IN PVOID Context, IN PKSEVENT_ENTRY EventEntry ); @@ -3152,7 +3165,7 @@ IRP Helper Functions */ -typedef NTSTATUS (*PFNKSIRPLISTCALLBACK)( +typedef NTSTATUS NTAPI (*PFNKSIRPLISTCALLBACK)( IN PIRP Irp, IN PVOID Context); @@ -3585,7 +3598,7 @@ IN const KSDEVICE_DESCRIPTOR* Descriptor OPTIONAL); -typedef void (*PFNKSFILTERFACTORYPOWER)( +typedef void NTAPI (*PFNKSFILTERFACTORYPOWER)( IN PKSFILTERFACTORY FilterFactory, IN DEVICE_POWER_STATE State);
15 years, 5 months
1
0
0
0
[jmorlan] 42163: LoadLibraryExW: After loading a library as a datafile, clean up properly (don't leak SearchPath, and don't free DllName if we didn't allocate it)
by jmorlan@svn.reactos.org
Author: jmorlan Date: Thu Jul 23 22:48:43 2009 New Revision: 42163 URL:
http://svn.reactos.org/svn/reactos?rev=42163&view=rev
Log: LoadLibraryExW: After loading a library as a datafile, clean up properly (don't leak SearchPath, and don't free DllName if we didn't allocate it) Modified: trunk/reactos/dll/win32/kernel32/misc/ldr.c Modified: trunk/reactos/dll/win32/kernel32/misc/ldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/ld…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/ldr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/ldr.c [iso-8859-1] Thu Jul 23 22:48:43 2009 @@ -266,14 +266,7 @@ * 'native' libraries only */ Status = LoadLibraryAsDatafile(SearchPath, DllName.Buffer, &hInst); - RtlFreeUnicodeString(&DllName); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return NULL; - } - - return hInst; + goto done; } } @@ -292,6 +285,7 @@ Status = LdrLoadDll(SearchPath, &dwFlags, &DllName, (PVOID*)&hInst); } +done: RtlFreeHeap(RtlGetProcessHeap(), 0, SearchPath); if (FreeString) RtlFreeUnicodeString(&DllName);
15 years, 5 months
1
0
0
0
[sginsberg] 42162: - Use the KiProcessorBlock array to loop the PRCBs in a portable way
by sginsberg@svn.reactos.org
Author: sginsberg Date: Thu Jul 23 21:37:09 2009 New Revision: 42162 URL:
http://svn.reactos.org/svn/reactos?rev=42162&view=rev
Log: - Use the KiProcessorBlock array to loop the PRCBs in a portable way Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] Thu Jul 23 21:37:09 2009 @@ -956,9 +956,11 @@ } CurrentTime.QuadPart = KeQueryInterruptTime(); - Prcb = KeGetPcr()->Prcb; for (i = 0; i < KeNumberProcessors; i++) { + /* Get the PRCB on this processor */ + Prcb = KiProcessorBlock[i]; + /* Calculate total user and kernel times */ TotalTime = Prcb->IdleThread->KernelTime + Prcb->IdleThread->UserTime; Spi->IdleTime.QuadPart = UInt32x32To64(TotalTime, KeMaximumIncrement); @@ -968,7 +970,6 @@ Spi->InterruptTime.QuadPart = UInt32x32To64(Prcb->InterruptTime, KeMaximumIncrement); Spi->InterruptCount = Prcb->InterruptCount; Spi++; - Prcb = (PKPRCB)((ULONG_PTR)Prcb + PAGE_SIZE); } return STATUS_SUCCESS;
15 years, 5 months
1
0
0
0
[janderwald] 42161: - Don't blame Arch, it was ks.h
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Jul 23 21:27:53 2009 New Revision: 42161 URL:
http://svn.reactos.org/svn/reactos?rev=42161&view=rev
Log: - Don't blame Arch, it was ks.h Modified: trunk/reactos/include/psdk/ks.h Modified: trunk/reactos/include/psdk/ks.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ks.h?rev=4216…
============================================================================== --- trunk/reactos/include/psdk/ks.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ks.h [iso-8859-1] Thu Jul 23 21:27:53 2009 @@ -3761,6 +3761,8 @@ #endif +#if defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__) + typedef interface IKsReferenceClock* PIKSREFERENCECLOCK; #undef INTERFACE @@ -3828,6 +3830,8 @@ #undef INTERFACE typedef IKsControl* PIKSCONTROL; +#endif + KSDDKAPI VOID NTAPI
15 years, 5 months
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
61
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Results per page:
10
25
50
100
200