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 2011
----- 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
20 participants
399 discussions
Start a n
N
ew thread
[ekohl] 53630: [RPCTR4] - Take NetworkAddr into account when a named pipe client is opened. - Return RPC_S_SERVER_UNAVAILABLE when an attempt to create a named pipe client fails with an ERROR_BAD_N...
by ekohl@svn.reactos.org
Author: ekohl Date: Wed Sep 7 20:11:19 2011 New Revision: 53630 URL:
http://svn.reactos.org/svn/reactos?rev=53630&view=rev
Log: [RPCTR4] - Take NetworkAddr into account when a named pipe client is opened. - Return RPC_S_SERVER_UNAVAILABLE when an attempt to create a named pipe client fails with an ERROR_BAD_NETPATH error. This fixes the first test failure in the advapi32 service winetest. Modified: trunk/reactos/dll/win32/rpcrt4/rpc_transport.c Modified: trunk/reactos/dll/win32/rpcrt4/rpc_transport.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpc_trans…
============================================================================== --- trunk/reactos/dll/win32/rpcrt4/rpc_transport.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/rpcrt4/rpc_transport.c [iso-8859-1] Wed Sep 7 20:11:19 2011 @@ -224,6 +224,9 @@ if (err == ERROR_PIPE_BUSY) { TRACE("connection failed, error=%x\n", err); return RPC_S_SERVER_TOO_BUSY; + } else if (err == ERROR_BAD_NETPATH) { + TRACE("connection failed, error=%x\n", err); + return RPC_S_SERVER_UNAVAILABLE; } if (!wait || !WaitNamedPipeA(pname, NMPWAIT_WAIT_FOREVER)) { err = GetLastError(); @@ -305,17 +308,31 @@ static RPC_STATUS rpcrt4_ncacn_np_open(RpcConnection* Connection) { RpcConnection_np *npc = (RpcConnection_np *) Connection; - static const char prefix[] = "\\\\."; + static const char prefix[] = "\\\\"; + static const char local[] ="."; RPC_STATUS r; LPSTR pname; + INT size; /* already connected? */ if (npc->pipe) return RPC_S_OK; /* protseq=ncacn_np: named pipes */ - pname = I_RpcAllocate(strlen(prefix) + strlen(Connection->Endpoint) + 1); - strcat(strcpy(pname, prefix), Connection->Endpoint); + size = strlen(prefix); + if (Connection->NetworkAddr == NULL || strlen(Connection->NetworkAddr) == 0) + size += strlen(local); + else + size += strlen(Connection->NetworkAddr); + size += strlen(Connection->Endpoint) + 1; + + pname = I_RpcAllocate(size); + strcpy(pname, prefix); + if (Connection->NetworkAddr == NULL || strlen(Connection->NetworkAddr) == 0) + strcat(pname, local); + else + strcat(pname, Connection->NetworkAddr); + strcat(pname, Connection->Endpoint); r = rpcrt4_conn_open_pipe(Connection, pname, TRUE); I_RpcFree(pname);
13 years, 3 months
1
0
0
0
[cmihail] 53629: [shell32.dll] - More uninitialized value fixing. Again Amine Khaldi spotting them with his magical powers. - I took the liberty to convert tabs I found to spaces. Normally I should...
by cmihail@svn.reactos.org
Author: cmihail Date: Wed Sep 7 20:00:32 2011 New Revision: 53629 URL:
http://svn.reactos.org/svn/reactos?rev=53629&view=rev
Log: [shell32.dll] - More uninitialized value fixing. Again Amine Khaldi spotting them with his magical powers. - I took the liberty to convert tabs I found to spaces. Normally I shouldn't mix formatting with coding changes but I forgot. Sorry. Modified: branches/shell32_new-bringup/dll/win32/shell32/autocomplete.cpp branches/shell32_new-bringup/dll/win32/shell32/she_ocmenu.cpp branches/shell32_new-bringup/dll/win32/shell32/shfldr_desktop.cpp branches/shell32_new-bringup/dll/win32/shell32/shfldr_fonts.cpp branches/shell32_new-bringup/dll/win32/shell32/shfldr_mydocuments.cpp Modified: branches/shell32_new-bringup/dll/win32/shell32/autocomplete.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/dll/win32/s…
============================================================================== --- branches/shell32_new-bringup/dll/win32/shell32/autocomplete.cpp [iso-8859-1] (original) +++ branches/shell32_new-bringup/dll/win32/shell32/autocomplete.cpp [iso-8859-1] Wed Sep 7 20:00:32 2011 @@ -51,6 +51,7 @@ txtbackup = NULL; quickComplete = NULL; hwndEdit = NULL; + wpOrigLBoxProc = NULL; } /************************************************************************** Modified: branches/shell32_new-bringup/dll/win32/shell32/she_ocmenu.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/dll/win32/s…
============================================================================== --- branches/shell32_new-bringup/dll/win32/shell32/she_ocmenu.cpp [iso-8859-1] (original) +++ branches/shell32_new-bringup/dll/win32/shell32/she_ocmenu.cpp [iso-8859-1] Wed Sep 7 20:00:32 2011 @@ -68,6 +68,7 @@ COpenWithMenu::COpenWithMenu() { count = 0; + wId = 0; } COpenWithMenu::~COpenWithMenu() Modified: branches/shell32_new-bringup/dll/win32/shell32/shfldr_desktop.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/dll/win32/s…
============================================================================== --- branches/shell32_new-bringup/dll/win32/shell32/shfldr_desktop.cpp [iso-8859-1] (original) +++ branches/shell32_new-bringup/dll/win32/shell32/shfldr_desktop.cpp [iso-8859-1] Wed Sep 7 20:00:32 2011 @@ -48,18 +48,18 @@ class CDesktopFolder; class CDesktopFolderEnum : - public IEnumIDListImpl + public IEnumIDListImpl { private: -// CComPtr fDesktopEnumerator; -// CComPtr fCommonDesktopEnumerator; +// CComPtr fDesktopEnumerator; +// CComPtr fCommonDesktopEnumerator; public: - CDesktopFolderEnum(); - ~CDesktopFolderEnum(); - HRESULT WINAPI Initialize(CDesktopFolder *desktopFolder, HWND hwndOwner, DWORD dwFlags); + CDesktopFolderEnum(); + ~CDesktopFolderEnum(); + HRESULT WINAPI Initialize(CDesktopFolder *desktopFolder, HWND hwndOwner, DWORD dwFlags); BEGIN_COM_MAP(CDesktopFolderEnum) - COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) + COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) END_COM_MAP() }; @@ -145,125 +145,126 @@ /* enumerate the root folders */ if (dwFlags & SHCONTF_FOLDERS) { - HKEY hkey; - UINT i; - DWORD dwResult; - - /* create the pidl for This item */ - if (IsNamespaceExtensionHidden(MyDocumentsClassString) < 1) - { - ret = AddToEnumList(_ILCreateMyDocuments()); - } - ret = AddToEnumList(_ILCreateMyComputer()); - - for (i = 0; i < 2; i++) - { - if (i == 0) - dwResult = RegOpenKeyExW(HKEY_LOCAL_MACHINE, Desktop_NameSpaceW, 0, KEY_READ, &hkey); - else - dwResult = RegOpenKeyExW(HKEY_CURRENT_USER, Desktop_NameSpaceW, 0, KEY_READ, &hkey); - - if (dwResult == ERROR_SUCCESS) - { - WCHAR iid[50]; - LPITEMIDLIST pidl; - int i=0; - - while (ret) - { - DWORD size; - LONG r; - - size = sizeof (iid) / sizeof (iid[0]); - r = RegEnumKeyExW(hkey, i, iid, &size, 0, NULL, NULL, NULL); - if (ERROR_SUCCESS == r) - { - if (IsNamespaceExtensionHidden(iid) < 1) - { - pidl = _ILCreateGuidFromStrW(iid); - if (pidl != NULL) - { - if (!HasItemWithCLSID(pidl)) - { - ret = AddToEnumList(pidl); - } - else - { - SHFree(pidl); - } - } - } - } - else if (ERROR_NO_MORE_ITEMS == r) - break; - else - ret = FALSE; - i++; - } - RegCloseKey(hkey); - } - } - for (i = 0; i < 2; i++) - { - if (i == 0) - dwResult = RegOpenKeyExW(HKEY_LOCAL_MACHINE, ClassicStartMenuW, 0, KEY_READ, &hkey); - else - dwResult = RegOpenKeyExW(HKEY_CURRENT_USER, ClassicStartMenuW, 0, KEY_READ, &hkey); - - if (dwResult == ERROR_SUCCESS) - { - DWORD j = 0, dwVal, Val, dwType, dwIID; - LONG r; - WCHAR iid[50]; - - while(ret) - { - dwVal = sizeof(Val); - dwIID = sizeof(iid) / sizeof(WCHAR); - - r = RegEnumValueW(hkey, j++, iid, &dwIID, NULL, &dwType, (LPBYTE)&Val, &dwVal); - if (r == ERROR_SUCCESS) - { - if (Val == 0 && dwType == REG_DWORD) - { - LPITEMIDLIST pidl = _ILCreateGuidFromStrW(iid); - if (pidl != NULL) - { - if (!HasItemWithCLSID(pidl)) - { - AddToEnumList(pidl); - } - else - { - SHFree(pidl); - } - } - } - } - else if (ERROR_NO_MORE_ITEMS == r) - break; - else - ret = FALSE; - } - RegCloseKey(hkey); - } - - } - } - - /* enumerate the elements in %windir%\desktop */ - ret = ret && SHGetSpecialFolderPathW(0, szPath, CSIDL_DESKTOPDIRECTORY, FALSE); - ret = ret && CreateFolderEnumList(szPath, dwFlags); + HKEY hkey; + UINT i; + DWORD dwResult; + + /* create the pidl for This item */ + if (IsNamespaceExtensionHidden(MyDocumentsClassString) < 1) + { + ret = AddToEnumList(_ILCreateMyDocuments()); + } + ret = AddToEnumList(_ILCreateMyComputer()); + + for (i = 0; i < 2; i++) + { + if (i == 0) + dwResult = RegOpenKeyExW(HKEY_LOCAL_MACHINE, Desktop_NameSpaceW, 0, KEY_READ, &hkey); + else + dwResult = RegOpenKeyExW(HKEY_CURRENT_USER, Desktop_NameSpaceW, 0, KEY_READ, &hkey); + + if (dwResult == ERROR_SUCCESS) + { + WCHAR iid[50]; + LPITEMIDLIST pidl; + int i=0; + + while (ret) + { + DWORD size; + LONG r; + + size = sizeof (iid) / sizeof (iid[0]); + r = RegEnumKeyExW(hkey, i, iid, &size, 0, NULL, NULL, NULL); + if (ERROR_SUCCESS == r) + { + if (IsNamespaceExtensionHidden(iid) < 1) + { + pidl = _ILCreateGuidFromStrW(iid); + if (pidl != NULL) + { + if (!HasItemWithCLSID(pidl)) + { + ret = AddToEnumList(pidl); + } + else + { + SHFree(pidl); + } + } + } + } + else if (ERROR_NO_MORE_ITEMS == r) + break; + else + ret = FALSE; + i++; + } + RegCloseKey(hkey); + } + } + for (i = 0; i < 2; i++) + { + if (i == 0) + dwResult = RegOpenKeyExW(HKEY_LOCAL_MACHINE, ClassicStartMenuW, 0, KEY_READ, &hkey); + else + dwResult = RegOpenKeyExW(HKEY_CURRENT_USER, ClassicStartMenuW, 0, KEY_READ, &hkey); + + if (dwResult == ERROR_SUCCESS) + { + DWORD j = 0, dwVal, Val, dwType, dwIID; + LONG r; + WCHAR iid[50]; + + while(ret) + { + dwVal = sizeof(Val); + dwIID = sizeof(iid) / sizeof(WCHAR); + + r = RegEnumValueW(hkey, j++, iid, &dwIID, NULL, &dwType, (LPBYTE)&Val, &dwVal); + if (r == ERROR_SUCCESS) + { + if (Val == 0 && dwType == REG_DWORD) + { + LPITEMIDLIST pidl = _ILCreateGuidFromStrW(iid); + if (pidl != NULL) + { + if (!HasItemWithCLSID(pidl)) + { + AddToEnumList(pidl); + } + else + { + SHFree(pidl); + } + } + } + } + else if (ERROR_NO_MORE_ITEMS == r) + break; + else + ret = FALSE; + } + RegCloseKey(hkey); + } + + } + } + + /* enumerate the elements in %windir%\desktop */ + ret = ret && SHGetSpecialFolderPathW(0, szPath, CSIDL_DESKTOPDIRECTORY, FALSE); + ret = ret && CreateFolderEnumList(szPath, dwFlags); ret = ret && SHGetSpecialFolderPathW(0, szPath, CSIDL_COMMON_DESKTOPDIRECTORY, FALSE); ret = ret && CreateFolderEnumList(szPath, dwFlags); - return ret ? S_OK : E_FAIL; + return ret ? S_OK : E_FAIL; } CDesktopFolder::CDesktopFolder() { pidlRoot = NULL; + sPathTarget = NULL; } CDesktopFolder::~CDesktopFolder() @@ -272,7 +273,7 @@ HRESULT WINAPI CDesktopFolder::FinalConstruct() { - WCHAR szMyPath[MAX_PATH]; + WCHAR szMyPath[MAX_PATH]; if (!SHGetSpecialFolderPathW( 0, szMyPath, CSIDL_DESKTOPDIRECTORY, TRUE )) return E_UNEXPECTED; @@ -280,7 +281,7 @@ pidlRoot = _ILCreateDesktop(); /* my qualified pidl */ sPathTarget = (LPWSTR)SHAlloc((wcslen(szMyPath) + 1) * sizeof(WCHAR)); wcscpy(sPathTarget, szMyPath); - return S_OK; + return S_OK; } /************************************************************************** @@ -390,37 +391,37 @@ */ HRESULT WINAPI CDesktopFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) { - CComObject<CDesktopFolderEnum> *theEnumerator; - CComPtr<IEnumIDList> result; - HRESULT hResult; - - TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList); + CComObject<CDesktopFolderEnum> *theEnumerator; + CComPtr<IEnumIDList> result; + HRESULT hResult; + + TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList); DbgPrint("[shell32, CDesktopFolder::EnumObjects] Called with flags = %d\n", dwFlags); - if (ppEnumIDList == NULL) - return E_POINTER; - *ppEnumIDList = NULL; - + if (ppEnumIDList == NULL) + return E_POINTER; + *ppEnumIDList = NULL; + ATLTRY (theEnumerator = new CComObject<CDesktopFolderEnum>); - + if (theEnumerator == NULL) - return E_OUTOFMEMORY; - + return E_OUTOFMEMORY; + hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result); - if (FAILED (hResult)) - { - delete theEnumerator; - return hResult; - } - + if (FAILED (hResult)) + { + delete theEnumerator; + return hResult; + } + hResult = theEnumerator->Initialize (this, hwndOwner, dwFlags); - if (FAILED (hResult)) - return hResult; - *ppEnumIDList = result.Detach (); + if (FAILED (hResult)) + return hResult; + *ppEnumIDList = result.Detach (); TRACE ("-- (%p)->(new ID List: %p)\n", this, *ppEnumIDList); - return S_OK; + return S_OK; } /************************************************************************** @@ -464,7 +465,7 @@ */ HRESULT WINAPI CDesktopFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) { - CComPtr<IShellView> pShellView; + CComPtr<IShellView> pShellView; HRESULT hr = E_INVALIDARG; TRACE ("(%p)->(hwnd=%p,%s,%p)\n", @@ -794,7 +795,7 @@ HRESULT WINAPI CDesktopFolder::SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, /* simple pidl */ LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut) { - CComPtr<IShellFolder2> psf; + CComPtr<IShellFolder2> psf; HRESULT hr; WCHAR szSrc[MAX_PATH + 1], szDest[MAX_PATH + 1]; LPWSTR ptr; @@ -984,7 +985,7 @@ HRESULT WINAPI CDesktopFolder::GetUniqueName(LPWSTR pwszName, UINT uLen) { - CComPtr<IEnumIDList> penum; + CComPtr<IEnumIDList> penum; HRESULT hr; WCHAR wszText[MAX_PATH]; WCHAR wszNewFolder[25]; @@ -1149,7 +1150,7 @@ HRESULT WINAPI CDesktopFolder::CopyItems(IShellFolder *pSFFrom, UINT cidl, LPCITEMIDLIST *apidl) { - CComPtr<IPersistFolder2> ppf2; + CComPtr<IPersistFolder2> ppf2; WCHAR szSrcPath[MAX_PATH]; WCHAR szTargetPath[MAX_PATH]; SHFILEOPSTRUCTW op; Modified: branches/shell32_new-bringup/dll/win32/shell32/shfldr_fonts.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/dll/win32/s…
============================================================================== --- branches/shell32_new-bringup/dll/win32/shell32/shfldr_fonts.cpp [iso-8859-1] (original) +++ branches/shell32_new-bringup/dll/win32/shell32/shfldr_fonts.cpp [iso-8859-1] Wed Sep 7 20:00:32 2011 @@ -35,17 +35,17 @@ */ class CDesktopFolderEnumZ : - public IEnumIDListImpl + public IEnumIDListImpl { private: public: - CDesktopFolderEnumZ(); - ~CDesktopFolderEnumZ(); - HRESULT WINAPI Initialize(DWORD dwFlags); - BOOL CreateFontsEnumList(DWORD dwFlags); + CDesktopFolderEnumZ(); + ~CDesktopFolderEnumZ(); + HRESULT WINAPI Initialize(DWORD dwFlags); + BOOL CreateFontsEnumList(DWORD dwFlags); BEGIN_COM_MAP(CDesktopFolderEnumZ) - COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) + COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) END_COM_MAP() }; @@ -74,47 +74,47 @@ HRESULT WINAPI CDesktopFolderEnumZ::Initialize(DWORD dwFlags) { if (CreateFontsEnumList(dwFlags) == FALSE) - return E_FAIL; - return S_OK; + return E_FAIL; + return S_OK; } static LPITEMIDLIST _ILCreateFontItem(LPWSTR pszFont, LPWSTR pszFile) { - PIDLDATA tmp; - LPITEMIDLIST pidl; - PIDLFontStruct * p; - int size0 = (char*)&tmp.u.cfont.szName-(char*)&tmp.u.cfont; - int size = size0; - - tmp.type = 0x00; - tmp.u.cfont.dummy = 0xFF; - tmp.u.cfont.offsFile = wcslen(pszFont) + 1; - - size += (tmp.u.cfont.offsFile + wcslen(pszFile) + 1) * sizeof(WCHAR); - - pidl = (LPITEMIDLIST)SHAlloc(size + 4); - if (!pidl) - return pidl; - - pidl->mkid.cb = size+2; - memcpy(pidl->mkid.abID, &tmp, 2+size0); - - p = &((PIDLDATA*)pidl->mkid.abID)->u.cfont; - wcscpy(p->szName, pszFont); - wcscpy(p->szName + tmp.u.cfont.offsFile, pszFile); - - *(WORD*)((char*)pidl+(size+2)) = 0; - return pidl; + PIDLDATA tmp; + LPITEMIDLIST pidl; + PIDLFontStruct * p; + int size0 = (char*)&tmp.u.cfont.szName-(char*)&tmp.u.cfont; + int size = size0; + + tmp.type = 0x00; + tmp.u.cfont.dummy = 0xFF; + tmp.u.cfont.offsFile = wcslen(pszFont) + 1; + + size += (tmp.u.cfont.offsFile + wcslen(pszFile) + 1) * sizeof(WCHAR); + + pidl = (LPITEMIDLIST)SHAlloc(size + 4); + if (!pidl) + return pidl; + + pidl->mkid.cb = size+2; + memcpy(pidl->mkid.abID, &tmp, 2+size0); + + p = &((PIDLDATA*)pidl->mkid.abID)->u.cfont; + wcscpy(p->szName, pszFont); + wcscpy(p->szName + tmp.u.cfont.offsFile, pszFile); + + *(WORD*)((char*)pidl+(size+2)) = 0; + return pidl; } static PIDLFontStruct * _ILGetFontStruct(LPCITEMIDLIST pidl) { - LPPIDLDATA pdata = _ILGetDataPointer(pidl); - - if (pdata && pdata->type==0x00) - return (PIDLFontStruct*)&(pdata->u.cfont); - - return NULL; + LPPIDLDATA pdata = _ILGetDataPointer(pidl); + + if (pdata && pdata->type==0x00) + return (PIDLFontStruct*)&(pdata->u.cfont); + + return NULL; } /************************************************************************** @@ -122,77 +122,78 @@ */ BOOL CDesktopFolderEnumZ::CreateFontsEnumList(DWORD dwFlags) { - WCHAR szPath[MAX_PATH]; - WCHAR szName[LF_FACESIZE+20]; - WCHAR szFile[MAX_PATH]; - LPWSTR pszPath; - UINT Length; - LONG ret; - DWORD dwType, dwName, dwFile, dwIndex; - LPITEMIDLIST pidl; - HKEY hKey; - - if (dwFlags & SHCONTF_NONFOLDERS) - { - if (!SHGetSpecialFolderPathW(NULL, szPath, CSIDL_FONTS, FALSE)) - return FALSE; - - pszPath = PathAddBackslashW(szPath); - if (!pszPath) - return FALSE; - if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts", 0, KEY_READ, &hKey)!= ERROR_SUCCESS) - return FALSE; - - Length = pszPath - szPath; - dwIndex = 0; - do - { - dwName = sizeof(szName)/sizeof(WCHAR); - dwFile = sizeof(szFile)/sizeof(WCHAR); - ret = RegEnumValueW(hKey, dwIndex++, szName, &dwName, NULL, &dwType, (LPBYTE)szFile, &dwFile); - if (ret == ERROR_SUCCESS) - { - szFile[(sizeof(szFile)/sizeof(WCHAR))-1] = L'\0'; - if (dwType == REG_SZ && wcslen(szFile) + Length + 1< (sizeof(szPath)/sizeof(WCHAR))) - { - wcscpy(&szPath[Length], szFile); - pidl = _ILCreateFontItem(szName, szPath); - TRACE("pidl %p name %s path %s\n", pidl, debugstr_w(szName), debugstr_w(szPath)); - if (pidl) - { - if (!AddToEnumList(pidl)) - SHFree(pidl); - } - } - } - }while(ret != ERROR_NO_MORE_ITEMS); - RegCloseKey(hKey); - - } - return TRUE; + WCHAR szPath[MAX_PATH]; + WCHAR szName[LF_FACESIZE+20]; + WCHAR szFile[MAX_PATH]; + LPWSTR pszPath; + UINT Length; + LONG ret; + DWORD dwType, dwName, dwFile, dwIndex; + LPITEMIDLIST pidl; + HKEY hKey; + + if (dwFlags & SHCONTF_NONFOLDERS) + { + if (!SHGetSpecialFolderPathW(NULL, szPath, CSIDL_FONTS, FALSE)) + return FALSE; + + pszPath = PathAddBackslashW(szPath); + if (!pszPath) + return FALSE; + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts", 0, KEY_READ, &hKey)!= ERROR_SUCCESS) + return FALSE; + + Length = pszPath - szPath; + dwIndex = 0; + do + { + dwName = sizeof(szName)/sizeof(WCHAR); + dwFile = sizeof(szFile)/sizeof(WCHAR); + ret = RegEnumValueW(hKey, dwIndex++, szName, &dwName, NULL, &dwType, (LPBYTE)szFile, &dwFile); + if (ret == ERROR_SUCCESS) + { + szFile[(sizeof(szFile)/sizeof(WCHAR))-1] = L'\0'; + if (dwType == REG_SZ && wcslen(szFile) + Length + 1< (sizeof(szPath)/sizeof(WCHAR))) + { + wcscpy(&szPath[Length], szFile); + pidl = _ILCreateFontItem(szName, szPath); + TRACE("pidl %p name %s path %s\n", pidl, debugstr_w(szName), debugstr_w(szPath)); + if (pidl) + { + if (!AddToEnumList(pidl)) + SHFree(pidl); + } + } + } + }while(ret != ERROR_NO_MORE_ITEMS); + RegCloseKey(hKey); + + } + return TRUE; } CFontsFolder::CFontsFolder() { pidlRoot = NULL; + apidl = NULL; } CFontsFolder::~CFontsFolder() { - TRACE("-- destroying IShellFolder(%p)\n", this); - SHFree(pidlRoot); + TRACE("-- destroying IShellFolder(%p)\n", this); + SHFree(pidlRoot); } HRESULT WINAPI CFontsFolder::FinalConstruct() { - pidlRoot = _ILCreateFont(); /* my qualified pidl */ - if (pidlRoot == NULL) - return E_OUTOFMEMORY; - return S_OK; -} - -/************************************************************************** -* ISF_Fonts_fnParseDisplayName + pidlRoot = _ILCreateFont(); /* my qualified pidl */ + if (pidlRoot == NULL) + return E_OUTOFMEMORY; + return S_OK; +} + +/************************************************************************** +* ISF_Fonts_fnParseDisplayName */ HRESULT WINAPI CFontsFolder::ParseDisplayName(HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName, DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) @@ -205,7 +206,7 @@ *ppidl = 0; if (pchEaten) - *pchEaten = 0; /* strange but like the original */ + *pchEaten = 0; /* strange but like the original */ TRACE ("(%p)->(-- ret=0x%08x)\n", this, hr); @@ -213,40 +214,40 @@ } /************************************************************************** -* ISF_Fonts_fnEnumObjects +* ISF_Fonts_fnEnumObjects */ HRESULT WINAPI CFontsFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) { - CComObject<CDesktopFolderEnumZ> *theEnumerator; - CComPtr<IEnumIDList> result; - HRESULT hResult; - - TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList); - - if (ppEnumIDList == NULL) - return E_POINTER; - *ppEnumIDList = NULL; - ATLTRY (theEnumerator = new CComObject<CDesktopFolderEnumZ>); - if (theEnumerator == NULL) - return E_OUTOFMEMORY; - hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result); - if (FAILED (hResult)) - { - delete theEnumerator; - return hResult; - } - hResult = theEnumerator->Initialize (dwFlags); - if (FAILED (hResult)) - return hResult; - *ppEnumIDList = result.Detach (); + CComObject<CDesktopFolderEnumZ> *theEnumerator; + CComPtr<IEnumIDList> result; + HRESULT hResult; + + TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList); + + if (ppEnumIDList == NULL) + return E_POINTER; + *ppEnumIDList = NULL; + ATLTRY (theEnumerator = new CComObject<CDesktopFolderEnumZ>); + if (theEnumerator == NULL) + return E_OUTOFMEMORY; + hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result); + if (FAILED (hResult)) + { + delete theEnumerator; + return hResult; + } + hResult = theEnumerator->Initialize (dwFlags); + if (FAILED (hResult)) + return hResult; + *ppEnumIDList = result.Detach (); TRACE ("-- (%p)->(new ID List: %p)\n", this, *ppEnumIDList); - return S_OK; -} - -/************************************************************************** -* ISF_Fonts_fnBindToObject + return S_OK; +} + +/************************************************************************** +* ISF_Fonts_fnBindToObject */ HRESULT WINAPI CFontsFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) { @@ -257,7 +258,7 @@ } /************************************************************************** -* ISF_Fonts_fnBindToStorage +* ISF_Fonts_fnBindToStorage */ HRESULT WINAPI CFontsFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) { @@ -269,7 +270,7 @@ } /************************************************************************** -* ISF_Fonts_fnCompareIDs +* ISF_Fonts_fnCompareIDs */ HRESULT WINAPI CFontsFolder::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) @@ -283,11 +284,11 @@ } /************************************************************************** -* ISF_Fonts_fnCreateViewObject +* ISF_Fonts_fnCreateViewObject */ HRESULT WINAPI CFontsFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) { - CComPtr<IShellView> pShellView; + CComPtr<IShellView> pShellView; HRESULT hr = E_INVALIDARG; TRACE ("(%p)->(hwnd=%p,%s,%p)\n", this, @@ -296,22 +297,22 @@ if (!ppvOut) return hr; - *ppvOut = NULL; - - if (IsEqualIID (riid, IID_IDropTarget)) - { - WARN ("IDropTarget not implemented\n"); - hr = E_NOTIMPL; - } + *ppvOut = NULL; + + if (IsEqualIID (riid, IID_IDropTarget)) + { + WARN ("IDropTarget not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID (riid, IID_IContextMenu)) { - WARN ("IContextMenu not implemented\n"); - hr = E_NOTIMPL; - } + WARN ("IContextMenu not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID (riid, IID_IShellView)) { - hr = IShellView_Constructor ((IShellFolder *)this, &pShellView); - if (pShellView) + hr = IShellView_Constructor ((IShellFolder *)this, &pShellView); + if (pShellView) hr = pShellView->QueryInterface(riid, ppvOut); } TRACE ("-- (%p)->(interface=%p)\n", this, ppvOut); @@ -338,7 +339,7 @@ if (cidl == 0) { - CComPtr<IShellFolder> psfParent; + CComPtr<IShellFolder> psfParent; LPCITEMIDLIST rpidl = NULL; hr = SHBindToParent(pidlRoot, IID_IShellFolder, (LPVOID *)&psfParent, (LPCITEMIDLIST *)&rpidl); @@ -364,7 +365,7 @@ } /************************************************************************** -* ISF_Fonts_fnGetUIObjectOf +* ISF_Fonts_fnGetUIObjectOf * * PARAMETERS * hwndOwner [in] Parent window for any output @@ -379,7 +380,7 @@ UINT * prgfInOut, LPVOID * ppvOut) { LPITEMIDLIST pidl; - CComPtr<IUnknown> pObj; + CComPtr<IUnknown> pObj; HRESULT hr = E_INVALIDARG; TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", this, @@ -430,7 +431,7 @@ } /************************************************************************** -* ISF_Fonts_fnGetDisplayNameOf +* ISF_Fonts_fnGetDisplayNameOf * */ HRESULT WINAPI CFontsFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) @@ -469,7 +470,7 @@ * dwFlags [in] SHGNO formatting flags * ppidlOut [out] simple pidl returned */ -HRESULT WINAPI CFontsFolder::SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ +HRESULT WINAPI CFontsFolder::SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) { FIXME ("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this, @@ -620,7 +621,7 @@ } /************************************************************************ - * INPFldr_PersistFolder2_GetClassID + * INPFldr_PersistFolder2_GetClassID */ HRESULT WINAPI CFontsFolder::GetClassID(CLSID *lpClassId) { @@ -635,7 +636,7 @@ } /************************************************************************ - * INPFldr_PersistFolder2_Initialize + * INPFldr_PersistFolder2_Initialize * * NOTES: it makes no sense to change the pidl */ @@ -647,7 +648,7 @@ } /************************************************************************** - * IPersistFolder2_fnGetCurFolder + * IPersistFolder2_fnGetCurFolder */ HRESULT WINAPI CFontsFolder::GetCurFolder (LPITEMIDLIST *pidl) { @@ -768,9 +769,9 @@ */ HRESULT WINAPI CFontsFolder::GetCommandString(UINT_PTR idCommand,UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) { - TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n",this, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); - - return E_FAIL; + TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n",this, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); + + return E_FAIL; } /************************************************************************** Modified: branches/shell32_new-bringup/dll/win32/shell32/shfldr_mydocuments.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/dll/win32/s…
============================================================================== --- branches/shell32_new-bringup/dll/win32/shell32/shfldr_mydocuments.cpp [iso-8859-1] (original) +++ branches/shell32_new-bringup/dll/win32/shell32/shfldr_mydocuments.cpp [iso-8859-1] Wed Sep 7 20:00:32 2011 @@ -34,16 +34,16 @@ */ class CFileSysEnumX : - public IEnumIDListImpl + public IEnumIDListImpl { private: public: - CFileSysEnumX(); - ~CFileSysEnumX(); - HRESULT WINAPI Initialize(DWORD dwFlags); + CFileSysEnumX(); + ~CFileSysEnumX(); + HRESULT WINAPI Initialize(DWORD dwFlags); BEGIN_COM_MAP(CFileSysEnumX) - COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) + COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) END_COM_MAP() }; @@ -67,16 +67,17 @@ HRESULT WINAPI CFileSysEnumX::Initialize(DWORD dwFlags) { - WCHAR szPath[MAX_PATH]; + WCHAR szPath[MAX_PATH]; if (SHGetSpecialFolderPathW(0, szPath, CSIDL_PERSONAL, FALSE) == FALSE) - return E_FAIL; - return CreateFolderEnumList(szPath, dwFlags); + return E_FAIL; + return CreateFolderEnumList(szPath, dwFlags); } CMyDocsFolder::CMyDocsFolder() { pidlRoot = NULL; + sPathTarget = NULL; } CMyDocsFolder::~CMyDocsFolder() @@ -88,16 +89,16 @@ HRESULT WINAPI CMyDocsFolder::FinalConstruct() { - WCHAR szMyPath[MAX_PATH]; - - if (!SHGetSpecialFolderPathW(0, szMyPath, CSIDL_PERSONAL, TRUE)) - return E_UNEXPECTED; - - pidlRoot = _ILCreateMyDocuments(); /* my qualified pidl */ - sPathTarget = (LPWSTR)SHAlloc((wcslen(szMyPath) + 1) * sizeof(WCHAR)); - wcscpy(sPathTarget, szMyPath); - - return S_OK; + WCHAR szMyPath[MAX_PATH]; + + if (!SHGetSpecialFolderPathW(0, szMyPath, CSIDL_PERSONAL, TRUE)) + return E_UNEXPECTED; + + pidlRoot = _ILCreateMyDocuments(); /* my qualified pidl */ + sPathTarget = (LPWSTR)SHAlloc((wcslen(szMyPath) + 1) * sizeof(WCHAR)); + wcscpy(sPathTarget, szMyPath); + + return S_OK; } HRESULT WINAPI CMyDocsFolder::ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, @@ -189,32 +190,32 @@ */ HRESULT WINAPI CMyDocsFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) { - CComObject<CFileSysEnumX> *theEnumerator; - CComPtr<IEnumIDList> result; - HRESULT hResult; - - TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList); - - if (ppEnumIDList == NULL) - return E_POINTER; - *ppEnumIDList = NULL; - ATLTRY (theEnumerator = new CComObject<CFileSysEnumX>); - if (theEnumerator == NULL) - return E_OUTOFMEMORY; - hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result); - if (FAILED (hResult)) - { - delete theEnumerator; - return hResult; - } - hResult = theEnumerator->Initialize (dwFlags); - if (FAILED (hResult)) - return hResult; - *ppEnumIDList = result.Detach (); + CComObject<CFileSysEnumX> *theEnumerator; + CComPtr<IEnumIDList> result; + HRESULT hResult; + + TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList); + + if (ppEnumIDList == NULL) + return E_POINTER; + *ppEnumIDList = NULL; + ATLTRY (theEnumerator = new CComObject<CFileSysEnumX>); + if (theEnumerator == NULL) + return E_OUTOFMEMORY; + hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result); + if (FAILED (hResult)) + { + delete theEnumerator; + return hResult; + } + hResult = theEnumerator->Initialize (dwFlags); + if (FAILED (hResult)) + return hResult; + *ppEnumIDList = result.Detach (); TRACE ("-- (%p)->(new ID List: %p)\n", this, *ppEnumIDList); - return S_OK; + return S_OK; } /**************************************************************************
13 years, 3 months
1
0
0
0
[cmihail] 53628: [shell32.dll] - Attempt at fixing bug 6315 (it doesn't completely work yet). Original patch by Edijs Kolesnikovics.
by cmihail@svn.reactos.org
Author: cmihail Date: Wed Sep 7 19:00:26 2011 New Revision: 53628 URL:
http://svn.reactos.org/svn/reactos?rev=53628&view=rev
Log: [shell32.dll] - Attempt at fixing bug 6315 (it doesn't completely work yet). Original patch by Edijs Kolesnikovics. Modified: branches/shell32_new-bringup/dll/win32/shell32/fprop.cpp Modified: branches/shell32_new-bringup/dll/win32/shell32/fprop.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/dll/win32/s…
============================================================================== --- branches/shell32_new-bringup/dll/win32/shell32/fprop.cpp [iso-8859-1] (original) +++ branches/shell32_new-bringup/dll/win32/shell32/fprop.cpp [iso-8859-1] Wed Sep 7 19:00:26 2011 @@ -31,6 +31,62 @@ } LANGANDCODEPAGE, *LPLANGANDCODEPAGE; EXTERN_C HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface, IDataObject *pDataObj); + +static LONG SH_GetAssociatedApplication(WCHAR *fileext, WCHAR *wAssocApp) +{ + WCHAR wDataType[MAX_PATH] = {0}; + HKEY hkey; + LONG result; + DWORD dwLen = MAX_PATH * sizeof(WCHAR); + + wAssocApp[0] = '\0'; + RegCreateKeyExW(HKEY_CLASSES_ROOT, fileext, 0, NULL, 0, KEY_READ, NULL, &hkey, NULL); + result = RegQueryValueExW(hkey, L"", NULL, NULL, (LPBYTE)wDataType, &dwLen); + RegCloseKey(hkey); + + if (result == ERROR_SUCCESS) + { + wcscat(wDataType, L"\\shell\\open\\command"); + dwLen = MAX_PATH * sizeof(WCHAR); + RegCreateKeyExW(HKEY_CLASSES_ROOT, wDataType, 0, NULL, 0, KEY_READ, NULL, &hkey, NULL); + result = (RegQueryValueExW(hkey, NULL, NULL, NULL, (LPBYTE)wAssocApp, &dwLen)); + RegCloseKey(hkey); + + if (result != ERROR_SUCCESS) + { + /* FIXME: Make it return full path instead of + notepad.exe "%1" + %systemroot%\notepad.exe "%1" + etc + Maybe there is code to do that somewhere? + dll\win32\shell32\shlexec.c for example? + */ + wAssocApp[0] = '\0'; + } + } + + return result; +} + +static LONG SH_FileGeneralOpensWith(HWND hwndDlg, WCHAR *fileext) +{ + HWND hDlgCtrl; + LONG result; + WCHAR wAppName[MAX_PATH] = {0}; + WCHAR wAssocApp[MAX_PATH] = {0}; + + hDlgCtrl = GetDlgItem(hwndDlg, 14007); + result = SH_GetAssociatedApplication(fileext, wAssocApp); + + if (result == ERROR_SUCCESS) + { + _wsplitpath(wAssocApp, NULL, NULL, wAppName, NULL); + + SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)wAppName); + } + + return result; +} /************************************************************************* * @@ -669,6 +725,9 @@ /* enumerate file extension from registry and application which opens it */ SH_FileGeneralSetFileType(hwndDlg, wcsrchr(lpstr, '.')); + /* set opens with */ + SH_FileGeneralOpensWith(hwndDlg, wcsrchr(lpstr, '.')); + /* set file time create/modfied/accessed */ SH_FileGeneralSetFileSizeTime(hwndDlg, lpstr, NULL);
13 years, 3 months
1
0
0
0
[tkreuzer] 53627: [HAL_XBOX] Fix build
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Sep 7 18:39:20 2011 New Revision: 53627 URL:
http://svn.reactos.org/svn/reactos?rev=53627&view=rev
Log: [HAL_XBOX] Fix build Modified: trunk/reactos/hal/halx86/xbox/halinit_xbox.c Modified: trunk/reactos/hal/halx86/xbox/halinit_xbox.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/xbox/halinit_xb…
============================================================================== --- trunk/reactos/hal/halx86/xbox/halinit_xbox.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/xbox/halinit_xbox.c [iso-8859-1] Wed Sep 7 18:39:20 2011 @@ -19,6 +19,16 @@ /* FUNCTIONS ***************************************************************/ VOID +NTAPI +HalpInitProcessor( + IN ULONG ProcessorNumber, + IN PLOADER_PARAMETER_BLOCK LoaderBlock) +{ + /* Set default IDR */ + KeGetPcr()->IDR = 0xFFFFFFFB; +} + +VOID HalpInitPhase0(PLOADER_PARAMETER_BLOCK LoaderBlock) { HalpXboxInitPartIo();
13 years, 3 months
1
0
0
0
[tkreuzer] 53626: [HAL] Fix buld. I swear it worked here!
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Sep 7 18:30:38 2011 New Revision: 53626 URL:
http://svn.reactos.org/svn/reactos?rev=53626&view=rev
Log: [HAL] Fix buld. I swear it worked here! Modified: trunk/reactos/hal/halx86/up/halinit_mini.c Modified: trunk/reactos/hal/halx86/up/halinit_mini.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/up/halinit_mini…
============================================================================== --- trunk/reactos/hal/halx86/up/halinit_mini.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/up/halinit_mini.c [iso-8859-1] Wed Sep 7 18:30:38 2011 @@ -65,11 +65,4 @@ return FALSE; } -VOID -NTAPI -INIT_FUNCTION -HalpInitializeClock(VOID) -{ -} - /* EOF */
13 years, 3 months
1
0
0
0
[tkreuzer] 53625: [HAL] - give apic hal its own halinit_apic - give minihal an own halinit_mini.c containing function stubs - move HalInitializeProcessor to halinit.c and add hal specific function ...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Sep 7 18:25:43 2011 New Revision: 53625 URL:
http://svn.reactos.org/svn/reactos?rev=53625&view=rev
Log: [HAL] - give apic hal its own halinit_apic - give minihal an own halinit_mini.c containing function stubs - move HalInitializeProcessor to halinit.c and add hal specific function HalpInitProcessor - get rid of all the #ifndef _MINIHAL_ in halinit.c and move the file to lib_hal_generic - improve the hal version/build check - Update spec file for amd64 Added: trunk/reactos/hal/halx86/apic/halinit_apic.c (with props) trunk/reactos/hal/halx86/up/halinit_mini.c (with props) Modified: trunk/reactos/hal/hal.spec trunk/reactos/hal/halx86/CMakeLists.txt trunk/reactos/hal/halx86/generic/halinit.c trunk/reactos/hal/halx86/hal_mini.rbuild trunk/reactos/hal/halx86/include/halp.h trunk/reactos/hal/halx86/up/halinit_up.c trunk/reactos/hal/halx86/up/processor.c Modified: trunk/reactos/hal/hal.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/hal.spec?rev=53625&r1=…
============================================================================== --- trunk/reactos/hal/hal.spec [iso-8859-1] (original) +++ trunk/reactos/hal/hal.spec [iso-8859-1] Wed Sep 7 18:25:43 2011 @@ -27,12 +27,13 @@ @ stdcall HalAllocateCommonBuffer(ptr long ptr long) @ stdcall HalAllocateCrashDumpRegisters(ptr ptr) @ stdcall HalAssignSlotResources(ptr ptr ptr ptr long long long ptr) -@ stdcall HalBeginSystemInterrupt(long long ptr) +@ stdcall -arch=i386,arm HalBeginSystemInterrupt(long long ptr) @ stdcall HalCalibratePerformanceCounter(ptr long long) +;@ stdcall -arch=x86_64 HalCallBios() @ stdcall HalDisableSystemInterrupt(long long) @ stdcall HalDisplayString(str) @ stdcall HalEnableSystemInterrupt(long long long) -@ stdcall HalEndSystemInterrupt(long long) +@ stdcall -arch=i386,arm HalEndSystemInterrupt(long long) @ stdcall HalFlushCommonBuffer(long long long long long) @ stdcall HalFreeCommonBuffer(ptr long long long ptr long) @ stdcall HalGetAdapter(ptr ptr) @@ -41,18 +42,22 @@ @ stdcall HalGetEnvironmentVariable(str long str) @ fastcall -arch=arm HalGetInterruptSource() @ stdcall HalGetInterruptVector(long long long long ptr ptr) -@ stdcall -arch=i386 HalHandleNMI(ptr) +;@ stdcall -arch=x86_64 HalHandleMcheck() +@ stdcall -arch=i386,x86_64 HalHandleNMI(ptr) @ stdcall HalInitSystem(long ptr) @ stdcall HalInitializeProcessor(long ptr) +;@ stdcall -arch=x86_64 HalIsHyperThreadingEnabled() @ stdcall HalMakeBeep(long) @ stdcall HalProcessorIdle() -@ stdcall HalPutDmaAdapter(ptr) +@ stdcall -arch=i386 HalPutDmaAdapter(ptr) @ stdcall HalQueryDisplayParameters(ptr ptr ptr ptr) @ stdcall HalQueryRealTimeClock(ptr) @ stdcall HalReadDmaCounter(ptr) @ stdcall HalReportResourceUsage() @ stdcall HalRequestIpi(long) @ stdcall HalReturnToFirmware(long) +;@ stdcall -arch=x86_64 HalSendNMI() +;@ stdcall -arch=x86_64 HalSendSoftwareInterrupt() @ stdcall HalSetBusData(long long long ptr long) @ stdcall HalSetBusDataByOffset(long long long ptr long long) @ stdcall HalSetDisplayParameters(long long) @@ -65,6 +70,7 @@ @ stdcall HalStopProfileInterrupt(long) @ fastcall -arch=arm HalSweepIcache() @ fastcall -arch=arm HalSweepDcache() +;@ stdcall -arch=x86_64 HalSystemVectorDispatchEntry() @ stdcall HalTranslateBusAddress(long long long long ptr ptr) @ stdcall IoFlushAdapterBuffers(ptr ptr ptr ptr long long) @ stdcall IoFreeAdapterChannel(ptr) @@ -98,3 +104,6 @@ @ stdcall -arch=i386,arm WRITE_PORT_ULONG(ptr long) @ stdcall -arch=i386,arm WRITE_PORT_USHORT(ptr long) @ stdcall -arch=x86_64 HalInitializeBios(long ptr) +;@ stdcall -arch=x86_64 x86BiosExecuteInterrupt() +;@ stdcall -arch=x86_64 x86BiosInitializeBiosEx() +;@ stdcall -arch=x86_64 x86BiosTranslateAddress() Modified: trunk/reactos/hal/halx86/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/CMakeLists.txt?…
============================================================================== --- trunk/reactos/hal/halx86/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/CMakeLists.txt [iso-8859-1] Wed Sep 7 18:25:43 2011 @@ -13,6 +13,7 @@ generic/display.c generic/dma.c generic/drive.c + generic/halinit.c generic/memory.c generic/misc.c generic/reboot.c @@ -56,8 +57,6 @@ list(APPEND HAL_UP_SOURCE generic/spinlock.c - generic/halinit.c - up/halinit_up.c up/processor.c) list(APPEND HAL_PIC_SOURCE @@ -65,12 +64,14 @@ generic/timer.c generic/systimer.S generic/trap.S + up/halinit_up.c up/pic.c) list(APPEND HAL_APIC_SOURCE apic/apic.c apic/apictimer.c apic/apictrap.S + apic/halinit_apic.c apic/rtctimer.c apic/tsc.c apic/tsccal.S) @@ -98,7 +99,7 @@ generic/sysinfo.c generic/timer.c generic/usage.c - up/halinit_up.c + up/halinit_mini.c up/pic.c up/processor.c) @@ -157,7 +158,6 @@ ${HAL_ACPI_SOURCE} ${HAL_APIC_SOURCE} generic/spinlock.c - generic/halinit.c amd64/x86bios.c amd64/halinit.c amd64/processor.c Added: trunk/reactos/hal/halx86/apic/halinit_apic.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/apic/halinit_ap…
============================================================================== --- trunk/reactos/hal/halx86/apic/halinit_apic.c (added) +++ trunk/reactos/hal/halx86/apic/halinit_apic.c [iso-8859-1] Wed Sep 7 18:25:43 2011 @@ -1,0 +1,53 @@ +/* $Id: halinit_up.c 53529 2011-09-02 14:45:19Z tkreuzer $ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/hal/x86/halinit.c + * PURPOSE: Initalize the x86 hal + * PROGRAMMER: David Welch (welch(a)cwcom.net) + * UPDATE HISTORY: + * 11/06/98: Created + */ + +/* INCLUDES *****************************************************************/ + +#include <hal.h> +#define NDEBUG +#include <debug.h> + +VOID +NTAPI +ApicInitializeLocalApic(ULONG Cpu); + +/* FUNCTIONS ***************************************************************/ + +VOID +NTAPI +HalpInitProcessor( + IN ULONG ProcessorNumber, + IN PLOADER_PARAMETER_BLOCK LoaderBlock) +{ + DPRINT1("ApicInitializeProcessor(%ld)\n", ProcessorNumber); + + /* Initialize the local APIC for this cpu */ + ApicInitializeLocalApic(ProcessorNumber); + + /* Initialize the timer */ + //ApicInitializeTimer(ProcessorNumber); + +} + +VOID +HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock) +{ + +} + +VOID +HalpInitPhase1(VOID) +{ + /* Initialize DMA. NT does this in Phase 0 */ + HalpInitDma(); +} + +/* EOF */ Propchange: trunk/reactos/hal/halx86/apic/halinit_apic.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/hal/halx86/generic/halinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/halinit…
============================================================================== --- trunk/reactos/hal/halx86/generic/halinit.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/halinit.c [iso-8859-1] Wed Sep 7 18:25:43 2011 @@ -41,6 +41,27 @@ /* FUNCTIONS *****************************************************************/ +VOID +NTAPI +HalInitializeProcessor( + IN ULONG ProcessorNumber, + IN PLOADER_PARAMETER_BLOCK LoaderBlock) +{ + /* Hal specific initialization for this cpu */ + HalpInitProcessor(ProcessorNumber, LoaderBlock); + + /* Set default stall count */ + KeGetPcr()->StallScaleFactor = INITIAL_STALL_COUNT; + + /* Update the interrupt affinity and processor mask */ + InterlockedBitTestAndSet((PLONG)&HalpActiveProcessors, ProcessorNumber); + InterlockedBitTestAndSet((PLONG)&HalpDefaultInterruptAffinity, + ProcessorNumber); + + /* Register routines for KDCOM */ + HalpRegisterKdSupportFunctions(); +} + /* * @implemented */ @@ -61,48 +82,25 @@ /* Get command-line parameters */ HalpGetParameters(LoaderBlock); - /* Checked HAL requires checked kernel */ -#if DBG - if (!(Prcb->BuildType & PRCB_BUILD_DEBUG)) + /* Check for PRCB version mismatch */ + if (Prcb->MajorVersion != PRCB_MAJOR_VERSION) { /* No match, bugcheck */ - KeBugCheckEx(MISMATCHED_HAL, 2, Prcb->BuildType, 1, 0); + KeBugCheckEx(MISMATCHED_HAL, 1, Prcb->MajorVersion, PRCB_MAJOR_VERSION, 0); } -#else - /* Release build requires release HAL */ - if (Prcb->BuildType & PRCB_BUILD_DEBUG) + + /* Checked/free HAL requires checked/free kernel */ + if (Prcb->BuildType != HAL_BUILD_TYPE) { /* No match, bugcheck */ - KeBugCheckEx(MISMATCHED_HAL, 2, Prcb->BuildType, 0, 0); - } -#endif - -#ifdef CONFIG_SMP - /* SMP HAL requires SMP kernel */ - if (Prcb->BuildType & PRCB_BUILD_UNIPROCESSOR) - { - /* No match, bugcheck */ - KeBugCheckEx(MISMATCHED_HAL, 2, Prcb->BuildType, 0, 0); - } -#endif - - /* Validate the PRCB */ - if (Prcb->MajorVersion != PRCB_MAJOR_VERSION) - { - /* Validation failed, bugcheck */ - KeBugCheckEx(MISMATCHED_HAL, 1, Prcb->MajorVersion, 1, 0); + KeBugCheckEx(MISMATCHED_HAL, 2, Prcb->BuildType, HAL_BUILD_TYPE, 0); } -#ifndef _MINIHAL_ /* Initialize ACPI */ HalpSetupAcpiPhase0(LoaderBlock); /* Initialize the PICs */ HalpInitializePICs(TRUE); -#endif - - /* Force initial PIC state */ - KfRaiseIrql(KeGetCurrentIrql()); /* Initialize CMOS lock */ KeInitializeSpinLock(&HalpSystemHardwareLock); @@ -114,17 +112,10 @@ HalQuerySystemInformation = HaliQuerySystemInformation; HalSetSystemInformation = HaliSetSystemInformation; HalInitPnpDriver = HaliInitPnpDriver; -#ifndef _MINIHAL_ HalGetDmaAdapter = HalpGetDmaAdapter; -#else - HalGetDmaAdapter = NULL; -#endif + HalGetInterruptTranslator = NULL; // FIXME: TODO -#ifndef _MINIHAL_ HalResetDisplay = HalpBiosDisplayReset; -#else - HalResetDisplay = NULL; -#endif HalHaltSystem = HaliHaltSystem; /* Register IRQ 2 */ @@ -140,10 +131,8 @@ /* Setup busy waiting */ HalpCalibrateStallExecution(); -#ifndef _MINIHAL_ /* Initialize the clock */ HalpInitializeClock(); -#endif /* * We could be rebooting with a pending profile interrupt, Modified: trunk/reactos/hal/halx86/hal_mini.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/hal_mini.rbuild…
============================================================================== --- trunk/reactos/hal/halx86/hal_mini.rbuild [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/hal_mini.rbuild [iso-8859-1] Wed Sep 7 18:25:43 2011 @@ -36,7 +36,7 @@ <file>bussupp.c</file> </directory> <directory name="up"> - <file>halinit_up.c</file> + <file>halinit_mini.c</file> <file>pic.c</file> <file>processor.c</file> </directory> Modified: trunk/reactos/hal/halx86/include/halp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/include/halp.h?…
============================================================================== --- trunk/reactos/hal/halx86/include/halp.h [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/include/halp.h [iso-8859-1] Wed Sep 7 18:25:43 2011 @@ -19,6 +19,12 @@ #define REGISTERCALL FASTCALL #else #define REGISTERCALL __attribute__((regparm(3))) +#endif + +#ifdef CONFIG_SMP +#define HAL_BUILD_TYPE (DBG ? PRCB_BUILD_DEBUG : 0) +#else +#define HAL_BUILD_TYPE ((DBG ? PRCB_BUILD_DEBUG : 0) | PRCB_BUILD_UNIPROCESSOR) #endif typedef struct _HAL_BIOS_FRAME @@ -836,8 +842,18 @@ IN PPCI_COMMON_CONFIG PciData ); +VOID +NTAPI +HalpInitProcessor( + IN ULONG ProcessorNumber, + IN PLOADER_PARAMETER_BLOCK LoaderBlock +); + #ifdef _M_AMD64 #define KfLowerIrql KeLowerIrql +#define KiEnterInterruptTrap(TrapFrame) /* We do all neccessary in asm code */ +#define KiEoiHelper() return +#define HalBeginSystemInterrupt(Irql, Vector, OldIrql) TRUE #ifndef CONFIG_SMP /* On UP builds, spinlocks don't exist at IRQL >= DISPATCH */ #define KiAcquireSpinLock(SpinLock) Added: trunk/reactos/hal/halx86/up/halinit_mini.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/up/halinit_mini…
============================================================================== --- trunk/reactos/hal/halx86/up/halinit_mini.c (added) +++ trunk/reactos/hal/halx86/up/halinit_mini.c [iso-8859-1] Wed Sep 7 18:25:43 2011 @@ -1,0 +1,75 @@ +/* $Id: halinit_up.c 53529 2011-09-02 14:45:19Z tkreuzer $ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/hal/x86/halinit.c + * PURPOSE: Initalize the x86 hal + * PROGRAMMER: David Welch (welch(a)cwcom.net) + * UPDATE HISTORY: + * 11/06/98: Created + */ + +/* INCLUDES *****************************************************************/ + +#include <hal.h> +#define NDEBUG +#include <debug.h> + +/* FUNCTIONS ***************************************************************/ + +VOID +NTAPI +HalpInitProcessor( + IN ULONG ProcessorNumber, + IN PLOADER_PARAMETER_BLOCK LoaderBlock) +{ +} + +VOID +HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock) +{ +} + +VOID +HalpInitPhase1(VOID) +{ +} + +NTSTATUS +NTAPI +HalpSetupAcpiPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock) +{ + return STATUS_SUCCESS; +} + +VOID +NTAPI +HalpInitializePICs(IN BOOLEAN EnableInterrupts) +{ +} + +PDMA_ADAPTER +NTAPI +HalpGetDmaAdapter( + IN PVOID Context, + IN PDEVICE_DESCRIPTION DeviceDescription, + OUT PULONG NumberOfMapRegisters) +{ + return NULL; +} + +BOOLEAN +NTAPI +HalpBiosDisplayReset(VOID) +{ + return FALSE; +} + +VOID +NTAPI +INIT_FUNCTION +HalpInitializeClock(VOID) +{ +} + +/* EOF */ Propchange: trunk/reactos/hal/halx86/up/halinit_mini.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/hal/halx86/up/halinit_up.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/up/halinit_up.c…
============================================================================== --- trunk/reactos/hal/halx86/up/halinit_up.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/up/halinit_up.c [iso-8859-1] Wed Sep 7 18:25:43 2011 @@ -18,6 +18,16 @@ /* FUNCTIONS ***************************************************************/ VOID +NTAPI +HalpInitProcessor( + IN ULONG ProcessorNumber, + IN PLOADER_PARAMETER_BLOCK LoaderBlock) +{ + /* Set default IDR */ + KeGetPcr()->IDR = 0xFFFFFFFB; +} + +VOID HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { @@ -26,7 +36,6 @@ VOID HalpInitPhase1(VOID) { -#ifndef _MINIHAL_ /* Enable IRQ 0 */ HalpEnableInterruptHandler(IDT_DEVICE, 0, @@ -45,7 +54,6 @@ /* Initialize DMA. NT does this in Phase 0 */ HalpInitDma(); -#endif } /* EOF */ Modified: trunk/reactos/hal/halx86/up/processor.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/up/processor.c?…
============================================================================== --- trunk/reactos/hal/halx86/up/processor.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/up/processor.c [iso-8859-1] Wed Sep 7 18:25:43 2011 @@ -28,26 +28,6 @@ /* FUNCTIONS *****************************************************************/ -/* - * @implemented - */ -VOID -NTAPI -HalInitializeProcessor(IN ULONG ProcessorNumber, - IN PLOADER_PARAMETER_BLOCK LoaderBlock) -{ - /* Set default IDR and stall count */ - KeGetPcr()->IDR = 0xFFFFFFFB; - KeGetPcr()->StallScaleFactor = INITIAL_STALL_COUNT; - - /* Update the interrupt affinity and processor mask */ - InterlockedBitTestAndSet((PLONG)&HalpActiveProcessors, ProcessorNumber); - InterlockedBitTestAndSet((PLONG)&HalpDefaultInterruptAffinity, - ProcessorNumber); - - /* Register routines for KDCOM */ - HalpRegisterKdSupportFunctions(); -} /* * @implemented
13 years, 3 months
1
0
0
0
[cmihail] 53624: [shell32.dll] - Fix bug 6317. Patch by Edijs Kolesnikovics.
by cmihail@svn.reactos.org
Author: cmihail Date: Wed Sep 7 17:41:56 2011 New Revision: 53624 URL:
http://svn.reactos.org/svn/reactos?rev=53624&view=rev
Log: [shell32.dll] - Fix bug 6317. Patch by Edijs Kolesnikovics. Modified: branches/shell32_new-bringup/dll/win32/shell32/shelllink.cpp Modified: branches/shell32_new-bringup/dll/win32/shell32/shelllink.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/dll/win32/s…
============================================================================== --- branches/shell32_new-bringup/dll/win32/shell32/shelllink.cpp [iso-8859-1] (original) +++ branches/shell32_new-bringup/dll/win32/shell32/shelllink.cpp [iso-8859-1] Wed Sep 7 17:41:56 2011 @@ -2015,6 +2015,7 @@ switch(uMsg) { case WM_INITDIALOG: + { ppsp = (LPPROPSHEETPAGEW)lParam; if (ppsp == NULL) break; @@ -2025,7 +2026,14 @@ SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pThis); TRACE("sArgs: %S sComponent: %S sDescription: %S sIcoPath: %S sPath: %S sPathRel: %S sProduct: %S sWorkDir: %S\n", pThis->sArgs, pThis->sComponent, pThis->sDescription, - pThis->sIcoPath, pThis->sPath, pThis->sPathRel, pThis->sProduct, pThis->sWorkDir); + pThis->sIcoPath, pThis->sPath, pThis->sPathRel, pThis->sProduct, pThis->sWorkDir); + + /* target location */ + wchar_t * wTrgtLocat; + const int ch = '\\'; + wTrgtLocat = wcsrchr(pThis->sWorkDir, ch)+1; + hDlgCtrl = GetDlgItem( hwndDlg, 14007 ); + SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)wTrgtLocat); /* target path */ hDlgCtrl = GetDlgItem( hwndDlg, 14009 ); @@ -2042,6 +2050,8 @@ if ( hDlgCtrl != NULL ) SendMessageW( hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)pThis->sDescription ); return TRUE; + } + case WM_NOTIFY: lppsn = (LPPSHNOTIFY) lParam; if ( lppsn->hdr.code == PSN_APPLY )
13 years, 3 months
1
0
0
0
[cmihail] 53623: [shell32.dll] - Fix bug 6316. Patch by Edijs Kolesnikovics.
by cmihail@svn.reactos.org
Author: cmihail Date: Wed Sep 7 17:10:45 2011 New Revision: 53623 URL:
http://svn.reactos.org/svn/reactos?rev=53623&view=rev
Log: [shell32.dll] - Fix bug 6316. Patch by Edijs Kolesnikovics. Modified: branches/shell32_new-bringup/dll/win32/shell32/fprop.cpp Modified: branches/shell32_new-bringup/dll/win32/shell32/fprop.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/dll/win32/s…
============================================================================== --- branches/shell32_new-bringup/dll/win32/shell32/fprop.cpp [iso-8859-1] (original) +++ branches/shell32_new-bringup/dll/win32/shell32/fprop.cpp [iso-8859-1] Wed Sep 7 17:10:45 2011 @@ -259,6 +259,12 @@ /* location text field */ wcsncpy(buff, lpstr, plength - flength); buff[plength - flength] = UNICODE_NULL; + + if (wcslen(buff) == 2) + { + wcscat(buff, L"\\"); + } + hDlgCtrl = GetDlgItem(hwndDlg, 14009); SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)buff); }
13 years, 3 months
1
0
0
0
[cmihail] 53622: [shell32.dll] - Fix bug #6301 . Patch by Edijs Kolesnikovics.
by cmihail@svn.reactos.org
Author: cmihail Date: Wed Sep 7 16:58:22 2011 New Revision: 53622 URL:
http://svn.reactos.org/svn/reactos?rev=53622&view=rev
Log: [shell32.dll] - Fix bug #6301 . Patch by Edijs Kolesnikovics. Modified: branches/shell32_new-bringup/dll/win32/shell32/icon_res.rc Modified: branches/shell32_new-bringup/dll/win32/shell32/icon_res.rc URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/dll/win32/s…
============================================================================== --- branches/shell32_new-bringup/dll/win32/shell32/icon_res.rc [iso-8859-1] (original) +++ branches/shell32_new-bringup/dll/win32/shell32/icon_res.rc [iso-8859-1] Wed Sep 7 16:58:22 2011 @@ -45,7 +45,9 @@ IDI_SHELL_OPEN_WITH ICON "res/icons/135.ico" IDI_SHELL_CONTROL_PANEL3 ICON "res/icons/137.ico" IDI_SHELL_PRINTER2 ICON "res/icons/138.ico" -/* TODO: 139.ico, 140.ico, 141.ico, 142.ico, 143.ico, 144,ico, 145.ico, 146.ico, 147.ico, 148.ico */ +/* TODO: 139.ico, 140.ico, 141.ico */ +IDI_SHELL_TRASH_FILE ICON "res/icons/33.ico" //142 +/* TODO 143.ico, 144,ico, 145.ico, 146.ico, 147.ico, 148.ico */ IDI_SHELL_INF_FILE ICON "res/icons/151.ico" IDI_SHELL_TEXT_FILE ICON "res/icons/152.ico" IDI_SHELL_BAT_FILE ICON "res/icons/153.ico"
13 years, 3 months
1
0
0
0
[gadamopoulos] 53621: [user32_apitest] - Add a test case for SetActiveWindow that shows its behavior related to owner windows. It should point the bug observed in bug 1239
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Wed Sep 7 14:05:58 2011 New Revision: 53621 URL:
http://svn.reactos.org/svn/reactos?rev=53621&view=rev
Log: [user32_apitest] - Add a test case for SetActiveWindow that shows its behavior related to owner windows. It should point the bug observed in bug 1239 Added: trunk/rostests/apitests/user32/SetActiveWindow.c (with props) Modified: trunk/rostests/apitests/user32/CMakeLists.txt trunk/rostests/apitests/user32/testlist.c trunk/rostests/apitests/user32/user32_apitest.rbuild Modified: trunk/rostests/apitests/user32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/CMakeList…
============================================================================== --- trunk/rostests/apitests/user32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/CMakeLists.txt [iso-8859-1] Wed Sep 7 14:05:58 2011 @@ -14,6 +14,7 @@ ScrollDC.c ScrollWindowEx.c SetCursorPos.c + SetActiveWindow.c WndProc.c testlist.c user32_apitest.rc) Added: trunk/rostests/apitests/user32/SetActiveWindow.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/SetActive…
============================================================================== --- trunk/rostests/apitests/user32/SetActiveWindow.c (added) +++ trunk/rostests/apitests/user32/SetActiveWindow.c [iso-8859-1] Wed Sep 7 14:05:58 2011 @@ -1,0 +1,52 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPL - See COPYING in the top level directory + * PURPOSE: Test for SetActiveWindow + * PROGRAMMERS: Giannis Adamopoulos + */ + +#include <stdio.h> +#include <wine/test.h> +#include <windows.h> + +void Test_SetActiveWindow() +{ + MSG msg; + HWND hWnd, hWnd1, hWnd2; + + hWnd = CreateWindowW(L"BUTTON", L"ownertest", WS_OVERLAPPEDWINDOW, + 20, 20, 300, 300, NULL, NULL, 0, NULL); + + hWnd1 = CreateWindowW(L"BUTTON", L"ownertest", WS_OVERLAPPEDWINDOW, + 20, 350, 300, 300, hWnd, NULL, 0, NULL); + + hWnd2 = CreateWindowW(L"BUTTON", L"ownertest", WS_OVERLAPPEDWINDOW, + 200, 200, 300, 300, NULL, NULL, 0, NULL); + + ShowWindow(hWnd, SW_SHOW); + UpdateWindow(hWnd); + ShowWindow(hWnd1, SW_SHOW); + UpdateWindow(hWnd1); + ShowWindow(hWnd2, SW_SHOW); + UpdateWindow(hWnd2); + + while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); + + ok(GetWindow(hWnd2,GW_HWNDNEXT) == hWnd1, "Expected %p after %p, not %p\n",hWnd1,hWnd2,GetWindow(hWnd2,GW_HWNDNEXT) ); + ok(GetWindow(hWnd1,GW_HWNDNEXT) == hWnd, "Expected %p after %p, not %p\n",hWnd,hWnd1,GetWindow(hWnd1,GW_HWNDNEXT)); + ok(GetActiveWindow() == hWnd2, "Expected %p to be the active window, not %p\n",hWnd2,GetActiveWindow()); + + SetActiveWindow(hWnd); + + while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); + + /* note: the owned is moved on top of the three windows */ + ok(GetActiveWindow() == hWnd, "Expected %p to be the active window, not %p\n",hWnd,GetActiveWindow()); + ok(GetWindow(hWnd1,GW_HWNDNEXT) == hWnd, "Expected %p after %p, not %p\n",hWnd,hWnd1,GetWindow(hWnd1,GW_HWNDNEXT) ); + ok(GetWindow(hWnd,GW_HWNDNEXT) == hWnd2, "Expected %p after %p, not %p\n",hWnd2,hWnd,GetWindow(hWnd,GW_HWNDNEXT) ); +} + +START_TEST(SetActiveWindow) +{ + Test_SetActiveWindow(); +} Propchange: trunk/rostests/apitests/user32/SetActiveWindow.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/user32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/testlist.…
============================================================================== --- trunk/rostests/apitests/user32/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/testlist.c [iso-8859-1] Wed Sep 7 14:05:58 2011 @@ -15,6 +15,7 @@ extern void func_DeferWindowPos(void); extern void func_GetKeyState(void); extern void func_SetCursorPos(void); +extern void func_SetActiveWindow(void); extern void func_WndProc(void); const struct test winetest_testlist[] = @@ -29,6 +30,7 @@ { "DeferWindowPos", func_DeferWindowPos }, { "GetKeyState", func_GetKeyState }, { "SetCursorPos", func_SetCursorPos }, + { "SetActiveWindow", func_SetActiveWindow }, { "WndProc", func_WndProc }, { 0, 0 } }; Modified: trunk/rostests/apitests/user32/user32_apitest.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/user32_ap…
============================================================================== --- trunk/rostests/apitests/user32/user32_apitest.rbuild [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/user32_apitest.rbuild [iso-8859-1] Wed Sep 7 14:05:58 2011 @@ -19,6 +19,7 @@ <file>GetIconInfo.c</file> <file>GetPeekMessage.c</file> <file>DeferWindowPos.c</file> + <file>SetActiveWindow.c</file> <file>SetCursorPos.c</file> <file>WndProc.c</file>
13 years, 3 months
1
0
0
0
← Newer
1
...
26
27
28
29
30
31
32
...
40
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
Results per page:
10
25
50
100
200