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 2006
----- 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
19 participants
662 discussions
Start a n
N
ew thread
[greatlrd] 23240: move more code into startup.c
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sun Jul 23 14:12:08 2006 New Revision: 23240 URL:
http://svn.reactos.org/svn/reactos?rev=23240&view=rev
Log: move more code into startup.c Modified: trunk/reactos/dll/directx/ddraw/hal/ddraw_hal.c trunk/reactos/dll/directx/ddraw/rosdraw.h trunk/reactos/dll/directx/ddraw/startup.c Modified: trunk/reactos/dll/directx/ddraw/hal/ddraw_hal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/hal/ddra…
============================================================================== --- trunk/reactos/dll/directx/ddraw/hal/ddraw_hal.c (original) +++ trunk/reactos/dll/directx/ddraw/hal/ddraw_hal.c Sun Jul 23 14:12:08 2006 @@ -9,156 +9,6 @@ */ #include "rosdraw.h" - - -HRESULT Hal_DirectDraw_Initialize (LPDIRECTDRAW7 iface) -{ - IDirectDrawImpl* This = (IDirectDrawImpl*)iface; - - /* HAL Startup process */ - BOOL newmode = FALSE; - - - /* - Startup DX HAL step one of three - */ - if (!DdCreateDirectDrawObject(&This->mDDrawGlobal, This->hdc)) - { - DxHeapMemFree(This->mpModeInfos); - DeleteDC(This->hdc); - return DD_FALSE; - } - - // Do not relase HDC it have been map in kernel mode - // DeleteDC(hdc); - - if (!DdReenableDirectDrawObject(&This->mDDrawGlobal, &newmode)) - { - DxHeapMemFree(This->mpModeInfos); - DeleteDC(This->hdc); - return DD_FALSE; - } - - - /* - Startup DX HAL step two of three - */ - - if (!DdQueryDirectDrawObject(&This->mDDrawGlobal, - &This->mHALInfo, - &This->mCallbacks.HALDD, - &This->mCallbacks.HALDDSurface, - &This->mCallbacks.HALDDPalette, - &This->mD3dCallbacks, - &This->mD3dDriverData, - &This->mD3dBufferCallbacks, - NULL, - NULL, - NULL)) - { - DxHeapMemFree(This->mpModeInfos); - DeleteDC(This->hdc); - // FIXME Close DX fristcall and second call - return DD_FALSE; - } - - This->mcvmList = This->mHALInfo.vmiData.dwNumHeaps; - This->mpvmList = (VIDMEM*) DxHeapMemAlloc(sizeof(VIDMEM) * This->mcvmList); - if (This->mpvmList == NULL) - { - DxHeapMemFree(This->mpModeInfos); - DeleteDC(This->hdc); - // FIXME Close DX fristcall and second call - return DD_FALSE; - } - - This->mcFourCC = This->mHALInfo.ddCaps.dwNumFourCCCodes; - This->mpFourCC = (DWORD *) DxHeapMemAlloc(sizeof(DWORD) * This->mcFourCC); - if (This->mpFourCC == NULL) - { - DxHeapMemFree(This->mpvmList); - DxHeapMemFree(This->mpModeInfos); - DeleteDC(This->hdc); - // FIXME Close DX fristcall and second call - return DD_FALSE; - } - - This->mcTextures = This->mD3dDriverData.dwNumTextureFormats; - This->mpTextures = (DDSURFACEDESC*) DxHeapMemAlloc(sizeof(DDSURFACEDESC) * This->mcTextures); - if (This->mpTextures == NULL) - { - DxHeapMemFree( This->mpFourCC); - DxHeapMemFree( This->mpvmList); - DxHeapMemFree( This->mpModeInfos); - DeleteDC(This->hdc); - // FIXME Close DX fristcall and second call - return DD_FALSE; - } - - This->mHALInfo.vmiData.pvmList = This->mpvmList; - This->mHALInfo.lpdwFourCC = This->mpFourCC; - This->mD3dDriverData.lpTextureFormats = This->mpTextures; - - if (!DdQueryDirectDrawObject( - &This->mDDrawGlobal, - &This->mHALInfo, - &This->mCallbacks.HALDD, - &This->mCallbacks.HALDDSurface, - &This->mCallbacks.HALDDPalette, - &This->mD3dCallbacks, - &This->mD3dDriverData, - &This->mCallbacks.HALDDExeBuf, - This->mpTextures, - This->mpFourCC, - This->mpvmList)) - - { - DxHeapMemFree(This->mpTextures); - DxHeapMemFree(This->mpFourCC); - DxHeapMemFree(This->mpvmList); - DxHeapMemFree(This->mpModeInfos); - DeleteDC(This->hdc); - // FIXME Close DX fristcall and second call - return DD_FALSE; - } - - /* - Copy over from HalInfo to DirectDrawGlobal - */ - - // this is wrong, cDriverName need be in ASC code not UNICODE - //memcpy(mDDrawGlobal.cDriverName, mDisplayAdapter, sizeof(wchar)*MAX_DRIVER_NAME); - - memcpy(&This->mDDrawGlobal.vmiData, &This->mHALInfo.vmiData,sizeof(VIDMEMINFO)); - memcpy(&This->mDDrawGlobal.ddCaps, &This->mHALInfo.ddCaps,sizeof(DDCORECAPS)); - - This->mHALInfo.dwNumModes = This->mcModeInfos; - This->mHALInfo.lpModeInfo = This->mpModeInfos; - This->mHALInfo.dwMonitorFrequency = This->mpModeInfos[0].wRefreshRate; - - This->mDDrawGlobal.dwMonitorFrequency = This->mHALInfo.dwMonitorFrequency; - This->mDDrawGlobal.dwModeIndex = This->mHALInfo.dwModeIndex; - This->mDDrawGlobal.dwNumModes = This->mHALInfo.dwNumModes; - This->mDDrawGlobal.lpModeInfo = This->mHALInfo.lpModeInfo; - This->mDDrawGlobal.hInstance = This->mHALInfo.hInstance; - - This->mDDrawGlobal.lp16DD = &This->mDDrawGlobal; - - //DeleteDC(This->hdc); - - DDHAL_GETDRIVERINFODATA DriverInfo; - memset(&DriverInfo,0, sizeof(DDHAL_GETDRIVERINFODATA)); - DriverInfo.dwSize = sizeof(DDHAL_GETDRIVERINFODATA); - DriverInfo.dwContext = This->mDDrawGlobal.hDD; - - /* Get the MiscellaneousCallbacks */ - DriverInfo.guidInfo = GUID_MiscellaneousCallbacks; - DriverInfo.lpvData = &This->mDDrawGlobal.lpDDCBtmp->HALDDMiscellaneous; - DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS); - This->mHALInfo.GetDriverInfo(&DriverInfo); - - return DD_OK; -} VOID Hal_DirectDraw_Release (LPDIRECTDRAW7 iface) Modified: trunk/reactos/dll/directx/ddraw/rosdraw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/rosdraw.…
============================================================================== --- trunk/reactos/dll/directx/ddraw/rosdraw.h (original) +++ trunk/reactos/dll/directx/ddraw/rosdraw.h Sun Jul 23 14:12:08 2006 @@ -10,9 +10,10 @@ #include <d3dhal.h> #include <ddrawgdi.h> +HRESULT WINAPI StartDirectDraw(LPDIRECTDRAW* iface); +HRESULT WINAPI StartDirectDrawHal(LPDIRECTDRAW* iface); HRESULT WINAPI Create_DirectDraw (LPGUID pGUID, LPDIRECTDRAW* pIface, REFIID id, BOOL ex); -HRESULT Hal_DirectDraw_Initialize (LPDIRECTDRAW7 ); HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 ); /* own macro to alloc memmory */ Modified: trunk/reactos/dll/directx/ddraw/startup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/startup.…
============================================================================== --- trunk/reactos/dll/directx/ddraw/startup.c (original) +++ trunk/reactos/dll/directx/ddraw/startup.c Sun Jul 23 14:12:08 2006 @@ -110,7 +110,7 @@ This->mDDrawGlobal.lpDDCBtmp = &This->mCallbacks; This->mDDrawGlobal.lpExclusiveOwner = &This->mDDrawLocal; - hal_ret = Hal_DirectDraw_Initialize ((LPDIRECTDRAW7)iface); + hal_ret = StartDirectDrawHal(iface); hel_ret = Hel_DirectDraw_Initialize ((LPDIRECTDRAW7)iface); if ((hal_ret!=DD_OK) && (hel_ret!=DD_OK)) { @@ -148,6 +148,157 @@ This->mDdCanCreateSurface.lpDD = &This->mDDrawGlobal; return DD_OK; +} + + +HRESULT WINAPI +StartDirectDrawHal(LPDIRECTDRAW* iface) +{ + IDirectDrawImpl* This = (IDirectDrawImpl*)iface; + + /* HAL Startup process */ + BOOL newmode = FALSE; + + + /* + Startup DX HAL step one of three + */ + if (!DdCreateDirectDrawObject(&This->mDDrawGlobal, This->hdc)) + { + DxHeapMemFree(This->mpModeInfos); + DeleteDC(This->hdc); + return DD_FALSE; + } + + // Do not relase HDC it have been map in kernel mode + // DeleteDC(hdc); + + if (!DdReenableDirectDrawObject(&This->mDDrawGlobal, &newmode)) + { + DxHeapMemFree(This->mpModeInfos); + DeleteDC(This->hdc); + return DD_FALSE; + } + + + /* + Startup DX HAL step two of three + */ + + if (!DdQueryDirectDrawObject(&This->mDDrawGlobal, + &This->mHALInfo, + &This->mCallbacks.HALDD, + &This->mCallbacks.HALDDSurface, + &This->mCallbacks.HALDDPalette, + &This->mD3dCallbacks, + &This->mD3dDriverData, + &This->mD3dBufferCallbacks, + NULL, + NULL, + NULL)) + { + DxHeapMemFree(This->mpModeInfos); + DeleteDC(This->hdc); + // FIXME Close DX fristcall and second call + return DD_FALSE; + } + + This->mcvmList = This->mHALInfo.vmiData.dwNumHeaps; + This->mpvmList = (VIDMEM*) DxHeapMemAlloc(sizeof(VIDMEM) * This->mcvmList); + if (This->mpvmList == NULL) + { + DxHeapMemFree(This->mpModeInfos); + DeleteDC(This->hdc); + // FIXME Close DX fristcall and second call + return DD_FALSE; + } + + This->mcFourCC = This->mHALInfo.ddCaps.dwNumFourCCCodes; + This->mpFourCC = (DWORD *) DxHeapMemAlloc(sizeof(DWORD) * This->mcFourCC); + if (This->mpFourCC == NULL) + { + DxHeapMemFree(This->mpvmList); + DxHeapMemFree(This->mpModeInfos); + DeleteDC(This->hdc); + // FIXME Close DX fristcall and second call + return DD_FALSE; + } + + This->mcTextures = This->mD3dDriverData.dwNumTextureFormats; + This->mpTextures = (DDSURFACEDESC*) DxHeapMemAlloc(sizeof(DDSURFACEDESC) * This->mcTextures); + if (This->mpTextures == NULL) + { + DxHeapMemFree( This->mpFourCC); + DxHeapMemFree( This->mpvmList); + DxHeapMemFree( This->mpModeInfos); + DeleteDC(This->hdc); + // FIXME Close DX fristcall and second call + return DD_FALSE; + } + + This->mHALInfo.vmiData.pvmList = This->mpvmList; + This->mHALInfo.lpdwFourCC = This->mpFourCC; + This->mD3dDriverData.lpTextureFormats = This->mpTextures; + + if (!DdQueryDirectDrawObject( + &This->mDDrawGlobal, + &This->mHALInfo, + &This->mCallbacks.HALDD, + &This->mCallbacks.HALDDSurface, + &This->mCallbacks.HALDDPalette, + &This->mD3dCallbacks, + &This->mD3dDriverData, + &This->mCallbacks.HALDDExeBuf, + This->mpTextures, + This->mpFourCC, + This->mpvmList)) + + { + DxHeapMemFree(This->mpTextures); + DxHeapMemFree(This->mpFourCC); + DxHeapMemFree(This->mpvmList); + DxHeapMemFree(This->mpModeInfos); + DeleteDC(This->hdc); + // FIXME Close DX fristcall and second call + return DD_FALSE; + } + + /* + Copy over from HalInfo to DirectDrawGlobal + */ + + // this is wrong, cDriverName need be in ASC code not UNICODE + //memcpy(mDDrawGlobal.cDriverName, mDisplayAdapter, sizeof(wchar)*MAX_DRIVER_NAME); + + memcpy(&This->mDDrawGlobal.vmiData, &This->mHALInfo.vmiData,sizeof(VIDMEMINFO)); + memcpy(&This->mDDrawGlobal.ddCaps, &This->mHALInfo.ddCaps,sizeof(DDCORECAPS)); + + This->mHALInfo.dwNumModes = This->mcModeInfos; + This->mHALInfo.lpModeInfo = This->mpModeInfos; + This->mHALInfo.dwMonitorFrequency = This->mpModeInfos[0].wRefreshRate; + + This->mDDrawGlobal.dwMonitorFrequency = This->mHALInfo.dwMonitorFrequency; + This->mDDrawGlobal.dwModeIndex = This->mHALInfo.dwModeIndex; + This->mDDrawGlobal.dwNumModes = This->mHALInfo.dwNumModes; + This->mDDrawGlobal.lpModeInfo = This->mHALInfo.lpModeInfo; + This->mDDrawGlobal.hInstance = This->mHALInfo.hInstance; + + This->mDDrawGlobal.lp16DD = &This->mDDrawGlobal; + + //DeleteDC(This->hdc); + + DDHAL_GETDRIVERINFODATA DriverInfo; + memset(&DriverInfo,0, sizeof(DDHAL_GETDRIVERINFODATA)); + DriverInfo.dwSize = sizeof(DDHAL_GETDRIVERINFODATA); + DriverInfo.dwContext = This->mDDrawGlobal.hDD; + + /* Get the MiscellaneousCallbacks */ + DriverInfo.guidInfo = GUID_MiscellaneousCallbacks; + DriverInfo.lpvData = &This->mDDrawGlobal.lpDDCBtmp->HALDDMiscellaneous; + DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS); + This->mHALInfo.GetDriverInfo(&DriverInfo); + + return DD_OK; } HRESULT
18 years, 5 months
1
0
0
0
[janderwald] 23239: * add ukrainian translation by Temarez * fixes bug 1706
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Jul 23 13:59:30 2006 New Revision: 23239 URL:
http://svn.reactos.org/svn/reactos?rev=23239&view=rev
Log: * add ukrainian translation by Temarez * fixes bug 1706 Added: trunk/reactos/base/applications/games/solitaire/uk.rc (with props) trunk/reactos/base/applications/games/winemine/Uk.rc (with props) trunk/reactos/base/applications/sndvol32/Uk.rc (with props) trunk/reactos/base/shell/cmd/Uk.rc (with props) trunk/reactos/dll/cpl/ncpa/uk.rc (with props) trunk/reactos/dll/cpl/sysdm/uk.rc (with props) Modified: trunk/reactos/base/applications/games/solitaire/sol.rc trunk/reactos/base/applications/games/winemine/winemine.rc trunk/reactos/base/applications/sndvol32/sndvol32.rc trunk/reactos/base/shell/cmd/cmd.rc trunk/reactos/dll/cpl/ncpa/ncpa.rc trunk/reactos/dll/cpl/sysdm/sysdm.rc Modified: trunk/reactos/base/applications/games/solitaire/sol.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
============================================================================== --- trunk/reactos/base/applications/games/solitaire/sol.rc (original) +++ trunk/reactos/base/applications/games/solitaire/sol.rc Sun Jul 23 13:59:30 2006 @@ -2,3 +2,4 @@ #include "de.rc" #include "en.rc" +#include "uk.rc" Added: trunk/reactos/base/applications/games/solitaire/uk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
============================================================================== --- trunk/reactos/base/applications/games/solitaire/uk.rc (added) +++ trunk/reactos/base/applications/games/solitaire/uk.rc Sun Jul 23 13:59:30 2006 @@ -1,0 +1,128 @@ +/* + * PROJECT: Solitaire + * LICENSE: Freeware, permission to use under Public Domain + * FILE: base/applications/games/solitaire/uk.rc + * PURPOSE: Ukraianian Language File for Solitaire + * TRANSLATOR: Artem Reznikov + */ +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS + +/* winemaker: #include "afxres.h" */ +/* winemaker:warning: 'afxres.h' is an MFC specific header. Replacing it with 'winres.h' */ +#include "winres.h" + +///// + +#undef APSTUDIO_READONLY_SYMBOLS + +///// +// Ukraianian resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) +#ifdef _WIN32 +LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT +#pragma code_page(1251) +#endif //_WIN32 + +///// +// Dialog + +IDD_DIALOG1 DIALOGEX DISCARDABLE 0, 0, 186, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Dialog" +FONT 8, "MS Shell Dlg" +EXSTYLE DS_SHELLFONT +BEGIN + DEFPUSHBUTTON "OK",IDOK,129,7,50,14 + PUSHBUTTON "Ñêàñóâàòè",IDCANCEL,129,24,50,14 +END + + +///// +// DESIGNINFO + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_DIALOG1, DIALOGEX + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + BOTTOMMARGIN, 88 + END +END +#endif // APSTUDIO_INVOKED + + +#ifdef APSTUDIO_INVOKED + +///// +// TEXTINCLUDE + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///// +// Menu + +IDR_MENU1 MENU DISCARDABLE +BEGIN + POPUP "&Ãðà" + BEGIN + MENUITEM "&Ðîçäàòè êàðòè\tF2", IDM_GAME_NEW + MENUITEM SEPARATOR + MENUITEM "&Êîëîäà...", IDM_GAME_DECK + MENUITEM "&Ïàðàìåòðè...", IDM_GAME_OPTIONS + MENUITEM SEPARATOR + MENUITEM "Â&èõ³ä", IDM_GAME_EXIT + END + POPUP "&Äîâ³äêà" + BEGIN + MENUITEM "&Çì³ñò\tF1", IDM_HELP_CONTENTS + MENUITEM "&Ïðî", IDM_HELP_ABOUT + END +END + +///// +// Accelerator + +IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +BEGIN + VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT + VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT +END + + +///// +// Icon + +IDI_ICON1 ICON DISCARDABLE "solitaire.ico" +#endif // Ukraianian resources + +///// + + +#ifndef APSTUDIO_INVOKED + +///// +#endif // not APSTUDIO_INVOKED Propchange: trunk/reactos/base/applications/games/solitaire/uk.rc ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/applications/games/winemine/Uk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/wi…
============================================================================== --- trunk/reactos/base/applications/games/winemine/Uk.rc (added) +++ trunk/reactos/base/applications/games/winemine/Uk.rc Sun Jul 23 13:59:30 2006 @@ -1,0 +1,91 @@ +/* + * PROJECT: WineMine + * LICENSE: GPL - See COPYING in the top level directory + * FILE: base/applications/games/winemine/Uk.rc + * PURPOSE: Ukraianian Language File for WineMine + * TRANSLATOR: Artem Reznikov + */ + +#include "resource.h" + +LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT + +STRINGTABLE { + IDS_APPNAME, "Ñàïåð" + +} + +MENU_WINEMINE MENU DISCARDABLE +{ + POPUP "&Îïö³¿" { + MENUITEM "&Íîâà", IDM_NEW + MENUITEM SEPARATOR + MENUITEM "&̳òêè (?)", IDM_MARKQ + MENUITEM SEPARATOR + MENUITEM "&Ïî÷àòê³âåöü", IDM_BEGINNER + MENUITEM "&Ëþáèòåëü", IDM_ADVANCED + MENUITEM "&Åêñïåðò", IDM_EXPERT + MENUITEM "&Îñîáëèâà", IDM_CUSTOM + MENUITEM SEPARATOR + MENUITEM "Â&èõ³ä", IDM_EXIT + } + POPUP "&²íôîðìàö³ÿ" { + MENUITEM "&Êðàù³ ÷àñè", IDM_TIMES + MENUITEM "&Ïðî", IDM_ABOUT + } +} + +DLG_TIMES DIALOG DISCARDABLE 0, 0, 160, 80 +STYLE DS_MODALFRAME | DS_3DLOOK | + WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP +CAPTION "Êðàù³ ÷àñè" +{ + GROUPBOX "Êðàù³ ÷àñè", IDNONE, 10, 10, 140, 45 + LTEXT "Ïî÷àòê³âåöü", IDNONE, 20, 20, 40, 8 + LTEXT "Ëþáèòåëü", IDNONE, 20, 30, 40, 8 + LTEXT "Åêñïåðò", IDNONE, 20, 40, 40, 8 + LTEXT "999", IDC_TIME1, 70, 20, 15, 8 + LTEXT "999", IDC_TIME2, 70, 30, 15, 8 + LTEXT "999", IDC_TIME3, 70, 40, 15, 8 + LTEXT "", IDC_NAME1, 90, 20, 55, 8 + LTEXT "", IDC_NAME2, 90, 30, 55, 8 + LTEXT "", IDC_NAME3, 90, 40, 55, 8 + DEFPUSHBUTTON "OK", IDOK, 55, 60, 50, 15 +} + +DLG_CONGRATS DIALOG DISCARDABLE 0, 0, 160, 60 +STYLE DS_MODALFRAME | DS_3DLOOK | + WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP +CAPTION "³òàííÿ!" +{ + LTEXT "Ââåä³òü Âàøå ³ì'ÿ", IDIGNORE, 10, 10, 150, 10 + EDITTEXT IDC_EDITNAME, 25, 20, 110, 12 + DEFPUSHBUTTON "OK", IDOK, 60, 40, 40, 15 +} + +DLG_CUSTOM DIALOG DISCARDABLE 0, 0, 100, 100 +STYLE DS_MODALFRAME | DS_3DLOOK | + WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP +CAPTION "Îñîáëèâà ãðà" +{ + LTEXT "Âèñîòà", IDNONE, 5, 5, 30, 10 + LTEXT "Øèðèíà", IDNONE, 5, 35, 30, 10 + LTEXT "̳í", IDNONE, 5, 65, 30, 10 + EDITTEXT IDC_EDITROWS, 5, 15, 20, 12, ES_NUMBER + EDITTEXT IDC_EDITCOLS, 5, 45, 20, 12, ES_NUMBER + EDITTEXT IDC_EDITMINES, 5, 75, 20, 12, ES_NUMBER + DEFPUSHBUTTON "OK", IDOK, 40, 30, 50, 15 + PUSHBUTTON "Ñêàñóâàòè", IDCANCEL, 40, 50, 50, 15 +} + +DLG_ABOUT DIALOG DISCARDABLE 0, 0, 145, 80 +STYLE DS_MODALFRAME | DS_3DLOOK | + WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP +CAPTION "About" +{ + LTEXT "Ñàïåð", IDNONE, 10, 10, 35, 10 + LTEXT "Copyright 2000, Joshua Thielen", IDNONE, 35, 25, 100, 10 + LTEXT "ïî ë³öåí糿 Wine", IDNONE, 35, 35, 100, 10 + ICON "WINEMINE", IDNONE, 10, 25, 20, 20 + DEFPUSHBUTTON "OK", IDOK, 50, 60, 55, 15 +} Propchange: trunk/reactos/base/applications/games/winemine/Uk.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/base/applications/games/winemine/winemine.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/wi…
============================================================================== --- trunk/reactos/base/applications/games/winemine/winemine.rc (original) +++ trunk/reactos/base/applications/games/winemine/winemine.rc Sun Jul 23 13:59:30 2006 @@ -26,6 +26,7 @@ #include "Fr.rc" #include "Pl.rc" #include "Nl.rc" +#include "Uk.rc" IDI_WINEMINE ICON MOVEABLE "rc/winemine.ico" Added: trunk/reactos/base/applications/sndvol32/Uk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndvol32…
============================================================================== --- trunk/reactos/base/applications/sndvol32/Uk.rc (added) +++ trunk/reactos/base/applications/sndvol32/Uk.rc Sun Jul 23 13:59:30 2006 @@ -1,0 +1,51 @@ +/* + * PROJECT: ReactOS Sound Volume Control + * LICENSE: GPL - See COPYING in the top level directory + * FILE: base/applications/sndvol32/Uk.rc + * PURPOSE: Ukraianian Language File for Volume Control + * TRANSLATOR: Artem Reznikov + */ + +LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT + +IDM_MAINMENU MENU DISCARDABLE +BEGIN + POPUP "&Ïàðàìåòðè" + BEGIN + MENUITEM "&Âëàñòèâîñò³", IDC_PROPERTIES + MENUITEM "&Äîäàòêîâ³ ïàðàìåòðè", IDC_ADVANCED_CONTROLS + MENUITEM SEPARATOR + MENUITEM "Â&èõ³ä", IDC_EXIT + END + POPUP "&Äîâ³äêà" + BEGIN + MENUITEM "&Çì³ñò", IDC_HELP_TOPICS + MENUITEM SEPARATOR + MENUITEM "&Ïðî ðåãóëÿòîð ãó÷íîñò³", IDC_ABOUT + END +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_SNDVOL32 "Ðåãóëÿòîð ãó÷íîñò³" + IDS_NOMIXERDEVICES "Àêòèâí³ ïðèñòðî¿-ì³êøåðè íåäîñòóïí³! Äîäàòîê çàê³í÷óº ðîáîòó." +END + +IDD_PREFERENCES DIALOGEX 0, 0, 224, 250 +STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Âëàñòèâîñò³" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "&̳êøåð:", -1, 7,8,48,9 + COMBOBOX IDC_MIXERDEVICE, 55,8,162,80, CBS_DROPDOWNLIST | WS_TABSTOP + GROUPBOX "Ðåãóëÿö³ÿ ãó÷íîñò³ äëÿ:", -1, 7,25,211,77 + PUSHBUTTON "&³äòâîðåííÿ", IDC_PLAYBACK, 13,43,47,8, BS_AUTORADIOBUTTON + PUSHBUTTON "&Çàïèñ", IDC_RECORDING, 13,61,47,8, BS_AUTORADIOBUTTON + PUSHBUTTON "&²íøå:", IDC_OTHER, 13,80,42,8, BS_AUTORADIOBUTTON | WS_DISABLED + COMBOBOX IDC_LINE, 55,80,155,50, CBS_DROPDOWNLIST | WS_TABSTOP | WS_DISABLED + LTEXT "³äîáðàæàòè íàñòóïí³ ðåãóëÿòîðè ãó÷íîñò³:", IDC_LABELCONTROLS, 7, 109, 162, 8 + CONTROL "", IDC_CONTROLS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | WS_TABSTOP | WS_BORDER, 7, 122, 211, 96 + + PUSHBUTTON "OK", IDOK, 114,226,50,14 + PUSHBUTTON "Ñêàñóâàòè", IDCANCEL, 168,226,50,14 +END Propchange: trunk/reactos/base/applications/sndvol32/Uk.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/base/applications/sndvol32/sndvol32.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndvol32…
============================================================================== --- trunk/reactos/base/applications/sndvol32/sndvol32.rc (original) +++ trunk/reactos/base/applications/sndvol32/sndvol32.rc Sun Jul 23 13:59:30 2006 @@ -22,5 +22,6 @@ #include "Ja.rc" #include "Nl.rc" #include "Sv.rc" +#include "Uk.rc" Added: trunk/reactos/base/shell/cmd/Uk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/Uk.rc?rev=2…
============================================================================== --- trunk/reactos/base/shell/cmd/Uk.rc (added) +++ trunk/reactos/base/shell/cmd/Uk.rc Sun Jul 23 13:59:30 2006 @@ -1,0 +1,653 @@ +/* + * PROJECT: Command-line interface + * LICENSE: GPL - See COPYING in the top level directory + * FILE: base/shell/cmd/Uk.rc + * PURPOSE: Ukraianian Language File for Command-line interface + * TRANSLATOR: Artem Reznikov + */ + +#include "windows.h" +#include "resource.h" + +LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT +STRINGTABLE DISCARDABLE +{ + +STRING_ATTRIB_HELP, "Displays or changes file attributes.\n\n\ +ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\ + [/S [/D]]\n\n\ + + Sets an attribute\n\ + - Clears an attribute\n\ + R Read-only file attribute\n\ + A Archive file attribute\n\ + S System file attribute\n\ + H Hidden file attribute\n\ + /S Processes matching files in the current directory\n\ + and all subdirectories\n\ + /D Processes directories as well\n\n\ +Type ATTRIB without a parameter to display the attributes of all files.\n" + +STRING_ALIAS_HELP, "Sets, removes or shows aliases.\n\n\ +ALIAS [alias=[command]]\n\n\ + alias Name for an alias.\n\ + command Text to be substituted for an alias.\n\n\ +To list all aliases:\n\ + ALIAS\n\n\ +To set a new or replace an existing alias:\n\ + ALIAS da=dir a:\n\n\ +To remove an alias from the alias list:\n\ + ALIAS da=" + +STRING_BEEP_HELP, "Beep the speaker.\n\nBEEP\n" + +STRING_CALL_HELP, "Calls one batch program from another.\n\n\ +CALL [drive:][path]filename [batch-parameter]\n\n\ + batch-parameter Specifies any command-line information required by the\n\ + batch program." + +STRING_CD_HELP, "Changes the current directory or displays it's name\n\n\ +CHDIR [/D][drive:][path]\n\ +CHDIR[..|.]\n\ +CD [/D][drive:][path]\n\ +CD[..|.]\n\n\ + .. parent directory\n\ + . current directory\n\ + /D Will change current drive and current directory.\n\n\ +Type CD drive: to display the current directory on the specified drive.\n\ +Type CD without a parameter to display the current drive and directory.\n" + +STRING_CHCP_HELP, "Displays or sets the active code page number.\n\n\ +CHCP [nnn]\n\n\ + nnn Specifies the active code page number.\n\n\ +Type CHCP without a parameter to display the active code page number.\n" + +STRING_CHOICE_HELP, "Waits for the user to choose one of a set of choices.\n\n\ +CHOICE [/C[:]choices][/N][/S][/T[:]c,nn][text]\n\n\ + /C[:]choices Specifies allowable keys. Default is YN.\n\ + /N Do not display choices and ? at the end of the prompt string.\n\ + /S Treat choice keys as case sensitive.\n\ + /T[:]c,nn Default choice to c after nn seconds.\n\ + text Prompt string to display.\n\n\ +ERRORLEVEL is set to offset of key user presses in choices.\n" + +STRING_CLS_HELP, "Clears the screen.\n\nCLS\n" + +STRING_CMD_HELP1, "\nInternal commands available:\n" + +STRING_CMD_HELP2, "\nFeatures available:" + +STRING_CMD_HELP3," [aliases]" + +STRING_CMD_HELP4," [history]" + +STRING_CMD_HELP5," [unix filename completion]" + +STRING_CMD_HELP6," [directory stack]" + +STRING_CMD_HELP7," [redirections and piping]" + +STRING_CMD_HELP8, "Starts a new instance of the ReactOS command line interpreter.\n\n\ +CMD [/[C|K] command][/P][/Q][/T:bf]\n\n\ + /C command Runs the specified command and terminates.\n\ + /K command Runs the specified command and remains.\n\ + /P CMD becomes permanent and runs autoexec.bat\n\ + (cannot be terminated).\n\ + /T:bf Sets the background/foreground color (see COLOR command).\n" + +STRING_COLOR_HELP1, "Sets the default foreground and background colors.\n\n\ +COLOR [attr [/-F]] \n\n\ + attr Specifies color attribute of console output\n\ + /-F Does not fill the console blank space with color attribute\n\n\ +There are three ways to specify the colors:\n\ +1) [bright] name on [bright] name (only the first three letters are required)\n\ +2) decimal on decimal\n\ +3) two hex digits\n\n\ +Colors are:\n\ +dec hex name dec hex name\n\ +0 0 Black 8 8 Gray(Bright black)\n\ +1 1 Blue 9 9 Bright Blue\n\ +2 2 Green 10 A Bright Green\n\ +3 3 Cyan 11 B Bright Cyan\n\ +4 4 Red 12 C Bright Red\n\ +5 5 Magenta 13 D Bright Magenta\n\ +6 6 Yellow 14 E Bright Yellow\n\ +7 7 White 15 F Bright White\n" + +STRING_COPY_HELP1, "Overwrite %s (Yes/No/All)? " + +STRING_COPY_HELP2, "Copies one or more files to another location.\n\n\ +COPY [/V][/Y|/-Y][/A|/B] source [/A|/B]\n\ + [+ source [/A|/B] [+ ...]] [destination [/A|/B]]\n\n\ + source Specifies the file or files to be copied.\n\ + /A Indicates an ASCII text file.\n\ + /B Indicates a binary file.\n\ + destination Specifies the directory and/or filename for the new file(s).\n\ + /V Verifies that new files are written correctly.\n\ + /Y Suppresses prompting to confirm you want to overwrite an\n\ + existing destination file.\n\ + /-Y Causes prompting to confirm you want to overwrite an\n\ + existing destination file.\n\n\ +The switch /Y may be present in the COPYCMD environment variable.\n\ +...\n" + +STRING_DATE_HELP1, "\nEnter new date (mm%cdd%cyyyy): " + +STRING_DATE_HELP2, "\nEnter new date (dd%cmm%cyyyy): " + +STRING_DATE_HELP3, "\nEnter new date (yyyy%cmm%cdd): " + +STRING_DATE_HELP4, "Displays or sets the date.\n\n\ +DATE [/T][date]\n\n\ + /T display only\n\n\ +Type DATE without parameters to display the current date setting and\n\ +a prompt for a new one. Press ENTER to keep the same date.\n" + +STRING_DEL_HELP1, "Deletes one or more files.\n\n\ +DEL [/N /P /T /Q /S /W /Y /Z /A[[:]attributes]] file ...\n\ +DELETE [/N /P /T /Q /S /W /Y /Z /A[[:]attributes]] file ...\n\ +ERASE [/N /P /T /Q /S /W /Y /Z /A[[:]attributes]] file ...\n\n\ + file Specifies the file(s) to delete.\n\n\ + /N Nothing.\n\ + /P Prompt. Ask before deleting each file.\n\ + /T Total. Display total number of deleted files and freed disk space.\n\ + /Q Quiet.\n\ + /W Wipe. Overwrite the file with random numbers before deleting it.\n\ + /Y Yes. Kill even *.* without asking.\n\ + /F Force Delete hidden, read-only and system files.\n\ + /S Delete file from all sub directory\n\ + /A Select files to be deleted based on attributes.\n\ + attributes\n\ + R Read Only files\n\ + S System files\n\ + A Archiveable files\n\ + H Hidden Files\n\ + - prefix meaning not\n" + +STRING_DEL_HELP2, "All files in the directory will be deleted!\nAre you sure (Y/N)?" +STRING_DEL_HELP3, " %lu file deleted\n" +STRING_DEL_HELP4, " %lu files deleted\n" + +STRING_DELAY_HELP, "pause for n seconds or milliseconds\n\ +DELAY [/m]n\n\n\ + /m specifiy than n are milliseconds\n\ + otherwise n are seconds\n" + +STRING_DIR_HELP1, "DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]\n\ + [/O[[:]sortorder]] [/P] [/Q] [/S] [/T[[:]timefield]] [/W] [/X] [/4]\n\n\ + [drive:][path][filename]\n\ + Specifies drive, directory, and/or files to list.\n\n\ + /A Displays files with specified attributes.\n\ + attributes D Directories R Read-only files\n\ + H Hidden files A Files ready for archiving\n\ + S System files - Prefix meaning not\n\ + /B Uses bare format (no heading information or summary).\n\ + /C Display the thousand separator in file sizes. This is the\n\ + default. Use /-C to disable display of separator.\n\ + /D Same as wide but files are list sorted by column.\n\ + /L Uses lowercase.\n\ + /N New long list format where filenames are on the far right.\n\ + /O List by files in sorted order.\n\ + sortorder N By name (alphabetic) S By size (smallest first)\n\ + E By extension (alphabetic) D By date/time (oldest first)\n\ + G Group directories first - Prefix to reverse order\n\ + /P Pauses after each screenful of information.\n\ + /Q Display the owner of the file.\n\ + /S Displays files in specified directory and all subdirectories.\n\ + /T Controls which time field displayed or used for sorting\n\ + timefield C Creation\n\ + A Last Access\n\ + W Last Written\n\ + /W Uses wide list format.\n\ + /X This displays the short names generated for non-8dot3 file\n\ + names. The format is that of /N with the short name inserted\n\ + before the long name. If no short name is present, blanks are\n\ + displayed in its place.\n\ + /4 Displays four-digit years\n\n\ +Switches may be preset in the DIRCMD environment variable. Override\n\ +preset switches by prefixing any switch with - (hyphen)--for example, /-W.\n" + +STRING_DIR_HELP2, " Volume in drive %c is %s\n" +STRING_DIR_HELP3, " Volume in drive %c has no label.\n" +STRING_DIR_HELP4, " Volume Serial Number is %04X-%04X\n" +STRING_DIR_HELP5, "\n Total Files Listed:\n%16i File(s)% 14s bytes\n" +STRING_DIR_HELP6, "%16i Dir(s)% 15s bytes\n" +STRING_DIR_HELP7, "\n Directory of %s\n\n" +STRING_DIR_HELP8, "%16i File(s)% 14s bytes\n" + +STRING_DIRSTACK_HELP1, "Stores the current directory for use by the POPD command, then\n\ +changes to the specified directory.\n\n\ +PUSHD [path | ..]\n\n\ + path Specifies the directory to make the current directory\n" + +STRING_DIRSTACK_HELP2, "Changes to the directory stored by the PUSHD command.\n\nPOPD" + +STRING_DIRSTACK_HELP3, "Prints the contents of the directory stack.\n\nDIRS" + +STRING_DIRSTACK_HELP4, "Directory stack empty" + +STRING_ECHO_HELP1, "Display a messages without trailing carriage return and line feed.\n\n\ + ECHOS message" + +STRING_ECHO_HELP2, "Displays a message to the standard error output.\n\n\ + ECHOERR message\n\ + ECHOERR. prints an empty line" + +STRING_ECHO_HELP3, "Prints a messages to standard error output without trailing carriage return and line feed.\n\n\ + ECHOSERR message" + +STRING_ECHO_HELP4, "Displays a message or switches command echoing on or off.\n\n\ + ECHO [ON | OFF]\n\ + ECHO [message]\n\ + ECHO. prints an empty line\n\n\ +Type ECHO without a parameter to display the current ECHO setting." + +STRING_ECHO_HELP5, "ECHO is %s\n" + +STRING_EXIT_HELP, "Exits the command line interpreter.\n\nEXIT\n" + +STRING_FOR_HELP1, "Runs a specified command for each file in a set of files\n\n\ +FOR %variable IN (set) DO command [parameters]\n\n\ + %variable Specifies a replaceable parameter.\n\ + (set) Specifies a set of one or more files. Wildcards may be used.\n\ + command Specifies the command to carry out for each file.\n\ + parameters Specifies parameters or switches for the specified command.\n\n\ +To use the FOR command in a batch program, specify %%variable instead of\n\ +%variable.\n" + +STRING_FREE_HELP1, "\nVolume in drive %s is %-11s\n\ + Serial number is %s\n\ + %16s bytes total disk space\n\ + %16s bytes used\n\ + %16s bytes free\n" + +STRING_FREE_HELP2, "Displays drive information.\n\nFREE [drive: ...]\n" + +STRING_IF_HELP1, "Performs conditional processing in batch programs.\n\n\ + IF [NOT] ERRORLEVEL number command\n\ + IF [NOT] string1==string2 command\n\ + IF [NOT] EXIST filename command\n\ + IF [NOT] DEFINED variable command\n\n\ +NOT Specifies that CMD should carry out the command only if\n\ + the condition is false\n\ +ERRORLEVEL number Specifies a true condition if the last program run returned\n\ + an exit code equal or greater than the number specified.\n\ +command Specifies the command to carry out if the condition is met.\n\ +string1==string2 Specifies a true condition if the specified text strings\n\ + match.\n\ +EXIST filename Specifies a true condition if the specified filename exists.\n\ +DEFINED variable Specifies a true condition if the specified variable is\n\ + defined.\n" + +STRING_GOTO_HELP1, "Directs CMD to a labeled line in a batch script.\n\n\ +GOTO label\n\n\ + label Specifies a text string used in a batch script as a label.\n\n\ +You type a label on a line by itself, beginning with a colon." + +STRING_LABEL_HELP1, "Displays or changes drive label.\n\nLABEL [drive:][label]\n" + +STRING_LABEL_HELP2, "Volume in drive %c: is %s\n" +STRING_LABEL_HELP3, "Volume in drive %c: has no label\n" +STRING_LABEL_HELP4, "Volume Serial Number is %04X-%04X\n" +STRING_LABEL_HELP5, "Drive label (11 Characters, ENTER if none)? " + +STRING_LOCALE_HELP1, "Current time is" + +STRING_MKDIR_HELP, "Creates a directory.\n\n\ +MKDIR [drive:]path\nMD [drive:]path" + +STRING_MEMMORY_HELP1, "Displays the amount of system memory.\n\nMEMORY" + +STRING_MEMMORY_HELP2, "\n %12s%% memory load.\n\n\ + %13s bytes total physical RAM.\n\ + %13s bytes available physical RAM.\n\n\ + %13s bytes total page file.\n\ + %13s bytes available page file.\n\n\ + %13s bytes total virtual memory.\n\ + %13s bytes available virtual memory.\n" + +STRING_MISC_HELP1, "Press a key to continue...\n" + +STRING_MOVE_HELP1, "Overwrite %s (Yes/No/All)? " + +STRING_MOVE_HELP2, "Moves files and renames files and directories.\n\n\ +To move one or more files:\n\ +MOVE [/N][drive:][path]filename1[,...] destination\n\n\ +To rename a directory:\n\ +MOVE [/N][drive:][path]dirname1 dirname2\n\n\ + [drive:][path]filename1 Specifies the location and name of the file\n\ + or files you want to move.\n\ + /N Nothing. Do everything but move files or directories.\n\n\ +Current limitations:\n\ + - You can't move a file or directory from one drive to another.\n" + +STRING_MSGBOX_HELP, "display a message box and return user responce\n\n\ +MSGBOX type ['title'] prompt\n\n\ +type button displayed\n\ + possible values are: OK, OKCANCEL,\n\ + YESNO, YESNOCANCEL\n\ +title title of message box\n\ +prompt text displayed by the message box\n\n\n\ +ERRORLEVEL is set according the button pressed:\n\n\ +YES : 10 | NO : 11\n\ +OK : 10 | CANCEL : 12\n" + +STRING_PATH_HELP1, "Displays or sets a search path for executable files.\n\n\ +PATH [[drive:]path[;...]]\nPATH ;\n\n\ +Type PATH ; to clear all search-path settings and direct the command shell\n\ +to search only in the current directory.\n\ +Type PATH without parameters to display the current path.\n" + +STRING_PROMPT_HELP1, "Changes the command prompt.\n\n\ +PROMPT [text]\n\n\ + text Specifies a new command prompt.\n\n\ +Prompt can be made up of normal characters and the following special codes:\n\n\ + $A & (Ampersand)\n\ + $B | (pipe)\n\ + $C ( (Left parenthesis)\n\ + $D Current date\n\ + $E Escape code (ASCII code 27)\n\ + $F ) (Right parenthesis)\n\ + $G > (greater-than sign)\n\ + $H Backspace (erases previous character)\n\ + $L < (less-than sign)\n\ + $N Current drive\n\ + $P Current drive and path\n\ + $Q = (equal sign)\n\ + $T Current time\n\ + $V OS version number\n\ + $_ Carriage return and linefeed\n\ + $$ $ (dollar sign)\n" + +STRING_PAUSE_HELP1, "Stops the execution of a batch file and shows the following message:\n\ +'Press any key to continue...' or a user defined message.\n\n\ +PAUSE [message]" + +STRING_PROMPT_HELP2, " $+ Displays the current depth of the directory stack" + +STRING_PROMPT_HELP3, "\nType PROMPT without parameters to reset the prompt to the default setting." + +STRING_REM_HELP, "Starts a comment line in a batch file.\n\nREM [Comment]" + +STRING_RMDIR_HELP, "Removes a directory.\n\n\ +RMDIR [drive:]path\nRD [drive:]path\n\ +/S Deletes all files and folders within target\n\ +/Q Doesnt prompt for user\n" +STRING_RMDIR_HELP2, "Directory is not empty!\n" + +STRING_REN_HELP1, "Renames a file/directory or files/directories.\n\n\ +RENAME [/E /N /P /Q /S /T] old_name ... new_name\n\ +REN [/E /N /P /Q /S /T] old_name ... new_name\n\n\ + /E No error messages.\n\ + /N Nothing.\n\ + /P Prompts for confirmation before renaming each file.\n\ + (Not implemented yet!)\n\ + /Q Quiet.\n\ + /S Rename subdirectories.\n\ + /T Display total number of renamed files.\n\n\ +Note that you cannot specify a new drive or path for your destination. Use\n\ +the MOVE command for that purpose.\n" + +STRING_REN_HELP2, " %lu file renamed\n" + +STRING_REN_HELP3, " %lu files renamed\n" + +STRING_SHIFT_HELP, "Changes the position of replaceable parameters in a batch file.\n\n\ +SHIFT [DOWN]" + +STRING_SCREEN_HELP, "move cursor and optionally print text\n\n\ +SCREEN row col [text]\n\n\ + row row to wich move the cursor\n\ + col column to wich move the cursor" + +STRING_SET_HELP, "Displays, sets, or removes environment variables.\n\n\ +SET [variable[=][string]]\n\n\ + variable Specifies the environment-variable name.\n\ + string Specifies a series of characters to assign to the variable.\n\n\ +Type SET without parameters to display the current environment variables.\n" + +STRING_START_HELP1, "Starts a command.\n\n\ +START command\n\n\ + command Specifies the command to run.\n\n\ +At the moment all commands are started asynchronously.\n" + +STRING_TITLE_HELP, "Sets the window title for the command prompt window.\n\n\ +TITLE [string]\n\n\ +string Specifies the title for the command prompt window.\n" + +STRING_TIME_HELP1, "Displays or sets the system time.\n\n\ +TIME [/T][time]\n\n\ + /T display only\n\n\ +Type TIME with no parameters to display the current time setting and a prompt\n\ +for a new one. Press ENTER to keep the same time.\n" + +STRING_TIME_HELP2, "Enter new time: " + +STRING_TIMER_HELP1, "Elapsed %d msecs\n" + +STRING_TIMER_HELP2, "Elapsed %02d%c%02d%c%02d%c%02d\n" + +STRING_TIMER_HELP3, "allow the use of ten stopwatches.\n\n\ +TIMER [ON|OFF] [/S] [/n] [/Fn]\n\n\ + ON set stopwatch ON\n\ + OFF set stopwatch OFF\n\ + /S Split time. Return stopwatch split\n\ + time without changing its value\n\ + /n Specifiy the stopwatch number.\n\ + Stopwatches available are 0 to 9\n\ + If it is not specified default is 1\n\ + /Fn Format for output\n\ + n can be:\n\ + 0 milliseconds\n\ + 1 hh%cmm%css%cdd\n\n\ +if none of ON, OFF or /S is specified the command\n\ +will toggle stopwatch state\n\n" + +STRING_TYPE_HELP1, "Displays the contents of text files.\n\nTYPE [drive:][path]filename \n\ + /P Shows one screen of output at a time.\n" + +STRING_VERIFY_HELP1, "This command is just a dummy!!\n\ +Sets whether to verify that your files are written correctly to a\n\ +disk.\n\n\ +VERIFY [ON | OFF]\n\n\ +Type VERIFY without a parameter to display the current VERIFY setting.\n" + +STRING_VERIFY_HELP2, "VERIFY is %s.\n" + +STRING_VERIFY_HELP3, "Must specify ON or OFF." + +STRING_VERSION_HELP1, "Displays shell version information\n\n\ +VER [/C][/R][/W]\n\n\ + /C Displays credits.\n\ + /R Displays redistribution information.\n\ + /W Displays warranty information." + +STRING_VERSION_HELP2, " comes with ABSOLUTELY NO WARRANTY; for details\n\ +type: `ver /w'. This is free software, and you are welcome to redistribute\n\ +it under certain conditions; type `ver /r' for details. Type `ver /c' for a\n\ +listing of credits." + +STRING_VERSION_HELP3, "\n This program is distributed in the hope that it will be useful,\n\ + but WITHOUT ANY WARRANTY; without even the implied warranty of\n\ + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\ + GNU General Public License for more details." + +STRING_VERSION_HELP4, "\n This program is free software; you can redistribute it and/or modify\n\ + it under the terms of the GNU General Public License as published by\n\ + the Free Software Foundation; either version 2 of the License, or\n\ + (at your option) any later version.\n" + +STRING_VERSION_HELP5, "\nSend bug reports to <ros-dev(a)reactos.org>.\n\ +Updates are available at:
http://www.reactos.org
" + +STRING_VERSION_HELP6, "\nFreeDOS version written by:\n" + +STRING_VERSION_HELP7, "\nReactOS version written by:\n" + +STRING_VOL_HELP1, " Volume in drive %c: is %s" +STRING_VOL_HELP2, " Volume in drive %c: has no label" +STRING_VOL_HELP3, " Volume Serial Number is %04X-%04X\n" +STRING_VOL_HELP4, "Displays the disk volume label and serial number, if they exist.\n\nVOL [drive:]" + +STRING_WINDOW_HELP1, "change console window aspect\n\n\ +WINDOW [/POS[=]left,top,width,heigth]\n\ + [MIN|MAX|RESTORE] ['title']\n\n\ +/POS specify window placement and dimensions\n\ +MIN minimize the window\n\ +MAX maximize the window\n\ +RESTORE restore the window" + +STRING_WINDOW_HELP2, "change console window aspect\n\n\ +ACTIVATE 'window' [/POS[=]left,top,width,heigth]\n\ + [MIN|MAX|RESTORE] ['title']\n\n\ +window tile of window on wich perform actions\n\ +/POS specify window placement and dimensions\n\ +MIN minimize the window\n\ +MAX maximize the window\n\ +RESTORE restore the window\n\ +title new title\n" + + +STRING_HELP1, "Ñïèñîê âñ³õ äîñòóïíèõ êîìàíä (+ îïèñ)\n\n\ + êîìàíäà /? Äëÿ äîêëàäíî¿ ³íôîðìàö³¿ ïðî êîíêðåòíó êîìàíäó\n\n\ +? Ñïèñîê âñ³õ äîñòóïíèõ êîìàíä áåç îïèñó.\n\ +ALIAS Âñòàíîâëåííÿ, âèäàëåííÿ àáî ïîêàç ïñåâäîí³ì³â.\n\ +ATTRIB ³äîáðàæåííÿ àáî çì³íà àòðèáóò³â ôàéëó.\n\ +BEEP Çâóêîâèé ñèãíàë ñï³êåðà.\n\ +CALL Âèêëèê îäí³º¿ ïàêåòíî¿ ïðîãðàìè ç ³íøî¿.\n\ +CD ³äîáðàæåííÿ ³ìåí³ àáî çì³íà ïîòî÷íî¿ ïàïêè.\n\ +CHCP ³äîáðàæåííÿ àáî âñòàíîâëåííÿ ïîòî÷íîãî íîìåðà êîäîâî¿ ñòîð³íêè.\n\ +CHOICE Î÷³êóâàííÿ âèáîðó êîðèñòóâà÷åì îäíîãî ç âêàçàíèõ ñèìâîë³â.\n\ +CLS Î÷èùåííÿ åêðàíó.\n\ +CMD Çàïóñê íîâî¿ êîﳿ ³íòåðïðåòàòîðà êîìàíä ReactOS.\n\ +COLOR Âñòàíîâëåííÿ òèïîâèõ êîëüîð³â òåêñòó ³ òëà êîíñîë³.\n\ +COPY Êîï³þâàííÿ îäíîãî àáî á³ëüøå ôàéë³â â ³íøå ì³ñöå.\n\ +DATE ³äîáðàæåííÿ àáî âñòàíîâëåííÿ äàòè.\n\ +DELETE Âèäàëåííÿ îäíîãî àáî á³ëüøå ôàéë³â.\n\ +DIR ³äîáðàæåííÿ ñïèñêó ôàéë³â ³ ï³äïàïîê â ïàïö³.\n\ +ECHO ³äîáðàæåííÿ ïîâ³äîìëåíü, àáî ïåðåìèêàííÿ ðåæèìó â³äîáðàæåííÿ êîìàíä.\n\ +ERASE Âèäàëåííÿ îäíîãî àáî á³ëüøå ôàéë³â.\n\ +EXIT Âèõ³ä ç ïðîãðàìè CMD.EXE (³íòåðïðåòàòîðà êîìàíä).\n\ +FOR Çàïóñê âêàçàíî¿ êîìàíäè äëÿ êîæíîãî ôàéëó ç íàáîðó ôàéë³â.\n\ +FREE (³ëüíèé) äèñêîâèé ïðîñò³ð.\n\ +GOTO Ïåðåäà÷à óïðàâë³ííÿ ðÿäêó ïàêåòíî¿ ïðîãðàìè, ÿêèé ì³ñòèòü ì³òêó.\n\ +HELP Äîâ³äêîâà ³íôîðìàö³ÿ ïðî êîìàíäè ReactOS.\n\ +HISTORY Ñïèñîê óñ³õ âèêîðèñòàíèõ êîìàíä.\n\ +IF Îïåðàòîð îáðîáêè óìîâ ó ïàêåòíèõ ïðîãðàìàõ.\n\ +LABEL Ñòâîðåííÿ, çì³íà, àáî âèäàëåííÿ ì³òîê òîìó äèñêà.\n\ +MD Ñòâîðåííÿ ïàïêè.\n\ +MKDIR Ñòâîðåííÿ ïàïêè.\n\ +MOVE Ïåðåì³ùåííÿ îäíîãî àáî á³ëüøå ôàéë³â ç îäí³º¿ ïàïêè äî ³íøî¿\n\ + ïàïêè.\n\ +PATH ³äîáðàæåííÿ àáî âñòàíîâëåííÿ øëÿõó ïîøóêó âèêîíóâàíèõ ôàéë³â.\n\ +PAUSE Òèì÷àñîâå ïðèïèíåííÿ îáðîáêè êîìàíäíîãî ôàéëó ³ ïîêàç ïîâ³äîìëåííÿ.\n\ +POPD ³äíîâëþº ïîïåðåäíº çíà÷åííÿ ïîòî÷íî¿ ïàïêè, çáåðåæåíå êîìàíäîþ\n\ + PUSHD.\n\ +PROMPT Çì³íà çàïðîøåííÿ êîìàíäíîãî ðÿäêà.\n\ +PUSHD Çáåð³ãຠïîòî÷íó ïàïêó, à ïîò³ì çì³íþº ¿¿.\n\ +RD Ïåðåì³ùåííÿ ïàïêè.\n\ +REM Çàïèñóº êîìåíòàð³ (çàóâàæåííÿ) â êîìàíäíèõ ôàéëàõ.\n\ +REN Ïåðåéìåíóâàííÿ ôàéëà àáî ôàéë³â.\n\ +RENAME Ïåðåéìåíóâàííÿ ôàéëà àáî ôàéë³â.\n\ +RMDIR Ïåðåì³ùåííÿ ïàïêè.\n\ +SCREEN Ïåðåì³ùåííÿ êóðñîðà ³ âèâåäåííÿ òåêñòó.\n\ +SET ³äîáðàæåííÿ, âñòàíîâëåííÿ, àáî âèäàëåííÿ çì³ííèõ îòî÷åííÿ ReactOS.\n\ +SHIFT Çðóøåííÿ ïîçèö³¿ çàì³ííèõ ïàðàìåòð³â ó êîìàíäíèõ ôàéëàõ.\n" +STRING_HELP2, "START ³äêðèâຠîêðåìå â³êíî äëÿ çàïóñêó âêàçàíèõ êîìàíä àáî ïðîãðàì.\n\ + Âèêîíóº êîìàíäó.\n\ +TIME ³äîáðàæåííÿ àáî âñòàíîâëåííÿ ñèñòåìíîãî ÷àñó.\n\ +TIMER Äîçâîëÿº âèêîðèñòàííÿ äåñÿòè ñåêóíäîì³ð³â.\n\ +TITLE Âñòàíîâëåííÿ çàãîëîâêà â³êíà äëÿ ñåñ³¿ CMD.EXE.\n\ +TYPE ³äîáðàæåííÿ âì³ñòó òåêñòîâîãî ôàéëó.\n\ +VER ³äîáðàæåííÿ âåðñ³¿ ReactOS.\n\ +VERIFY Âêëþ÷åííÿ àáî â³äêëþ÷åííÿ ðåæèìó ïåðåâ³ðêè ïðàâèëüíîñò³ çàïèñó\n\ + ôàéë³â íà äèñê.\n\ +VOL ³äîáðàæåííÿ ì³òêè òîìó äèñêà ³ ñåð³éíîãî íîìåðà.\n" + + +STRING_CHOICE_OPTION, "YN" +STRING_COPY_OPTION, "YNA" + + +STRING_ALIAS_ERROR, "Command line too long after alias expansion!\n" +STRING_BATCH_ERROR, "Error opening batch file\n" +STRING_CHCP_ERROR1, "Active code page: %u\n" +STRING_CHCP_ERROR4, "Invalid code page\n" +STRING_CHOICE_ERROR, "Invalid option. Expected format: /C[:]options" +STRING_CHOICE_ERROR_TXT, "Invalid option. Expected format: /T[:]c,nn" +STRING_CHOICE_ERROR_OPTION, "Illegal Option: %s" +STRING_MD_ERROR, "A subdirectory or file already exists.\n" +STRING_MD_ERROR2, "The path to the new folder does not exist.\n" +STRING_CMD_ERROR1, "Can't redirect input from file %s\n" +STRING_CMD_ERROR2, "Error creating temporary file for pipe data\n" +STRING_CMD_ERROR3, "Can't redirect to file %s\n" +STRING_CMD_ERROR4, "Running %s...\n" +STRING_CMD_ERROR5, "Running cmdexit.bat...\n" +STRING_COLOR_ERROR1, "Same colors error! (Background and foreground can't be the same color)" +STRING_COLOR_ERROR2, "error in color specification" +STRING_COLOR_ERROR3, "Color %x\n" +STRING_COLOR_ERROR4, "same colors error!" +STRING_CONSOLE_ERROR, "Unknown error: %d\n" +STRING_COPY_ERROR1, "Error: Cannot open source - %s!\n" +STRING_COPY_ERROR2, "Error: Can't copy onto itself!\n" +STRING_COPY_ERROR3, "Error writing destination!\n" +STRING_COPY_ERROR4, "Error: Not implemented yet!\n" +STRING_DATE_ERROR, "Invalid date." +STRING_DEL_ERROR5, "The file %s will be deleted! " +STRING_DEL_ERROR6, "Are you sure (Y/N)?" +STRING_DEL_ERROR7, "Deleting: %s\n" +STRING_ERROR_ERROR1, "Unknown error! Error code: 0x%lx\n" +STRING_ERROR_ERROR2, "Syntax error" +STRING_FOR_ERROR1, "'in' missing in for statement." +STRING_FOR_ERROR2, "no brackets found." +STRING_FOR_ERROR3, "'do' missing." +STRING_FOR_ERROR4, "no command after 'do'." +STRING_FREE_ERROR1, "Invalid drive" +STRING_FREE_ERROR2, "unlabeled" +STRING_GOTO_ERROR1, "No label specified for GOTO" +STRING_GOTO_ERROR2, "Label '%s' not found\n" + +STRING_MOVE_ERROR1, "[OK]\n" +STRING_MOVE_ERROR2, "[Error]\n" + +STRING_REN_ERROR1, "MoveFile() failed. Error: %lu\n" + +STRING_START_ERROR1, "No batch support at the moment!" + +STRING_TIME_ERROR1, "Invalid time." + +STRING_TYPE_ERROR1, "Invalid option '/%s'\n" + +STRING_WINDOW_ERROR1, "window not found" + + +STRING_ERROR_PARAMETERF_ERROR, "Parameter format not correct - %c\n" +STRING_ERROR_INVALID_SWITCH, "Invalid switch - /%c\n" +STRING_ERROR_TOO_MANY_PARAMETERS, "Too many parameters - %s\n" +STRING_ERROR_PATH_NOT_FOUND, "Path not found\n" +STRING_ERROR_FILE_NOT_FOUND, "File not found\n" +STRING_ERROR_REQ_PARAM_MISSING, "Required parameter missing\n" +STRING_ERROR_INVALID_DRIVE, "Invalid drive specification\n" +STRING_ERROR_INVALID_PARAM_FORMAT, "Invalid parameter format - %s\n" +STRING_ERROR_BADCOMMAND, "Íåâ³ðíà êîìàíäà àáî ³ì'ÿ ôàéëó\n" +STRING_ERROR_OUT_OF_MEMORY, "Out of memory error.\n" +STRING_ERROR_CANNOTPIPE, "Error! Cannot pipe! Cannot open temporary file!\n" +STRING_ERROR_D_PAUSEMSG, "Press any key to continue . . ." +STRING_ERROR_DRIVER_NOT_READY, "Drive not ready" + +STRING_PATH_ERROR, "CMD: Not in environment '%s'\n" + +STRING_CMD_SHELLINFO, "\nReactOS Command Line Interpreter" +STRING_VERSION_RUNVER, " running on %s" +STRING_COPY_FILE , " %d file(s) copied\n" +STRING_DELETE_WIPE, "wiped" +STRING_FOR_ERROR, "bad variable specification." +STRING_SCREEN_COL, "invalid value for col" +STRING_SCREEN_ROW, "invalid value for row" +STRING_TIMER_TIME "Timer %d is %s: " + +STRING_INVALID_OPERAND, "Invalid operand." +STRING_EXPECTED_CLOSE_PAREN, "Expected ')'." +STRING_EXPECTED_NUMBER_OR_VARIABLE,"Expected number or variable name." +STRING_SYNTAX_COMMAND_INCORRECT, "The syntax of the command is incorrect." + +} Propchange: trunk/reactos/base/shell/cmd/Uk.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/base/shell/cmd/cmd.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.rc?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/cmd.rc (original) +++ trunk/reactos/base/shell/cmd/cmd.rc Sun Jul 23 13:59:30 2006 @@ -16,6 +16,7 @@ #include "Ja.rc" #include "Hu.rc" #include "No.rc" +#include "Uk.rc" STRINGTABLE DISCARDABLE { Modified: trunk/reactos/dll/cpl/ncpa/ncpa.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/ncpa/ncpa.rc?rev=2…
============================================================================== --- trunk/reactos/dll/cpl/ncpa/ncpa.rc (original) +++ trunk/reactos/dll/cpl/ncpa/ncpa.rc Sun Jul 23 13:59:30 2006 @@ -29,7 +29,4 @@ #include "nl.rc" #include "ru.rc" #include "sv.rc" - - - - +#include "uk.rc" Added: trunk/reactos/dll/cpl/ncpa/uk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/ncpa/uk.rc?rev=232…
============================================================================== --- trunk/reactos/dll/cpl/ncpa/uk.rc (added) +++ trunk/reactos/dll/cpl/ncpa/uk.rc Sun Jul 23 13:59:30 2006 @@ -1,0 +1,106 @@ +/* + * PROJECT: Network Control Panel Applet + * LICENSE: GPL - See COPYING in the top level directory + * FILE: dll/cpl/ncpa/Uk.rc + * PURPOSE: Ukraianian Language File for Network Applet + * TRANSLATOR: Artem Reznikov + */ + +LANGUAGE LANG_UKRAINIAN, SUBLANG_NEUTRAL + +IDD_PROPPAGENETWORK DIALOG DISCARDABLE 0, 0, 246, 228 +STYLE DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Íàñòðîéêè ìåðåæ³" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Ìåðåæåâ³ àäàïòåðè",-1,9,9,217,8 + LISTBOX IDC_NETCARDLIST,9,21,229,73,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "&Äîäàòè",IDC_ADD,9,100,60,14 + PUSHBUTTON "Â&èäàëèòè",IDC_REMOVE,72,100,60,14 + PUSHBUTTON "&Âëàñòèâîñò³",IDC_PROPERTIES,179,100,60,14 +END + +IDD_NETPROPERTIES DIALOG DISCARDABLE 0, 0, 246, 228 +STYLE DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Çàãàëüí³" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ϳäêëþ÷åííÿ ÷åðåç:", -1, 9,9,217,8 + EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_DISABLED | WS_BORDER | WS_TABSTOP + PUSHBUTTON "&Íàëàøòóâàòè", IDC_CONFIGURE, 189, 38, 50, 14 + LTEXT "³äì³÷åí³ êîìïîíåíòè âèêîðèñòîâóþòüñÿ öèì ï³äêëþ÷åííÿì:", -1, 9, 59, 217, 8 + LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 55, LBS_STANDARD | LBS_NOINTEGRALHEIGHT + PUSHBUTTON "Âñò&àíîâèòè", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "Â&èäàëèòè", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Âëàñòèâîñò³", IDC_PROPERTIES, 174, 130, 65, 14 + GROUPBOX "Îïèñ", -1, 9, 153, 230, 46, BS_GROUPBOX + LTEXT "Îïèñ êîìïîíåíò³â...", IDC_DESCRIPTION, 15, 165, 217, 28, WS_GROUP + CHECKBOX "Âèâåñòè çíà÷îê ï³äêëþ÷åííÿ íà ïàíåëü çàâäàíü", IDC_SHOWTASKBAR, 9, 206, 230, 12, BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP +END + + +IDD_CARDPROPERTIES DIALOG DISCARDABLE 0, 0, 200,180 +STYLE DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Çàãàëüí³" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "ϳäêëþ÷åííÿ", -1, 9, 8, 182, 58, BS_GROUPBOX + LTEXT "Ñòàí:", -1, 19, 20, 60, 8 + LTEXT "Òðèâàë³ñòü:", -1, 19, 34, 60, 8 + LTEXT "Øâèäê³ñòü:", -1, 19, 48, 60, 8 + GROUPBOX "Àêòèâí³ñòü", -1, 9, 74, 182, 70, BS_GROUPBOX + RTEXT "³äïðàâëåíî", -1, 26, 90, 60, 8 + ICON IDI_HORIZONTAL, -1, 90, 85, 18, 20 + ICON IDI_NETSTAT, -1, 110, 85, 18, 20 + ICON IDI_HORIZONTAL, -1, 130, 85, 18, 20 + LTEXT "Ïðèéíÿòî", -1, 149, 90, 37, 8 + LTEXT "Ïàêåò³â:", -1, 17, 115, 32, 8 + RTEXT "000.000.000", IDC_SEND, 63, 115, 44, 8 + ICON IDI_VERTICAL, -1, 110, 108, 18, 20 + RTEXT "000.000.000", IDC_RECEIVED, 139, 115, 44, 8 + PUSHBUTTON "&Âëàñòèâîñò³", IDC_PROPERTIES, 10, 150, 50, 14 + PUSHBUTTON "Â&³äêëþ÷èòè", IDC_ENDISABLE, 66, 150, 50, 14 +END + +IDD_TCPIPPROPERTIES DIALOG DISCARDABLE 0, 0, 246, 228 +STYLE DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Çàãàëüí³" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Ïàðàìåòðè ïðîòîêîëó IP ìîæóòü ïðèçíà÷àòèñÿ àâòîìàòè÷íî, ÿêùî ìåðåæà ï³äòðèìóº òàêó ìîæëèâ³ñòü. ²íàêøå âàì ïîòð³áíî îòðèìàòè ö³ ïàðàìåòðè ó àäì³í³ñòðàòîðà ìåðåæ³.", -1, 9, 9, 228, 27 + CONTROL "Îòðèìóâàòè IP-àäðåñó àâòîìàòè÷íî", IDC_USEDHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 43, 210, 12 + GROUPBOX "", -1, 9, 61, 228, 70, BS_GROUPBOX + CONTROL "&Âèêîðèñòîâóâàòè íàñòóïíó IP-àäðåñó:", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON, 14, 59, 105, 12 + LTEXT "IP-àäðåñà:", -1, 14, 75, 135, 8 + CONTROL "",IDC_IPADDR,"SysIPAddress32",WS_TABSTOP,150,75-2,80,12 + LTEXT "Ìàñêà ï³äìåðåæ³:", -1, 14, 90, 135, 8 + CONTROL "",IDC_SUBNETMASK,"SysIPAddress32",WS_TABSTOP,150,90-2,80,12 + LTEXT "Øëþç çà çàìîâ÷óâàííÿì:", -1, 14, 105, 135, 8 + CONTROL "",IDC_DEFGATEWAY,"SysIPAddress32",WS_TABSTOP,150,105-2,80,12 + CONTROL "Îòðèìóâàòè àäðåñó DNS-ñåðâåðà àâòîìàòè÷íî", IDC_AUTODNS, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 139, 210, 12 + GROUPBOX "", -1, 9, 157, 228, 47, BS_GROUPBOX + CONTROL "Â&èêîðèñòîâóâàòè íàñòóïí³ àäðåñè DNS-ñåðâåð³â", IDC_FIXEDDNS, "BUTTON", BS_AUTORADIOBUTTON, 14, 155, 142, 12 + LTEXT "Ïåðåâàæíèé DNS-ñåðâåð:", -1, 14, 171, 135, 8 + CONTROL "",IDC_DNS1,"SysIPAddress32",WS_TABSTOP,150,171-2,80,12 + LTEXT "Àëüòåðíàòèâíèé DNS-ñåðâåð:", -1, 14, 186, 135, 8 + CONTROL "",IDC_DNS2,"SysIPAddress32",WS_TABSTOP,150,186-2,80,12 + PUSHBUTTON "&Äîäàòêîâî", IDC_ADVANCED, 186, 209, 50, 14, WS_DISABLED | WS_TABSTOP +END + + +STRINGTABLE +BEGIN + IDS_CPLSYSTEMNAME "Íàñòðîéêè ìåðåæ³" + IDS_CPLSYSTEMDESCRIPTION "Âñòàíîâëþº íàñòðîéêè ìåðåæ³." +END + +STRINGTABLE +BEGIN + IDS_ERROR "Ïîìèëêà" + IDS_ENTER_VALID_IPADDRESS "Âè ìàºòå ââåñòè ïðàâèëüíó IP-àäðåñó" + IDS_ENTER_VALID_SUBNET "Âè ìàºòå ââåñòè ïðàâèëüíó ìàñêó ï³äìåðåæ³" + IDS_CANNOT_LOAD_CONFIG "Íåìîæëèâî çàâàíòàæèòè ïîòî÷í³ íàñòðîéêè" + IDS_CANNOT_CREATE_PROPSHEET "Íåìîæëèâî ñòâîðèòè â³êíî âëàñòèâîñòåé" + IDS_OUT_OF_MEMORY "Íåäîñòàòíüî ïàì'ÿò³" + IDS_CANNOT_SAVE_CHANGES "Íåìîæëèâî çáåðåãòè âíåñåí³ çì³íè" +END Propchange: trunk/reactos/dll/cpl/ncpa/uk.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/cpl/sysdm/sysdm.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/sysdm.rc?rev…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/sysdm.rc (original) +++ trunk/reactos/dll/cpl/sysdm/sysdm.rc Sun Jul 23 13:59:30 2006 @@ -25,3 +25,4 @@ #include "Ja.rc" #include "hu.rc" #include "ru.rc" +#include "uk.rc" Added: trunk/reactos/dll/cpl/sysdm/uk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/uk.rc?rev=23…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/uk.rc (added) +++ trunk/reactos/dll/cpl/sysdm/uk.rc Sun Jul 23 13:59:30 2006 @@ -1,0 +1,180 @@ +/* + * PROJECT: System Control Panel Applet + * LICENSE: GPL - See COPYING in the top level directory + * FILE: dll/cpl/sysdm/uk.rc + * PURPOSE: Ukraianian Language File for System Applet + * TRANSLATOR: Artem Reznikov + */ + +LANGUAGE LANG_UKRAINIAN, SUBLANG_NEUTRAL + +RC_LICENSE RTDATA "resources/gpl.txt" + +IDD_PROPPAGEGENERAL DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Çàãàëüí³" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Îïåðàö³éíà ñèñòåìà",-1,SYSTEM_COLUMN,LABELLINE(2),PROPSHEETWIDTH-SYSTEM_COLUMN-PROPSHEETPADDING(1),8 + LTEXT REACTOS_STR_PRODUCT_NAME,-1,SYSTEM_COLUMN+PROPSHEETPADDING(1),LABELLINE(3),PROPSHEETWIDTH-SYSTEM_COLUMN-PROPSHEETPADDING(1),8 + LTEXT "Âåðñ³ÿ "REACTOS_STR_PRODUCT_VERSION,-1,SYSTEM_COLUMN+PROPSHEETPADDING(1),LABELLINE(4),PROPSHEETWIDTH-SYSTEM_COLUMN-PROPSHEETPADDING(1),8 + + LTEXT "Êîìï'þòåð",-1,SYSTEM_COLUMN,LABELLINE(6),PROPSHEETWIDTH-SYSTEM_COLUMN-PROPSHEETPADDING(1),8 + LTEXT "",IDC_PROCESSORMANUFACTURER,SYSTEM_COLUMN+PROPSHEETPADDING(1),LABELLINE(7),PROPSHEETWIDTH-SYSTEM_COLUMN-PROPSHEETPADDING(1),8 + LTEXT "",IDC_PROCESSOR,SYSTEM_COLUMN+PROPSHEETPADDING(1),LABELLINE(8),PROPSHEETWIDTH-SYSTEM_COLUMN-PROPSHEETPADDING(1),8 + LTEXT "",IDC_PROCESSORSPEED,SYSTEM_COLUMN+PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-SYSTEM_COLUMN-PROPSHEETPADDING(1),8 + LTEXT "",IDC_SYSTEMMEMORY,SYSTEM_COLUMN+PROPSHEETPADDING(1),LABELLINE(10),PROPSHEETWIDTH-SYSTEM_COLUMN-PROPSHEETPADDING(1),8 + + EDITTEXT IDC_LICENSEMEMO,PROPSHEETPADDING(1),LABELLINE(13),PROPSHEETWIDTH-PROPSHEETPADDING(2),PROPSHEETHEIGHT-LABELLINE(13)-PROPSHEETPADDING(1),ES_LEFT|WS_TABSTOP|WS_BORDER|WS_VSCROLL|WS_HSCROLL|WS_GROUP|ES_MULTILINE|ES_READONLY +END + +IDD_PROPPAGECOMPUTER DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Ìåðåæåâà ³íäåíò³ô³êàöèÿ" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING(1),LABELLINE(1)-5, ICONSIZE, ICONSIZE, SS_ICON + LTEXT "ReactOS âèêîðèñòîâóº íàñòóïíó ³íôîðìàö³þ, ùîá ³äåíòèô³êóâàòè âàø êîìï'þòåð â ìåðåæ³.",-1,PROPSHEETPADDING(4)+ICONSIZE,LABELLINE(1)-5,PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(3) + LTEXT "Ïîâíå ³ì'ÿ êîìï'þòåðà:",-1,PROPSHEETPADDING(1),LABELLINE(4)-4,PROPSHEETPADDING(17),LABELLINE(4)-4 + LTEXT "(Çà çàìîâ÷óâàííÿì)",IDC_COMPUTERNAME,PROPSHEETPADDING(17),LABELLINE(4)-5,60,LABELLINE(4)-5 + LTEXT "Ðîáî÷à ãðóïà:",IDC_WORKGROUPDOMAIN,PROPSHEETPADDING(1),LABELLINE(6)-6,PROPSHEETPADDING(17),LABELLINE(6)-6 + LTEXT "(ïîðîæíüî)",IDC_WORKGROUPDOMAIN_NAME,PROPSHEETPADDING(17),LABELLINE(6)-6,60,LABELLINE(6)-6 + LTEXT "Ùîá ñêîðèñòóâàòèñÿ Ìàéñòðîì ìåðåæåâî¿ ³äåíòèô³êàö³¿ äëÿ ïðèºäíàííÿ äî äîìåíó ³ ñòâîðåííÿ ëîêàëüíîãî êîðèñòóâà÷à, íàòèñí³òü ²äåíòèô³êàö³ÿ.",-1,PROPSHEETPADDING(1),LABELLINE(7)+5,PROPSHEETWIDTH-PROPSHEETPADDING(12)-ICONSIZE,LABELLINE(8)+5 + PUSHBUTTON "&²äåíòèô³êàö³ÿ...",IDC_NETWORK_ID,175,LABELLINE(7)+5,70,LABELLINE(1)+4 + LTEXT "Ùîá ïåðåéìåíóâàòè öåé êîìï'þòåð àáî ïðèºäíàòèñÿ äî äîìåíó, íàòèñí³òü Âëàñòèâîñò³.",-1,PROPSHEETPADDING(1),LABELLINE(11)+2,PROPSHEETWIDTH-PROPSHEETPADDING(12)-ICONSIZE,LABELLINE(12)+2 + PUSHBUTTON "&Âëàñòèâîñò³...",IDC_NETWORK_PROPERTY,175,LABELLINE(11)+2,70,LABELLINE(1)+4 +END + +IDD_PROPPAGEHARDWARE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Óñòàòêóâàííÿ" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Óñòàíîâêà óñòàòêóâàííÿ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Ìàéñòåð óñòàíîâêè óñòàòêóâàííÿ äîïîìàãຠóñòàíîâèòè, â³äêëþ÷èòè, â³äíîâèòè, âèòÿãíóòè, òà íàëàøòóâàòè âàøå óñòàòêóâàííÿ.",-1,PROPSHEETPADDING(4)+ICONSIZE,LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(3) + ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING(2),LABELLINE(2), ICONSIZE, ICONSIZE, SS_ICON + PUSHBUTTON "&Óñòàíîâêà óñòàòêóâàííÿ...",IDC_HARDWARE_WIZARD,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(5)+2,PROPSHEETPADDING(15),14 + + GROUPBOX "Äèñïåò÷åð ïðèñòðî¿â",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(7)+2 + ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING(2),LABELLINE(10)-3,ICONSIZE, ICONSIZE, SS_ICON + LTEXT "Äèñïåò÷åð ïðèñòðî¿â ïåðåë³÷óº âñå óñòàòêóâàííÿ, óñòàíîâëåíå íà öüîìó êîìï'þòåð³. Çà éîãî äîïîìîãîþ ìîæíà çì³íèòè âëàñòèâîñò³ áóäü-ÿêîãî ïðèñòðîþ.",-1,PROPSHEETPADDING(4)+ICONSIZE,LABELLINE(10)-3,PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(3) + + PUSHBUTTON "&Äèñïåò÷åð ïðèñòðî¿â...",IDC_HARDWARE_DEVICE_MANAGER,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(13)+2,PROPSHEETPADDING(15),14 + + GROUPBOX "Ïðîô³ë³ óñòàòêóâàííÿ",-1,PROPSHEETPADDING(1),LABELLINE(16)+3,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING(2),LABELLINE(18)-5, ICONSIZE, ICONSIZE, SS_ICON + LTEXT "Ïðîô³ë³ óñòàòêóâàííÿ äàþòü çìîãó óñòàíîâëþâàòè é çáåð³ãàòè ð³çí³ êîíô³ãóðàö³¿ óñòàòêóâàííÿ.",0,PROPSHEETPADDING(4)+ICONSIZE,LABELLINE(18)-5,PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(3) + PUSHBUTTON "&Ïðîô³ë³ óñòàòêóâàííÿ...",IDC_HARDWARE_PROFILE,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(20)+2,PROPSHEETPADDING(15),14 +END + +IDD_PROPPAGEUSERPROFILE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Ïðîô³ë³ êîðèñòóâà÷³â" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING(1),LABELLINE(1), ICONSIZE, ICONSIZE, SS_ICON + LTEXT "Ïðîô³ë³ êîðèñòóâà÷³â ì³ñòÿòü ïàðàìåòðè ðîáî÷îãî ñòîëà òà ³íø³ â³äîìîñò³ ñòîñîâíî îáë³êîâèõ çàïèñ³â êîðèñòóâà÷³â. Âè ìîæåòå ñòâîðèòè îêðåì³ ïðîô³ë³ äëÿ êîæíîãî ç êîìï'þòåð³â, íà ÿêèõ âè ïðàöþºòå, àáî âèêîðèñòîâóâàòè îäèí ñï³ëüíèé ïðîô³ëü äëÿ âñ³õ êîìï'þòåð³â.",-1,PROPSHEETPADDING(4)+ICONSIZE,LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(4) + LTEXT "Ïðîô³ë³, ÿê³ çáåð³ãàþòüñÿ íà öüîìó êîìï'þòåð³:",-1,PROPSHEETPADDING(1),LABELLINE(6),PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(1) + CONTROL "",IDC_USERPROFILE_LIST,"SysListView32",LVS_REPORT|LVS_SINGLESEL|LVS_SHOWSELALWAYS|LVS_SORTASCENDING|WS_BORDER|WS_TABSTOP,PROPSHEETPADDING(1),LABELLINE(8),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(11),WS_EX_CLIENTEDGE + + PUSHBUTTON "Âèäàëèòè",IDC_USERPROFILE_DELETE,PROPSHEETPADDING(1),LABELLINE(20),60,LABELLINE(1)+2 + PUSHBUTTON "Çì³íèòè òèï...",IDC_USERPROFILE_CHANGE,(PROPSHEETWIDTH/2)-30,LABELLINE(20),60,LABELLINE(1)+2 + PUSHBUTTON "Êîï³þâàòè...",IDC_USERPROFILE_COPY,PROPSHEETWIDTH-PROPSHEETPADDING(1)-60,LABELLINE(20),60,LABELLINE(1)+2 +END + +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Äîäàòêîâî" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Øâèäêîä³ÿ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING(2),LABELLINE(2), ICONSIZE, ICONSIZE, SS_ICON + LTEXT "Ïàðàìåòðè øâèäêî䳿 âèçíà÷àþòü, ÿê ïðîãðàìè âèêîðèñòîâóþòü ïàì'ÿòü, ùî âïëèâຠíà øâèäê³ñòü ðîáîòè âàøîãî êîìï'þòåðà.",-1,PROPSHEETPADDING(4)+ICONSIZE,LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(3) + PUSHBUTTON "&Ïàðàìåòðè øâèäêî䳿...",IDC_PERFOR,PROPSHEETWIDTH-PROPSHEETPADDING(20),LABELLINE(5)+2,PROPSHEETPADDING(18),14 + GROUPBOX "Çì³íí³ îòî÷åííÿ",-1,PROPSHEETPADDING(1),LABELLINE(8)+2,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING(2),LABELLINE(10)-5, ICONSIZE, ICONSIZE, SS_ICON + LTEXT "Çì³íí³ îòî÷åííÿ âèçíà÷àþòü ì³ñöå çáåð³ãàííÿ ïåâíèõ âè³â ³íôîðìàö³¿ ó âàøîìó êîìï'þòåð³.",-1,PROPSHEETPADDING(4)+ICONSIZE,LABELLINE(10)-5,PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(3) + PUSHBUTTON "&Çì³íí³ îòî÷åííÿ...",IDC_ENVVAR,PROPSHEETWIDTH-PROPSHEETPADDING(20),LABELLINE(12)+2,PROPSHEETPADDING(18),14 + GROUPBOX "&Çàâàíòàæåííÿ ³ â³äíîâëåííÿ",-1,PROPSHEETPADDING(1),LABELLINE(15)+3,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING(2),LABELLINE(17)-5, ICONSIZE, ICONSIZE, SS_ICON + LTEXT "Ïàðàìåòðè çàâàíòàæåííÿ ³ â³äíîâëåííÿ âèçíà÷àþòü 䳿, ùî âèêîíóþòüñÿ ïðè çàïóñêó òà â ðàç³ çóïèíêè êîìï'þòåðà ÷åðåç ïîìèëêó.",0,PROPSHEETPADDING(4)+ICONSIZE,LABELLINE(17)-5,PROPSHEETWIDTH-PROPSHEETPADDING(6)-ICONSIZE,LABELLINE(3) + PUSHBUTTON "&Ç&àâàíòàæåííÿ ³ â³äíîâëåííÿ...",IDC_STAREC,PROPSHEETWIDTH-PROPSHEETPADDING(20),LABELLINE(19)+2,PROPSHEETPADDING(18),14 +END + + +IDD_VIRTMEM DIALOGEX 6, 6, 223, 248 +STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "³ðòóàëüíà ïàì'ÿòü" +FONT 8, "MS Sans Serif", 0, 0, 0x0 +BEGIN + CONTROL "",IDC_PAGEFILELIST,"ListBox",0x50010141,10,16,204,52,0x00000200 + LTEXT "Äèñê [ì³òêà òîìó]", -1, 12, 5, 96, 9 + LTEXT "Ôàéë äîâàíòàæåííÿ (ÌÁ)", -1, 114, 5, 100, 9 + CONTROL "Ðîçì³ð ôàéëó äîâàíòàæåííÿ äëÿ âèáðàíîãî äèñêà",IDC_DRIVEGROUP,"Button",0x50000007,10,70,204,104 + LTEXT "", IDC_DRIVE, 20, 84, 100, 9 + LTEXT "", IDC_SPACEAVAIL, 20, 94, 112, 8 + CONTROL "Îñîáëèâèé ðîçì³ð",IDC_CUSTOM,"Button",0x50010009,20,105,54,9 + CONTROL "",IDC_INITIALSIZE,"Edit",0x50010000,100,114,44,13,0x00000200 + CONTROL "",IDC_MAXSIZE,"Edit",0x50010000,100,129,44,13,0x00000200 + LTEXT "Âèõ³äíèé ðîçì³ð (ÌÁ):", -1 ,22,118,54,9 + LTEXT "Ìàêñèìàëüíèé ðîçì³ð (ÌÁ):", -1 ,22,131,64,9 + CONTROL "Ðîçì³ð, óñòàíîâëþâàíèé ñèñòåìîþ",IDC_SYSMANSIZE,"Button",0x50010009,20,145,88,9 + CONTROL "Áåç ôàéëó äîâàíòàæåííÿ",IDC_NOPAGEFILE,"Button",0x50010009,20,158,78,9 + PUSHBUTTON "Óñòàíîâèòè",IDC_SET, 158, 155, 50, 13 + CONTROL "Çàãàëüíèé ðîçì³ð ôàéëó äîâàíòàæåííÿ äëÿ âñ³õ äèñê³â", IDC_TOTALGROUP, "Button", 0x50000007, 10, 179, 204, 46 + PUSHBUTTON "OK", IDOK, 114, 232, 48, 13 + PUSHBUTTON "Ñêàñóâàòè", IDCANCEL, 168, 232, 48, 13 + LTEXT "", IDC_MINIMUM, 18, 200, 100, 9 + LTEXT "", IDC_RECOMMENDED, 18, 200, 100, 9 + LTEXT "", IDC_CURRENT, 18, 200, 100, 9 +END + +IDD_ENVIRONMENT_VARIABLES DIALOGEX 6, 18, 252, 245 +STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Çì³íí³ îòî÷åííÿ" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Çì³íí³ êîðèñòóâà÷à",-1,7,12,238,100 + LTEXT "Ç&ì³íí³:",-1,14,24,224,8 + CONTROL "",IDC_USER_VARIABLE_LIST,"SysListView32",LVS_REPORT|LVS_SINGLESEL|LVS_SHOWSELALWAYS|LVS_SORTASCENDING|LVS_NOSORTHEADER|WS_VSCROLL|WS_HSCROLL|WS_TABSTOP,14,35,224,48,WS_EX_CLIENTEDGE + PUSHBUTTON "&Ñòâîðèòè...",IDC_USER_VARIABLE_NEW,80,90,50,14 + PUSHBUTTON "&Çì³íèòè...",IDC_USER_VARIABLE_EDIT,134,90,50,14 + PUSHBUTTON "Â&èäàëèòè",IDC_USER_VARIABLE_DELETE,188,90,50,14 + + GROUPBOX "Ñèñòåìí³ çì³íí³",-1,7,116,238,100 + LTEXT "Ç&ì³íí³:",-1,14,128,224,8 + CONTROL "",IDC_SYSTEM_VARIABLE_LIST,"SysListView32",LVS_REPORT|LVS_SINGLESEL|LVS_SHOWSELALWAYS|LVS_SORTASCENDING|LVS_NOSORTHEADER|WS_VSCROLL|WS_HSCROLL|WS_TABSTOP,14,139,224,48,WS_EX_CLIENTEDGE + PUSHBUTTON "&Ñòâîðèòè...",IDC_SYSTEM_VARIABLE_NEW,80,194,50,14 + PUSHBUTTON "&Çì³íèòè...",IDC_SYSTEM_VARIABLE_EDIT,134,194,50,14 + PUSHBUTTON "Â&èäàëèòè",IDC_SYSTEM_VARIABLE_DELETE,188,194,50,14 + + DEFPUSHBUTTON "OK",IDOK,141,224,50,14,WS_GROUP + PUSHBUTTON "Ñêàñóâàòè",IDCANCEL,195,224,50,14 +END + + +IDD_EDIT_VARIABLE DIALOGEX 10, 15, 227, 71 +STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Ðåäàãóâàííÿ çì³ííî¿" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "&²ì'ÿ çì³ííî¿:",-1,7,14,50,8 + EDITTEXT IDC_VARIABLE_NAME,75,12,145,12,ES_AUTOHSCROLL + LTEXT "&Çíà÷åííÿ çì³ííî¿:",-1,7,32,50,8 + EDITTEXT IDC_VARIABLE_VALUE,75,30,145,12,ES_AUTOHSCROLL + + DEFPUSHBUTTON "OK",IDOK,116,50,50,14,WS_GROUP + PUSHBUTTON "Ñêàñóâàòè",IDCANCEL,170,50,50,14 +END + + +STRINGTABLE DISCARDABLE +BEGIN + IDS_CPLSYSTEMNAME "Ñèñòåìà" + IDS_CPLSYSTEMDESCRIPTION "Ïåðåãëÿä â³äîìîñòåé ïðî âàø êîìïþòåð òà çì³íà ïàðàìåòð³â ñèñòåìè é óñòàòêóâàííÿ." + IDS_DRIVE "Äèñê: %s" + IDS_SPACE "Äîñòóïíèé ïðîñò³ð: %s" + IDS_MIN "̳í³ìàëüíî ìîæëèâèé: %s" + IDS_REC "Ðåêîìåíäîâàíèé: %s" + IDS_CUR "Ïîòî÷íèé: %s" +END Propchange: trunk/reactos/dll/cpl/sysdm/uk.rc ------------------------------------------------------------------------------ svn:eol-style = native
18 years, 5 months
1
0
0
0
[greatlrd] 23238: Start cleaing up DDraw.dll I start moving all startup code for HAL and HEL to startup.c. It will kill alot of files and code and we can adodate our ddraw to wine ddraw design, at end.
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sun Jul 23 13:57:15 2006 New Revision: 23238 URL:
http://svn.reactos.org/svn/reactos?rev=23238&view=rev
Log: Start cleaing up DDraw.dll I start moving all startup code for HAL and HEL to startup.c. It will kill alot of files and code and we can adodate our ddraw to wine ddraw design, at end. Added: trunk/reactos/dll/directx/ddraw/startup.c (with props) Modified: trunk/reactos/dll/directx/ddraw/ddraw.rbuild trunk/reactos/dll/directx/ddraw/main.c trunk/reactos/dll/directx/ddraw/main/ddraw_main.c trunk/reactos/dll/directx/ddraw/rosdraw.h Modified: trunk/reactos/dll/directx/ddraw/ddraw.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/ddraw.rb…
============================================================================== --- trunk/reactos/dll/directx/ddraw/ddraw.rbuild (original) +++ trunk/reactos/dll/directx/ddraw/ddraw.rbuild Sun Jul 23 13:57:15 2006 @@ -17,6 +17,7 @@ <file>ddraw.rc</file> <file>main.c</file> <file>regsvr.c</file> + <file>startup.c</file> <file>helinterface.c</file> <file>clipper.c</file> Modified: trunk/reactos/dll/directx/ddraw/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main.c?r…
============================================================================== --- trunk/reactos/dll/directx/ddraw/main.c (original) +++ trunk/reactos/dll/directx/ddraw/main.c Sun Jul 23 13:57:15 2006 @@ -13,39 +13,6 @@ #include "rosdraw.h" #include "d3dhal.h" - - -/* - * IMPLEMENT - * Status this api is finish and is 100% correct - */ - -HRESULT -WINAPI -Create_DirectDraw (LPGUID pGUID, - LPDIRECTDRAW* pIface, - REFIID id, - BOOL ex) -{ - IDirectDrawImpl* This = (IDirectDrawImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectDrawImpl)); - - if (This == NULL) - return E_OUTOFMEMORY; - - ZeroMemory(This,sizeof(IDirectDrawImpl)); - - This->lpVtbl = &DirectDraw7_Vtable; - This->lpVtbl_v1 = &DDRAW_IDirectDraw_VTable; - This->lpVtbl_v2 = &DDRAW_IDirectDraw2_VTable; - This->lpVtbl_v4 = &DDRAW_IDirectDraw4_VTable; - - *pIface = (LPDIRECTDRAW)This; - - if(This->lpVtbl->QueryInterface ((LPDIRECTDRAW7)This, id, (void**)&pIface) != S_OK) - return DDERR_INVALIDPARAMS; - - return This->lpVtbl->Initialize ((LPDIRECTDRAW7)This, pGUID); -} /* * IMPLEMENT Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main/ddr…
============================================================================== --- trunk/reactos/dll/directx/ddraw/main/ddraw_main.c (original) +++ trunk/reactos/dll/directx/ddraw/main/ddraw_main.c Sun Jul 23 13:57:15 2006 @@ -69,17 +69,7 @@ HRESULT WINAPI Main_DirectDraw_Initialize (LPDIRECTDRAW7 iface, LPGUID lpGUID) -{ - DWORD hal_ret; - DWORD hel_ret; - DEVMODE devmode; - HBITMAP hbmp; - const UINT bmiSize = sizeof(BITMAPINFOHEADER) + 0x10; - UCHAR *pbmiData; - BITMAPINFO *pbmi; - DWORD *pMasks; - - +{ DX_WINDBG_trace(); IDirectDrawImpl* This = (IDirectDrawImpl*)iface; @@ -88,7 +78,6 @@ { return DDERR_NOTINITIALIZED; } - if (This->InitializeDraw == TRUE) { @@ -99,121 +88,6 @@ This->InitializeDraw = TRUE; } - RtlZeroMemory(&This->mDDrawGlobal, sizeof(DDRAWI_DIRECTDRAW_GBL)); - - - /* cObsolete is undoc in msdn it being use in CreateDCA */ - RtlCopyMemory(&This->mDDrawGlobal.cObsolete,&"DISPLAY",7); - RtlCopyMemory(&This->mDDrawGlobal.cDriverName,&"DISPLAY",7); - - /* Same for HEL and HAL */ - This->mcModeInfos = 1; - This->mpModeInfos = (DDHALMODEINFO*) DxHeapMemAlloc(This->mcModeInfos * sizeof(DDHALMODEINFO)); - - if (This->mpModeInfos == NULL) - { - return DD_FALSE; - } - - EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devmode); - - This->mpModeInfos[0].dwWidth = devmode.dmPelsWidth; - This->mpModeInfos[0].dwHeight = devmode.dmPelsHeight; - This->mpModeInfos[0].dwBPP = devmode.dmBitsPerPel; - This->mpModeInfos[0].lPitch = (devmode.dmPelsWidth*devmode.dmBitsPerPel)/8; - This->mpModeInfos[0].wRefreshRate = (WORD)devmode.dmDisplayFrequency; - - This->hdc = CreateDCW(L"DISPLAY",L"DISPLAY",NULL,NULL); - - if (This->hdc == NULL) - { - return DDERR_OUTOFMEMORY ; - } - - hbmp = CreateCompatibleBitmap(This->hdc, 1, 1); - if (hbmp==NULL) - { - DxHeapMemFree(This->mpModeInfos); - DeleteDC(This->hdc); - return DDERR_OUTOFMEMORY; - } - - pbmiData = (UCHAR *) DxHeapMemAlloc(bmiSize); - pbmi = (BITMAPINFO*)pbmiData; - - if (pbmiData==NULL) - { - DxHeapMemFree(This->mpModeInfos); - DeleteDC(This->hdc); - DeleteObject(hbmp); - return DDERR_OUTOFMEMORY; - } - - pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - pbmi->bmiHeader.biBitCount = (WORD)devmode.dmBitsPerPel; - pbmi->bmiHeader.biCompression = BI_BITFIELDS; - pbmi->bmiHeader.biWidth = 1; - pbmi->bmiHeader.biHeight = 1; - - GetDIBits(This->hdc, hbmp, 0, 0, NULL, pbmi, 0); - DeleteObject(hbmp); - - pMasks = (DWORD*)(pbmiData + sizeof(BITMAPINFOHEADER)); - This->mpModeInfos[0].dwRBitMask = pMasks[0]; - This->mpModeInfos[0].dwGBitMask = pMasks[1]; - This->mpModeInfos[0].dwBBitMask = pMasks[2]; - This->mpModeInfos[0].dwAlphaBitMask = pMasks[3]; - - DxHeapMemFree(pbmiData); - - /* Startup HEL and HAL */ - RtlZeroMemory(&This->mDDrawGlobal, sizeof(DDRAWI_DIRECTDRAW_GBL)); - RtlZeroMemory(&This->mHALInfo, sizeof(DDHALINFO)); - RtlZeroMemory(&This->mCallbacks, sizeof(DDHAL_CALLBACKS)); - - This->mDDrawLocal.lpDDCB = &This->mCallbacks; - This->mDDrawLocal.lpGbl = &This->mDDrawGlobal; - This->mDDrawLocal.dwProcessId = GetCurrentProcessId(); - - This->mDDrawGlobal.lpDDCBtmp = &This->mCallbacks; - This->mDDrawGlobal.lpExclusiveOwner = &This->mDDrawLocal; - - hal_ret = Hal_DirectDraw_Initialize (iface); - hel_ret = Hel_DirectDraw_Initialize (iface); - if ((hal_ret!=DD_OK) && (hel_ret!=DD_OK)) - { - return DDERR_NODIRECTDRAWSUPPORT; - } - - /* - Try figout which api we shall use, first we try see if HAL exits - if it does not we select HEL instead - */ - - if (This->mDDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_CANCREATESURFACE) - { - This->mDdCanCreateSurface.CanCreateSurface = This->mCallbacks.HALDD.CanCreateSurface; - } - else - { - This->mDdCanCreateSurface.CanCreateSurface = This->mCallbacks.HELDD.CanCreateSurface; - } - - This->mDdCreateSurface.lpDD = &This->mDDrawGlobal; - - if (This->mDDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_CREATESURFACE) - { - This->mDdCreateSurface.CreateSurface = This->mCallbacks.HALDD.CreateSurface; - } - else - { - This->mDdCreateSurface.CreateSurface = This->mCallbacks.HELDD.CreateSurface; - } - - /* Setup calback struct so we do not need refill same info again */ - This->mDdCreateSurface.lpDD = &This->mDDrawGlobal; - This->mDdCanCreateSurface.lpDD = &This->mDDrawGlobal; - return DD_OK; } Modified: trunk/reactos/dll/directx/ddraw/rosdraw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/rosdraw.…
============================================================================== --- trunk/reactos/dll/directx/ddraw/rosdraw.h (original) +++ trunk/reactos/dll/directx/ddraw/rosdraw.h Sun Jul 23 13:57:15 2006 @@ -10,21 +10,10 @@ #include <d3dhal.h> #include <ddrawgdi.h> - -/* this sturct are not longer in DDK - I did recrate it by looking diffent betwin DD_xx struct and _DDHAL strucrt - only diffent I found was the global pointer have been change from LPDDRAWI_DDRAWSURFACE_GBL - to DD_DIRECTDRAW_GLOBAL -*/ - -typedef struct _DDHAL_MAPMEMORYDATA -{ - LPDDRAWI_DDRAWSURFACE_GBL lpDD; - BOOL bMap; - HANDLE hProcess; - FLATPTR fpProcess; - HRESULT ddRVal; -} DDHAL_MAPMEMORYDATA; +HRESULT WINAPI Create_DirectDraw (LPGUID pGUID, LPDIRECTDRAW* pIface, REFIID id, BOOL ex); + +HRESULT Hal_DirectDraw_Initialize (LPDIRECTDRAW7 ); +HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 ); /* own macro to alloc memmory */ #define DxHeapMemAlloc(m) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, m) @@ -228,8 +217,7 @@ HRESULT WINAPI Main_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps, LPDWORD total, LPDWORD free); -HRESULT Hal_DirectDraw_Initialize (LPDIRECTDRAW7 ); -HRESULT Hal_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 ); + VOID Hal_DirectDraw_Release (LPDIRECTDRAW7 ); HRESULT Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7, LPDDSCAPS2, LPDWORD, LPDWORD ); HRESULT Hal_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7, DWORD, HANDLE ); Added: trunk/reactos/dll/directx/ddraw/startup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/startup.…
============================================================================== --- trunk/reactos/dll/directx/ddraw/startup.c (added) +++ trunk/reactos/dll/directx/ddraw/startup.c Sun Jul 23 13:57:15 2006 @@ -1,0 +1,188 @@ +/* $Id: main.c 21434 2006-04-01 19:12:56Z greatlrd $ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/ddraw/ddraw.c + * PURPOSE: DirectDraw Library + * PROGRAMMER: Magnus Olsen (greatlrd) + * + */ + +#include <windows.h> +#include "rosdraw.h" +#include "d3dhal.h" + + +HRESULT WINAPI +StartDirectDraw(LPDIRECTDRAW* iface) +{ + IDirectDrawImpl* This = (IDirectDrawImpl*)iface; + DWORD hal_ret; + DWORD hel_ret; + DEVMODE devmode; + HBITMAP hbmp; + const UINT bmiSize = sizeof(BITMAPINFOHEADER) + 0x10; + UCHAR *pbmiData; + BITMAPINFO *pbmi; + DWORD *pMasks; + + DX_WINDBG_trace(); + + RtlZeroMemory(&This->mDDrawGlobal, sizeof(DDRAWI_DIRECTDRAW_GBL)); + + /* cObsolete is undoc in msdn it being use in CreateDCA */ + RtlCopyMemory(&This->mDDrawGlobal.cObsolete,&"DISPLAY",7); + RtlCopyMemory(&This->mDDrawGlobal.cDriverName,&"DISPLAY",7); + + /* Same for HEL and HAL */ + This->mcModeInfos = 1; + This->mpModeInfos = (DDHALMODEINFO*) DxHeapMemAlloc(This->mcModeInfos * sizeof(DDHALMODEINFO)); + + if (This->mpModeInfos == NULL) + { + DX_STUB_str("DD_FALSE"); + return DD_FALSE; + } + + EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devmode); + + This->mpModeInfos[0].dwWidth = devmode.dmPelsWidth; + This->mpModeInfos[0].dwHeight = devmode.dmPelsHeight; + This->mpModeInfos[0].dwBPP = devmode.dmBitsPerPel; + This->mpModeInfos[0].lPitch = (devmode.dmPelsWidth*devmode.dmBitsPerPel)/8; + This->mpModeInfos[0].wRefreshRate = (WORD)devmode.dmDisplayFrequency; + + This->hdc = CreateDCW(L"DISPLAY",L"DISPLAY",NULL,NULL); + + if (This->hdc == NULL) + { + DX_STUB_str("DDERR_OUTOFMEMORY"); + return DDERR_OUTOFMEMORY ; + } + + hbmp = CreateCompatibleBitmap(This->hdc, 1, 1); + if (hbmp==NULL) + { + DxHeapMemFree(This->mpModeInfos); + DeleteDC(This->hdc); + DX_STUB_str("DDERR_OUTOFMEMORY"); + return DDERR_OUTOFMEMORY; + } + + pbmiData = (UCHAR *) DxHeapMemAlloc(bmiSize); + pbmi = (BITMAPINFO*)pbmiData; + + if (pbmiData==NULL) + { + DxHeapMemFree(This->mpModeInfos); + DeleteDC(This->hdc); + DeleteObject(hbmp); + DX_STUB_str("DDERR_OUTOFMEMORY"); + return DDERR_OUTOFMEMORY; + } + + pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + pbmi->bmiHeader.biBitCount = (WORD)devmode.dmBitsPerPel; + pbmi->bmiHeader.biCompression = BI_BITFIELDS; + pbmi->bmiHeader.biWidth = 1; + pbmi->bmiHeader.biHeight = 1; + + GetDIBits(This->hdc, hbmp, 0, 0, NULL, pbmi, 0); + DeleteObject(hbmp); + + pMasks = (DWORD*)(pbmiData + sizeof(BITMAPINFOHEADER)); + This->mpModeInfos[0].dwRBitMask = pMasks[0]; + This->mpModeInfos[0].dwGBitMask = pMasks[1]; + This->mpModeInfos[0].dwBBitMask = pMasks[2]; + This->mpModeInfos[0].dwAlphaBitMask = pMasks[3]; + + DxHeapMemFree(pbmiData); + + /* Startup HEL and HAL */ + RtlZeroMemory(&This->mDDrawGlobal, sizeof(DDRAWI_DIRECTDRAW_GBL)); + RtlZeroMemory(&This->mHALInfo, sizeof(DDHALINFO)); + RtlZeroMemory(&This->mCallbacks, sizeof(DDHAL_CALLBACKS)); + + This->mDDrawLocal.lpDDCB = &This->mCallbacks; + This->mDDrawLocal.lpGbl = &This->mDDrawGlobal; + This->mDDrawLocal.dwProcessId = GetCurrentProcessId(); + + This->mDDrawGlobal.lpDDCBtmp = &This->mCallbacks; + This->mDDrawGlobal.lpExclusiveOwner = &This->mDDrawLocal; + + hal_ret = Hal_DirectDraw_Initialize ((LPDIRECTDRAW7)iface); + hel_ret = Hel_DirectDraw_Initialize ((LPDIRECTDRAW7)iface); + if ((hal_ret!=DD_OK) && (hel_ret!=DD_OK)) + { + DX_STUB_str("DDERR_NODIRECTDRAWSUPPORT"); + return DDERR_NODIRECTDRAWSUPPORT; + } + + /* + Try figout which api we shall use, first we try see if HAL exits + if it does not we select HEL instead + */ + + if (This->mDDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_CANCREATESURFACE) + { + This->mDdCanCreateSurface.CanCreateSurface = This->mCallbacks.HALDD.CanCreateSurface; + } + else + { + This->mDdCanCreateSurface.CanCreateSurface = This->mCallbacks.HELDD.CanCreateSurface; + } + + This->mDdCreateSurface.lpDD = &This->mDDrawGlobal; + + if (This->mDDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_CREATESURFACE) + { + This->mDdCreateSurface.CreateSurface = This->mCallbacks.HALDD.CreateSurface; + } + else + { + This->mDdCreateSurface.CreateSurface = This->mCallbacks.HELDD.CreateSurface; + } + + /* Setup calback struct so we do not need refill same info again */ + This->mDdCreateSurface.lpDD = &This->mDDrawGlobal; + This->mDdCanCreateSurface.lpDD = &This->mDDrawGlobal; + + return DD_OK; +} + +HRESULT +WINAPI +Create_DirectDraw (LPGUID pGUID, + LPDIRECTDRAW* pIface, + REFIID id, + BOOL ex) +{ + IDirectDrawImpl* This = (IDirectDrawImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectDrawImpl)); + + DX_WINDBG_trace(); + + if (This == NULL) + return E_OUTOFMEMORY; + + ZeroMemory(This,sizeof(IDirectDrawImpl)); + + This->lpVtbl = &DirectDraw7_Vtable; + This->lpVtbl_v1 = &DDRAW_IDirectDraw_VTable; + This->lpVtbl_v2 = &DDRAW_IDirectDraw2_VTable; + This->lpVtbl_v4 = &DDRAW_IDirectDraw4_VTable; + + *pIface = (LPDIRECTDRAW)This; + + if(This->lpVtbl->QueryInterface ((LPDIRECTDRAW7)This, id, (void**)&pIface) != S_OK) + { + return DDERR_INVALIDPARAMS; + } + + if (StartDirectDraw((LPDIRECTDRAW*)This) == DD_OK); + { + return This->lpVtbl->Initialize ((LPDIRECTDRAW7)This, pGUID); + } + + return DDERR_INVALIDPARAMS; +} + Propchange: trunk/reactos/dll/directx/ddraw/startup.c ------------------------------------------------------------------------------ svn:eol-style = native
18 years, 5 months
1
0
0
0
[janderwald] 23237: * add automatic powrprof diff for winesync
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Jul 23 13:56:59 2006 New Revision: 23237 URL:
http://svn.reactos.org/svn/reactos?rev=23237&view=rev
Log: * add automatic powrprof diff for winesync Added: trunk/reactos/dll/win32/powrprof/powrprof_ros.diff (with props) Added: trunk/reactos/dll/win32/powrprof/powrprof_ros.diff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/powrprof/powrpro…
============================================================================== --- trunk/reactos/dll/win32/powrprof/powrprof_ros.diff (added) +++ trunk/reactos/dll/win32/powrprof/powrprof_ros.diff Sun Jul 23 13:56:59 2006 @@ -1,0 +1,10 @@ +Index: D:/reactos/dll/win32/powrprof/powrprof.spec +=================================================================== +--- D:/reactos/dll/win32/powrprof/powrprof.spec (revision 22834) ++++ D:/reactos/dll/win32/powrprof/powrprof.spec (revision 22835) +@@ -18,3 +18,4 @@ + @ stdcall WriteGlobalPwrPolicy (ptr) + @ stdcall WriteProcessorPwrScheme (long ptr) + @ stdcall WritePwrScheme (ptr str str ptr) ++@ stdcall ValidatePowerPolicies (ptr ptr) +\ No newline at end of file Propchange: trunk/reactos/dll/win32/powrprof/powrprof_ros.diff ------------------------------------------------------------------------------ svn:eol-style = native
18 years, 5 months
1
0
0
0
[ion] 23236: - Refactor SeCaptureSubjectContext into SeCaptureSubjectContextEx and SeCreateAccessState into SeCreateAccessStateEx. The *Ex routines allow specifying a custom process/thread which isn't the current one. This is useful when creating a new process or thread since we're not actually in it. - Implemented a bit more security calls in PspCreateProcess as seen in WI II. We now create an AccessState. - Also write the PID in the ObjectTable.
by ion@svn.reactos.org
Author: ion Date: Sun Jul 23 12:20:57 2006 New Revision: 23236 URL:
http://svn.reactos.org/svn/reactos?rev=23236&view=rev
Log: - Refactor SeCaptureSubjectContext into SeCaptureSubjectContextEx and SeCreateAccessState into SeCreateAccessStateEx. The *Ex routines allow specifying a custom process/thread which isn't the current one. This is useful when creating a new process or thread since we're not actually in it. - Implemented a bit more security calls in PspCreateProcess as seen in WI II. We now create an AccessState. - Also write the PID in the ObjectTable. Modified: trunk/reactos/ntoskrnl/include/internal/se.h trunk/reactos/ntoskrnl/ps/process.c trunk/reactos/ntoskrnl/se/access.c trunk/reactos/ntoskrnl/se/audit.c trunk/reactos/ntoskrnl/se/semgr.c Modified: trunk/reactos/ntoskrnl/include/internal/se.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/se.h (original) +++ trunk/reactos/ntoskrnl/include/internal/se.h Sun Jul 23 12:20:57 2006 @@ -131,6 +131,17 @@ NTSTATUS NTAPI +SeCreateAccessStateEx( + IN PETHREAD Thread, + IN PEPROCESS Process, + IN OUT PACCESS_STATE AccessState, + IN PAUX_DATA AuxData, + IN ACCESS_MASK Access, + IN PGENERIC_MAPPING GenericMapping +); + +NTSTATUS +NTAPI SeIsTokenChild( IN PTOKEN Token, OUT PBOOLEAN IsChild @@ -160,12 +171,24 @@ NTAPI SeAuditProcessExit(IN PEPROCESS Process); +VOID +NTAPI +SeAuditProcessCreate(IN PEPROCESS Process); + NTSTATUS NTAPI SeExchangePrimaryToken( struct _EPROCESS* Process, PACCESS_TOKEN NewToken, PACCESS_TOKEN* OldTokenP +); + +VOID +NTAPI +SeCaptureSubjectContextEx( + IN PETHREAD Thread, + IN PEPROCESS Process, + OUT PSECURITY_SUBJECT_CONTEXT SubjectContext ); NTSTATUS Modified: trunk/reactos/ntoskrnl/ps/process.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/process.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ps/process.c (original) +++ trunk/reactos/ntoskrnl/ps/process.c Sun Jul 23 12:20:57 2006 @@ -368,6 +368,9 @@ PETHREAD CurrentThread; PEPROCESS CurrentProcess; ULONG MinWs, MaxWs; + ACCESS_STATE LocalAccessState; + PACCESS_STATE AccessState = &LocalAccessState; + AUX_DATA AuxData; PAGED_CODE(); DirectoryTableBase.QuadPart = 0; @@ -633,7 +636,19 @@ goto CleanupWithRef; } - /* FIXME: Insert into Job Object */ + /* Set the handle table PID */ + Process->ObjectTable->UniqueProcessId = Process->UniqueProcessId; + + /* Check if we need to audit */ + if (SeDetailedAuditingWithToken(NULL)) SeAuditProcessCreate(Process); + + /* Check if the parent had a job */ + if ((Parent) && (Parent->Job)) + { + /* FIXME: We need to insert this process */ + DPRINT1("Jobs not yet supported\n"); + KEBUGCHECK(0); + } /* Create PEB only for User-Mode Processes */ if (Parent) @@ -647,15 +662,29 @@ InsertTailList(&PsActiveProcessHead, &Process->ActiveProcessLinks); KeReleaseGuardedMutex(&PspActiveProcessMutex); - /* FIXME: SeCreateAccessStateEx */ + /* Create an access state */ + Status = SeCreateAccessStateEx(CurrentThread, + ((Parent) && + (Parent == PsInitialSystemProcess)) ? + Parent : CurrentProcess, + &LocalAccessState, + &AuxData, + DesiredAccess, + &PsProcessType->TypeInfo.GenericMapping); + if (!NT_SUCCESS(Status)) goto CleanupWithRef; /* Insert the Process into the Object Directory */ Status = ObInsertObject(Process, - NULL, + AccessState, DesiredAccess, 1, (PVOID*)&Process, &hProcess); + + /* Free the access state */ + if (AccessState) SeDeleteAccessState(AccessState); + + /* Cleanup on failure */ if (!NT_SUCCESS(Status)) goto Cleanup; /* FIXME: Compute Quantum and Priority */ Modified: trunk/reactos/ntoskrnl/se/access.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/access.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/se/access.c (original) +++ trunk/reactos/ntoskrnl/se/access.c Sun Jul 23 12:20:57 2006 @@ -14,24 +14,19 @@ #define NDEBUG #include <internal/debug.h> -#define GENERIC_ACCESS (GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | \ - GENERIC_ALL) - /* FUNCTIONS ***************************************************************/ -/* - * @implemented - */ NTSTATUS -STDCALL -SeCreateAccessState(PACCESS_STATE AccessState, - PAUX_DATA AuxData, - ACCESS_MASK Access, - PGENERIC_MAPPING GenericMapping) +NTAPI +SeCreateAccessStateEx(IN PETHREAD Thread, + IN PEPROCESS Process, + IN OUT PACCESS_STATE AccessState, + IN PAUX_DATA AuxData, + IN ACCESS_MASK Access, + IN PGENERIC_MAPPING GenericMapping) { ACCESS_MASK AccessMask = Access; PTOKEN Token; - PAGED_CODE(); /* Map the Generic Acess to Specific Access if we have a Mapping */ @@ -44,8 +39,10 @@ RtlZeroMemory(AccessState, sizeof(ACCESS_STATE)); /* Capture the Subject Context */ - SeCaptureSubjectContext(&AccessState->SubjectSecurityContext); - + SeCaptureSubjectContextEx(Thread, + Process, + &AccessState->SubjectSecurityContext); + /* Set Access State Data */ AccessState->AuxData = AuxData; AccessState->RemainingDesiredAccess = AccessMask; @@ -56,7 +53,7 @@ Token = AccessState->SubjectSecurityContext.ClientToken ? (PTOKEN)&AccessState->SubjectSecurityContext.ClientToken : (PTOKEN)&AccessState->SubjectSecurityContext.PrimaryToken; - + /* Check for Travers Privilege */ if (Token->TokenFlags & TOKEN_HAS_TRAVERSE_PRIVILEGE) { @@ -67,11 +64,32 @@ /* Set the Auxiliary Data */ AuxData->PrivilegeSet = (PPRIVILEGE_SET)((ULONG_PTR)AccessState + FIELD_OFFSET(ACCESS_STATE, - Privileges)); + Privileges)); if (GenericMapping) AuxData->GenericMapping = *GenericMapping; /* Return Sucess */ return STATUS_SUCCESS; +} + +/* + * @implemented + */ +NTSTATUS +STDCALL +SeCreateAccessState(IN OUT PACCESS_STATE AccessState, + IN PAUX_DATA AuxData, + IN ACCESS_MASK Access, + IN PGENERIC_MAPPING GenericMapping) +{ + PAGED_CODE(); + + /* Call the internal API */ + return SeCreateAccessStateEx(PsGetCurrentThread(), + PsGetCurrentProcess(), + AccessState, + AuxData, + Access, + GenericMapping); } /* @@ -89,7 +107,7 @@ /* Deallocate Privileges */ if (AccessState->PrivilegesAllocated) ExFreePool(AuxData->PrivilegeSet); - + /* Deallocate Name and Type Name */ if (AccessState->ObjectName.Buffer) { Modified: trunk/reactos/ntoskrnl/se/audit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/audit.c?rev=23…
============================================================================== --- trunk/reactos/ntoskrnl/se/audit.c (original) +++ trunk/reactos/ntoskrnl/se/audit.c Sun Jul 23 12:20:57 2006 @@ -21,6 +21,13 @@ { /* FIXME */ return FALSE; +} + +VOID +NTAPI +SeAuditProcessCreate(IN PEPROCESS Process) +{ + /* FIXME */ } VOID Modified: trunk/reactos/ntoskrnl/se/semgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/semgr.c?rev=23…
============================================================================== --- trunk/reactos/ntoskrnl/se/semgr.c (original) +++ trunk/reactos/ntoskrnl/se/semgr.c Sun Jul 23 12:20:57 2006 @@ -416,36 +416,52 @@ return STATUS_SUCCESS; } +VOID +NTAPI +SeCaptureSubjectContextEx(IN PETHREAD Thread, + IN PEPROCESS Process, + OUT PSECURITY_SUBJECT_CONTEXT SubjectContext) +{ + BOOLEAN CopyOnOpen, EffectiveOnly; + PAGED_CODE(); + + /* ROS HACK */ + if (!Process) return; + + /* Save the unique ID */ + SubjectContext->ProcessAuditId = Process->UniqueProcessId; + + /* Check if we have a thread */ + if (!Thread) + { + /* We don't, so no token */ + SubjectContext->ClientToken = NULL; + } + else + { + /* Get the impersonation token */ + SubjectContext->ClientToken = + PsReferenceImpersonationToken(Thread, + &CopyOnOpen, + &EffectiveOnly, + &SubjectContext->ImpersonationLevel); + } + + /* Get the primary token */ + SubjectContext->PrimaryToken = PsReferencePrimaryToken(Process); +} + /* * @implemented */ -VOID STDCALL +VOID +NTAPI SeCaptureSubjectContext(OUT PSECURITY_SUBJECT_CONTEXT SubjectContext) { - PETHREAD Thread; - BOOLEAN CopyOnOpen; - BOOLEAN EffectiveOnly; - - PAGED_CODE(); - - Thread = PsGetCurrentThread(); - if (Thread == NULL) - { - SubjectContext->ProcessAuditId = 0; - SubjectContext->PrimaryToken = NULL; - SubjectContext->ClientToken = NULL; - SubjectContext->ImpersonationLevel = 0; - } - else - { - SubjectContext->ProcessAuditId = Thread->ThreadsProcess; - SubjectContext->ClientToken = - PsReferenceImpersonationToken(Thread, - &CopyOnOpen, - &EffectiveOnly, - &SubjectContext->ImpersonationLevel); - SubjectContext->PrimaryToken = PsReferencePrimaryToken(Thread->ThreadsProcess); - } + /* Call the internal API */ + SeCaptureSubjectContextEx(PsGetCurrentThread(), + PsGetCurrentProcess(), + SubjectContext); }
18 years, 5 months
1
0
0
0
[ion] 23235: - SeAccessCheck should assume failure if no SD was passed. Also fixes bugcheck on startup since processes don't currently have SDs.
by ion@svn.reactos.org
Author: ion Date: Sun Jul 23 11:24:20 2006 New Revision: 23235 URL:
http://svn.reactos.org/svn/reactos?rev=23235&view=rev
Log: - SeAccessCheck should assume failure if no SD was passed. Also fixes bugcheck on startup since processes don't currently have SDs. Modified: trunk/reactos/ntoskrnl/ps/security.c trunk/reactos/ntoskrnl/se/semgr.c Modified: trunk/reactos/ntoskrnl/ps/security.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/security.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ps/security.c (original) +++ trunk/reactos/ntoskrnl/ps/security.c Sun Jul 23 11:24:20 2006 @@ -263,6 +263,7 @@ SubjectContext.ClientToken = NULL; /* Do the access check */ + if (!SecurityDescriptor) DPRINT1("FIX PS SDs!!\n"); Result = SeAccessCheck(SecurityDescriptor, &SubjectContext, FALSE, Modified: trunk/reactos/ntoskrnl/se/semgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/semgr.c?rev=23…
============================================================================== --- trunk/reactos/ntoskrnl/se/semgr.c (original) +++ trunk/reactos/ntoskrnl/se/semgr.c Sun Jul 23 11:24:20 2006 @@ -871,6 +871,14 @@ PAGED_CODE(); + /* Check if we didn't get an SD */ + if (!SecurityDescriptor) + { + /* Automatic failure */ + *AccessStatus = STATUS_ACCESS_DENIED; + return FALSE; + } + CurrentAccess = PreviouslyGrantedAccess; if (SubjectContextLocked == FALSE)
18 years, 5 months
1
0
0
0
[ion] 23234: - Fixup PSTRACE to print much nicer output and actually work. - Add tracing for security.c and kill.c.
by ion@svn.reactos.org
Author: ion Date: Sun Jul 23 11:13:19 2006 New Revision: 23234 URL:
http://svn.reactos.org/svn/reactos?rev=23234&view=rev
Log: - Fixup PSTRACE to print much nicer output and actually work. - Add tracing for security.c and kill.c. Modified: trunk/reactos/ntoskrnl/include/internal/ps.h trunk/reactos/ntoskrnl/ps/kill.c trunk/reactos/ntoskrnl/ps/query.c trunk/reactos/ntoskrnl/ps/security.c Modified: trunk/reactos/ntoskrnl/include/internal/ps.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ps.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ps.h Sun Jul 23 11:13:19 2006 @@ -9,7 +9,7 @@ // // Define this if you want debugging support // -#define _PS_DEBUG_ 0x00 +#define _PS_DEBUG_ 0x01 // // These define the Debug Masks Supported @@ -22,19 +22,32 @@ #define PS_WIN32K_DEBUG 0x20 #define PS_STATE_DEBUG 0x40 #define PS_QUOTA_DEBUG 0x80 +#define PS_KILL_DEBUG 0x100 // // Debug/Tracing support // #if _PS_DEBUG_ #ifdef NEW_DEBUG_SYSTEM_IMPLEMENTED // enable when Debug Filters are implemented -#define PSTRACE DbgPrintEx +#define PSTRACE(x, ...) \ + { \ + DbgPrintEx("%s [%.16s] - ", \ + __FUNCTION__, \ + PsGetCurrentProcess()->ImageFileName); \ + DbgPrintEx(__VA_ARGS__); \ + } #else -#define PSTRACE(x, ...) \ - if (x & PspTraceLevel) DbgPrint(__VA_ARGS__) +#define PSTRACE(x, ...) \ + if (x & PspTraceLevel) \ + { \ + DbgPrint("%s [%.16s] - ", \ + __FUNCTION__, \ + PsGetCurrentProcess()->ImageFileName); \ + DbgPrint(__VA_ARGS__); \ + } #endif #else -#define PSTRACE(x, ...) DPRINT(__VA_ARGS__) +#define PSTRACE(x, ...) DPRINT(__VA_ARGS__); #endif // Modified: trunk/reactos/ntoskrnl/ps/kill.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/kill.c?rev=232…
============================================================================== --- trunk/reactos/ntoskrnl/ps/kill.c (original) +++ trunk/reactos/ntoskrnl/ps/kill.c Sun Jul 23 11:13:19 2006 @@ -81,8 +81,10 @@ PspTerminateProcess(IN PEPROCESS Process, IN NTSTATUS ExitStatus) { + PETHREAD Thread = NULL; PAGED_CODE(); - PETHREAD Thread = NULL; + PSTRACE(PS_KILL_DEBUG, + "Process: %p ExitStatus: %p\n", Process, ExitStatus); /* Check if this is a Critical Process */ if (Process->BreakOnTermination) @@ -151,6 +153,7 @@ PLIST_ENTRY *ListAddr; PLIST_ENTRY NextEntry; PETHREAD Thread; + PSTRACE(PS_KILL_DEBUG, "Context: %p\n", Context); /* Get the Reaper Address Pointer */ ListAddr = &PspReaperListHead.Flink; @@ -191,6 +194,7 @@ PEPROCESS Process = (PEPROCESS)ObjectBody; KAPC_STATE ApcState; PAGED_CODE(); + PSTRACE(PS_KILL_DEBUG, "ObjectBody: %p\n", ObjectBody); /* Check if it has an Active Process Link */ if (Process->ActiveProcessLinks.Flink) @@ -321,6 +325,7 @@ PETHREAD Thread = (PETHREAD)ObjectBody; PEPROCESS Process = Thread->ThreadsProcess; PAGED_CODE(); + PSTRACE(PS_KILL_DEBUG, "ObjectBody: %p\n", ObjectBody); ASSERT(Thread->Tcb.Win32Thread == NULL); /* Check if we have a stack */ @@ -388,6 +393,7 @@ PKAPC Apc; PTOKEN PrimaryToken; PAGED_CODE(); + PSTRACE(PS_KILL_DEBUG, "ExitStatus: %p\n", ExitStatus); /* Get the Current Thread and Process */ Thread = PsGetCurrentThread(); @@ -445,9 +451,6 @@ /* Lock the Process before we modify its thread entries */ KeEnterCriticalRegion(); ExAcquirePushLockExclusive(&CurrentProcess->ProcessLock); - - /* Wake up the thread so we don't deadlock on lock */ - //KeForceResumeThread(&Thread->Tcb); /* Decrease the active thread count, and check if it's 0 */ if (!(--CurrentProcess->ActiveThreads)) @@ -794,10 +797,12 @@ IN OUT PKNORMAL_ROUTINE* NormalRoutine, IN OUT PVOID* NormalContext, IN OUT PVOID* SystemArgument1, - IN OUT PVOID* SystemArguemnt2) + IN OUT PVOID* SystemArgument2) { NTSTATUS Status; PAGED_CODE(); + PSTRACE(PS_KILL_DEBUG, + "Apc: %p SystemArgument2: %p \n", Apc, SystemArgument2); /* Don't do anything unless we are in User-Mode */ if (Apc->SystemArgument2) @@ -820,6 +825,7 @@ PKAPC Apc = (PKAPC)SystemArgument1; PETHREAD Thread = PsGetCurrentThread(); PAGED_CODE(); + PSTRACE(PS_KILL_DEBUG, "SystemArgument2: %p \n", SystemArgument2); /* This should never happen */ ASSERT(!(((ULONG_PTR)SystemArgument2) & 1)); @@ -861,6 +867,7 @@ NTSTATUS Status = STATUS_SUCCESS; ULONG Flags; PAGED_CODE(); + PSTRACE(PS_KILL_DEBUG, "Thread: %p ExitStatus: %p\n", Thread, ExitStatus); /* Check if this is a Critical Thread, and Bugcheck */ if (Thread->BreakOnTermination) @@ -935,6 +942,8 @@ { ULONG Actual; PAGED_CODE(); + PSTRACE(PS_KILL_DEBUG, + "LastThread: %p Process: %p\n", LastThread, Process); /* Set Process Exit flag */ InterlockedOr((PLONG)&Process->Flags, PSF_PROCESS_EXITING_BIT); @@ -1002,11 +1011,7 @@ PETHREAD Thread = PsGetCurrentThread(); /* Make sure this is a system thread */ - if (Thread->SystemThread) - { - DPRINT1("Trying to Terminate a non-system thread!\n"); - return STATUS_INVALID_PARAMETER; - } + if (Thread->SystemThread) return STATUS_INVALID_PARAMETER; /* Terminate it for real */ return PspTerminateThreadByPointer(Thread, ExitStatus, TRUE); @@ -1025,6 +1030,8 @@ PETHREAD Thread, CurrentThread = PsGetCurrentThread(); BOOLEAN KillByHandle; PAGED_CODE(); + PSTRACE(PS_KILL_DEBUG, + "ProcessHandle: %p ExitStatus: %p\n", ProcessHandle, ExitStatus); /* Remember how we will kill it */ KillByHandle = (ProcessHandle != NULL); @@ -1126,6 +1133,8 @@ PETHREAD CurrentThread = PsGetCurrentThread(); NTSTATUS Status; PAGED_CODE(); + PSTRACE(PS_KILL_DEBUG, + "ThreadHandle: %p ExitStatus: %p\n", ThreadHandle, ExitStatus); /* Handle the special NULL case */ if (!ThreadHandle) @@ -1187,6 +1196,7 @@ PVOID TerminationLpcPort; PETHREAD Thread; PAGED_CODE(); + PSTRACE(PS_KILL_DEBUG, "PortHandle: %p\n", PortHandle); /* Get the Port */ Status = ObReferenceObjectByHandle(PortHandle, Modified: trunk/reactos/ntoskrnl/ps/query.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/query.c?rev=23…
============================================================================== --- trunk/reactos/ntoskrnl/ps/query.c (original) +++ trunk/reactos/ntoskrnl/ps/query.c Sun Jul 23 11:13:19 2006 @@ -15,6 +15,9 @@ /* Include Information Class Tables */ #include "internal/ps_i.h" + +/* Debugging Level */ +ULONG PspTraceLevel = 0; //PS_KILL_DEBUG | PS_SECURITY_DEBUG; /* PRIVATE FUNCTIONS *********************************************************/ Modified: trunk/reactos/ntoskrnl/ps/security.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/security.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ps/security.c (original) +++ trunk/reactos/ntoskrnl/ps/security.c Sun Jul 23 11:13:19 2006 @@ -21,6 +21,7 @@ PspDeleteProcessSecurity(IN PEPROCESS Process) { PAGED_CODE(); + PSTRACE(PS_SECURITY_DEBUG, "Process: %p\n", Process); /* Check if we have a token */ if (Process->Token.Object) @@ -36,6 +37,7 @@ PspDeleteThreadSecurity(IN PETHREAD Thread) { PAGED_CODE(); + PSTRACE(PS_SECURITY_DEBUG, "Thread: %p\n", Thread); /* Check if we have active impersonation info */ if (Thread->ActiveImpersonationInfo) @@ -60,9 +62,10 @@ PspInitializeProcessSecurity(IN PEPROCESS Process, IN PEPROCESS Parent OPTIONAL) { - PAGED_CODE(); NTSTATUS Status = STATUS_SUCCESS; PTOKEN NewToken, ParentToken; + PAGED_CODE(); + PSTRACE(PS_SECURITY_DEBUG, "Process: %p\n", Process); /* If we have a parent, then duplicate the Token */ if (Parent) @@ -108,6 +111,7 @@ BOOLEAN IsImpersonating; KAPC_STATE ApcState; PAGED_CODE(); + PSTRACE(PS_SECURITY_DEBUG, "Thread: %p\n", Thread); /* Sanity check */ ASSERT(CurrentThread == PsGetCurrentThread()); @@ -174,6 +178,7 @@ PACCESS_TOKEN OldToken; NTSTATUS Status; PAGED_CODE(); + PSTRACE(PS_SECURITY_DEBUG, "Process: %p Token: %p\n", Process, Token); /* Lock the process */ PspLockProcessSecurityExclusive(Process); @@ -202,6 +207,7 @@ BOOLEAN Result, SdAllocated; PSECURITY_DESCRIPTOR SecurityDescriptor; SECURITY_SUBJECT_CONTEXT SubjectContext; + PSTRACE(PS_SECURITY_DEBUG, "Process: %p Token: %p\n", Process, Token); /* Make sure we got a handle */ if (TokenHandle) @@ -319,6 +325,8 @@ KPROCESSOR_MODE PreviousMode = ExGetPreviousMode(); NTSTATUS Status = STATUS_SUCCESS; PAGED_CODE(); + PSTRACE(PS_SECURITY_DEBUG, + "Process: %p DesiredAccess: %lx\n", ProcessHandle, DesiredAccess); /* Check if caller was user-mode */ if (PreviousMode != KernelMode) @@ -385,6 +393,7 @@ { PACCESS_TOKEN Token; PAGED_CODE(); + PSTRACE(PS_SECURITY_DEBUG, "Process: %p\n", Process); /* Fast Reference the Token */ Token = ObFastReferenceObject(&Process->Token); @@ -417,6 +426,7 @@ PEPROCESS Process; NTSTATUS Status; PAGED_CODE(); + PSTRACE(PS_SECURITY_DEBUG, "Process: %p\n", ProcessHandle); /* Get the Token */ Status = ObReferenceObjectByHandle(ProcessHandle, @@ -448,6 +458,7 @@ SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; NTSTATUS Status; PAGED_CODE(); + PSTRACE(PS_SECURITY_DEBUG, "Thread: %p Token: %p\n", Thread, TokenHandle); /* Check if we were given a handle */ if (!TokenHandle) @@ -513,6 +524,7 @@ { PTOKEN Token = NULL; PAGED_CODE(); + PSTRACE(PS_SECURITY_DEBUG, "Thread: %p\n", Thread); /* Make sure we had impersonation information */ if (Thread->ActiveImpersonationInfo) @@ -556,6 +568,7 @@ PPS_IMPERSONATION_INFORMATION Impersonation; PTOKEN OldToken = NULL; PAGED_CODE(); + PSTRACE(PS_SECURITY_DEBUG, "Thread: %p, Token: %p\n", Thread, Token); /* Check if we don't have a token */ if (!Token) @@ -653,6 +666,8 @@ PEPROCESS Process; PACCESS_TOKEN Token = NULL; PAGED_CODE(); + PSTRACE(PS_SECURITY_DEBUG, + "Thread: %p, TokenType: %p\n", Thread, TokenType); /* Check if we don't have impersonation info */ Process = Thread->ThreadsProcess; @@ -715,6 +730,7 @@ { PTOKEN Token = NULL; PAGED_CODE(); + PSTRACE(PS_SECURITY_DEBUG, "Thread: %p\n", Thread); /* If we don't have impersonation info, just quit */ if (!Thread->ActiveImpersonationInfo) return NULL; @@ -779,6 +795,8 @@ PPS_IMPERSONATION_INFORMATION Impersonation = NULL; LONG NewValue, OldValue; PAGED_CODE(); + PSTRACE(PS_SECURITY_DEBUG, + "Thread: %p State: %p\n", Thread, ImpersonationState); /* Check if we don't have impersonation */ if (Thread->ActiveImpersonationInfo) @@ -835,6 +853,8 @@ PTOKEN Token = NULL; PPS_IMPERSONATION_INFORMATION Impersonation; PAGED_CODE(); + PSTRACE(PS_SECURITY_DEBUG, + "Thread: %p State: %p\n", Thread, ImpersonationState); /* Lock thread security */ PspLockThreadSecurityExclusive(Thread); @@ -859,7 +879,8 @@ Impersonation->Token = ImpersonationState->Token; /* Enable impersonation */ - InterlockedOr(&Thread->CrossThreadFlags, CT_ACTIVE_IMPERSONATION_INFO_BIT); + InterlockedOr(&Thread->CrossThreadFlags, + CT_ACTIVE_IMPERSONATION_INFO_BIT); } else { @@ -888,6 +909,8 @@ KPROCESSOR_MODE PreviousMode = ExGetPreviousMode(); NTSTATUS Status = STATUS_SUCCESS; PAGED_CODE(); + PSTRACE(PS_SECURITY_DEBUG, + "Threads: %p %p\n", ThreadHandle, ThreadToImpersonateHandle); /* Check if call came from user mode */ if (PreviousMode != KernelMode)
18 years, 5 months
1
0
0
0
[ion] 23233: - ImperstionationLocale -> ImpersonationLocale. - Implement PspWriteTebImpersonationInfo for setting the impersonation locale and impersonation status in the TEB (since User-mode needs to read this value and we don't want to NtQueryInformationThread for it each time to read the ETHERAD flag). - Complete the implementation of PspSetPrimaryToken to recalculate a process's access rights to itself based on a new primary token. - Reorganize ps.h header like ob.h and io.h, implement Traci
by ion@svn.reactos.org
Author: ion Date: Sun Jul 23 09:43:28 2006 New Revision: 23233 URL:
http://svn.reactos.org/svn/reactos?rev=23233&view=rev
Log: - ImperstionationLocale -> ImpersonationLocale. - Implement PspWriteTebImpersonationInfo for setting the impersonation locale and impersonation status in the TEB (since User-mode needs to read this value and we don't want to NtQueryInformationThread for it each time to read the ETHERAD flag). - Complete the implementation of PspSetPrimaryToken to recalculate a process's access rights to itself based on a new primary token. - Reorganize ps.h header like ob.h and io.h, implement Tracing support but not the tracing itself yet. - Get rid of some deprecated cruft. Removed: trunk/reactos/ntoskrnl/include/internal/arch/ps.h Modified: trunk/reactos/include/ndk/pstypes.h trunk/reactos/ntoskrnl/KrnlFun.c trunk/reactos/ntoskrnl/include/internal/ob.h trunk/reactos/ntoskrnl/include/internal/ps.h trunk/reactos/ntoskrnl/ke/kthread.c trunk/reactos/ntoskrnl/ps/security.c Modified: trunk/reactos/include/ndk/pstypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/pstypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/pstypes.h (original) +++ trunk/reactos/include/ndk/pstypes.h Sun Jul 23 09:43:28 2006 @@ -780,7 +780,7 @@ ULONG SoftPatchPtr1; ULONG SoftPatchPtr2; PVOID *TlsExpansionSlots; - ULONG ImpersionationLocale; + ULONG ImpersonationLocale; ULONG IsImpersonating; PVOID NlsCache; PVOID pShimData; Modified: trunk/reactos/ntoskrnl/KrnlFun.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/KrnlFun.c?rev=232…
============================================================================== --- trunk/reactos/ntoskrnl/KrnlFun.c (original) +++ trunk/reactos/ntoskrnl/KrnlFun.c Sun Jul 23 09:43:28 2006 @@ -30,8 +30,6 @@ // - Add security calls where necessary. // - Add tracing. // - Add failure/race checks for thread creation. -// - Complete PspSetPrimaryToken. -// - Update TEB Security information when impersonating. // // Ob: // - Possible bug in deferred deletion under Cc Rewrite branch. Removed: trunk/reactos/ntoskrnl/include/internal/arch/ps.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/arch/ps.h (original) +++ trunk/reactos/ntoskrnl/include/internal/arch/ps.h (removed) @@ -1,13 +1,0 @@ -#ifndef __NTOSKRNL_INCLUDE_INTERNAL_ARCH_PS_H -#define __NTOSKRNL_INCLUDE_INTERNAL_ARCH_PS_H - -#ifdef _M_IX86 -#define KiArchContextSwitch KiSwapContext -#define KiArchInitThreadWithContext Ke386InitThreadWithContext -#else -#error "Unknown processor" -#endif - -#endif /* __NTOSKRNL_INCLUDE_INTERNAL_ARCH_PS_H */ - -/* EOF */ Modified: trunk/reactos/ntoskrnl/include/internal/ob.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ob.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ob.h Sun Jul 23 09:43:28 2006 @@ -5,6 +5,7 @@ * PURPOSE: Internal header for the Object Manager * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) */ + // // Define this if you want debugging support // Modified: trunk/reactos/ntoskrnl/include/internal/ps.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ps.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ps.h Sun Jul 23 09:43:28 2006 @@ -1,61 +1,160 @@ -#ifndef __INCLUDE_INTERNAL_PS_H -#define __INCLUDE_INTERNAL_PS_H - -/* Forward declarations. */ -struct _KTHREAD; -struct _KTRAPFRAME; -struct _EJOB; - -#include <internal/arch/ps.h> - -/* Top level irp definitions. */ -#define FSRTL_FSP_TOP_LEVEL_IRP (0x01) -#define FSRTL_CACHE_TOP_LEVEL_IRP (0x02) -#define FSRTL_MOD_WRITE_TOP_LEVEL_IRP (0x03) -#define FSRTL_FAST_IO_TOP_LEVEL_IRP (0x04) -#define FSRTL_MAX_TOP_LEVEL_IRP_FLAG (0x04) - +/* +* PROJECT: ReactOS Kernel +* LICENSE: GPL - See COPYING in the top level directory +* FILE: ntoskrnl/include/ps.h +* PURPOSE: Internal header for the Process Manager +* PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) +*/ + +// +// Define this if you want debugging support +// +#define _PS_DEBUG_ 0x00 + +// +// These define the Debug Masks Supported +// +#define PS_THREAD_DEBUG 0x01 +#define PS_PROCESS_DEBUG 0x02 +#define PS_SECURITY_DEBUG 0x04 +#define PS_JOB_DEBUG 0x08 +#define PS_NOTIFICATIONS_DEBUG 0x10 +#define PS_WIN32K_DEBUG 0x20 +#define PS_STATE_DEBUG 0x40 +#define PS_QUOTA_DEBUG 0x80 + +// +// Debug/Tracing support +// +#if _PS_DEBUG_ +#ifdef NEW_DEBUG_SYSTEM_IMPLEMENTED // enable when Debug Filters are implemented +#define PSTRACE DbgPrintEx +#else +#define PSTRACE(x, ...) \ + if (x & PspTraceLevel) DbgPrint(__VA_ARGS__) +#endif +#else +#define PSTRACE(x, ...) DPRINT(__VA_ARGS__) +#endif + +// +// Maximum Count of Notification Routines +// #define PSP_MAX_CREATE_THREAD_NOTIFY 8 #define PSP_MAX_LOAD_IMAGE_NOTIFY 8 #define PSP_MAX_CREATE_PROCESS_NOTIFY 8 +// +// Maximum Job Scheduling Classes +// #define PSP_JOB_SCHEDULING_CLASSES 10 -VOID -NTAPI -PspShutdownProcessManager(VOID); - -VOID -NTAPI -PsInitThreadManagment(VOID); - -VOID -INIT_FUNCTION -NTAPI -PiInitProcessManager(VOID); - -VOID -NTAPI -PsInitProcessManagment(VOID); - -VOID -NTAPI -PsInitIdleThread(VOID); - +// +// Initialization Functions +// +VOID +NTAPI +PspShutdownProcessManager( + VOID +); + +VOID +INIT_FUNCTION +NTAPI +PsInitThreadManagment( + VOID +); + +VOID +INIT_FUNCTION +NTAPI +PiInitProcessManager( + VOID +); + +VOID +INIT_FUNCTION +NTAPI +PsInitProcessManagment( + VOID +); + +VOID +INIT_FUNCTION +NTAPI +PsInitIdleThread( + VOID +); + +NTSTATUS +NTAPI +PsInitializeIdleOrFirstThread( + IN PEPROCESS Process, + OUT PETHREAD* ThreadPtr, + IN PKSTART_ROUTINE StartRoutine, + IN KPROCESSOR_MODE AccessMode, + IN BOOLEAN First +); + +VOID +NTAPI +INIT_FUNCTION +PsInitJobManagment( + VOID +); + +// +// Utility Routines +// +PETHREAD +NTAPI +PsGetNextProcessThread( + IN PEPROCESS Process, + IN PETHREAD Thread OPTIONAL +); + +PEPROCESS +NTAPI +PsGetNextProcess( + IN PEPROCESS OldProcess OPTIONAL +); + +NTSTATUS +NTAPI +PspMapSystemDll( + IN PEPROCESS Process, + OUT PVOID *DllBase +); + +NTSTATUS +NTAPI +PsLocateSystemDll( + VOID +); + +NTSTATUS +NTAPI +PspGetSystemDllEntryPoints( + VOID +); + +// +// Security Routines +// PACCESS_TOKEN -STDCALL +NTAPI PsReferenceEffectiveToken( - PETHREAD Thread, - PTOKEN_TYPE TokenType, - PUCHAR b, - PSECURITY_IMPERSONATION_LEVEL Level -); - -NTSTATUS -STDCALL + IN PETHREAD Thread, + OUT PTOKEN_TYPE TokenType, + OUT PUCHAR b, + OUT PSECURITY_IMPERSONATION_LEVEL Level +); + +NTSTATUS +NTAPI PsOpenTokenOfProcess( - HANDLE ProcessHandle, - PACCESS_TOKEN* Token + IN HANDLE ProcessHandle, + OUT PACCESS_TOKEN* Token ); NTSTATUS @@ -66,15 +165,30 @@ IN PTOKEN Token OPTIONAL ); -PETHREAD -NTAPI -PsGetNextProcessThread( - IN PEPROCESS Process, - IN PETHREAD Thread OPTIONAL -); - -VOID -STDCALL +NTSTATUS +NTAPI +PspInitializeProcessSecurity( + IN PEPROCESS Process, + IN PEPROCESS Parent OPTIONAL +); + +VOID +NTAPI +PspDeleteProcessSecurity( + IN PEPROCESS Process +); + +VOID +NTAPI +PspDeleteThreadSecurity( + IN PETHREAD Thread +); + +// +// Reaping and Deletion +// +VOID +NTAPI PsExitSpecialApc( PKAPC Apc, PKNORMAL_ROUTINE *NormalRoutine, @@ -83,121 +197,95 @@ PVOID *SystemArgument2 ); -NTSTATUS -STDCALL -PspInitializeProcessSecurity( - PEPROCESS Process, - PEPROCESS Parent OPTIONAL -); - -VOID -STDCALL +VOID +NTAPI +PspReapRoutine( + IN PVOID Context +); + +VOID +NTAPI +PspExitThread( + IN NTSTATUS ExitStatus +); + +NTSTATUS +NTAPI +PspTerminateThreadByPointer( + IN PETHREAD Thread, + IN NTSTATUS ExitStatus, + IN BOOLEAN bSelf +); + +VOID +NTAPI +PspExitProcess( + IN BOOLEAN LastThread, + IN PEPROCESS Process +); + +VOID +NTAPI +PspDeleteProcess( + IN PVOID ObjectBody +); + +VOID +NTAPI +PspDeleteThread( + IN PVOID ObjectBody +); + +// +// Thread/Process Startup +// +VOID +NTAPI PspSystemThreadStartup( PKSTART_ROUTINE StartRoutine, PVOID StartContext ); -NTSTATUS -NTAPI -PsInitializeIdleOrFirstThread( - PEPROCESS Process, - PETHREAD* ThreadPtr, - PKSTART_ROUTINE StartRoutine, - KPROCESSOR_MODE AccessMode, - BOOLEAN First -); - -VOID -STDCALL -PspReapRoutine(PVOID Context); - -VOID -STDCALL -PspExitThread(NTSTATUS ExitStatus); - -NTSTATUS -STDCALL -PspTerminateThreadByPointer( - PETHREAD Thread, - NTSTATUS ExitStatus, - BOOLEAN bSelf -); - -PEPROCESS -STDCALL -PsGetNextProcess(PEPROCESS OldProcess); - -VOID -STDCALL -PsIdleThreadMain(PVOID Context); - -VOID -STDCALL -PspExitProcess(BOOLEAN LastThread, - PEPROCESS Process); - -VOID -STDCALL -PspDeleteProcess(PVOID ObjectBody); - -VOID -STDCALL -PspDeleteThread(PVOID ObjectBody); - -VOID -NTAPI -INIT_FUNCTION -PsInitJobManagment(VOID); - -VOID -STDCALL +VOID +NTAPI +PsIdleThreadMain( + IN PVOID Context +); + +// +// Quota Support +// +VOID +NTAPI PspInheritQuota( - PEPROCESS Process, - PEPROCESS ParentProcess -); - -VOID -STDCALL -PspDestroyQuotaBlock(PEPROCESS Process); - -NTSTATUS -STDCALL -PspMapSystemDll( - PEPROCESS Process, - PVOID *DllBase -); - -NTSTATUS -STDCALL -PsLocateSystemDll(VOID); - -NTSTATUS -STDCALL -PspGetSystemDllEntryPoints(VOID); - -VOID -NTAPI -PspRemoveProcessFromJob( - IN PEPROCESS Process, - IN PEJOB Job -); - -NTSTATUS -NTAPI -PspDeleteLdt(IN PEPROCESS Process); - -NTSTATUS -NTAPI -PspDeleteVdmObjects(IN PEPROCESS Process); - -VOID -NTAPI -PspDeleteProcessSecurity(IN PEPROCESS Process); - -VOID -NTAPI -PspDeleteThreadSecurity(IN PETHREAD Thread); - + IN PEPROCESS Process, + IN PEPROCESS ParentProcess +); + +VOID +NTAPI +PspDestroyQuotaBlock( + IN PEPROCESS Process +); + +// +// VDM Support +// +NTSTATUS +NTAPI +PspDeleteLdt( + IN PEPROCESS Process +); + +NTSTATUS +NTAPI +PspDeleteVdmObjects( + IN PEPROCESS Process +); + +// +// Job Routines +// VOID NTAPI PspExitProcessFromJob( @@ -205,6 +293,17 @@ IN PEPROCESS Process ); +VOID +NTAPI +PspRemoveProcessFromJob( + IN PEPROCESS Process, + IN PEJOB Job +); + +// +// Global data inside the Process Manager +// +extern ULONG PspTraceLevel; extern LCID PsDefaultThreadLocaleId; extern LCID PsDefaultSystemLocaleId; extern LIST_ENTRY PspReaperListHead; @@ -231,6 +330,8 @@ extern PVOID PspSystemDllBase; extern BOOLEAN PspUseJobSchedulingClasses; extern CHAR PspJobSchedulingClasses[PSP_JOB_SCHEDULING_CLASSES]; + +// +// Inlined Functions +// #include "ps_x.h" - -#endif /* __INCLUDE_INTERNAL_PS_H */ Modified: trunk/reactos/ntoskrnl/ke/kthread.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/kthread.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/kthread.c (original) +++ trunk/reactos/ntoskrnl/ke/kthread.c Sun Jul 23 09:43:28 2006 @@ -187,7 +187,7 @@ /* Special note for Filip: This will release the Dispatcher DB Lock ;-) -- Alex */ DPRINT("You are : %x, swapping to: %x\n", OldThread, CurrentThread); - KiArchContextSwitch(CurrentThread); + KiSwapContext(CurrentThread); DPRINT("You are : %x, swapped from: %x\n", OldThread, CurrentThread); return; } @@ -841,11 +841,11 @@ _SEH_TRY { /* Initalize the Thread Context */ - KiArchInitThreadWithContext(Thread, - SystemRoutine, - StartRoutine, - StartContext, - Context); + Ke386InitThreadWithContext(Thread, + SystemRoutine, + StartRoutine, + StartContext, + Context); } _SEH_HANDLE { Modified: trunk/reactos/ntoskrnl/ps/security.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/security.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ps/security.c (original) +++ trunk/reactos/ntoskrnl/ps/security.c Sun Jul 23 09:43:28 2006 @@ -99,6 +99,75 @@ NTSTATUS NTAPI +PspWriteTebImpersonationInfo(IN PETHREAD Thread, + IN PETHREAD CurrentThread) +{ + PEPROCESS Process; + PTEB Teb; + BOOLEAN Attached = FALSE; + BOOLEAN IsImpersonating; + KAPC_STATE ApcState; + PAGED_CODE(); + + /* Sanity check */ + ASSERT(CurrentThread == PsGetCurrentThread()); + + /* Get process and TEB */ + Process = Thread->ThreadsProcess; + Teb = Thread->Tcb.Teb; + if (Teb) + { + /* Check if we're not in the right process */ + if (Thread->Tcb.ApcState.Process != &Process->Pcb) + { + /* Attach to the process */ + KeStackAttachProcess(&Process->Pcb, &ApcState); + Attached = TRUE; + } + + /* Check if we're in a different thread */ + if (Thread != CurrentThread) + { + /* Acquire thread rundown protection */ + ExAcquireRundownProtection(&Thread->RundownProtect); + } + + /* Check if the thread is impersonating */ + IsImpersonating = Thread->ActiveImpersonationInfo; + if (IsImpersonating) + { + /* Set TEB data */ + Teb->ImpersonationLocale = -1; + Teb->IsImpersonating = 1; + } + else + { + /* Set TEB data */ + Teb->ImpersonationLocale = 0; + Teb->IsImpersonating = 0; + } + + /* Set new flag */ + Thread->ActiveImpersonationInfo = TRUE; + + /* Check if we're in a different thread */ + if (Thread != CurrentThread) + { + /* Release protection */ + ExReleaseRundownProtection(&Thread->RundownProtect); + } + + /* Dettach */ + if (Attached) KeUnstackDetachProcess(&ApcState); + } + + /* Return to caller */ + return STATUS_SUCCESS; +} + + +NTSTATUS +NTAPI PspAssignPrimaryToken(IN PEPROCESS Process, IN PTOKEN Token) { @@ -129,7 +198,10 @@ { KPROCESSOR_MODE PreviousMode = ExGetPreviousMode(); BOOLEAN IsChild; - NTSTATUS Status; + NTSTATUS Status, AccessStatus; + BOOLEAN Result, SdAllocated; + PSECURITY_DESCRIPTOR SecurityDescriptor; + SECURITY_SUBJECT_CONTEXT SubjectContext; /* Make sure we got a handle */ if (TokenHandle) @@ -171,14 +243,42 @@ if (NT_SUCCESS(Status)) { /* - * The idea here is that we need to completely reverify - * if the process still has access to itself under this new - * token, by doing an SeAccessCheck with the Primary Token and - * the SD of the Process (ObGetObjectSecurity). - * In the really twisted case where we lose access to ourselves, - * we would set Process->GrantedAccess to 0. + * We need to completely reverify if the process still has access to + * itself under this new token. */ - DPRINT1("Process security not complete\n"); + Status = ObGetObjectSecurity(Process, + &SecurityDescriptor, + &SdAllocated); + if (NT_SUCCESS(Status)) + { + /* Setup the security context */ + SubjectContext.ProcessAuditId = Process; + SubjectContext.PrimaryToken = PsReferencePrimaryToken(Process); + SubjectContext.ClientToken = NULL; + + /* Do the access check */ + Result = SeAccessCheck(SecurityDescriptor, + &SubjectContext, + FALSE, + MAXIMUM_ALLOWED, + 0, + NULL, + &PsProcessType->TypeInfo.GenericMapping, + PreviousMode, + &Process->GrantedAccess, + &AccessStatus); + + /* Dereference the token and let go the SD */ + ObFastDereferenceObject(&Process->Token, + SubjectContext.PrimaryToken); + ObReleaseObjectSecurity(SecurityDescriptor, SdAllocated); + + /* Remove access if it failed */ + if (!Result) Process->GrantedAccess = 0; + } + + /* Dereference the process */ + ObDereferenceObject(Process); } /* Dereference the token */ @@ -437,6 +537,9 @@ /* Dereference the impersonation token */ if (Token) ObDereferenceObject(Token); + + /* Write impersonation info to the TEB */ + PspWriteTebImpersonationInfo(Thread, PsGetCurrentThread()); } /* @@ -529,8 +632,10 @@ PspUnlockThreadSecurityExclusive(Thread); } + /* Write impersonation info to the TEB */ + PspWriteTebImpersonationInfo(Thread, PsGetCurrentThread()); + /* Dereference the token and return success */ - ObReferenceObject(Token); if (OldToken) ObDereferenceObject(OldToken); return STATUS_SUCCESS; }
18 years, 5 months
1
0
0
0
[ion] 23232: [AUDIT] - The entire /kd directory is clear. We do not implement any Kd support in ReactOS, and I very much doubt someone implemented GDB or BOCHS support based reverse-engineering NT since NT happens not to have a GDB/BOCHS stub built-in (what a surprise!).
by ion@svn.reactos.org
Author: ion Date: Sun Jul 23 09:43:00 2006 New Revision: 23232 URL:
http://svn.reactos.org/svn/reactos?rev=23232&view=rev
Log: [AUDIT] - The entire /kd directory is clear. We do not implement any Kd support in ReactOS, and I very much doubt someone implemented GDB or BOCHS support based reverse-engineering NT since NT happens not to have a GDB/BOCHS stub built-in (what a surprise!). Modified: trunk/reactos/ntoskrnl/kd/kdinit.c (props changed) trunk/reactos/ntoskrnl/kd/kdio.c (props changed) trunk/reactos/ntoskrnl/kd/kdmain.c (props changed) trunk/reactos/ntoskrnl/kd/wrappers/bochs.c (props changed) trunk/reactos/ntoskrnl/kd/wrappers/gdbstub.c (contents, props changed) Propchange: trunk/reactos/ntoskrnl/kd/kdinit.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: trunk/reactos/ntoskrnl/kd/kdio.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: trunk/reactos/ntoskrnl/kd/kdmain.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: trunk/reactos/ntoskrnl/kd/wrappers/bochs.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Modified: trunk/reactos/ntoskrnl/kd/wrappers/gdbstub.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/wrappers/gdbst…
============================================================================== --- trunk/reactos/ntoskrnl/kd/wrappers/gdbstub.c (original) +++ trunk/reactos/ntoskrnl/kd/wrappers/gdbstub.c Sun Jul 23 09:43:00 2006 @@ -86,7 +86,6 @@ #include <ntoskrnl.h> #define NDEBUG #include <internal/debug.h> -#include <internal/ps.h> /************************************************************************/ /* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/ Propchange: trunk/reactos/ntoskrnl/kd/wrappers/gdbstub.c ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -*
18 years, 5 months
1
0
0
0
[ion] 23231: - CT_ACTIVE_IMPERSTIONATION_INFO_BIT -> CT_ACTIVE_IMPERSONATION_INFO_BIT - Added Process and Thread locking inlined functions for Ps Security functions. - Thread safety is your friend! Huge rework of almost all the functions in ps/security.c to use the process/thread pushlocks and use interlocked operations when dealing with the ActiveImpersonationInfo thread flag. - Added PAGED_CODE(). - Added checks for Processes with Jobs for the day that will happen. - PsAssignImpersoonationToke
by ion@svn.reactos.org
Author: ion Date: Sun Jul 23 02:57:42 2006 New Revision: 23231 URL:
http://svn.reactos.org/svn/reactos?rev=23231&view=rev
Log: - CT_ACTIVE_IMPERSTIONATION_INFO_BIT -> CT_ACTIVE_IMPERSONATION_INFO_BIT - Added Process and Thread locking inlined functions for Ps Security functions. - Thread safety is your friend! Huge rework of almost all the functions in ps/security.c to use the process/thread pushlocks and use interlocked operations when dealing with the ActiveImpersonationInfo thread flag. - Added PAGED_CODE(). - Added checks for Processes with Jobs for the day that will happen. - PsAssignImpersoonationToken with a NULL token handle means simply to revert to self. - Don't ignore the HandleAttributes in NtOpenProcessTokenEx. - Use SeTokenType to make sure the token passed is an impersonation token. - Remove some fixed bugs in krnlfun.c, add more TODOs. Modified: trunk/reactos/include/ndk/pstypes.h trunk/reactos/ntoskrnl/KrnlFun.c trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h trunk/reactos/ntoskrnl/include/internal/ps_x.h trunk/reactos/ntoskrnl/ps/security.c Modified: trunk/reactos/include/ndk/pstypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/pstypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/pstypes.h (original) +++ trunk/reactos/include/ndk/pstypes.h Sun Jul 23 02:57:42 2006 @@ -163,7 +163,7 @@ #define CT_TERMINATED_BIT 0x1 #define CT_DEAD_THREAD_BIT 0x2 #define CT_HIDE_FROM_DEBUGGER_BIT 0x4 -#define CT_ACTIVE_IMPERSTIONATION_INFO_BIT 0x8 +#define CT_ACTIVE_IMPERSONATION_INFO_BIT 0x8 #define CT_SYSTEM_THREAD_BIT 0x10 #define CT_HARD_ERRORS_ARE_DISABLED_BIT 0x20 #define CT_BREAK_ON_TERMINATION_BIT 0x40 Modified: trunk/reactos/ntoskrnl/KrnlFun.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/KrnlFun.c?rev=232…
============================================================================== --- trunk/reactos/ntoskrnl/KrnlFun.c (original) +++ trunk/reactos/ntoskrnl/KrnlFun.c Sun Jul 23 02:57:42 2006 @@ -25,14 +25,13 @@ // - Add tracing to iofunc.c // // Ps: -// - Use Process/Thread Rundown. -// - Use Process Pushlock Locks. -// - Use Security Locks in security.c // - Figure out why processes don't die. // - Generate process cookie for user-more thread. // - Add security calls where necessary. // - Add tracing. // - Add failure/race checks for thread creation. +// - Complete PspSetPrimaryToken. +// - Update TEB Security information when impersonating. // // Ob: // - Possible bug in deferred deletion under Cc Rewrite branch. Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h Sun Jul 23 02:57:42 2006 @@ -17,6 +17,7 @@ #include "i386/v86m.h" #include "ob.h" #include "mm.h" +#include "ex.h" #include "ps.h" #include "cc.h" #include "io.h" @@ -24,7 +25,6 @@ #include "se.h" #include "ldr.h" #include "kd.h" -#include "ex.h" #include "fsrtl.h" #include "lpc.h" #include "rtl.h" Modified: trunk/reactos/ntoskrnl/include/internal/ps_x.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ps_x.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ps_x.h Sun Jul 23 02:57:42 2006 @@ -84,3 +84,90 @@ if (PspLegoNotifyRoutine) PspLegoNotifyRoutine(Thread); } +VOID +FORCEINLINE +PspLockProcessSecurityShared(IN PEPROCESS Process) +{ + /* Enter a Critical Region */ + KeEnterCriticalRegion(); + + /* Lock the Process */ + ExAcquirePushLockShared(&Process->ProcessLock); +} + +VOID +FORCEINLINE +PspUnlockProcessSecurityShared(IN PEPROCESS Process) +{ + /* Unlock the Process */ + ExReleasePushLockShared(&Process->ProcessLock); + + /* Leave Critical Region */ + KeLeaveCriticalRegion(); +} + +VOID +FORCEINLINE +PspLockProcessSecurityExclusive(IN PEPROCESS Process) +{ + /* Enter a Critical Region */ + KeEnterCriticalRegion(); + + /* Lock the Process */ + ExAcquirePushLockExclusive(&Process->ProcessLock); +} + +VOID +FORCEINLINE +PspUnlockProcessSecurityExclusive(IN PEPROCESS Process) +{ + /* Unlock the Process */ + ExReleasePushLockExclusive(&Process->ProcessLock); + + /* Leave Critical Region */ + KeLeaveCriticalRegion(); +} + +VOID +FORCEINLINE +PspLockThreadSecurityShared(IN PETHREAD Thread) +{ + /* Enter a Critical Region */ + KeEnterCriticalRegion(); + + /* Lock the Thread */ + ExAcquirePushLockShared(&Thread->ThreadLock); +} + +VOID +FORCEINLINE +PspUnlockThreadSecurityShared(IN PETHREAD Thread) +{ + /* Unlock the Thread */ + ExReleasePushLockShared(&Thread->ThreadLock); + + /* Leave Critical Region */ + KeLeaveCriticalRegion(); +} + +VOID +FORCEINLINE +PspLockThreadSecurityExclusive(IN PETHREAD Thread) +{ + /* Enter a Critical Region */ + KeEnterCriticalRegion(); + + /* Lock the Thread */ + ExAcquirePushLockExclusive(&Thread->ThreadLock); +} + +VOID +FORCEINLINE +PspUnlockThreadSecurityExclusive(IN PETHREAD Thread) +{ + /* Unlock the Process */ + ExReleasePushLockExclusive(&Thread->ThreadLock); + + /* Leave Critical Thread */ + KeLeaveCriticalRegion(); +} Modified: trunk/reactos/ntoskrnl/ps/security.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/security.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ps/security.c (original) +++ trunk/reactos/ntoskrnl/ps/security.c Sun Jul 23 02:57:42 2006 @@ -16,58 +16,12 @@ /* PRIVATE FUNCTIONS *********************************************************/ -/* FIXME: Turn into Macro */ VOID NTAPI -PspLockProcessSecurityShared(IN PEPROCESS Process) -{ - /* Enter a Critical Region */ - KeEnterCriticalRegion(); - - /* Lock the Process */ - ExAcquirePushLockShared(&Process->ProcessLock); -} - -/* FIXME: Turn into Macro */ -VOID -NTAPI -PspUnlockProcessSecurityShared(IN PEPROCESS Process) -{ - /* Unlock the Process */ - ExReleasePushLockShared(&Process->ProcessLock); - - /* Leave Critical Region */ - KeLeaveCriticalRegion(); -} - -/* FIXME: Turn into Macro */ -VOID -NTAPI -PspLockProcessSecurityExclusive(IN PEPROCESS Process) -{ - /* Enter a Critical Region */ - KeEnterCriticalRegion(); - - /* Lock the Process */ - ExAcquirePushLockExclusive(&Process->ProcessLock); -} - -/* FIXME: Turn into Macro */ -VOID -NTAPI -PspUnlockProcessSecurityExclusive(IN PEPROCESS Process) -{ - /* Unlock the Process */ - ExReleasePushLockExclusive(&Process->ProcessLock); - - /* Leave Critical Region */ - KeLeaveCriticalRegion(); -} - -VOID -NTAPI PspDeleteProcessSecurity(IN PEPROCESS Process) { + PAGED_CODE(); + /* Check if we have a token */ if (Process->Token.Object) { @@ -81,6 +35,8 @@ NTAPI PspDeleteThreadSecurity(IN PETHREAD Thread) { + PAGED_CODE(); + /* Check if we have active impersonation info */ if (Thread->ActiveImpersonationInfo) { @@ -93,7 +49,8 @@ { /* Free it */ ExFreePool(Thread->ImpersonationInfo); - Thread->ActiveImpersonationInfo = FALSE; + InterlockedAnd(&Thread->CrossThreadFlags, + ~CT_ACTIVE_IMPERSONATION_INFO_BIT); Thread->ImpersonationInfo = NULL; } } @@ -103,6 +60,7 @@ PspInitializeProcessSecurity(IN PEPROCESS Process, IN PEPROCESS Parent OPTIONAL) { + PAGED_CODE(); NTSTATUS Status = STATUS_SUCCESS; PTOKEN NewToken, ParentToken; @@ -113,7 +71,10 @@ ParentToken = PsReferencePrimaryToken(Parent); /* Duplicate it */ - Status = SeSubProcessToken(ParentToken, &NewToken, TRUE, 0); + Status = SeSubProcessToken(ParentToken, + &NewToken, + TRUE, + 0);//MmGetSessionId(Process)); /* Dereference the Parent */ ObFastDereferenceObject(&Parent->Token, ParentToken); @@ -124,13 +85,9 @@ else { #ifdef SCHED_REWRITE - PTOKEN BootToken; - - /* No parent, this is the Initial System Process. Assign Boot Token */ - BootToken = SepCreateSystemProcessToken(); - BootToken->TokenInUse = TRUE; - Process->Token = BootToken; - ObReferenceObject(BootToken); + /* No parent, assign the Boot Token */ + ObInitializeFastReference(&Process->Token, NULL); + SeAssignPrimaryToken(Process, PspBootAccessToken); #else DPRINT1("PspInitializeProcessSecurity called with no parent.\n"); #endif @@ -289,7 +246,7 @@ { /* Reference it by handle and dereference the pointer */ Status = ObOpenObjectByPointer(Token, - 0, + HandleAttributes, NULL, DesiredAccess, SepTokenObjectType, @@ -327,6 +284,7 @@ PsReferencePrimaryToken(PEPROCESS Process) { PACCESS_TOKEN Token; + PAGED_CODE(); /* Fast Reference the Token */ Token = ObFastReferenceObject(&Process->Token); @@ -358,6 +316,7 @@ { PEPROCESS Process; NTSTATUS Status; + PAGED_CODE(); /* Get the Token */ Status = ObReferenceObjectByHandle(ProcessHandle, @@ -366,7 +325,7 @@ ExGetPreviousMode(), (PVOID*)&Process, NULL); - if(NT_SUCCESS(Status)) + if (NT_SUCCESS(Status)) { /* Reference the token and dereference the process */ *Token = PsReferencePrimaryToken(Process); @@ -388,28 +347,38 @@ PACCESS_TOKEN Token; SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; NTSTATUS Status; + PAGED_CODE(); /* Check if we were given a handle */ - if (TokenHandle) - { - /* Get the token object */ - Status = ObReferenceObjectByHandle(TokenHandle, - TOKEN_IMPERSONATE, - SepTokenObjectType, - KeGetPreviousMode(), - (PVOID*)&Token, - NULL); - if (!NT_SUCCESS(Status)) return(Status); - - /* Get the impersionation level */ - ImpersonationLevel = SeTokenImpersonationLevel(Token); - } - else - { - /* Otherwise, clear values */ - Token = NULL; - ImpersonationLevel = 0; - } + if (!TokenHandle) + { + /* Undo impersonation */ + PsRevertThreadToSelf(Thread); + return STATUS_SUCCESS; + } + + /* Get the token object */ + Status = ObReferenceObjectByHandle(TokenHandle, + TOKEN_IMPERSONATE, + SepTokenObjectType, + KeGetPreviousMode(), + (PVOID*)&Token, + NULL); + if (!NT_SUCCESS(Status)) return(Status); + + /* Make sure it's an impersonation token */ + if (SeTokenType(Token) != TokenImpersonation) + { + /* Fail */ + ObDereferenceObject(Token); + return STATUS_BAD_TOKEN_TYPE; + } + + /* Check if this is a job, which we don't support yet */ + if (Thread->ThreadsProcess->Job) KEBUGCHECK(0); + + /* Get the impersionation level */ + ImpersonationLevel = SeTokenImpersonationLevel(Token); /* Call the impersonation API */ Status = PsImpersonateClient(Thread, @@ -431,6 +400,7 @@ PsRevertToSelf(VOID) { /* Call the per-thread API */ + PAGED_CODE(); PsRevertThreadToSelf(PsGetCurrentThread()); } @@ -441,13 +411,32 @@ NTAPI PsRevertThreadToSelf(IN PETHREAD Thread) { + PTOKEN Token = NULL; + PAGED_CODE(); + /* Make sure we had impersonation information */ if (Thread->ActiveImpersonationInfo) { - /* Dereference the impersonation token and set it as false */ - ObDereferenceObject (Thread->ImpersonationInfo->Token); - Thread->ActiveImpersonationInfo = FALSE; - } + /* Lock the thread security */ + PspLockThreadSecurityExclusive(Thread); + + /* Make sure it's still active */ + if (Thread->ActiveImpersonationInfo) + { + /* Disable impersonation */ + InterlockedAnd(&Thread->CrossThreadFlags, + ~CT_ACTIVE_IMPERSONATION_INFO_BIT); + + /* Get the token */ + Token = Thread->ImpersonationInfo->Token; + } + + /* Release thread security */ + PspUnlockThreadSecurityExclusive(Thread); + } + + /* Dereference the impersonation token */ + if (Token) ObDereferenceObject(Token); } /* @@ -462,6 +451,8 @@ IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel) { PPS_IMPERSONATION_INFORMATION Impersonation; + PTOKEN OldToken = NULL; + PAGED_CODE(); /* Check if we don't have a token */ if (!Token) @@ -469,52 +460,78 @@ /* Make sure we're impersonating */ if (Thread->ActiveImpersonationInfo) { - /* Disable impersonation and check for token */ - Thread->ActiveImpersonationInfo = FALSE; - if (Thread->ImpersonationInfo->Token) + /* We seem to be, lock the thread */ + PspLockThreadSecurityExclusive(Thread); + + /* Make sure we're still impersonating */ + if (Thread->ActiveImpersonationInfo) { - /* Dereference it */ - ObDereferenceObject(Thread->ImpersonationInfo->Token); + /* Disable impersonation */ + InterlockedAnd(&Thread->CrossThreadFlags, + ~CT_ACTIVE_IMPERSONATION_INFO_BIT); + + /* Get the token */ + OldToken = Thread->ImpersonationInfo->Token; } - } - - /* Return success */ - return STATUS_SUCCESS; - } - - /* Check if we have active impersonation */ - if (Thread->ActiveImpersonationInfo) - { - /* Reuse the block and reference the token */ + + /* Unlock the process */ + PspUnlockThreadSecurityExclusive(Thread); + } + } + else + { + /* Check if we have impersonation info */ Impersonation = Thread->ImpersonationInfo; - if (Impersonation->Token) ObDereferenceObject(Impersonation->Token); - } - else if (Thread->ImpersonationInfo) - { - /* It's not active, but we can still reuse the block */ - Impersonation = Thread->ImpersonationInfo; - } - else - { - /* We need to allocate a new one */ - Impersonation = ExAllocatePoolWithTag(PagedPool, - sizeof(*Impersonation), - TAG_PS_IMPERSONATION); - if (!Impersonation) return STATUS_INSUFFICIENT_RESOURCES; - - /* Update the pointer */ - Thread->ImpersonationInfo = Impersonation; - } - - /* Now fill it out */ - Impersonation->ImpersonationLevel = ImpersonationLevel; - Impersonation->CopyOnOpen = CopyOnOpen; - Impersonation->EffectiveOnly = EffectiveOnly; - Impersonation->Token = Token; - Thread->ActiveImpersonationInfo = TRUE; - - /* Reference the token and return success */ - ObReferenceObject(Impersonation->Token); + if (!Impersonation) + { + /* We need to allocate a new one */ + Impersonation = ExAllocatePoolWithTag(PagedPool, + sizeof(*Impersonation), + TAG_PS_IMPERSONATION); + if (!Impersonation) return STATUS_INSUFFICIENT_RESOURCES; + + /* Update the pointer */ + if (InterlockedCompareExchangePointer(&Thread->ImpersonationInfo, + Impersonation, + NULL)) + { + /* Someone beat us to it, free our copy */ + ExFreePool(Impersonation); + } + } + + /* Check if this is a job, which we don't support yet */ + if (Thread->ThreadsProcess->Job) KEBUGCHECK(0); + + /* Lock thread security */ + PspLockThreadSecurityExclusive(Thread); + + /* Check if we're impersonating */ + if (Thread->ActiveImpersonationInfo) + { + /* Get the token */ + OldToken = Impersonation->Token; + } + else + { + /* Otherwise, enable impersonation */ + InterlockedOr(&Thread->CrossThreadFlags, + CT_ACTIVE_IMPERSONATION_INFO_BIT); + } + + /* Now fill it out */ + Impersonation->ImpersonationLevel = ImpersonationLevel; + Impersonation->CopyOnOpen = CopyOnOpen; + Impersonation->EffectiveOnly = EffectiveOnly; + Impersonation->Token = Token; + + /* Unlock the thread */ + PspUnlockThreadSecurityExclusive(Thread); + } + + /* Dereference the token and return success */ + ObReferenceObject(Token); + if (OldToken) ObDereferenceObject(OldToken); return STATUS_SUCCESS; } @@ -529,12 +546,13 @@ OUT PSECURITY_IMPERSONATION_LEVEL Level) { PEPROCESS Process; - PACCESS_TOKEN Token; + PACCESS_TOKEN Token = NULL; + PAGED_CODE(); /* Check if we don't have impersonation info */ + Process = Thread->ThreadsProcess; if (!Thread->ActiveImpersonationInfo) { - Process = Thread->ThreadsProcess; *TokenType = TokenPrimary; *EffectiveOnly = FALSE; @@ -556,14 +574,24 @@ } else { - /* Get the token */ - Token = Thread->ImpersonationInfo->Token; - ObReferenceObject(Token); - - /* Return data to caller */ - *TokenType = TokenImpersonation; - *EffectiveOnly = Thread->ImpersonationInfo->EffectiveOnly; - *Level = Thread->ImpersonationInfo->ImpersonationLevel; + /* Lock the Process */ + PspLockProcessSecurityShared(Process); + + /* Make sure impersonation is still active */ + if (Thread->ActiveImpersonationInfo) + { + /* Get the token */ + Token = Thread->ImpersonationInfo->Token; + ObReferenceObject(Token); + + /* Return data to caller */ + *TokenType = TokenImpersonation; + *EffectiveOnly = Thread->ImpersonationInfo->EffectiveOnly; + *Level = Thread->ImpersonationInfo->ImpersonationLevel; + } + + /* Unlock the Process */ + PspUnlockProcessSecurityShared(Process); } /* Return the token */ @@ -580,17 +608,31 @@ OUT PBOOLEAN EffectiveOnly, OUT PSECURITY_IMPERSONATION_LEVEL ImpersonationLevel) { + PTOKEN Token = NULL; + PAGED_CODE(); + /* If we don't have impersonation info, just quit */ if (!Thread->ActiveImpersonationInfo) return NULL; - /* Return data from caller */ - *ImpersonationLevel = Thread->ImpersonationInfo->ImpersonationLevel; - *CopyOnOpen = Thread->ImpersonationInfo->CopyOnOpen; - *EffectiveOnly = Thread->ImpersonationInfo->EffectiveOnly; - - /* Reference the token and return it */ - ObReferenceObject(Thread->ImpersonationInfo->Token); - return Thread->ImpersonationInfo->Token; + /* Lock the thread */ + PspLockThreadSecurityShared(Thread); + + /* Make sure we still have active impersonation */ + if (Thread->ActiveImpersonationInfo) + { + /* Return data from caller */ + ObReferenceObject(Thread->ImpersonationInfo->Token); + *ImpersonationLevel = Thread->ImpersonationInfo->ImpersonationLevel; + *CopyOnOpen = Thread->ImpersonationInfo->CopyOnOpen; + *EffectiveOnly = Thread->ImpersonationInfo->EffectiveOnly; + + /* Set the token */ + Token = Thread->ImpersonationInfo->Token; + } + + /* Unlock thread and return impersonation token */ + PspUnlockThreadSecurityShared(Thread); + return Token; } #undef PsDereferenceImpersonationToken @@ -601,6 +643,8 @@ NTAPI PsDereferenceImpersonationToken(IN PACCESS_TOKEN ImpersonationToken) { + PAGED_CODE(); + /* If we got a token, dereference it */ if (ImpersonationToken) ObDereferenceObject(ImpersonationToken); } @@ -613,6 +657,8 @@ NTAPI PsDereferencePrimaryToken(IN PACCESS_TOKEN PrimaryToken) { + PAGED_CODE(); + /* Dereference the token*/ ObDereferenceObject(PrimaryToken); } @@ -625,29 +671,52 @@ PsDisableImpersonation(IN PETHREAD Thread, IN PSE_IMPERSONATION_STATE ImpersonationState) { - PPS_IMPERSONATION_INFORMATION Impersonation; + PPS_IMPERSONATION_INFORMATION Impersonation = NULL; + LONG NewValue, OldValue; + PAGED_CODE(); /* Check if we don't have impersonation */ - if (!Thread->ActiveImpersonationInfo) - { - /* Clear everything */ - ImpersonationState->Token = NULL; - ImpersonationState->CopyOnOpen = FALSE; - ImpersonationState->EffectiveOnly = FALSE; - ImpersonationState->Level = SecurityAnonymous; - return FALSE; - } - - /* Copy the old state */ - Impersonation = Thread->ImpersonationInfo; - ImpersonationState->Token = Impersonation->Token; - ImpersonationState->CopyOnOpen = Impersonation->CopyOnOpen; - ImpersonationState->EffectiveOnly = Impersonation->EffectiveOnly; - ImpersonationState->Level = Impersonation->ImpersonationLevel; - - /* Disable impersonation and return true */ - Thread->ActiveImpersonationInfo = FALSE; - return TRUE; + if (Thread->ActiveImpersonationInfo) + { + /* Lock thread security */ + PspLockThreadSecurityExclusive(Thread); + + /* Disable impersonation */ + OldValue = Thread->CrossThreadFlags; + do + { + /* Attempt to change the flag */ + NewValue = + InterlockedCompareExchange(&Thread->CrossThreadFlags, + OldValue &~ + CT_ACTIVE_IMPERSONATION_INFO_BIT, + OldValue); + } while (NewValue != OldValue); + + /* Did someone disable behind our back? */ + if (!(NewValue & CT_ACTIVE_IMPERSONATION_INFO_BIT)) + { + /* Copy the old state */ + Impersonation = Thread->ImpersonationInfo; + ImpersonationState->Token = Impersonation->Token; + ImpersonationState->CopyOnOpen = Impersonation->CopyOnOpen; + ImpersonationState->EffectiveOnly = Impersonation->EffectiveOnly; + ImpersonationState->Level = Impersonation->ImpersonationLevel; + } + + /* Unlock thread security */ + PspUnlockThreadSecurityExclusive(Thread); + + /* If we had impersonation info, return true */ + if (Impersonation) return TRUE; + } + + /* Clear everything */ + ImpersonationState->Token = NULL; + ImpersonationState->CopyOnOpen = FALSE; + ImpersonationState->EffectiveOnly = FALSE; + ImpersonationState->Level = SecurityAnonymous; + return FALSE; } /* @@ -658,15 +727,47 @@ PsRestoreImpersonation(IN PETHREAD Thread, IN PSE_IMPERSONATION_STATE ImpersonationState) { - /* Call the impersonation API */ - PsImpersonateClient(Thread, - ImpersonationState->Token, - ImpersonationState->CopyOnOpen, - ImpersonationState->EffectiveOnly, - ImpersonationState->Level); + PTOKEN Token = NULL; + PPS_IMPERSONATION_INFORMATION Impersonation; + PAGED_CODE(); + + /* Lock thread security */ + PspLockThreadSecurityExclusive(Thread); + + /* Get the impersonation info */ + Impersonation = Thread->ImpersonationInfo; + + /* Check if we're impersonating */ + if (Thread->ActiveImpersonationInfo) + { + /* Get the token */ + Token = Impersonation->Token; + } + + /* Check if we have an impersonation state */ + if (ImpersonationState) + { + /* Fill out the impersonation info */ + Impersonation->ImpersonationLevel = ImpersonationState->Level; + Impersonation->CopyOnOpen = ImpersonationState->CopyOnOpen; + Impersonation->EffectiveOnly = ImpersonationState->EffectiveOnly; + Impersonation->Token = ImpersonationState->Token; + + /* Enable impersonation */ + InterlockedOr(&Thread->CrossThreadFlags, CT_ACTIVE_IMPERSONATION_INFO_BIT); + } + else + { + /* Disable impersonation */ + InterlockedAnd(&Thread->CrossThreadFlags, + ~CT_ACTIVE_IMPERSONATION_INFO_BIT); + } + + /* Unlock the thread */ + PspUnlockThreadSecurityExclusive(Thread); /* Dereference the token */ - ObDereferenceObject(ImpersonationState->Token); + if (Token) ObDereferenceObject(Token); } NTSTATUS
18 years, 5 months
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
67
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
62
63
64
65
66
67
Results per page:
10
25
50
100
200