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
September 2008
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
27 participants
747 discussions
Start a n
N
ew thread
[sginsberg] 35862: - When creating a mutex, and you intend to release it without waiting for it, then you should specify so in bInitialOwner
by sginsberg@svn.reactos.org
Author: sginsberg Date: Mon Sep 1 22:42:21 2008 New Revision: 35862 URL:
http://svn.reactos.org/svn/reactos?rev=35862&view=rev
Log: - When creating a mutex, and you intend to release it without waiting for it, then you should specify so in bInitialOwner Modified: trunk/reactos/dll/win32/shell32/control.c Modified: trunk/reactos/dll/win32/shell32/control.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/control.…
============================================================================== --- trunk/reactos/dll/win32/shell32/control.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/control.c [iso-8859-1] Mon Sep 1 22:42:21 2008 @@ -357,7 +357,7 @@ memcpy(szName, (LPVOID)ptr, Length * sizeof(WCHAR)); szName[Length] = L'\0'; - hMutex = CreateMutexW(NULL, FALSE, szName); + hMutex = CreateMutexW(NULL, TRUE, szName); if ((!hMutex) || (GetLastError() == ERROR_ALREADY_EXISTS)) return;
16 years, 3 months
1
0
0
0
[fireball] 35861: - Fix SHARED_CACHE_MAP structure: it should contain a PRIVATE_CACHE_MAP, not a pointer to it! (confirmed by OSR). - The same error in VacbPushLock field (also confirmed by OSR).
by fireball@svn.reactos.org
Author: fireball Date: Mon Sep 1 21:32:18 2008 New Revision: 35861 URL:
http://svn.reactos.org/svn/reactos?rev=35861&view=rev
Log: - Fix SHARED_CACHE_MAP structure: it should contain a PRIVATE_CACHE_MAP, not a pointer to it! (confirmed by OSR). - The same error in VacbPushLock field (also confirmed by OSR). Modified: trunk/reactos/include/ndk/cctypes.h Modified: trunk/reactos/include/ndk/cctypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/cctypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/cctypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/cctypes.h [iso-8859-1] Mon Sep 1 21:32:18 2008 @@ -127,8 +127,8 @@ ULONG BcbSpinLock; PVOID Reserved; KEVENT Event; - PEX_PUSH_LOCK VacbPushLock; - PPRIVATE_CACHE_MAP PrivateCacheMap; + EX_PUSH_LOCK VacbPushLock; + PRIVATE_CACHE_MAP PrivateCacheMap; } SHARED_CACHE_MAP; #endif /* _NTIFS_INCLUDED_ */
16 years, 3 months
1
0
0
0
[gbrunmar] 35860: D3D9: * Initial cursor creation in swap chain * Changed from screen width/height in swap chains to back buffer width/height
by gbrunmar@svn.reactos.org
Author: gbrunmar Date: Mon Sep 1 20:32:57 2008 New Revision: 35860 URL:
http://svn.reactos.org/svn/reactos?rev=35860&view=rev
Log: D3D9: * Initial cursor creation in swap chain * Changed from screen width/height in swap chains to back buffer width/height Added: trunk/reactos/dll/directx/d3d9/d3d9_cursor.c (with props) trunk/reactos/dll/directx/d3d9/d3d9_cursor.h (with props) Modified: trunk/reactos/dll/directx/d3d9/d3d9.rbuild trunk/reactos/dll/directx/d3d9/d3d9_baseobject.c trunk/reactos/dll/directx/d3d9/d3d9_baseobject.h trunk/reactos/dll/directx/d3d9/d3d9_device.c trunk/reactos/dll/directx/d3d9/d3d9_device.h trunk/reactos/dll/directx/d3d9/d3d9_swapchain.c trunk/reactos/dll/directx/d3d9/d3d9_swapchain.h trunk/reactos/dll/directx/d3d9/device.c Modified: trunk/reactos/dll/directx/d3d9/d3d9.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9.rbui…
============================================================================== --- trunk/reactos/dll/directx/d3d9/d3d9.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/directx/d3d9/d3d9.rbuild [iso-8859-1] Mon Sep 1 20:32:57 2008 @@ -13,15 +13,16 @@ <library>d3d8thk</library> <file>d3d9.c</file> + <file>d3d9_baseobject.c</file> + <file>d3d9_caps.c</file> + <file>d3d9_create.c</file> + <file>d3d9_cursor.c</file> + <file>d3d9_device.c</file> + <file>d3d9_haldevice.c</file> <file>d3d9_helpers.c</file> <file>d3d9_impl.c</file> - <file>d3d9_baseobject.c</file> - <file>d3d9_create.c</file> - <file>d3d9_caps.c</file> - <file>d3d9_device.c</file> + <file>d3d9_puredevice.c</file> <file>d3d9_swapchain.c</file> - <file>d3d9_puredevice.c</file> - <file>d3d9_haldevice.c</file> <file>adapter.c</file> <file>device.c</file> <file>format.c</file> Modified: trunk/reactos/dll/directx/d3d9/d3d9_baseobject.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_base…
============================================================================== --- trunk/reactos/dll/directx/d3d9/d3d9_baseobject.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/d3d9/d3d9_baseobject.c [iso-8859-1] Mon Sep 1 20:32:57 2008 @@ -71,3 +71,18 @@ return E_NOINTERFACE; } + +HRESULT D3D9BaseObject_GetDeviceInt(D3D9BaseObject* pBaseObject, DIRECT3DDEVICE9_INT** ppDevice) +{ + if (pBaseObject->pUnknown) + { + LPDIRECT3DDEVICE9 pDevice; + if (FAILED(pBaseObject->pUnknown->lpVtbl->QueryInterface((IUnknown*) &pBaseObject->pUnknown->lpVtbl, &IID_IDirect3DDevice9, (void**)&pDevice))) + return E_NOINTERFACE; + + *ppDevice = IDirect3DDevice9ToImpl(pDevice); + return D3D_OK; + } + + return E_NOINTERFACE; +} Modified: trunk/reactos/dll/directx/d3d9/d3d9_baseobject.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_base…
============================================================================== --- trunk/reactos/dll/directx/d3d9/d3d9_baseobject.h [iso-8859-1] (original) +++ trunk/reactos/dll/directx/d3d9/d3d9_baseobject.h [iso-8859-1] Mon Sep 1 20:32:57 2008 @@ -12,6 +12,7 @@ #include <d3d9.h> struct _D3D9BaseObject; +struct _Direct3DDevice9_INT; enum REF_TYPE { @@ -42,5 +43,6 @@ ULONG D3D9BaseObject_AddRef(D3D9BaseObject* pBaseObject); ULONG D3D9BaseObject_Release(D3D9BaseObject* pBaseObject); HRESULT D3D9BaseObject_GetDevice(D3D9BaseObject* pBaseObject, IDirect3DDevice9** ppDevice); +HRESULT D3D9BaseObject_GetDeviceInt(D3D9BaseObject* pBaseObject, struct _Direct3DDevice9_INT** ppDevice); #endif // _D3D9_BASEOBJECT_H_ Added: trunk/reactos/dll/directx/d3d9/d3d9_cursor.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_curs…
============================================================================== --- trunk/reactos/dll/directx/d3d9/d3d9_cursor.c (added) +++ trunk/reactos/dll/directx/d3d9/d3d9_cursor.c [iso-8859-1] Mon Sep 1 20:32:57 2008 @@ -1,0 +1,34 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS ReactX + * FILE: dll/directx/d3d9/d3d9_cursor.h + * PURPOSE: d3d9.dll internal cursor methods + * PROGRAMERS: Gregor Gullwi <gbrunmar (dot) ros (at) gmail (dot) com> + */ +#include "d3d9_cursor.h" + +#include <debug.h> +#include <d3d9.h> +#include "d3d9_private.h" +#include "adapter.h" +#include "d3d9_device.h" +#include "d3d9_swapchain.h" +#include "d3d9_helpers.h" + +D3D9Cursor* CreateD3D9Cursor(struct _Direct3DDevice9_INT* pBaseDevice, struct _Direct3DSwapChain9_INT* pSwapChain) +{ + D3D9Cursor* pCursor; + + if (FAILED(AlignedAlloc((LPVOID*)&pCursor, sizeof(D3D9Cursor)))) + { + DPRINT1("Failed to allocate D3D9Cursor"); + return NULL; + } + + pCursor->pBaseDevice = pBaseDevice; + pCursor->pSwapChain = pSwapChain; + pCursor->dwWidth = pSwapChain->dwWidth / 2; + pCursor->dwHeight = pSwapChain->dwHeight / 2; + + return pCursor; +} Propchange: trunk/reactos/dll/directx/d3d9/d3d9_cursor.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/directx/d3d9/d3d9_cursor.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_curs…
============================================================================== --- trunk/reactos/dll/directx/d3d9/d3d9_cursor.h (added) +++ trunk/reactos/dll/directx/d3d9/d3d9_cursor.h [iso-8859-1] Mon Sep 1 20:32:57 2008 @@ -1,0 +1,34 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS ReactX + * FILE: dll/directx/d3d9/d3d9_cursor.h + * PURPOSE: d3d9.dll internal cursor methods + * PROGRAMERS: Gregor Gullwi <gbrunmar (dot) ros (at) gmail (dot) com> + */ +#ifndef _D3D9_CURSOR_H +#define _D3D9_CURSOR_H + +#include "d3d9_common.h" + +typedef struct _D3D9Cursor +{ +/* 0x0000 */ DWORD dwUnknown0000; +/* 0x0004 */ DWORD dwUnknown0004; +/* 0x0008 */ DWORD dwUnknown0008; +/* 0x000c */ DWORD dwUnknown000c; +/* 0x0010 */ DWORD dwUnknown0010; +/* 0x0014 */ DWORD dwUnknown0014; +/* 0x0018 */ DWORD dwWidth; +/* 0x001c */ DWORD dwHeight; +/* 0x0020 */ DWORD dwUnknown0020[18]; +/* 0x0070 */ struct _Direct3DDevice9_INT* pBaseDevice; +/* 0x0074 */ struct _Direct3DSwapChain9_INT* pSwapChain; +/* 0x0078 */ DWORD dwUnknown0078; +/* 0x007c */ DWORD dwMonitorVirtualX; +/* 0x0080 */ DWORD dwMonitorVirtualY; +/* 0x0084 */ DWORD dwUnknown0084; +} D3D9Cursor; + +D3D9Cursor* CreateD3D9Cursor(struct _Direct3DDevice9_INT* pBaseDevice, struct _Direct3DSwapChain9_INT* pSwapChain); + +#endif // _D3D9_CURSOR_H Propchange: trunk/reactos/dll/directx/d3d9/d3d9_cursor.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/directx/d3d9/d3d9_device.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_devi…
============================================================================== --- trunk/reactos/dll/directx/d3d9/d3d9_device.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/d3d9/d3d9_device.c [iso-8859-1] Mon Sep 1 20:32:57 2008 @@ -15,7 +15,7 @@ #define UNLOCK_D3DDEVICE9() if (This->bLockDevice) LeaveCriticalSection(&This->CriticalSection); /* Convert a IDirect3D9 pointer safely to the internal implementation struct */ -static LPDIRECT3DDEVICE9_INT IDirect3DDevice9ToImpl(LPDIRECT3DDEVICE9 iface) +LPDIRECT3DDEVICE9_INT IDirect3DDevice9ToImpl(LPDIRECT3DDEVICE9 iface) { if (NULL == iface) return NULL; @@ -63,6 +63,7 @@ { DestroyD3D9DeviceData(&This->DeviceData[iAdapter]); } + This->lpVtbl->VirtualDestructor(iface); LeaveCriticalSection(&This->CriticalSection); AlignedFree(This); @@ -71,7 +72,7 @@ return ref; } -/* IDirect3D9Device interface */ +/* IDirect3DDevice9 public interface */ HRESULT WINAPI IDirect3DDevice9Base_TestCooperativeLevel(LPDIRECT3DDEVICE9 iface) { UNIMPLEMENTED @@ -544,3 +545,14 @@ return D3D_OK; } + +/* IDirect3DDevice9 private interface */ +VOID WINAPI IDirect3DDevice9Base_Destroy(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED +} + +VOID WINAPI IDirect3DDevice9Base_VirtualDestructor(LPDIRECT3DDEVICE9 iface) +{ + UNIMPLEMENTED +} Modified: trunk/reactos/dll/directx/d3d9/d3d9_device.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_devi…
============================================================================== --- trunk/reactos/dll/directx/d3d9/d3d9_device.h [iso-8859-1] (original) +++ trunk/reactos/dll/directx/d3d9/d3d9_device.h [iso-8859-1] Mon Sep 1 20:32:57 2008 @@ -82,25 +82,6 @@ /* 0x0010 - 0x0170 */ DWORD dwUnknown0010; /* 0x0014 - 0x0174 */ D3D9HeapTexture* pTextureHeap; } D3D9ResourceManager; - -typedef struct _D3D9Cursor -{ -/* 0x0000 */ DWORD dwUnknown0000; -/* 0x0004 */ DWORD dwUnknown0004; -/* 0x0008 */ DWORD dwUnknown0008; -/* 0x000c */ DWORD dwUnknown000c; -/* 0x0010 */ DWORD dwUnknown0010; -/* 0x0014 */ DWORD dwUnknown0014; -/* 0x0018 */ DWORD dwWidth; -/* 0x001c */ DWORD dwHeight; -/* 0x0020 */ DWORD dwUnknown0020[18]; -/* 0x0070 */ struct _Direct3DDevice9_INT* pBaseDevice; -/* 0x0074 */ struct _Direct3DSwapChain9_INT* pSwapChain; -/* 0x0078 */ DWORD dwUnknown0078; -/* 0x007c */ DWORD dwMonitorVirtualX; -/* 0x0080 */ DWORD dwMonitorVirtualY; -/* 0x0084 */ DWORD dwUnknown0084; -} D3D9Cursor; typedef struct _Direct3DDevice9_INT { @@ -204,12 +185,15 @@ /* 0x1f44 */ DWORD unknown002001; } DIRECT3DDEVICE9_INT, FAR* LPDIRECT3DDEVICE9_INT; +/* Helper functions */ +LPDIRECT3DDEVICE9_INT IDirect3DDevice9ToImpl(LPDIRECT3DDEVICE9 iface); + /* IUnknown interface */ HRESULT WINAPI IDirect3DDevice9Base_QueryInterface(LPDIRECT3DDEVICE9 iface, REFIID riid, void** ppvObject); ULONG WINAPI IDirect3DDevice9Base_AddRef(LPDIRECT3DDEVICE9 iface); ULONG WINAPI IDirect3DDevice9Base_Release(LPDIRECT3DDEVICE9 iface); -/* IDirect3D9Device public interface */ +/* IDirect3DDevice9 public interface */ HRESULT WINAPI IDirect3DDevice9Base_TestCooperativeLevel(LPDIRECT3DDEVICE9 iface); UINT WINAPI IDirect3DDevice9Base_GetAvailableTextureMem(LPDIRECT3DDEVICE9 iface); HRESULT WINAPI IDirect3DDevice9Base_EvictManagedResources(LPDIRECT3DDEVICE9 iface); @@ -245,4 +229,8 @@ HRESULT WINAPI IDirect3DDevice9Base_ColorFill(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pSurface, CONST RECT* pRect, D3DCOLOR color); HRESULT WINAPI IDirect3DDevice9Base_CreateOffscreenPlainSurface(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle); +/* IDirect3DDevice9 private interface */ +VOID WINAPI IDirect3DDevice9Base_Destroy(LPDIRECT3DDEVICE9 iface); +VOID WINAPI IDirect3DDevice9Base_VirtualDestructor(LPDIRECT3DDEVICE9 iface); + #endif /* _D3D9_DEVICE_H_ */ Modified: trunk/reactos/dll/directx/d3d9/d3d9_swapchain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_swap…
============================================================================== --- trunk/reactos/dll/directx/d3d9/d3d9_swapchain.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/d3d9/d3d9_swapchain.c [iso-8859-1] Mon Sep 1 20:32:57 2008 @@ -12,6 +12,7 @@ #include "d3d9_helpers.h" #include "d3d9_device.h" +#include "d3d9_cursor.h" #define LOCK_D3DDEVICE9() if (This->BaseObject.pUnknown && ((LPDIRECT3DDEVICE9_INT)This->BaseObject.pUnknown)->bLockDevice) \ EnterCriticalSection(&((LPDIRECT3DDEVICE9_INT)This->BaseObject.pUnknown)->CriticalSection); @@ -184,7 +185,7 @@ Direct3DSwapChain9_INT* CreateDirect3DSwapChain9(enum REF_TYPE RefType, struct _Direct3DDevice9_INT* pBaseDevice, DWORD ChainIndex) { Direct3DSwapChain9_INT* pThisSwapChain; - if (FAILED(AlignedAlloc((LPVOID *)&pThisSwapChain, sizeof(Direct3DSwapChain9_INT)))) + if (FAILED(AlignedAlloc((LPVOID*)&pThisSwapChain, sizeof(Direct3DSwapChain9_INT)))) { DPRINT1("Could not create Direct3DSwapChain9_INT"); return NULL; @@ -202,15 +203,16 @@ return pThisSwapChain; } -VOID Direct3DSwapChain9_SetDisplayMode(Direct3DSwapChain9_INT* pThisSwapChain, D3DDISPLAYMODE* pMode) -{ - pThisSwapChain->dwWidth = pMode->Width; - pThisSwapChain->dwHeight = pMode->Height; +VOID Direct3DSwapChain9_SetDisplayMode(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters) +{ + pThisSwapChain->dwWidth = pPresentationParameters->BackBufferWidth; + pThisSwapChain->dwHeight = pPresentationParameters->BackBufferHeight; } HRESULT Direct3DSwapChain9_Init(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters) { int i; + DIRECT3DDEVICE9_INT* pDevice; for (i = 0; i < 256; i++) { @@ -221,6 +223,20 @@ pThisSwapChain->PresentParameters = pPresentationParameters[pThisSwapChain->ChainIndex]; pThisSwapChain->SwapEffect = pPresentationParameters->SwapEffect; + Direct3DSwapChain9_SetDisplayMode(pThisSwapChain, &pThisSwapChain->PresentParameters); + + if (FAILED(D3D9BaseObject_GetDeviceInt(&pThisSwapChain->BaseObject, &pDevice))) + { + DPRINT1("Could not get the swapchain device"); + return DDERR_GENERIC; + } + + pThisSwapChain->pCursor = CreateD3D9Cursor(pDevice, pThisSwapChain); + if (NULL == pThisSwapChain->pCursor) + { + DPRINT1("Could not allocate D3D9Cursor"); + return DDERR_OUTOFMEMORY; + } return Direct3DSwapChain9_Reset(pThisSwapChain, pPresentationParameters); } Modified: trunk/reactos/dll/directx/d3d9/d3d9_swapchain.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_swap…
============================================================================== --- trunk/reactos/dll/directx/d3d9/d3d9_swapchain.h [iso-8859-1] (original) +++ trunk/reactos/dll/directx/d3d9/d3d9_swapchain.h [iso-8859-1] Mon Sep 1 20:32:57 2008 @@ -74,7 +74,7 @@ Direct3DSwapChain9_INT* CreateDirect3DSwapChain9(enum REF_TYPE RefType, struct _Direct3DDevice9_INT* pBaseDevice, DWORD ChainIndex); -VOID Direct3DSwapChain9_SetDisplayMode(Direct3DSwapChain9_INT* pThisSwapChain, D3DDISPLAYMODE* pMode); +VOID Direct3DSwapChain9_SetDisplayMode(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters); HRESULT Direct3DSwapChain9_Init(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters); HRESULT Direct3DSwapChain9_Reset(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters); Modified: trunk/reactos/dll/directx/d3d9/device.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/device.c?…
============================================================================== --- trunk/reactos/dll/directx/d3d9/device.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/d3d9/device.c [iso-8859-1] Mon Sep 1 20:32:57 2008 @@ -81,7 +81,6 @@ pThisBaseDevice->pSwapChains[i] = CreateDirect3DSwapChain9(RT_BUILTIN, pThisBaseDevice, i); pThisBaseDevice->pSwapChains2[i] = pThisBaseDevice->pSwapChains[i]; - Direct3DSwapChain9_SetDisplayMode(pThisBaseDevice->pSwapChains[i], &pThisBaseDevice->CurrentDisplayMode[i]); if (FAILED(Direct3DSwapChain9_Init(pThisBaseDevice->pSwapChains[i], pPresentationParameters))) {
16 years, 3 months
1
0
0
0
[janderwald] 35839: - Remove old unused enumeration code - Implement displaying network component properties
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Aug 31 13:07:21 2008 New Revision: 35839 URL:
http://svn.reactos.org/svn/reactos?rev=35839&view=rev
Log: - Remove old unused enumeration code - Implement displaying network component properties Modified: trunk/reactos/dll/win32/netshell/lanconnectui.c trunk/reactos/dll/win32/netshell/netshell.rc Modified: trunk/reactos/dll/win32/netshell/lanconnectui.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lanconn…
============================================================================== --- trunk/reactos/dll/win32/netshell/lanconnectui.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netshell/lanconnectui.c [iso-8859-1] Sun Aug 31 13:07:21 2008 @@ -16,12 +16,15 @@ NET_TYPE Type; DWORD dwCharacteristics; LPWSTR szHelp; + INetCfgComponent *pNCfgComp; + UINT NumPropDialogOpen; }NET_ITEM, *PNET_ITEM; typedef struct { INetConnectionPropertyUi *lpVtbl; INetConnection * pCon; + INetCfg * pNCfg; LONG ref; }INetConnectionPropertyUiImpl, *LPINetConnectionPropertyUiImpl; @@ -57,92 +60,6 @@ lvItem.iItem = ListView_GetItemCount(hDlgCtrl); lvItem.iItem = SendMessageW(hDlgCtrl, LVM_INSERTITEMW, 0, (LPARAM)&lvItem); ListView_SetCheckState(hDlgCtrl, lvItem.iItem, TRUE); -} - -VOID -EnumClientServiceProtocol(HWND hDlgCtrl, HKEY hKey, UINT Type) -{ - DWORD dwIndex = 0; - DWORD dwSize; - DWORD dwRetVal; - DWORD dwCharacteristics; - WCHAR szName[100]; - WCHAR szText[100]; - WCHAR szHelp[200]; - HKEY hSubKey; - static WCHAR szNDI[] = L"\\Ndi"; - PNET_ITEM pItem; - - do - { - szHelp[0] = L'\0'; - dwCharacteristics = 0; - szText[0] = L'\0'; - - dwSize = sizeof(szName)/sizeof(WCHAR); - if (RegEnumKeyExW(hKey, dwIndex++, szName, &dwSize, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) - { - /* Get Help Text */ - if (dwSize + (sizeof(szNDI)/sizeof(WCHAR)) + 1 < sizeof(szName)/sizeof(WCHAR)) - { - wcscpy(&szName[dwSize], szNDI); - if (RegOpenKeyExW(hKey, szName, 0, KEY_READ, &hSubKey) == ERROR_SUCCESS) - { -#if 0 - if (RegLoadMUIStringW(hSubKey, L"HelpText", szHelp, sizeof(szHelp)/sizeof(WCHAR), &dwRetVal, 0, NULL) == ERROR_SUCCESS) - szHelp[(sizeof(szHelp)/sizeof(WCHAR))-1] = L'\0'; -#else - DWORD dwType; - dwRetVal = sizeof(szHelp); - if (RegQueryValueExW(hSubKey, L"HelpText", NULL, &dwType, (LPBYTE)szHelp, &dwRetVal) == ERROR_SUCCESS) - szHelp[(sizeof(szHelp)/sizeof(WCHAR))-1] = L'\0'; -#endif - RegCloseKey(hSubKey); - } - szName[dwSize] = L'\0'; - } - /* Get Characteristics */ - if (RegOpenKeyExW(hKey, szName, 0, KEY_READ, &hSubKey) == ERROR_SUCCESS) - { - dwSize = sizeof(dwCharacteristics); - if (RegQueryValueExW(hSubKey, L"Characteristics", NULL, NULL, (LPBYTE)&dwCharacteristics, &dwSize) == ERROR_SUCCESS) - { - if (dwCharacteristics & NCF_HIDDEN) - { - RegCloseKey(hSubKey); - continue; - } - } - /* Get the Client/Procotol/Service name */ - dwSize = sizeof(szText); - if (RegQueryValueExW(hSubKey, L"Description", NULL, NULL, (LPBYTE)szText, &dwSize) == ERROR_SUCCESS) - { - szText[(sizeof(szText)/sizeof(WCHAR))-1] = L'\0'; - } - RegCloseKey(hSubKey); - } - - if (!wcslen(szText)) - continue; - - - pItem = CoTaskMemAlloc(sizeof(NET_ITEM)); - if (!pItem) - continue; - - pItem->dwCharacteristics = dwCharacteristics; - pItem->Type = Type; - pItem->szHelp = CoTaskMemAlloc((wcslen(szHelp)+1)*sizeof(WCHAR)); - if (pItem->szHelp) - wcscpy(pItem->szHelp, szHelp); - - AddItemToListView(hDlgCtrl, pItem, szText); - } - else - break; - - }while(TRUE); - } VOID @@ -182,17 +99,17 @@ pItem->dwCharacteristics = dwCharacteristics; pItem->szHelp = pHelpText; pItem->Type = Type; + pItem->pNCfgComp = pNCfgComp; + pItem->NumPropDialogOpen = 0; AddItemToListView(hDlgCtrl, pItem, pDisplayName); CoTaskMemFree(pDisplayName); - - INetCfgComponent_Release(pNCfgComp); } IEnumNetCfgComponent_Release(pENetCfg); } VOID -InitializeLANPropertiesUIDlg(HWND hwndDlg) +InitializeLANPropertiesUIDlg(HWND hwndDlg, INetConnectionPropertyUiImpl * This) { HRESULT hr; INetCfg * pNCfg; @@ -200,6 +117,23 @@ LVCOLUMNW lc; RECT rc; DWORD dwStyle; + NETCON_PROPERTIES * pProperties; + + hr = INetConnection_GetProperties(This->pCon, &pProperties); + if (FAILED(hr)) + return; + + SendDlgItemMessageW(hwndDlg, IDC_NETCARDNAME, WM_SETTEXT, 0, (LPARAM)pProperties->pszwDeviceName); + if (pProperties->dwCharacter & NCCF_SHOW_ICON) + { + /* check show item on taskbar*/ + SendDlgItemMessageW(hwndDlg, IDC_SHOWTASKBAR, BM_SETCHECK, BST_CHECKED, 0); + } + if (pProperties->dwCharacter & NCCF_NOTIFY_DISCONNECTED) + { + /* check notify item */ + SendDlgItemMessageW(hwndDlg, IDC_NOTIFYNOCONNECTION, BM_SETCHECK, BST_CHECKED, 0); + } memset(&lc, 0, sizeof(LV_COLUMN)); lc.mask = LVCF_TEXT | LVCF_SUBITEM | LVCF_FMT; @@ -231,10 +165,92 @@ EnumComponents(hDlgCtrl, pNCfg, &GUID_DEVCLASS_NETCLIENT, NET_TYPE_CLIENT); EnumComponents(hDlgCtrl, pNCfg, &GUID_DEVCLASS_NETSERVICE, NET_TYPE_SERVICE); EnumComponents(hDlgCtrl, pNCfg, &GUID_DEVCLASS_NETTRANS, NET_TYPE_PROTOCOL); - - INetCfg_Release(pNCfg); -} - + This->pNCfg = pNCfg; +} + +VOID +ShowNetworkComponentProperties( + HWND hwndDlg, + INetConnectionPropertyUiImpl * This) +{ + LVITEMW lvItem; + HWND hDlgCtrl; + UINT Index, Count; + HRESULT hr; + INetConnectionPropertyUi * pConUI = NULL; + INetCfgComponent * pNCfgComp; + PNET_ITEM pItem; + INetCfgLock * pLock; + LPWSTR pLockApp; + + hDlgCtrl = GetDlgItem(hwndDlg, IDC_COMPONENTSLIST); + Count = ListView_GetItemCount(hDlgCtrl); + if (!Count) + return; + + + hr = CoCreateInstance(&CLSID_LANConnectUI, + NULL, + CLSCTX_INPROC_SERVER | CLSCTX_NO_CODE_DOWNLOAD, + &IID_INetConnectionPropertyUi, + (LPVOID)&pConUI); + + if (FAILED(hr)) + { + return; + } + hr = INetConnectionPropertyUi_SetConnection(pConUI, This->pCon); + if (FAILED(hr)) + { + INetConnectionPropertyUi_Release(pConUI); + return; + } + + ZeroMemory(&lvItem, sizeof(LVITEMW)); + lvItem.mask = LVIF_PARAM | LVIF_STATE; + lvItem.stateMask = (UINT)-1; + for (Index = 0; Index < Count; Index++) + { + lvItem.iItem = Index; + if (SendMessageW(hDlgCtrl, LVM_GETITEMW, 0, (LPARAM)&lvItem)) + { + if (lvItem.state & LVIS_SELECTED) + break; + } + } + + if (!(lvItem.state & LVIS_SELECTED)) + { + INetConnectionPropertyUi_Release(pConUI); + return; + } + + pItem = (PNET_ITEM)lvItem.lParam; + pNCfgComp = (INetCfgComponent*) pItem->pNCfgComp; + + hr = INetCfg_QueryInterface(This->pNCfg, &IID_INetCfgLock, (LPVOID*)&pLock); + if (FAILED(hr)) + return; + + hr = INetCfgLock_AcquireWriteLock(pLock, 10000, L"", &pLockApp); + if (FAILED(hr)) + { + CoTaskMemFree(pLockApp); + INetConnectionPropertyUi_Release(pConUI); + return; + } + + + hr = INetCfgComponent_RaisePropertyUi(pNCfgComp, GetParent(hwndDlg), NCRP_QUERY_PROPERTY_UI, (IUnknown*)pConUI); + if (SUCCEEDED(hr)) + { + hr = INetCfgComponent_RaisePropertyUi(pNCfgComp, GetParent(hwndDlg), NCRP_SHOW_PROPERTY_UI, (IUnknown*)pConUI); + } + + INetCfgLock_ReleaseWriteLock(pLock); + INetConnectionPropertyUi_Release(pConUI); + +} INT_PTR @@ -250,25 +266,15 @@ LPNMLISTVIEW lppl; LVITEMW li; PNET_ITEM pItem; - NETCON_PROPERTIES * pProperties; + INetConnectionPropertyUiImpl * This; switch(uMsg) { case WM_INITDIALOG: page = (PROPSHEETPAGE*)lParam; - pProperties = (NETCON_PROPERTIES*)page->lParam; - SendDlgItemMessageW(hwndDlg, IDC_NETCARDNAME, WM_SETTEXT, 0, (LPARAM)pProperties->pszwDeviceName); - if (pProperties->dwCharacter & NCCF_SHOW_ICON) - { - /* check show item on taskbar*/ - SendDlgItemMessageW(hwndDlg, IDC_SHOWTASKBAR, BM_SETCHECK, BST_CHECKED, 0); - } - if (pProperties->dwCharacter & NCCF_NOTIFY_DISCONNECTED) - { - /* check notify item */ - SendDlgItemMessageW(hwndDlg, IDC_NOTIFYNOCONNECTION, BM_SETCHECK, BST_CHECKED, 0); - } - InitializeLANPropertiesUIDlg(hwndDlg); + This = (INetConnectionPropertyUiImpl*)page->lParam; + InitializeLANPropertiesUIDlg(hwndDlg, This); + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)This); return TRUE; case WM_NOTIFY: lppl = (LPNMLISTVIEW) lParam; @@ -301,6 +307,14 @@ } } break; + case WM_COMMAND: + if (LOWORD(wParam) == IDC_PROPERTIES) + { + This = (INetConnectionPropertyUiImpl*) GetWindowLongPtr(hwndDlg, DWLP_USER); + ShowNetworkComponentProperties(hwndDlg, This); + return FALSE; + } + break; } return FALSE; } @@ -385,37 +399,34 @@ LPARAM lParam) { HPROPSHEETPAGE hProp; + BOOL ret; + HRESULT hr = E_FAIL; + INITCOMMONCONTROLSEX initEx; NETCON_PROPERTIES * pProperties; - BOOL ret; - HRESULT hr; - INITCOMMONCONTROLSEX initEx; INetConnectionPropertyUiImpl * This = (INetConnectionPropertyUiImpl*)iface; initEx.dwSize = sizeof(initEx); initEx.dwICC = ICC_LISTVIEW_CLASSES; - - if(!InitCommonControlsEx(&initEx)) return E_FAIL; - - hr = INetConnection_GetProperties(This->pCon, &pProperties); if (FAILED(hr)) return hr; - hProp = InitializePropertySheetPage(MAKEINTRESOURCEW(IDD_NETPROPERTIES), LANPropertiesUIDlg, (LPARAM)pProperties, pProperties->pszwName); + hProp = InitializePropertySheetPage(MAKEINTRESOURCEW(IDD_NETPROPERTIES), LANPropertiesUIDlg, (LPARAM)This, pProperties->pszwName); if (hProp) { ret = (*pfnAddPage)(hProp, lParam); if (ret) { - return NOERROR; + hr = NOERROR; } DestroyPropertySheetPage(hProp); } - return E_FAIL; + //NcFreeNetconProperties(pProperties); + return hr; } static const INetConnectionPropertyUiVtbl vt_NetConnectionPropertyUi = @@ -443,6 +454,7 @@ This->ref = 1; This->pCon = NULL; + This->pNCfg = NULL; This->lpVtbl = (INetConnectionPropertyUi*)&vt_NetConnectionPropertyUi; if (!SUCCEEDED (INetConnectionPropertyUi_fnQueryInterface ((INetConnectionPropertyUi*)This, riid, ppv))) Modified: trunk/reactos/dll/win32/netshell/netshell.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/netshel…
============================================================================== --- trunk/reactos/dll/win32/netshell/netshell.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netshell/netshell.rc [iso-8859-1] Sun Aug 31 13:07:21 2008 @@ -11,6 +11,7 @@ #define REACTOS_STR_ORIGINAL_FILENAME "netshell.dll\0" #define REACTOS_STR_PRODUCT_VERSION "5.1.2600.3264\0" #define REACTOS_STR_FILE_VERSION "5.1.2600.3264\0" +#define REACTOS_STR_COMPANY_NAME "Microsoft Corporation" #include <reactos/version.rc>
16 years, 3 months
2
1
0
0
[arty] 35859: Enable and fix up lazy write thread, reattach completion routine for simple read and write functions. Fat write works, and produces a correct volume.
by arty@svn.reactos.org
Author: arty Date: Mon Sep 1 10:19:13 2008 New Revision: 35859 URL:
http://svn.reactos.org/svn/reactos?rev=35859&view=rev
Log: Enable and fix up lazy write thread, reattach completion routine for simple read and write functions. Fat write works, and produces a correct volume. Modified: branches/arty-newcc/ntoskrnl/cache/cachesub.c branches/arty-newcc/ntoskrnl/cache/fssup.c branches/arty-newcc/ntoskrnl/cache/lazyrite.c branches/arty-newcc/ntoskrnl/cache/pinsup.c branches/arty-newcc/ntoskrnl/mm/section.c Modified: branches/arty-newcc/ntoskrnl/cache/cachesub.c URL:
http://svn.reactos.org/svn/reactos/branches/arty-newcc/ntoskrnl/cache/cache…
============================================================================== --- branches/arty-newcc/ntoskrnl/cache/cachesub.c [iso-8859-1] (original) +++ branches/arty-newcc/ntoskrnl/cache/cachesub.c [iso-8859-1] Mon Sep 1 10:19:13 2008 @@ -23,6 +23,32 @@ NTSTATUS NTAPI +CcpSimpleWriteComplete +(PDEVICE_OBJECT DeviceObject, + PIRP Irp, + PVOID Context) +{ + /* Unlock MDL Pages, page 167. */ + PMDL Mdl = Irp->MdlAddress; + while (Mdl) + { + MmUnlockPages(Mdl); + Mdl = Mdl->Next; + } + + /* Check if there's an MDL */ + while ((Mdl = Irp->MdlAddress)) + { + /* Clear all of them */ + Irp->MdlAddress = Mdl->Next; + IoFreeMdl(Mdl); + } + + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI CcpSimpleWrite (PFILE_OBJECT FileObject, PLARGE_INTEGER FileOffset, @@ -71,12 +97,13 @@ Irp->Flags |= IRP_PAGING_IO | IRP_SYNCHRONOUS_PAGING_IO | IRP_NOCACHE; ObReferenceObject(FileObject); - + Irp->UserEvent = &ReadWait; Irp->Tail.Overlay.OriginalFileObject = FileObject; Irp->Tail.Overlay.Thread = PsGetCurrentThread(); IrpSp = IoGetNextIrpStackLocation(Irp); IrpSp->FileObject = FileObject; + IrpSp->CompletionRoutine = CcpSimpleWriteComplete; Status = IoCallDriver(DeviceObject, Irp); if (Status == STATUS_PENDING) @@ -182,6 +209,7 @@ PNOCC_BCB Bcb; LARGE_INTEGER ToWrite = *FileOffset; IO_STATUS_BLOCK IOSB; + PNOCC_CACHE_MAP Map = (PNOCC_CACHE_MAP)SectionObjectPointer->SharedCacheMap; if (!SectionObjectPointer->SharedCacheMap) { @@ -194,15 +222,17 @@ } BOOLEAN Result = CcpMapData - ((PNOCC_CACHE_MAP)SectionObjectPointer->SharedCacheMap, + (Map, FileOffset, Length, PIN_WAIT, (PVOID *)&Bcb, &Buffer); - if (!Result) return; - + /* Don't flush a pinned bcb, because we'll disturb the locked-ness + * of the pages. Figured out how to do this right. */ + if (!Result || Bcb->Pinned || !Bcb->Dirty) return; + BufStart = (PCHAR)PAGE_ROUND_DOWN(((ULONG_PTR)Buffer)); ToWrite.LowPart = PAGE_ROUND_DOWN(FileOffset->LowPart); @@ -220,20 +250,19 @@ ToWrite.QuadPart += PAGE_SIZE; } - DPRINT - ("Page Write: %08x\n", IOSB.Status); - - CcUnpinData(Bcb); + Bcb->Dirty = FALSE; + + DPRINT("Page Write: %08x\n", IOSB.Status); if (IoStatus && NT_SUCCESS(IOSB.Status)) { - IoStatus->Status = STATUS_SUCCESS; - IoStatus->Information = Length; + IoStatus->Status = STATUS_SUCCESS; + IoStatus->Information = Length; } else if (IoStatus) { - IoStatus->Status = IOSB.Status; - IoStatus->Information = 0; + IoStatus->Status = IOSB.Status; + IoStatus->Information = 0; } } Modified: branches/arty-newcc/ntoskrnl/cache/fssup.c URL:
http://svn.reactos.org/svn/reactos/branches/arty-newcc/ntoskrnl/cache/fssup…
============================================================================== --- branches/arty-newcc/ntoskrnl/cache/fssup.c [iso-8859-1] (original) +++ branches/arty-newcc/ntoskrnl/cache/fssup.c [iso-8859-1] Mon Sep 1 10:19:13 2008 @@ -59,7 +59,6 @@ KEBUGCHECK(0); } -#if 0 Status = PsCreateSystemThread (&CcLazyWriteThreadHandle, THREAD_ALL_ACCESS, @@ -68,7 +67,6 @@ &CcLazyWriteThreadId, (PKSTART_ROUTINE) CcpLazyWriteThread, NULL); -#endif if (!NT_SUCCESS(Status)) { Modified: branches/arty-newcc/ntoskrnl/cache/lazyrite.c URL:
http://svn.reactos.org/svn/reactos/branches/arty-newcc/ntoskrnl/cache/lazyr…
============================================================================== --- branches/arty-newcc/ntoskrnl/cache/lazyrite.c [iso-8859-1] (original) +++ branches/arty-newcc/ntoskrnl/cache/lazyrite.c [iso-8859-1] Mon Sep 1 10:19:13 2008 @@ -22,7 +22,7 @@ CcpLazyWriteThread(PVOID Unused) { ULONG i; - BOOLEAN GotLock; + BOOLEAN GotLock, WasAlloc; PNOCC_BCB RealBcb; LARGE_INTEGER Interval; IO_STATUS_BLOCK IoStatus; @@ -34,7 +34,12 @@ RealBcb = &CcCacheSections[i]; CcpLock(&CcMutex); GotLock = RealBcb->RefCount == 1; - if (GotLock) RealBcb->RefCount++; + WasAlloc = RtlTestBit(CcCacheBitmap, i); + if (GotLock) + { + RtlSetBit(CcCacheBitmap, i); + RealBcb->RefCount++; + } CcpUnlock(&CcMutex); // Pinned (temporarily) if (GotLock) @@ -51,12 +56,15 @@ IoStatus.Status, IoStatus.Information); - CcUnpinData(RealBcb); + CcpLock(&CcMutex); + RealBcb->RefCount--; + if (!WasAlloc) RtlClearBit(CcCacheBitmap, i); + CcpUnlock(&CcMutex); DPRINT("CcpLazyWrite: done #%x\n", i); } } KeSetEvent(&CcpLazyWriteEvent, IO_DISK_INCREMENT, TRUE); - Interval.QuadPart = -1000000L; + Interval.QuadPart = -100000000L; KeDelayExecutionThread(KernelMode, FALSE, &Interval); } } Modified: branches/arty-newcc/ntoskrnl/cache/pinsup.c URL:
http://svn.reactos.org/svn/reactos/branches/arty-newcc/ntoskrnl/cache/pinsu…
============================================================================== --- branches/arty-newcc/ntoskrnl/cache/pinsup.c [iso-8859-1] (original) +++ branches/arty-newcc/ntoskrnl/cache/pinsup.c [iso-8859-1] Mon Sep 1 10:19:13 2008 @@ -691,6 +691,7 @@ { IoFreeMdl(TheBcb->Pinned); TheBcb->Pinned = NULL; + TheBcb->Dirty = TRUE; Result = FALSE; } _SEH_END; Modified: branches/arty-newcc/ntoskrnl/mm/section.c URL:
http://svn.reactos.org/svn/reactos/branches/arty-newcc/ntoskrnl/mm/section.…
============================================================================== --- branches/arty-newcc/ntoskrnl/mm/section.c [iso-8859-1] (original) +++ branches/arty-newcc/ntoskrnl/mm/section.c [iso-8859-1] Mon Sep 1 10:19:13 2008 @@ -183,6 +183,7 @@ Irp->Tail.Overlay.Thread = PsGetCurrentThread(); IrpSp = IoGetNextIrpStackLocation(Irp); IrpSp->FileObject = FileObject; + IrpSp->CompletionRoutine = MiSimpleReadComplete; Status = IoCallDriver(DeviceObject, Irp); if (Status == STATUS_PENDING) @@ -267,6 +268,7 @@ Irp->Tail.Overlay.Thread = PsGetCurrentThread(); IrpSp = IoGetNextIrpStackLocation(Irp); IrpSp->FileObject = FileObject; + IrpSp->CompletionRoutine = MiSimpleReadComplete; Status = IoCallDriver(DeviceObject, Irp); if (Status == STATUS_PENDING)
16 years, 3 months
1
0
0
0
[arty] 35858: Don't actually need all spew anymore. Keep a reference to the associated file object. MmGetDeviceObjectForFile was way more complicated than it needed to be, due to my wrong understanding of IoGetRelatedDeviceObject. VFAT read is now working.
by arty@svn.reactos.org
Author: arty Date: Mon Sep 1 09:27:00 2008 New Revision: 35858 URL:
http://svn.reactos.org/svn/reactos?rev=35858&view=rev
Log: Don't actually need all spew anymore. Keep a reference to the associated file object. MmGetDeviceObjectForFile was way more complicated than it needed to be, due to my wrong understanding of IoGetRelatedDeviceObject. VFAT read is now working. Modified: branches/arty-newcc/ntoskrnl/cache/fssup.c branches/arty-newcc/ntoskrnl/cache/pinsup.c branches/arty-newcc/ntoskrnl/mm/section.c Modified: branches/arty-newcc/ntoskrnl/cache/fssup.c URL:
http://svn.reactos.org/svn/reactos/branches/arty-newcc/ntoskrnl/cache/fssup…
============================================================================== --- branches/arty-newcc/ntoskrnl/cache/fssup.c [iso-8859-1] (original) +++ branches/arty-newcc/ntoskrnl/cache/fssup.c [iso-8859-1] Mon Sep 1 09:27:00 2008 @@ -115,10 +115,10 @@ PNOCC_CACHE_MAP Map = ExAllocatePool(NonPagedPool, sizeof(NOCC_CACHE_MAP)); FileObject->SectionObjectPointer->SharedCacheMap = Map; Map->RefCount = 1; + ObReferenceObject(FileObject); Map->FileObject = FileObject; Map->NumberOfMaps = 0; Map->FileSizes = *FileSizes; - ASSERT(Map->FileSizes.ValidDataLength.HighPart != 0xcccccccc); DPRINT("FileSizes->ValidDataLength %x\n", FileSizes->ValidDataLength.LowPart); InitializeListHead(&Map->AssociatedBcb); } @@ -175,6 +175,8 @@ } } + ObDereferenceObject(Map->FileObject); + ExFreePool(Map); /* Clear the cache map */ Modified: branches/arty-newcc/ntoskrnl/cache/pinsup.c URL:
http://svn.reactos.org/svn/reactos/branches/arty-newcc/ntoskrnl/cache/pinsu…
============================================================================== --- branches/arty-newcc/ntoskrnl/cache/pinsup.c [iso-8859-1] (original) +++ branches/arty-newcc/ntoskrnl/cache/pinsup.c [iso-8859-1] Mon Sep 1 09:27:00 2008 @@ -10,7 +10,7 @@ /* INCLUDES *******************************************************************/ #include <ntoskrnl.h> -//#define NDEBUG +#define NDEBUG #include <debug.h> /* GLOBALS ********************************************************************/ Modified: branches/arty-newcc/ntoskrnl/mm/section.c URL:
http://svn.reactos.org/svn/reactos/branches/arty-newcc/ntoskrnl/mm/section.…
============================================================================== --- branches/arty-newcc/ntoskrnl/mm/section.c [iso-8859-1] (original) +++ branches/arty-newcc/ntoskrnl/mm/section.c [iso-8859-1] Mon Sep 1 09:27:00 2008 @@ -45,7 +45,7 @@ /* INCLUDES *****************************************************************/ #include <ntoskrnl.h> -//#define NDEBUG +#define NDEBUG #include <internal/debug.h> #include <reactos/exeformat.h> @@ -98,15 +98,7 @@ NTAPI MmGetDeviceObjectForFile(IN PFILE_OBJECT FileObject) { - if (FileObject->Flags & (FO_DIRECT_DEVICE_OPEN | FO_STREAM_FILE)) - { - /* Get the device object */ - return IoGetAttachedDevice(FileObject->DeviceObject); - } - else - { - return IoGetRelatedDeviceObject(FileObject); - } + return IoGetRelatedDeviceObject(FileObject); } PFILE_OBJECT
16 years, 3 months
1
0
0
0
[cwittich] 35857: allow to specify a config file as cmdline argument
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Sep 1 08:42:40 2008 New Revision: 35857 URL:
http://svn.reactos.org/svn/reactos?rev=35857&view=rev
Log: allow to specify a config file as cmdline argument Modified: trunk/tools/sysreg2/virt.c Modified: trunk/tools/sysreg2/virt.c URL:
http://svn.reactos.org/svn/reactos/trunk/tools/sysreg2/virt.c?rev=35857&r1=…
============================================================================== --- trunk/tools/sysreg2/virt.c [iso-8859-1] (original) +++ trunk/tools/sysreg2/virt.c [iso-8859-1] Mon Sep 1 08:42:40 2008 @@ -135,7 +135,7 @@ } -int main() +int main(int argc, char **argv) { virConnectPtr vConn; virDomainPtr vDom; @@ -143,13 +143,18 @@ int Stages = 1; /* 1 for testing, should be set to 3 later */ char qemu_img_cmdline[300]; FILE* file; - - if (!LoadSettings("sysreg.xml")) + char config[255]; + + if (argc == 2) + strcpy(config, argv[1]); + else + strcpy(config, "sysreg.xml"); + + if (!LoadSettings(config)) { printf("Can not load configuration file\n"); return EXIT_FAILURE; } - vConn = virConnectOpen("qemu:///session"); if (IsVirtualMachineRunning(vConn, AppSettings.Name))
16 years, 3 months
1
0
0
0
[cgutman] 35856: - Initially set Packet to NULL
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Sep 1 08:12:34 2008 New Revision: 35856 URL:
http://svn.reactos.org/svn/reactos?rev=35856&view=rev
Log: - Initially set Packet to NULL Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1] Mon Sep 1 08:12:34 2008 @@ -408,6 +408,8 @@ NDIS_DbgPrint(MAX_TRACE, ("Status (0x%X) Packet (0x%X) PoolHandle (0x%X).\n", Status, Packet, PoolHandle)); + *Packet = NULL; + if (Pool == NULL) { *Status = NDIS_STATUS_FAILURE;
16 years, 3 months
1
0
0
0
[gedmurphy] 35855: remove warning
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Mon Sep 1 08:08:52 2008 New Revision: 35855 URL:
http://svn.reactos.org/svn/reactos?rev=35855&view=rev
Log: remove warning Modified: trunk/reactos/base/services/tcpsvcs/log.c Modified: trunk/reactos/base/services/tcpsvcs/log.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/tcpsvcs/log.…
============================================================================== --- trunk/reactos/base/services/tcpsvcs/log.c [iso-8859-1] (original) +++ trunk/reactos/base/services/tcpsvcs/log.c [iso-8859-1] Mon Sep 1 08:08:52 2008 @@ -15,7 +15,6 @@ static LPCWSTR lpLogFileName = L"C:\\tcpsvcs_log.log"; static HANDLE hLogFile = NULL; -static BOOL bWaitingOnRead = FALSE; static OVERLAPPED olWrite;
16 years, 3 months
1
0
0
0
[gedmurphy] 35854: - Fix file logging to be asynchronous and more robust - Convert to unicode
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Mon Sep 1 07:51:49 2008 New Revision: 35854 URL:
http://svn.reactos.org/svn/reactos?rev=35854&view=rev
Log: - Fix file logging to be asynchronous and more robust - Convert to unicode Modified: trunk/reactos/base/services/tcpsvcs/chargen.c trunk/reactos/base/services/tcpsvcs/daytime.c trunk/reactos/base/services/tcpsvcs/discard.c trunk/reactos/base/services/tcpsvcs/echo.c trunk/reactos/base/services/tcpsvcs/log.c trunk/reactos/base/services/tcpsvcs/qotd.c trunk/reactos/base/services/tcpsvcs/skelserver.c trunk/reactos/base/services/tcpsvcs/tcpsvcs.c trunk/reactos/base/services/tcpsvcs/tcpsvcs.h Modified: trunk/reactos/base/services/tcpsvcs/chargen.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/tcpsvcs/char…
============================================================================== --- trunk/reactos/base/services/tcpsvcs/chargen.c [iso-8859-1] (original) +++ trunk/reactos/base/services/tcpsvcs/chargen.c [iso-8859-1] Mon Sep 1 07:51:49 2008 @@ -32,16 +32,16 @@ } else { - LogEvent(_T("Chargen: Not sent enough bytes"), 0, 0, LOG_FILE); + LogEvent(L"Chargen: Not sent enough bytes", 0, 0, LOG_FILE); } } else if (retVal == SOCKET_ERROR) { - LogEvent(_T("Chargen: Socket error\n"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"Chargen: Socket error\n", WSAGetLastError(), 0, LOG_ERROR); } else { - LogEvent(_T("Chargen: unknown error\n"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"Chargen: unknown error\n", WSAGetLastError(), 0, LOG_ERROR); } return bRet;; @@ -100,21 +100,21 @@ if (!GenerateChars(sock)) { - LogEvent(_T("Chargen: Char generation failed"), 0, 0, LOG_FILE); + LogEvent(L"Chargen: Char generation failed", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("Chargen: Shutting connection down..."), 0, 0, LOG_FILE); + LogEvent(L"Chargen: Shutting connection down...", 0, 0, LOG_FILE); if (ShutdownConnection(sock, FALSE)) { - LogEvent(_T("Chargen: Connection is down"), 0, 0, LOG_FILE); + LogEvent(L"Chargen: Connection is down", 0, 0, LOG_FILE); } else { - LogEvent(_T("Chargen: Connection shutdown failed"), 0, 0, LOG_FILE); + LogEvent(L"Chargen: Connection shutdown failed", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("Chargen: Terminating thread"), 0, 0, LOG_FILE); + LogEvent(L"Chargen: Terminating thread", 0, 0, LOG_FILE); ExitThread(retVal); } Modified: trunk/reactos/base/services/tcpsvcs/daytime.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/tcpsvcs/dayt…
============================================================================== --- trunk/reactos/base/services/tcpsvcs/daytime.c [iso-8859-1] (original) +++ trunk/reactos/base/services/tcpsvcs/daytime.c [iso-8859-1] Mon Sep 1 07:51:49 2008 @@ -15,7 +15,7 @@ DWORD stringSize = strlen(time) + 1; if (send(sock, time, stringSize, 0) == SOCKET_ERROR) { - LogEvent(_T("DayTime: Error sending data"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"DayTime: Error sending data", WSAGetLastError(), 0, LOG_ERROR); return FALSE; } @@ -41,15 +41,15 @@ retVal = 1; } - LogEvent(_T("DayTime: Shutting connection down"), 0, 0, LOG_FILE); + LogEvent(L"DayTime: Shutting connection down", 0, 0, LOG_FILE); if (ShutdownConnection(Sock, FALSE)) - LogEvent(_T("DayTime: Connection is down"), 0, 0, LOG_FILE); + LogEvent(L"DayTime: Connection is down", 0, 0, LOG_FILE); else { - LogEvent(_T("DayTime: Connection shutdown failed"), 0, 0, LOG_FILE); + LogEvent(L"DayTime: Connection shutdown failed", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("DayTime: Terminating thread"), 0, 0, LOG_FILE); + LogEvent(L"DayTime: Terminating thread", 0, 0, LOG_FILE); ExitThread(retVal); } Modified: trunk/reactos/base/services/tcpsvcs/discard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/tcpsvcs/disc…
============================================================================== --- trunk/reactos/base/services/tcpsvcs/discard.c [iso-8859-1] (original) +++ trunk/reactos/base/services/tcpsvcs/discard.c [iso-8859-1] Mon Sep 1 07:51:49 2008 @@ -14,7 +14,7 @@ static BOOL RecieveIncomingPackets(SOCKET sock) { - char readBuffer[BUFSIZE]; + CHAR readBuffer[BUFSIZE]; INT readBytes; do @@ -24,18 +24,18 @@ { TCHAR logBuf[256]; - _stprintf(logBuf, _T("Discard: Received %d bytes from client"), readBytes); + _swprintf(logBuf, L"Discard: Received %d bytes from client", readBytes); LogEvent(logBuf, 0, 0, LOG_FILE); } else if (readBytes == SOCKET_ERROR) { - LogEvent(_T("Discard: Socket Error"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"Discard: Socket Error", WSAGetLastError(), 0, LOG_ERROR); return FALSE; } } while ((readBytes > 0) && (!bShutdown)); if (!bShutdown) - LogEvent(_T("Discard: Connection closed by peer"), 0, 0, LOG_FILE); + LogEvent(L"Discard: Connection closed by peer", 0, 0, LOG_FILE); return TRUE; } @@ -48,21 +48,21 @@ if (!RecieveIncomingPackets(sock)) { - LogEvent(_T("Discard: RecieveIncomingPackets failed"), 0, 0, LOG_FILE); + LogEvent(L"Discard: RecieveIncomingPackets failed", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("Discard: Shutting connection down"), 0, 0, LOG_FILE); + LogEvent(L"Discard: Shutting connection down", 0, 0, LOG_FILE); if (ShutdownConnection(sock, TRUE)) { - LogEvent(_T("Discard: Connection is down."), 0, 0, LOG_FILE); + LogEvent(L"Discard: Connection is down.", 0, 0, LOG_FILE); } else { - LogEvent(_T("Discard: Connection shutdown failed"), 0, 0, LOG_FILE); + LogEvent(L"Discard: Connection shutdown failed", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("Discard: Terminating thread"), 0, 0, LOG_FILE); + LogEvent(L"Discard: Terminating thread", 0, 0, LOG_FILE); ExitThread(retVal); } Modified: trunk/reactos/base/services/tcpsvcs/echo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/tcpsvcs/echo…
============================================================================== --- trunk/reactos/base/services/tcpsvcs/echo.c [iso-8859-1] (original) +++ trunk/reactos/base/services/tcpsvcs/echo.c [iso-8859-1] Mon Sep 1 07:51:49 2008 @@ -15,7 +15,7 @@ EchoIncomingPackets(SOCKET sock) { CHAR readBuffer[RECV_BUF]; - TCHAR logBuf[256]; + WCHAR logBuf[256]; INT totalSentBytes; INT readBytes; INT retVal; @@ -25,7 +25,7 @@ readBytes = recv(sock, readBuffer, RECV_BUF, 0); if (readBytes > 0) { - _stprintf(logBuf, _T("Received %d bytes from client"), readBytes); + _swprintf(logBuf, L"Received %d bytes from client", readBytes); LogEvent(logBuf, 0, 0, LOG_FILE); totalSentBytes = 0; @@ -34,33 +34,33 @@ retVal = send(sock, readBuffer + totalSentBytes, readBytes - totalSentBytes, 0); if (retVal > 0) { - _stprintf(logBuf, _T("Sent %d bytes back to client"), retVal); + _swprintf(logBuf, L"Sent %d bytes back to client", retVal); LogEvent(logBuf, 0, 0, LOG_FILE); totalSentBytes += retVal; } else if (retVal == SOCKET_ERROR) { - LogEvent(_T("Echo: socket error"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"Echo: socket error", WSAGetLastError(), 0, LOG_ERROR); return FALSE; } else { /* Client closed connection before we could reply to all the data it sent, so quit early. */ - LogEvent(_T("Peer unexpectedly dropped connection!"), 0, 0, LOG_FILE); + LogEvent(L"Peer unexpectedly dropped connection!", 0, 0, LOG_FILE); return FALSE; } } } else if (readBytes == SOCKET_ERROR) { - LogEvent(_T("Echo: socket error"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"Echo: socket error", WSAGetLastError(), 0, LOG_ERROR); return FALSE; } } while ((readBytes != 0) && (!bShutdown)); if (!bShutdown) - LogEvent(_T("Echo: Connection closed by peer"), 0, 0, LOG_FILE); + LogEvent(L"Echo: Connection closed by peer", 0, 0, LOG_FILE); return TRUE; } @@ -73,22 +73,22 @@ if (!EchoIncomingPackets(sock)) { - LogEvent(_T("Echo: EchoIncomingPackets failed"), 0, 0, LOG_FILE); + LogEvent(L"Echo: EchoIncomingPackets failed", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("Echo: Shutting connection down"), 0, 0, LOG_FILE); + LogEvent(L"Echo: Shutting connection down", 0, 0, LOG_FILE); if (ShutdownConnection(sock, TRUE)) { - LogEvent(_T("Echo: Connection is down"), 0, 0, LOG_FILE); + LogEvent(L"Echo: Connection is down", 0, 0, LOG_FILE); } else { - LogEvent(_T("Echo: Connection shutdown failed"), 0, 0, LOG_FILE); + LogEvent(L"Echo: Connection shutdown failed", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("Echo: Terminating thread"), 0, 0, LOG_FILE); + LogEvent(L"Echo: Terminating thread", 0, 0, LOG_FILE); ExitThread(retVal); } Modified: trunk/reactos/base/services/tcpsvcs/log.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/tcpsvcs/log.…
============================================================================== --- trunk/reactos/base/services/tcpsvcs/log.c [iso-8859-1] (original) +++ trunk/reactos/base/services/tcpsvcs/log.c [iso-8859-1] Mon Sep 1 07:51:49 2008 @@ -11,31 +11,35 @@ #define DEBUG -static LPTSTR lpEventSource = _T("tcpsvcs"); -static LPCTSTR lpLogFileName = _T("C:\\tcpsvcs_log.log"); -static HANDLE hLogFile; +static LPWSTR lpEventSource = L"tcpsvcs"; +static LPCWSTR lpLogFileName = L"C:\\tcpsvcs_log.log"; +static HANDLE hLogFile = NULL; + +static BOOL bWaitingOnRead = FALSE; +static OVERLAPPED olWrite; + // needs work static VOID -LogToEventLog(LPCTSTR lpMsg, +LogToEventLog(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags) { HANDLE hEventLog; - hEventLog = RegisterEventSource(NULL, lpEventSource); + hEventLog = RegisterEventSourceW(NULL, lpEventSource); if (hEventLog) { - ReportEvent(hEventLog, - (flags & LOG_ERROR) ? EVENTLOG_ERROR_TYPE : EVENTLOG_SUCCESS, - 0, - 0, - NULL, - 1, - 0, - &lpMsg, - NULL); + ReportEventW(hEventLog, + (flags & LOG_ERROR) ? EVENTLOG_ERROR_TYPE : EVENTLOG_SUCCESS, + 0, + 0, + NULL, + 1, + 0, + &lpMsg, + NULL); CloseEventLog(hEventLog); } @@ -44,45 +48,45 @@ static BOOL OpenLogFile() { - hLogFile = CreateFile(lpLogFileName, - GENERIC_WRITE, - 0, - NULL, - OPEN_ALWAYS, - FILE_ATTRIBUTE_NORMAL, - NULL); - if (hLogFile == INVALID_HANDLE_VALUE) + hLogFile = CreateFileW(lpLogFileName, + GENERIC_WRITE, + 0, + NULL, + OPEN_ALWAYS, + FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, + NULL); + if (hLogFile == INVALID_HANDLE_VALUE) + { + hLogFile = NULL; return FALSE; + } return TRUE; } static VOID -LogToFile(LPCTSTR lpMsg, +LogToFile(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags) { - LPTSTR lpFullMsg = NULL; + LPWSTR lpFullMsg = NULL; DWORD msgLen; - if (!OpenLogFile()) - return; - - msgLen = _tcslen(lpMsg) + 1; + msgLen = wcslen(lpMsg) + 1; if (flags & LOG_ERROR) { LPVOID lpSysMsg; DWORD eMsgLen; - eMsgLen = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, - errNum, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR)&lpSysMsg, - 0, - NULL); + eMsgLen = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, + NULL, + errNum, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR)&lpSysMsg, + 0, + NULL); msgLen = msgLen + eMsgLen + 40; @@ -91,9 +95,9 @@ msgLen * sizeof(TCHAR)); if (lpFullMsg) { - _sntprintf(lpFullMsg, + _snwprintf(lpFullMsg, msgLen, - _T("%s : %s\tErrNum = %lu ExitCode = %lu\r\n"), + L"%s : %s\tErrNum = %lu ExitCode = %lu\r\n", lpMsg, lpSysMsg, errNum, @@ -112,9 +116,9 @@ msgLen * sizeof(TCHAR)); if (lpFullMsg) { - _sntprintf(lpFullMsg, + _snwprintf(lpFullMsg, msgLen, - _T("%s\r\n"), + L"%s\r\n", lpMsg); } } @@ -122,17 +126,50 @@ if (lpFullMsg) { DWORD bytesWritten; - - SetFilePointer(hLogFile, 0, NULL, FILE_END); - - WriteFile(hLogFile, - lpFullMsg, - _tcslen(lpFullMsg) * sizeof(TCHAR), - &bytesWritten, - NULL); - if (bytesWritten == 0) - { - LogToEventLog(_T("Failed to write to log file"), + DWORD dwRet; + BOOL bRet; + + bRet = WriteFile(hLogFile, + lpFullMsg, + wcslen(lpFullMsg) * sizeof(WCHAR), + &bytesWritten, + &olWrite); + if (!bRet) + { + if (GetLastError() != ERROR_IO_PENDING) + { + bRet = FALSE; + } + else + { + // Write is pending + dwRet = WaitForSingleObject(olWrite.hEvent, INFINITE); + + switch (dwRet) + { + // event has been signaled + case WAIT_OBJECT_0: + { + bRet = GetOverlappedResult(hLogFile, + &olWrite, + &bytesWritten, + FALSE); + break; + } + + default: + // An error has occurred in WaitForSingleObject. + // This usually indicates a problem with the + // OVERLAPPED structure's event handle. + bRet = FALSE; + break; + } + } + } + + if (!bRet || bytesWritten == 0) + { + LogToEventLog(L"Failed to write to log file", GetLastError(), 0, LOG_EVENTLOG | LOG_ERROR); @@ -143,8 +180,6 @@ lpFullMsg); } - CloseHandle(hLogFile); - if (exitCode > 0) ExitProcess(exitCode); } @@ -152,7 +187,7 @@ VOID -LogEvent(LPCTSTR lpMsg, +LogEvent(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags) @@ -165,39 +200,64 @@ LogToEventLog(lpMsg, errNum, exitCode, flags); } -VOID +BOOL InitLogging() { - WCHAR wcBom = 0xFEFF; - - DeleteFile(lpLogFileName); - -#ifdef _UNICODE - if (OpenLogFile()) - { - DWORD bytesWritten; - - WriteFile(hLogFile, - &wcBom, - sizeof(WCHAR), - &bytesWritten, - NULL); - if (bytesWritten == 0) - { - LogToEventLog(_T("Failed to write to log file"), - GetLastError(), - 0, - LOG_EVENTLOG | LOG_ERROR); - } - - CloseHandle(hLogFile); - } +#ifdef DEBUG + BOOL bRet = FALSE; + + ZeroMemory(&olWrite, sizeof(OVERLAPPED)); + olWrite.Offset = 0xFFFFFFFF; + olWrite.OffsetHigh = 0xFFFFFFFF; + olWrite.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + if (olWrite.hEvent) + { + DeleteFileW(lpLogFileName); + + if (OpenLogFile()) + { + WCHAR wcBom = 0xFEFF; + DWORD bytesWritten; + + bRet = WriteFile(hLogFile, + &wcBom, + sizeof(WCHAR), + &bytesWritten, + &olWrite); + if (!bRet) + { + if (GetLastError() != ERROR_IO_PENDING) + { + LogToEventLog(L"Failed to write to log file", + GetLastError(), + 0, + LOG_EVENTLOG | LOG_ERROR); + } + else + { + bRet = TRUE; + } + } + } + } + + return bRet; +#else + return TRUE; #endif } VOID UninitLogging() { - FlushFileBuffers(hLogFile); - CloseHandle(hLogFile); -} + if (hLogFile) + { + FlushFileBuffers(hLogFile); + CloseHandle(hLogFile); + } + + if (olWrite.hEvent) + { + CloseHandle(olWrite.hEvent); + } +} Modified: trunk/reactos/base/services/tcpsvcs/qotd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/tcpsvcs/qotd…
============================================================================== --- trunk/reactos/base/services/tcpsvcs/qotd.c [iso-8859-1] (original) +++ trunk/reactos/base/services/tcpsvcs/qotd.c [iso-8859-1] Mon Sep 1 07:51:49 2008 @@ -9,7 +9,7 @@ #include "tcpsvcs.h" -static LPCTSTR lpFilePath = _T("\\drivers\\etc\\quotes"); +static WCHAR szFilePath[] = L"\\drivers\\etc\\quotes"; static BOOL SendQuote(SOCKET sock, char* Quote) @@ -25,33 +25,33 @@ RetrieveQuote(SOCKET sock) { HANDLE hFile; - TCHAR lpFullPath[MAX_PATH + 20]; + WCHAR szFullPath[MAX_PATH + 20]; DWORD dwBytesRead; LPSTR lpQuotes; LPSTR lpStr; - DWORD quoteNum; - DWORD NumQuotes = 0; + INT quoteNum; + INT NumQuotes = 0; INT i; - if(!GetSystemDirectory(lpFullPath, MAX_PATH)) + if(!GetSystemDirectoryW(szFullPath, MAX_PATH)) { - LogEvent(_T("QOTD: Getting system path failed"), GetLastError(), 0, LOG_FILE); + LogEvent(L"QOTD: Getting system path failed", GetLastError(), 0, LOG_FILE); return FALSE; } - _tcscat(lpFullPath, lpFilePath); + wcscat(szFullPath, szFilePath); - LogEvent(_T("QOTD: Opening quotes file"), 0, 0, LOG_FILE); - hFile = CreateFile(lpFullPath, - GENERIC_READ, - 0, - NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - NULL); + LogEvent(L"QOTD: Opening quotes file", 0, 0, LOG_FILE); + hFile = CreateFileW(szFullPath, + GENERIC_READ, + 0, + NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + NULL); if (hFile == INVALID_HANDLE_VALUE) { - LogEvent(_T("QOTD: Error opening quotes file"), GetLastError(), 0, LOG_FILE); + LogEvent(L"QOTD: Error opening quotes file", GetLastError(), 0, LOG_FILE); } else { @@ -105,7 +105,7 @@ /* send the quote */ if (!SendQuote(sock, lpStart)) - LogEvent(_T("QOTD: Error sending data"), 0, 0, LOG_FILE); + LogEvent(L"QOTD: Error sending data", 0, 0, LOG_FILE); break; } else @@ -133,22 +133,22 @@ if (!RetrieveQuote(sock)) { - LogEvent(_T("QOTD: Error retrieving quote"), 0, 0, LOG_FILE); + LogEvent(L"QOTD: Error retrieving quote", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("QOTD: Shutting connection down"), 0, 0, LOG_FILE); + LogEvent(L"QOTD: Shutting connection down", 0, 0, LOG_FILE); if (ShutdownConnection(sock, FALSE)) { - LogEvent(_T("QOTD: Connection is down"), 0, 0, LOG_FILE); + LogEvent(L"QOTD: Connection is down", 0, 0, LOG_FILE); } else { - LogEvent(_T("QOTD: Connection shutdown failed"), 0, 0, LOG_FILE); - LogEvent(_T("QOTD: Terminating thread"), 0, 0, LOG_FILE); + LogEvent(L"QOTD: Connection shutdown failed", 0, 0, LOG_FILE); + LogEvent(L"QOTD: Terminating thread", 0, 0, LOG_FILE); retVal = 1; } - LogEvent(_T("QOTD: Terminating thread"), 0, 0, LOG_FILE); + LogEvent(L"QOTD: Terminating thread", 0, 0, LOG_FILE); ExitThread(retVal); } Modified: trunk/reactos/base/services/tcpsvcs/skelserver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/tcpsvcs/skel…
============================================================================== --- trunk/reactos/base/services/tcpsvcs/skelserver.c [iso-8859-1] (original) +++ trunk/reactos/base/services/tcpsvcs/skelserver.c [iso-8859-1] Mon Sep 1 07:51:49 2008 @@ -33,17 +33,17 @@ } else { - LogEvent(_T("listen() failed"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"listen() failed", WSAGetLastError(), 0, LOG_ERROR); } } else { - LogEvent(_T("bind() failed"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"bind() failed", WSAGetLastError(), 0, LOG_ERROR); } } else { - LogEvent(_T("socket() failed"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"socket() failed", WSAGetLastError(), 0, LOG_ERROR); } return bSetup ? sock : INVALID_SOCKET; @@ -53,14 +53,14 @@ static VOID AcceptConnections(SOCKET listeningSocket, LPTHREAD_START_ROUTINE lpService, - LPTSTR lpName) + LPWSTR lpName) { SOCKADDR_IN client; SOCKET sock; HANDLE hThread; TIMEVAL timeVal; FD_SET readFD; - TCHAR logBuf[256]; + WCHAR logBuf[256]; INT timeOut = 2000; timeVal.tv_sec = timeOut / 1000; @@ -83,14 +83,14 @@ sock = accept(listeningSocket, (SOCKADDR*)&client, &addrSize); if (sock != INVALID_SOCKET) { - _stprintf(logBuf, - _T("Accepted connection to %s server from %s:%d"), + _swprintf(logBuf, + L"Accepted connection to %s server from %S:%d", lpName, inet_ntoa(client.sin_addr), ntohs(client.sin_port)); LogEvent(logBuf, 0, 0, LOG_FILE); - _stprintf(logBuf, _T("Creating worker thread for %s"), lpName); + _swprintf(logBuf, L"Creating worker thread for %s", lpName); LogEvent(logBuf, 0, 0, LOG_FILE); if (!bShutdown) @@ -102,7 +102,7 @@ } else { - _stprintf(logBuf, _T("Failed to start worker thread for the %s server"), + _swprintf(logBuf, L"Failed to start worker thread for the %s server", lpName); LogEvent(logBuf, 0, 0, LOG_FILE); } @@ -110,13 +110,13 @@ } else { - LogEvent(_T("accept failed"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"accept failed", WSAGetLastError(), 0, LOG_ERROR); } } } else if (selRet == SOCKET_ERROR) { - LogEvent(_T("select failed"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"select failed", WSAGetLastError(), 0, LOG_ERROR); } } } @@ -125,14 +125,14 @@ ShutdownConnection(SOCKET sock, BOOL bRec) { - TCHAR logBuf[256]; + WCHAR logBuf[256]; /* Disallow any further data sends. This will tell the other side that we want to go away now. If we skip this step, we don't shut the connection down nicely. */ if (shutdown(sock, SD_SEND) == SOCKET_ERROR) { - LogEvent(_T("Error in shutdown()"), WSAGetLastError(), 0, LOG_ERROR); + LogEvent(L"Error in shutdown()", WSAGetLastError(), 0, LOG_ERROR); return FALSE; } @@ -148,7 +148,7 @@ ret = recv(sock, readBuffer, BUF, 0); if (ret >= 0) { - _stprintf(logBuf, _T("FYI, received %d unexpected bytes during shutdown"), ret); + _swprintf(logBuf, L"FYI, received %d unexpected bytes during shutdown", ret); LogEvent(logBuf, 0, 0, LOG_FILE); } } while (ret > 0); @@ -169,7 +169,7 @@ pServices = (PSERVICES)lpParam; - _stprintf(logBuf, _T("Starting %s server"), pServices->Name); + _swprintf(logBuf, L"Starting %s server", pServices->lpName); LogEvent(logBuf, 0, 0, LOG_FILE); if (!bShutdown) @@ -177,23 +177,23 @@ listeningSocket = SetUpListener(htons(pServices->Port)); if (!bShutdown && listeningSocket != INVALID_SOCKET) { - _stprintf(logBuf, - _T("%s is waiting for connections on port %d"), - pServices->Name, + _swprintf(logBuf, + L"%s is waiting for connections on port %d", + pServices->lpName, pServices->Port); LogEvent(logBuf, 0, 0, LOG_FILE); - AcceptConnections(listeningSocket, pServices->Service, pServices->Name); + AcceptConnections(listeningSocket, pServices->lpService, pServices->lpName); } else { - LogEvent(_T("Socket error when setting up listener"), 0, 0, LOG_FILE); + LogEvent(L"Socket error when setting up listener", 0, 0, LOG_FILE); } } - _stprintf(logBuf, - _T("Exiting %s thread"), - pServices->Name); + _swprintf(logBuf, + L"Exiting %s thread", + pServices->lpName); LogEvent(logBuf, 0, 0, LOG_FILE); ExitThread(0); } Modified: trunk/reactos/base/services/tcpsvcs/tcpsvcs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/tcpsvcs/tcps…
============================================================================== --- trunk/reactos/base/services/tcpsvcs/tcpsvcs.c [iso-8859-1] (original) +++ trunk/reactos/base/services/tcpsvcs/tcpsvcs.c [iso-8859-1] Mon Sep 1 07:51:49 2008 @@ -9,7 +9,7 @@ #include "tcpsvcs.h" -static LPTSTR ServiceName = _T("tcpsvcs"); +static WCHAR ServiceName[] = L"tcpsvcs"; volatile BOOL bShutdown = FALSE; volatile BOOL bPause = FALSE; @@ -23,11 +23,11 @@ static SERVICES Services[NUM_SERVICES] = { - {ECHO_PORT, _T("Echo"), EchoHandler}, - {DISCARD_PORT, _T("Discard"), DiscardHandler}, - {DAYTIME_PORT, _T("Daytime"), DaytimeHandler}, - {QOTD_PORT, _T("QOTD"), QotdHandler}, - {CHARGEN_PORT, _T("Chargen"), ChargenHandler} + {ECHO_PORT, L"Echo", EchoHandler}, + {DISCARD_PORT, L"Discard", DiscardHandler}, + {DAYTIME_PORT, L"Daytime", DaytimeHandler}, + {QOTD_PORT, L"QOTD", QotdHandler}, + {CHARGEN_PORT, L"Chargen", ChargenHandler} }; @@ -36,7 +36,7 @@ DWORD NewStatus, DWORD Check) { - TCHAR szSet[50]; + WCHAR szSet[50]; if (Check > 0) pServInfo->servStatus.dwCheckPoint += Check; @@ -46,15 +46,15 @@ if (NewStatus > 0) pServInfo->servStatus.dwCurrentState = NewStatus; - _sntprintf(szSet, + _snwprintf(szSet, 49, - _T("Service state 0x%lu, CheckPoint %lu"), + L"Service state 0x%lu, CheckPoint %lu", pServInfo->servStatus.dwCurrentState, pServInfo->servStatus.dwCheckPoint); LogEvent(szSet, 0, 0, LOG_FILE); if (!SetServiceStatus(pServInfo->hStatus, &pServInfo->servStatus)) - LogEvent(_T("Cannot set service status"), GetLastError(), 0, LOG_ALL); + LogEvent(L"Cannot set service status", GetLastError(), 0, LOG_ALL); } @@ -64,25 +64,25 @@ DWORD dwThreadId[NUM_SERVICES]; HANDLE hThread[NUM_SERVICES]; WSADATA wsaData; - TCHAR buf[256]; + WCHAR buf[256]; INT i; DWORD RetVal; if ((RetVal = WSAStartup(MAKEWORD(2, 2), &wsaData)) != 0) { - _stprintf(buf, _T("WSAStartup() failed : %lu\n"), RetVal); + _swprintf(buf, L"WSAStartup() failed : %lu\n", RetVal); LogEvent(buf, 0, 100, LOG_ALL); return FALSE; } UpdateStatus(pServInfo, 0, 1); - LogEvent(_T("\nCreating server Threads"), 0, 0, LOG_FILE); + LogEvent(L"\nCreating server Threads", 0, 0, LOG_FILE); /* Create worker threads. */ - for(i = 0; i < NUM_SERVICES; i++) - { - _stprintf(buf, _T("Creating thread for %s server"), Services[i].Name); + for (i = 0; i < NUM_SERVICES; i++) + { + _swprintf(buf, L"Creating thread for %s server", Services[i].lpName); LogEvent(buf, 0, 0, LOG_FILE); hThread[i] = CreateThread(NULL, @@ -94,26 +94,26 @@ if (hThread[i] == NULL) { - _stprintf(buf, _T("\nFailed to start %s server\n"), Services[i].Name); + _swprintf(buf, L"\nFailed to start %s server\n", Services[i].lpName); LogEvent(buf, GetLastError(), 0, LOG_ALL); } UpdateStatus(pServInfo, 0, 1); } - LogEvent(_T("Setting service status to running"), 0, 0, LOG_FILE); + LogEvent(L"Setting service status to running", 0, 0, LOG_FILE); UpdateStatus(pServInfo, SERVICE_RUNNING, 0); /* Wait until all threads have terminated. */ WaitForMultipleObjects(NUM_SERVICES, hThread, TRUE, INFINITE); - for(i = 0; i < NUM_SERVICES; i++) + for (i = 0; i < NUM_SERVICES; i++) { if (hThread[i] != NULL) CloseHandle(hThread[i]); } - LogEvent(_T("Detaching Winsock2"), 0, 0, LOG_FILE); + LogEvent(L"Detaching Winsock2", 0, 0, LOG_FILE); WSACleanup(); return 0; @@ -131,7 +131,7 @@ { case SERVICE_CONTROL_SHUTDOWN: case SERVICE_CONTROL_STOP: - LogEvent(_T("\nSetting the service to SERVICE_STOP_PENDING"), 0, 0, LOG_FILE); + LogEvent(L"\nSetting the service to SERVICE_STOP_PENDING", 0, 0, LOG_FILE); InterlockedExchange((LONG *)&bShutdown, TRUE); pServInfo->servStatus.dwWin32ExitCode = 0; pServInfo->servStatus.dwWaitHint = 0; @@ -139,13 +139,13 @@ break; case SERVICE_CONTROL_PAUSE: /* not yet implemented */ - LogEvent(_T("Setting the service to SERVICE_PAUSED"), 0, 0, LOG_FILE); + LogEvent(L"Setting the service to SERVICE_PAUSED", 0, 0, LOG_FILE); InterlockedExchange((LONG *)&bPause, TRUE); UpdateStatus(pServInfo, SERVICE_PAUSED, 0); break; case SERVICE_CONTROL_CONTINUE: - LogEvent(_T("Setting the service to SERVICE_RUNNING"), 0, 0, LOG_FILE); + LogEvent(L"Setting the service to SERVICE_RUNNING", 0, 0, LOG_FILE); InterlockedExchange((LONG *)&bPause, FALSE); UpdateStatus(pServInfo, SERVICE_RUNNING, 0); break; @@ -155,19 +155,19 @@ default: if (dwControl > 127 && dwControl < 256) /* user defined */ - LogEvent(_T("User defined control code"), 0, 0, LOG_FILE); + LogEvent(L"User defined control code", 0, 0, LOG_FILE); else - LogEvent(_T("ERROR: Bad control code"), 0, 0, LOG_FILE); + LogEvent(L"ERROR: Bad control code", 0, 0, LOG_FILE); break; } } VOID WINAPI -ServiceMain(DWORD argc, LPTSTR argv[]) +ServiceMain(DWORD argc, LPWSTR argv[]) { SERVICEINFO servInfo; - LogEvent (_T("Entering ServiceMain."), 0, 0, LOG_FILE); + LogEvent(L"Entering ServiceMain.", 0, 0, LOG_FILE); servInfo.servStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS; servInfo.servStatus.dwCurrentState = SERVICE_STOPPED; @@ -177,12 +177,12 @@ servInfo.servStatus.dwCheckPoint = 0; servInfo.servStatus.dwWaitHint = 2 * CS_TIMEOUT; - LogEvent(_T("Registering service control handler"), 0, 0, LOG_FILE); - servInfo.hStatus = RegisterServiceCtrlHandlerEx(ServiceName, - (LPHANDLER_FUNCTION_EX)ServerCtrlHandler, - &servInfo); + LogEvent(L"Registering service control handler", 0, 0, LOG_FILE); + servInfo.hStatus = RegisterServiceCtrlHandlerExW(ServiceName, + (LPHANDLER_FUNCTION_EX)ServerCtrlHandler, + &servInfo); if (!servInfo.hStatus) - LogEvent(_T("Failed to register service\n"), GetLastError(), 100, LOG_ALL); + LogEvent(L"Failed to register service", GetLastError(), 100, LOG_ALL); UpdateStatus(&servInfo, SERVICE_START_PENDING, 1); @@ -193,27 +193,28 @@ return; } - LogEvent(_T("Service threads shut down. Set SERVICE_STOPPED status"), 0, 0, LOG_FILE); + LogEvent(L"Service threads shut down. Set SERVICE_STOPPED status", 0, 0, LOG_FILE); UpdateStatus(&servInfo, SERVICE_STOPPED, 0); - LogEvent(_T("Leaving ServiceMain\n"), 0, 0, LOG_FILE); + LogEvent(L"Leaving ServiceMain\n", 0, 0, LOG_FILE); } int _tmain (int argc, LPTSTR argv []) { - SERVICE_TABLE_ENTRY ServiceTable[] = + SERVICE_TABLE_ENTRYW ServiceTable[] = { {ServiceName, ServiceMain}, {NULL, NULL } }; - InitLogging(); - - if (!StartServiceCtrlDispatcher(ServiceTable)) - LogEvent(_T("failed to start the service control dispatcher"), GetLastError(), 101, LOG_ALL); - - UninitLogging(); + if (InitLogging()) + { + if (!StartServiceCtrlDispatcherW(ServiceTable)) + LogEvent(L"failed to start the service control dispatcher", GetLastError(), 101, LOG_ALL); + + UninitLogging(); + } return 0; } Modified: trunk/reactos/base/services/tcpsvcs/tcpsvcs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/tcpsvcs/tcps…
============================================================================== --- trunk/reactos/base/services/tcpsvcs/tcpsvcs.h [iso-8859-1] (original) +++ trunk/reactos/base/services/tcpsvcs/tcpsvcs.h [iso-8859-1] Mon Sep 1 07:51:49 2008 @@ -2,6 +2,10 @@ #include <winsock2.h> #include <tchar.h> #include <time.h> + +#ifndef _MSC_VER +#define _swprintf swprintf +#endif #define LOG_FILE 1 #define LOG_EVENTLOG 2 @@ -20,19 +24,20 @@ /* data structure to pass to threads */ -typedef struct _Services { +typedef struct _Services +{ USHORT Port; - TCHAR *Name; - LPTHREAD_START_ROUTINE Service; + LPWSTR lpName; + LPTHREAD_START_ROUTINE lpService; } SERVICES, *PSERVICES; extern volatile BOOL bShutdown; extern volatile BOOL bPause; /* logging functions */ -VOID InitLogging(); +BOOL InitLogging(); VOID UninitLogging(); -VOID LogEvent(LPCTSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags); +VOID LogEvent(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags); /* skelserver functions */ DWORD WINAPI StartServer(LPVOID lpParam);
16 years, 3 months
1
0
0
0
← Newer
1
...
71
72
73
74
75
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
68
69
70
71
72
73
74
75
Results per page:
10
25
50
100
200