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
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
May 2011
----- 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
26 participants
511 discussions
Start a n
N
ew thread
[ekohl] 51901: [MSPORTS] - Implement ComDBClaimNextFreePort and ComDBReleasePort. - Add stubs for ComDBGetCurrentPortUsage and ComDBResizeDatabase. - Do not keep the port bitmap in a buffer between...
by ekohl@svn.reactos.org
Author: ekohl Date: Wed May 25 10:52:12 2011 New Revision: 51901 URL:
http://svn.reactos.org/svn/reactos?rev=51901&view=rev
Log: [MSPORTS] - Implement ComDBClaimNextFreePort and ComDBReleasePort. - Add stubs for ComDBGetCurrentPortUsage and ComDBResizeDatabase. - Do not keep the port bitmap in a buffer between calls but use a read-modify-write strategy instead. - Replace pointer-based access to the port bitmap by index-based access. - Use ComDBClaimNextFreePort in the serial port installer. See issue #6272 for more details. Modified: trunk/reactos/dll/win32/msports/classinst.c trunk/reactos/dll/win32/msports/comdb.c trunk/reactos/dll/win32/msports/msports.spec trunk/reactos/include/ddk/msports.h Modified: trunk/reactos/dll/win32/msports/classinst.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msports/classins…
============================================================================== --- trunk/reactos/dll/win32/msports/classinst.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msports/classinst.c [iso-8859-1] Wed May 25 10:52:12 2011 @@ -257,8 +257,6 @@ DeviceInfoData); if (dwPortNumber != 0) { - swprintf(szPortName, L"COM%u", dwPortNumber); - ComDBClaimPort(hComDB, dwPortNumber, FALSE, @@ -266,8 +264,11 @@ } else { - wcscpy(szPortName, L"COMx"); - } + ComDBClaimNextFreePort(hComDB, + &dwPortNumber); + } + + swprintf(szPortName, L"COM%u", dwPortNumber); /* Close the com port database */ if (hComDB != HCOMDB_INVALID_HANDLE_VALUE) Modified: trunk/reactos/dll/win32/msports/comdb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msports/comdb.c?…
============================================================================== --- trunk/reactos/dll/win32/msports/comdb.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msports/comdb.c [iso-8859-1] Wed May 25 10:52:12 2011 @@ -18,9 +18,95 @@ typedef struct _COMDB { HKEY hKey; +} COMDB, *PCOMDB; + + +LONG +WINAPI +ComDBClaimNextFreePort(IN HCOMDB hComDB, + OUT LPDWORD ComNumber) +{ + PCOMDB pComDB; + DWORD dwBitIndex; + DWORD dwByteIndex; DWORD dwSize; - PBYTE pBitmap; -} COMDB, *PCOMDB; + DWORD dwType; + PBYTE pBitmap = NULL; + BYTE cMask; + LONG lError; + + TRACE("ComDBClaimNextFreePort(%p %p)\n", hComDB, ComNumber); + + if (hComDB == INVALID_HANDLE_VALUE || + hComDB == NULL || + ComNumber == NULL) + return ERROR_INVALID_PARAMETER; + + pComDB = (PCOMDB)hComDB; + + /* Get the required bitmap size */ + lError = RegQueryValueExW(pComDB->hKey, + L"ComDB", + NULL, + &dwType, + NULL, + &dwSize); + if (lError != ERROR_SUCCESS) + return lError; + + /* Allocate the bitmap */ + pBitmap = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + dwSize); + if (pBitmap == NULL) + { + ERR("Failed to allocate the bitmap!\n"); + return lError; + } + + /* Read the bitmap */ + lError = RegQueryValueExW(pComDB->hKey, + L"ComDB", + NULL, + &dwType, + pBitmap, + &dwSize); + if (lError != ERROR_SUCCESS) + goto done; + + lError = ERROR_INVALID_PARAMETER; + for (dwBitIndex = 0; dwBitIndex < (dwSize * BITS_PER_BYTE); dwBitIndex++) + { + /* Calculate the byte index and a mask for the affected bit */ + dwByteIndex = dwBitIndex / BITS_PER_BYTE; + cMask = 1 << (dwBitIndex % BITS_PER_BYTE); + + if ((pBitmap[dwByteIndex] & cMask) == 0) + { + pBitmap[dwByteIndex] |= cMask; + *ComNumber = dwBitIndex + 1; + lError = ERROR_SUCCESS; + break; + } + } + + /* Save the bitmap if it was modified */ + if (lError == ERROR_SUCCESS) + { + lError = RegSetValueExW(pComDB->hKey, + L"ComDB", + 0, + REG_BINARY, + pBitmap, + dwSize); + } + +done:; + if (pBitmap != NULL) + HeapFree(GetProcessHeap(), 0, pBitmap); + + return lError; +} LONG @@ -31,12 +117,15 @@ OUT PBOOL Forced) { PCOMDB pComDB; - PBYTE pByte; - BYTE cMask; DWORD dwBitIndex; + DWORD dwByteIndex; DWORD dwType; DWORD dwSize; + PBYTE pBitmap = NULL; + BYTE cMask; LONG lError; + + TRACE("ComDBClaimPort(%p %lu)\n", hComDB, ComNumber); if (hComDB == INVALID_HANDLE_VALUE || hComDB == NULL || @@ -46,42 +135,60 @@ pComDB = (PCOMDB)hComDB; - /* Update the bitmap */ - dwSize = pComDB->dwSize; - lError = RegQueryValueExW(pComDB->hKey, - L"ComDB", - NULL, - &dwType, - pComDB->pBitmap, - &dwSize); - if (lError != ERROR_SUCCESS) - return lError; + /* Get the required bitmap size */ + lError = RegQueryValueExW(pComDB->hKey, + L"ComDB", + NULL, + &dwType, + NULL, + &dwSize); + if (lError != ERROR_SUCCESS) + return lError; + + /* Allocate the bitmap */ + pBitmap = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + dwSize); + if (pBitmap == NULL) + { + ERR("Failed to allocate the bitmap!\n"); + return lError; + } + + /* Read the bitmap */ + lError = RegQueryValueExW(pComDB->hKey, + L"ComDB", + NULL, + &dwType, + pBitmap, + &dwSize); + if (lError != ERROR_SUCCESS) + goto done; /* Get the bit index */ dwBitIndex = ComNumber - 1; /* Check if the bit to set fits into the bitmap */ - if (dwBitIndex >= (pComDB->dwSize * BITS_PER_BYTE)) - { - /* FIXME: Resize the bitmap */ - return ERROR_INVALID_PARAMETER; - } - - /* Get a pointer to the affected byte and calculate a mask for the affected bit */ - pByte = &(pComDB->pBitmap[dwBitIndex / BITS_PER_BYTE]); + if (dwBitIndex >= (dwSize * BITS_PER_BYTE)) + { + FIXME("Resize the bitmap\n"); + + lError = ERROR_INVALID_PARAMETER; + goto done; + } + + /* Calculate the byte index and a mask for the affected bit */ + dwByteIndex = dwBitIndex / BITS_PER_BYTE; cMask = 1 << (dwBitIndex % BITS_PER_BYTE); + lError = ERROR_SHARING_VIOLATION; + /* Check if the bit is not set */ - if ((*pByte & cMask) == 0) + if ((pBitmap[dwByteIndex] & cMask) == 0) { /* Set the bit */ - *pByte |= cMask; + pBitmap[dwByteIndex] |= cMask; lError = ERROR_SUCCESS; - } - else - { - /* The bit is already set */ - lError = ERROR_SHARING_VIOLATION; } /* Save the bitmap if it was modified */ @@ -91,9 +198,13 @@ L"ComDB", 0, REG_BINARY, - pComDB->pBitmap, - pComDB->dwSize); - } + pBitmap, + dwSize); + } + +done: + if (pBitmap != NULL) + HeapFree(GetProcessHeap(), 0, pBitmap); return lError; } @@ -104,6 +215,8 @@ ComDBClose(IN HCOMDB hComDB) { PCOMDB pComDB; + + TRACE("ComDBClose(%p)\n", hComDB); if (hComDB == HCOMDB_INVALID_HANDLE_VALUE || hComDB == NULL) return ERROR_INVALID_PARAMETER; @@ -114,14 +227,23 @@ if (pComDB->hKey != NULL) RegCloseKey(pComDB->hKey); - /* Release the bitmap */ - if (pComDB->pBitmap != NULL) - HeapFree(GetProcessHeap(), 0, pComDB->pBitmap); - /* Release the database */ HeapFree(GetProcessHeap(), 0, pComDB); return ERROR_SUCCESS; +} + + +LONG +WINAPI +ComDBGetCurrentPortUsage(IN HCOMDB hComDB, + OUT PBYTE Buffer, + IN DWORD BufferSize, + IN DWORD ReportType, + OUT LPDWORD MaxPortsReported) +{ + FIXME("ComDBGetCurrentPortUsage(%p)\n", hComDB); + return ERROR_CALL_NOT_IMPLEMENTED; } @@ -132,6 +254,8 @@ PCOMDB pComDB; DWORD dwDisposition; DWORD dwType; + DWORD dwSize; + PBYTE pBitmap; LONG lError; TRACE("ComDBOpen(%p)\n", phComDB); @@ -142,7 +266,7 @@ sizeof(COMDB)); if (pComDB == NULL) { - ERR("Failed to allocaete the database!\n"); + ERR("Failed to allocate the database!\n"); return ERROR_ACCESS_DENIED; } @@ -165,28 +289,30 @@ NULL, &dwType, NULL, - &pComDB->dwSize); + &dwSize); if (lError == ERROR_FILE_NOT_FOUND) { /* Allocate a new bitmap */ - pComDB->dwSize = COMDB_MIN_PORTS_ARBITRATED / BITS_PER_BYTE; - pComDB->pBitmap = HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, - pComDB->dwSize); - if (pComDB->pBitmap == NULL) + dwSize = COMDB_MIN_PORTS_ARBITRATED / BITS_PER_BYTE; + pBitmap = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + dwSize); + if (pBitmap == NULL) { - ERR("Failed to allocaete the bitmap!\n"); + ERR("Failed to allocate the bitmap!\n"); lError = ERROR_ACCESS_DENIED; goto done; } - /* Read the bitmap from the registry */ + /* Write the bitmap to the registry */ lError = RegSetValueExW(pComDB->hKey, L"ComDB", 0, REG_BINARY, - pComDB->pBitmap, - pComDB->dwSize); + pBitmap, + dwSize); + + HeapFree(GetProcessHeap(), 0, pBitmap); } done:; @@ -196,9 +322,6 @@ if (pComDB->hKey != NULL) RegCloseKey(pComDB->hKey); - if (pComDB->pBitmap != NULL) - HeapFree(GetProcessHeap(), 0, pComDB->pBitmap); - HeapFree(GetProcessHeap(), 0, pComDB); *phComDB = HCOMDB_INVALID_HANDLE_VALUE; @@ -214,4 +337,99 @@ return lError; } + +LONG +WINAPI +ComDBReleasePort(IN HCOMDB hComDB, + IN DWORD ComNumber) +{ + PCOMDB pComDB; + DWORD dwByteIndex; + DWORD dwBitIndex; + DWORD dwType; + DWORD dwSize; + PBYTE pBitmap = NULL; + BYTE cMask; + LONG lError; + + TRACE("ComDBReleasePort(%p %lu)\n", hComDB, ComNumber); + + if (hComDB == INVALID_HANDLE_VALUE || + ComNumber == 0 || + ComNumber > COMDB_MAX_PORTS_ARBITRATED) + return ERROR_INVALID_PARAMETER; + + pComDB = (PCOMDB)hComDB; + + /* Get the required bitmap size */ + lError = RegQueryValueExW(pComDB->hKey, + L"ComDB", + NULL, + &dwType, + NULL, + &dwSize); + if (lError != ERROR_SUCCESS) + return lError; + + /* Allocate the bitmap */ + pBitmap = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + dwSize); + if (pBitmap == NULL) + { + ERR("Failed to allocate the bitmap!\n"); + return lError; + } + + /* Read the bitmap */ + lError = RegQueryValueExW(pComDB->hKey, + L"ComDB", + NULL, + &dwType, + pBitmap, + &dwSize); + if (lError != ERROR_SUCCESS) + goto done; + + /* Get the bit index */ + dwBitIndex = ComNumber - 1; + + /* Check if the bit to set fits into the bitmap */ + if (dwBitIndex >= (dwSize * BITS_PER_BYTE)) + { + lError = ERROR_INVALID_PARAMETER; + goto done; + } + + /* Calculate the byte index and a mask for the affected bit */ + dwByteIndex = dwBitIndex / BITS_PER_BYTE; + cMask = 1 << (dwBitIndex % BITS_PER_BYTE); + + /* Release the port */ + pBitmap[dwByteIndex] &= ~cMask; + + lError = RegSetValueExW(pComDB->hKey, + L"ComDB", + 0, + REG_BINARY, + pBitmap, + dwSize); + +done:; + if (pBitmap != NULL) + HeapFree(GetProcessHeap(), 0, pBitmap); + + return lError; +} + + +LONG +WINAPI +ComDBResizeDatabase(IN HCOMDB hComDB, + IN DWORD NewSize) +{ + FIXME("ComDBResizeDatabase(%p %lu)\n", hComDB, NewSize); + return ERROR_CALL_NOT_IMPLEMENTED; +} + /* EOF */ Modified: trunk/reactos/dll/win32/msports/msports.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msports/msports.…
============================================================================== --- trunk/reactos/dll/win32/msports/msports.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msports/msports.spec [iso-8859-1] Wed May 25 10:52:12 2011 @@ -1,10 +1,10 @@ -@ stub ComDBClaimNextFreePort +@ stdcall ComDBClaimNextFreePort(ptr ptr) @ stdcall ComDBClaimPort(ptr long long ptr) @ stdcall ComDBClose(ptr) -@ stub ComDBGetCurrentPortUsage +@ stdcall ComDBGetCurrentPortUsage(ptr ptr long long ptr) @ stdcall ComDBOpen(ptr) -@ stub ComDBReleasePort -@ stub ComDBResizeDatabase +@ stdcall ComDBReleasePort(ptr long) +@ stdcall ComDBResizeDatabase(ptr long) @ stdcall LibMain(ptr long ptr) DllMain @ stub ParallelPortPropPageProvider @ stdcall PortsClassInstaller(long ptr ptr) Modified: trunk/reactos/include/ddk/msports.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/msports.h?rev=…
============================================================================== --- trunk/reactos/include/ddk/msports.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/msports.h [iso-8859-1] Wed May 25 10:52:12 2011 @@ -11,6 +11,11 @@ #define COMDB_MIN_PORTS_ARBITRATED 256 #define COMDB_MAX_PORTS_ARBITRATED 4096 + +LONG +WINAPI +ComDBClaimNextFreePort(IN HCOMDB hComDB, + OUT LPDWORD ComNumber); LONG WINAPI @@ -28,7 +33,7 @@ ComDBGetCurrentPortUsage(IN HCOMDB hComDB, OUT PBYTE Buffer, IN DWORD BufferSize, - IN ULONG ReportType, + IN DWORD ReportType, OUT LPDWORD MaxPortsReported); LONG
13 years, 5 months
1
0
0
0
[janderwald] 51900: [USBOHCI] - Add glue code for supporting iso transfers - Remove dead from Handle - Remove broken asserts - Add support for string descriptors - Add support for class specific en...
by janderwald@svn.reactos.org
Author: janderwald Date: Wed May 25 02:11:06 2011 New Revision: 51900 URL:
http://svn.reactos.org/svn/reactos?rev=51900&view=rev
Log: [USBOHCI] - Add glue code for supporting iso transfers - Remove dead from Handle - Remove broken asserts - Add support for string descriptors - Add support for class specific endpoint requests (Needs be ported to usbehci) - Link to usbd driver - Add support for retrieving string descriptor - Rewrite configuration descriptor handling in IUSBDevice. New code is smaller, smarter and handles a lot more cases. Needs to be ported to usbehci - Wrap usbdlib.h include in extern c macro, it has c linkage - Control transfers should now work - Need to implement support for isochronous / bulk / interrupt transfers until functional - Tested with Bluetooth USB Stick (multi function, interrupt / bulk / control / isochronous) / USB Microphone (isochronous & control) in XP SP3 Modified: branches/usb-bringup/drivers/usb/usbohci/CMakeLists.txt branches/usb-bringup/drivers/usb/usbohci/hub_controller.cpp branches/usb-bringup/drivers/usb/usbohci/usb_device.cpp branches/usb-bringup/drivers/usb/usbohci/usb_queue.cpp branches/usb-bringup/drivers/usb/usbohci/usbohci.h Modified: branches/usb-bringup/drivers/usb/usbohci/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbohci/CMakeLists.txt [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbohci/CMakeLists.txt [iso-8859-1] Wed May 25 02:11:06 2011 @@ -30,6 +30,6 @@ endif(MSVC) set_module_type(usbohci kernelmodedriver) -add_importlibs(usbohci ntoskrnl ks drmk hal) +add_importlibs(usbohci ntoskrnl ks drmk hal usbd) add_cab_target(usbohci 2) Modified: branches/usb-bringup/drivers/usb/usbohci/hub_controller.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbohci/hub_controller.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbohci/hub_controller.cpp [iso-8859-1] Wed May 25 02:11:06 2011 @@ -66,7 +66,9 @@ NTSTATUS HandleSelectInterface(IN OUT PIRP Irp, PURB Urb); NTSTATUS HandleClassOther(IN OUT PIRP Irp, PURB Urb); NTSTATUS HandleClassInterface(IN OUT PIRP Irp, PURB Urb); + NTSTATUS HandleClassEndpoint(IN OUT PIRP Irp, PURB Urb); NTSTATUS HandleBulkOrInterruptTransfer(IN OUT PIRP Irp, PURB Urb); + NTSTATUS HandleIsochronousTransfer(IN OUT PIRP Irp, PURB Urb); friend VOID StatusChangeEndpointCallBack(PVOID Context); @@ -756,6 +758,47 @@ IoCompleteRequest(Irp, IO_NO_INCREMENT); return STATUS_NOT_IMPLEMENTED; } + +//----------------------------------------------------------------------------------------- +NTSTATUS +CHubController::HandleIsochronousTransfer( + IN OUT PIRP Irp, + PURB Urb) +{ + PUSBDEVICE UsbDevice; + PUSB_ENDPOINT_DESCRIPTOR EndPointDesc = NULL; + + // + // Check PipeHandle to determine if this is a Bulk or Interrupt Transfer Request + // + EndPointDesc = (PUSB_ENDPOINT_DESCRIPTOR)Urb->UrbIsochronousTransfer.PipeHandle; + + if (!EndPointDesc) + { + DPRINT1("No EndpointDesc\n"); + Urb->UrbIsochronousTransfer.Hdr.Status = USBD_STATUS_INVALID_PIPE_HANDLE; + return STATUS_INVALID_PARAMETER; + } + + // + // sanity checks + // + ASSERT(EndPointDesc); + ASSERT((EndPointDesc->bmAttributes & USB_ENDPOINT_TYPE_MASK) == USB_ENDPOINT_TYPE_ISOCHRONOUS); + + // + // check if this is a valid usb device handle + // + PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + + // + // get device + // + UsbDevice = PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle); + + return UsbDevice->SubmitIrp(Irp); +} + //----------------------------------------------------------------------------------------- NTSTATUS CHubController::HandleBulkOrInterruptTransfer( @@ -794,22 +837,11 @@ // EndPointDesc = (PUSB_ENDPOINT_DESCRIPTOR)Urb->UrbBulkOrInterruptTransfer.PipeHandle; - switch(EndPointDesc->bmAttributes & 0x0F) - { - case USB_ENDPOINT_TYPE_CONTROL: - DPRINT1("Control Transfer is not expected!!!\n"); - return STATUS_INVALID_DEVICE_REQUEST; - case USB_ENDPOINT_TYPE_BULK: - DPRINT("Initiating Bulk Transfer\n"); - break; - case USB_ENDPOINT_TYPE_ISOCHRONOUS: - case USB_ENDPOINT_TYPE_INTERRUPT: - DPRINT1("Not Supported\n"); - break; - default: - DPRINT1("Unknown EndPoint Type!\n"); - break; - } + // + // sanity checks + // + ASSERT(EndPointDesc); + ASSERT((EndPointDesc->bmAttributes & USB_ENDPOINT_TYPE_MASK) == USB_ENDPOINT_TYPE_BULK || (EndPointDesc->bmAttributes & USB_ENDPOINT_TYPE_MASK) == USB_ENDPOINT_TYPE_INTERRUPT); // // check if this is a valid usb device handle @@ -1199,6 +1231,7 @@ { NTSTATUS Status = STATUS_NOT_IMPLEMENTED; PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor; + USB_DEFAULT_PIPE_SETUP_PACKET CtrlSetup; PUCHAR Buffer; PUSBDEVICE UsbDevice; ULONG Length; @@ -1299,8 +1332,6 @@ } else { - DPRINT1("Length %u\n", Urb->UrbControlDescriptorRequest.TransferBufferLength); - // // check if this is a valid usb device handle // @@ -1329,11 +1360,6 @@ // perform work in IUSBDevice // UsbDevice->GetConfigurationDescriptors((PUSB_CONFIGURATION_DESCRIPTOR)Urb->UrbControlDescriptorRequest.TransferBuffer, Urb->UrbControlDescriptorRequest.TransferBufferLength, &Length); - - // - // sanity check - // - PC_ASSERT(Urb->UrbControlDescriptorRequest.TransferBufferLength >= Length); // // store result size @@ -1363,15 +1389,89 @@ UsbDevice = PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle); // - // unimplemented - // - ASSERT(FALSE); + // generate setup packet + // + CtrlSetup.bRequest = USB_REQUEST_GET_DESCRIPTOR; + CtrlSetup.wValue.LowByte = Urb->UrbControlDescriptorRequest.Index; + CtrlSetup.wValue.HiByte = Urb->UrbControlDescriptorRequest.DescriptorType; + CtrlSetup.wIndex.W = Urb->UrbControlDescriptorRequest.LanguageId; + CtrlSetup.wLength = (USHORT)Urb->UrbControlDescriptorRequest.TransferBufferLength; + CtrlSetup.bmRequestType.B = 0x80; + + // + // submit setup packet + // + Status = UsbDevice->SubmitSetupPacket(&CtrlSetup, Urb->UrbControlDescriptorRequest.TransferBufferLength, Urb->UrbControlDescriptorRequest.TransferBuffer); break; } default: DPRINT1("CHubController::HandleGetDescriptor DescriptorType %x unimplemented\n", Urb->UrbControlDescriptorRequest.DescriptorType); break; } + + // + // done + // + return Status; +} + +//----------------------------------------------------------------------------------------- +NTSTATUS +CHubController::HandleClassEndpoint( + IN OUT PIRP Irp, + IN OUT PURB Urb) +{ + USB_DEFAULT_PIPE_SETUP_PACKET CtrlSetup; + NTSTATUS Status; + PUSBDEVICE UsbDevice; + + // + // sanity check + // + PC_ASSERT(Urb->UrbControlVendorClassRequest.TransferBuffer); + PC_ASSERT(Urb->UrbControlVendorClassRequest.TransferBufferLength); + PC_ASSERT(Urb->UrbHeader.UsbdDeviceHandle); + + // + // check if this is a valid usb device handle + // + PC_ASSERT(ValidateUsbDevice(PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle))); + + // + // get device + // + UsbDevice = PUSBDEVICE(Urb->UrbHeader.UsbdDeviceHandle); + + + DPRINT1("URB_FUNCTION_CLASS_ENDPOINT\n"); + DPRINT1("TransferFlags %x\n", Urb->UrbControlVendorClassRequest.TransferFlags); + DPRINT1("TransferBufferLength %x\n", Urb->UrbControlVendorClassRequest.TransferBufferLength); + DPRINT1("TransferBuffer %x\n", Urb->UrbControlVendorClassRequest.TransferBuffer); + DPRINT1("TransferBufferMDL %x\n", Urb->UrbControlVendorClassRequest.TransferBufferMDL); + DPRINT1("RequestTypeReservedBits %x\n", Urb->UrbControlVendorClassRequest.RequestTypeReservedBits); + DPRINT1("Request %x\n", Urb->UrbControlVendorClassRequest.Request); + DPRINT1("Value %x\n", Urb->UrbControlVendorClassRequest.Value); + DPRINT1("Index %x\n", Urb->UrbControlVendorClassRequest.Index); + + // + // initialize setup packet + // + CtrlSetup.bmRequestType.B = 0xa2; //FIXME: Const. + CtrlSetup.bRequest = Urb->UrbControlVendorClassRequest.Request; + CtrlSetup.wValue.W = Urb->UrbControlVendorClassRequest.Value; + CtrlSetup.wIndex.W = Urb->UrbControlVendorClassRequest.Index; + CtrlSetup.wLength = Urb->UrbControlVendorClassRequest.TransferBufferLength; + + // + // issue request + // + Status = UsbDevice->SubmitSetupPacket(&CtrlSetup, Urb->UrbControlVendorClassRequest.TransferBufferLength, Urb->UrbControlVendorClassRequest.TransferBuffer); + + // + // assert on failure + // + PC_ASSERT(NT_SUCCESS(Status)); + // // done @@ -1500,8 +1600,14 @@ case URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER: Status = HandleBulkOrInterruptTransfer(Irp, Urb); break; + case URB_FUNCTION_ISOCH_TRANSFER: + Status = HandleIsochronousTransfer(Irp, Urb); + break; case URB_FUNCTION_CLASS_INTERFACE: Status = HandleClassInterface(Irp, Urb); + break; + case URB_FUNCTION_CLASS_ENDPOINT: + Status = HandleClassEndpoint(Irp, Urb); break; default: DPRINT1("IOCTL_INTERNAL_USB_SUBMIT_URB Function %x NOT IMPLEMENTED\n", Urb->UrbHeader.Function); @@ -2290,11 +2396,7 @@ PC_ASSERT(Controller->ValidateUsbDevice(OldUsbDevice)); DPRINT1("NewUsbDevice: DeviceAddress %x\n", NewUsbDevice->GetDeviceAddress()); - - DPRINT1("OldUsbDevice: DeviceAddress %x\n", OldUsbDevice->GetDeviceAddress()); - - PC_ASSERT(FALSE); // // remove old device handle Modified: branches/usb-bringup/drivers/usb/usbohci/usb_device.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbohci/usb_device.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbohci/usb_device.cpp [iso-8859-1] Wed May 25 02:11:06 2011 @@ -10,24 +10,6 @@ #define INITGUID #include "usbohci.h" - -typedef struct _USB_ENDPOINT -{ - USB_ENDPOINT_DESCRIPTOR EndPointDescriptor; -} USB_ENDPOINT, *PUSB_ENDPOINT; - -typedef struct _USB_INTERFACE -{ - USB_INTERFACE_DESCRIPTOR InterfaceDescriptor; - USB_ENDPOINT *EndPoints; -} USB_INTERFACE, *PUSB_INTERFACE; - -typedef struct _USB_CONFIGURATION -{ - USB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor; - USB_INTERFACE *Interfaces; -} USB_CONFIGURATION, *PUSB_CONFIGURATION; - class CUSBDevice : public IUSBDevice { @@ -97,8 +79,7 @@ ULONG m_PortStatus; PUSBQUEUE m_Queue; PDMAMEMORYMANAGER m_DmaManager; - - PUSB_CONFIGURATION m_ConfigurationDescriptors; + PUSB_CONFIGURATION_DESCRIPTOR *m_ConfigurationDescriptors; }; //---------------------------------------------------------------------------------------- @@ -400,12 +381,12 @@ // // allocate configuration descriptor // - m_ConfigurationDescriptors = (PUSB_CONFIGURATION) ExAllocatePoolWithTag(NonPagedPool, sizeof(USB_CONFIGURATION) * m_DeviceDescriptor.bNumConfigurations, TAG_USBOHCI); + m_ConfigurationDescriptors = (PUSB_CONFIGURATION_DESCRIPTOR*) ExAllocatePoolWithTag(NonPagedPool, sizeof(PUSB_CONFIGURATION_DESCRIPTOR) * m_DeviceDescriptor.bNumConfigurations, TAG_USBOHCI); // // zero configuration descriptor // - RtlZeroMemory(m_ConfigurationDescriptors, sizeof(USB_CONFIGURATION) * m_DeviceDescriptor.bNumConfigurations); + RtlZeroMemory(m_ConfigurationDescriptors, sizeof(PUSB_CONFIGURATION_DESCRIPTOR) * m_DeviceDescriptor.bNumConfigurations); // // retrieve the configuration descriptors @@ -683,10 +664,7 @@ USB_DEFAULT_PIPE_SETUP_PACKET CtrlSetup; NTSTATUS Status; PMDL Mdl; - ULONG InterfaceIndex, EndPointIndex; PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor; - PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor; - PUSB_ENDPOINT_DESCRIPTOR EndPointDescriptor; // @@ -783,100 +761,9 @@ PC_ASSERT(ConfigurationDescriptor->bNumInterfaces); // - // request is complete, initialize configuration descriptor - // - RtlCopyMemory(&m_ConfigurationDescriptors[Index].ConfigurationDescriptor, ConfigurationDescriptor, ConfigurationDescriptor->bLength); - - // - // now allocate interface descriptors - // - m_ConfigurationDescriptors[Index].Interfaces = (PUSB_INTERFACE)ExAllocatePoolWithTag(NonPagedPool, sizeof(USB_INTERFACE) * ConfigurationDescriptor->bNumInterfaces, TAG_USBOHCI); - if (!m_ConfigurationDescriptors[Index].Interfaces) - { - // - // failed to allocate interface descriptors - // - ExFreePool(Buffer); - return STATUS_INSUFFICIENT_RESOURCES; - } - - // - // zero interface descriptor - // - RtlZeroMemory(m_ConfigurationDescriptors[Index].Interfaces, sizeof(USB_INTERFACE) * ConfigurationDescriptor->bNumInterfaces); - - // - // get first interface descriptor - // - InterfaceDescriptor = (PUSB_INTERFACE_DESCRIPTOR)(ConfigurationDescriptor + 1); - - // - // setup interface descriptors - // - for(InterfaceIndex = 0; InterfaceIndex < ConfigurationDescriptor->bNumInterfaces; InterfaceIndex++) - { - // - // sanity check - // - PC_ASSERT(InterfaceDescriptor->bLength == sizeof(USB_INTERFACE_DESCRIPTOR)); - PC_ASSERT(InterfaceDescriptor->bNumEndpoints); - - // - // copy current interface descriptor - // - RtlCopyMemory(&m_ConfigurationDescriptors[Index].Interfaces[InterfaceIndex].InterfaceDescriptor, InterfaceDescriptor, InterfaceDescriptor->bLength); - - // - // allocate end point descriptors - // - m_ConfigurationDescriptors[Index].Interfaces[InterfaceIndex].EndPoints = (PUSB_ENDPOINT)ExAllocatePoolWithTag(NonPagedPool, sizeof(USB_ENDPOINT) * InterfaceDescriptor->bNumEndpoints, TAG_USBOHCI); - if (!m_ConfigurationDescriptors[Index].Interfaces[InterfaceIndex].EndPoints) - { - // - // failed to allocate endpoint - // - Status = STATUS_INSUFFICIENT_RESOURCES; - break; - } - - // - // zero memory - // - RtlZeroMemory(m_ConfigurationDescriptors[Index].Interfaces[InterfaceIndex].EndPoints, sizeof(USB_ENDPOINT) * InterfaceDescriptor->bNumEndpoints); - - // - // initialize end point descriptors - // - EndPointDescriptor = (PUSB_ENDPOINT_DESCRIPTOR)(InterfaceDescriptor + 1); - - for(EndPointIndex = 0; EndPointIndex < InterfaceDescriptor->bNumEndpoints; EndPointIndex++) - { - // - // sanity check - // - PC_ASSERT(EndPointDescriptor->bLength == sizeof(USB_ENDPOINT_DESCRIPTOR)); - - // - // copy endpoint descriptor - // - RtlCopyMemory(&m_ConfigurationDescriptors[Index].Interfaces[InterfaceIndex].EndPoints[EndPointIndex].EndPointDescriptor, EndPointDescriptor, EndPointDescriptor->bLength); - - // - // move to next offset - // - EndPointDescriptor = (PUSB_ENDPOINT_DESCRIPTOR)((ULONG_PTR)EndPointDescriptor + EndPointDescriptor->bLength); - } - - // - // update interface descriptor offset - // - InterfaceDescriptor = (PUSB_INTERFACE_DESCRIPTOR)EndPointDescriptor; - } - - // - // free buffer - // - ExFreePoolWithTag(Buffer, TAG_USBOHCI); + // store configuration descriptor + // + m_ConfigurationDescriptors[Index] = ConfigurationDescriptor; // // done @@ -890,9 +777,6 @@ IN ULONG BufferLength, OUT PULONG OutBufferLength) { - PVOID Buffer; - ULONG InterfaceIndex, EndpointIndex; - // // sanity check // @@ -911,78 +795,10 @@ PC_ASSERT(m_DeviceDescriptor.bNumConfigurations == 1); // - // copy first configuration descriptor - // - RtlCopyMemory(ConfigDescriptorBuffer, &m_ConfigurationDescriptors[0].ConfigurationDescriptor, sizeof(USB_CONFIGURATION_DESCRIPTOR)); - - // - // subtract length - // - BufferLength -= sizeof(USB_CONFIGURATION_DESCRIPTOR); - *OutBufferLength += sizeof(USB_CONFIGURATION_DESCRIPTOR); - - // - // increment offset - // - Buffer = (PVOID)(ConfigDescriptorBuffer + 1); - - for(InterfaceIndex = 0; InterfaceIndex < m_ConfigurationDescriptors[0].ConfigurationDescriptor.bNumInterfaces; InterfaceIndex++) - { - if (BufferLength < sizeof(USB_INTERFACE_DESCRIPTOR)) - { - // - // no more room in buffer - // - return; - } - - // - // copy interface descriptor - // - RtlCopyMemory(Buffer, &m_ConfigurationDescriptors[0].Interfaces[InterfaceIndex].InterfaceDescriptor, sizeof(USB_INTERFACE_DESCRIPTOR)); - - // - // increment offset - // - Buffer = (PVOID)((ULONG_PTR)Buffer + sizeof(USB_INTERFACE_DESCRIPTOR)); - BufferLength -= sizeof(USB_INTERFACE_DESCRIPTOR); - *OutBufferLength += sizeof(USB_INTERFACE_DESCRIPTOR); - - // - // does the interface have endpoints - // - if (m_ConfigurationDescriptors[0].Interfaces[InterfaceIndex].InterfaceDescriptor.bNumEndpoints) - { - // - // is enough space available - // - if (BufferLength < sizeof(USB_ENDPOINT_DESCRIPTOR) * m_ConfigurationDescriptors[0].Interfaces[InterfaceIndex].InterfaceDescriptor.bNumEndpoints) - { - // - // no buffer - // - return; - } - - // - // copy end points - // - for(EndpointIndex = 0; EndpointIndex < m_ConfigurationDescriptors[0].Interfaces[InterfaceIndex].InterfaceDescriptor.bNumEndpoints; EndpointIndex++) - { - // - // copy endpoint - // - RtlCopyMemory(Buffer, &m_ConfigurationDescriptors[0].Interfaces[InterfaceIndex].EndPoints[EndpointIndex].EndPointDescriptor, sizeof(USB_ENDPOINT_DESCRIPTOR)); - - // - // increment buffer offset - // - Buffer = (PVOID)((ULONG_PTR)Buffer + sizeof(USB_ENDPOINT_DESCRIPTOR)); - BufferLength -= sizeof(USB_ENDPOINT_DESCRIPTOR); - *OutBufferLength += sizeof(USB_ENDPOINT_DESCRIPTOR); - } - } - } + // copy configuration descriptor + // + RtlCopyMemory(ConfigDescriptorBuffer, m_ConfigurationDescriptors[0], min(m_ConfigurationDescriptors[0]->wTotalLength, BufferLength)); + *OutBufferLength = m_ConfigurationDescriptors[0]->wTotalLength; } //---------------------------------------------------------------------------------------- @@ -994,7 +810,10 @@ // PC_ASSERT(m_DeviceDescriptor.bNumConfigurations == 1); - return m_ConfigurationDescriptors[0].ConfigurationDescriptor.wTotalLength; + ASSERT(m_ConfigurationDescriptors[0]); + ASSERT(m_ConfigurationDescriptors[0]->wTotalLength); + + return m_ConfigurationDescriptors[0]->wTotalLength; } //---------------------------------------------------------------------------------------- VOID @@ -1074,21 +893,28 @@ IN PUSBD_INTERFACE_INFORMATION InterfaceInfo, OUT USBD_CONFIGURATION_HANDLE *ConfigurationHandle) { - ULONG ConfigurationIndex = 0; ULONG InterfaceIndex, PipeIndex; USB_DEFAULT_PIPE_SETUP_PACKET CtrlSetup; NTSTATUS Status; + PUSB_CONFIGURATION_DESCRIPTOR CurrentConfigurationDescriptor; + PUSB_INTERFACE_DESCRIPTOR CurrentInterfaceDescriptor; + PUSB_ENDPOINT_DESCRIPTOR CurrentEndpointDescriptor; + PVOID StartPosition; // // FIXME: support multiple configurations // - PC_ASSERT(m_DeviceDescriptor.bNumConfigurations == 1); - PC_ASSERT(ConfigurationDescriptor->iConfiguration == m_ConfigurationDescriptors[ConfigurationIndex].ConfigurationDescriptor.iConfiguration); + ASSERT(m_DeviceDescriptor.bNumConfigurations == 1); + ASSERT(m_ConfigurationDescriptors[0]); + CurrentConfigurationDescriptor = m_ConfigurationDescriptors[0]; // // sanity check // - PC_ASSERT(ConfigurationDescriptor->bNumInterfaces <= m_ConfigurationDescriptors[ConfigurationIndex].ConfigurationDescriptor.bNumInterfaces); + PC_ASSERT(ConfigurationDescriptor->iConfiguration == CurrentConfigurationDescriptor->iConfiguration); + PC_ASSERT(ConfigurationDescriptor->bNumInterfaces <= CurrentConfigurationDescriptor->bNumInterfaces); + DPRINT1("CUSBDevice::SelectConfiguration NumInterfaces %lu\n", ConfigurationDescriptor->bNumInterfaces); + // // copy interface info and pipe info @@ -1096,36 +922,62 @@ for(InterfaceIndex = 0; InterfaceIndex < ConfigurationDescriptor->bNumInterfaces; InterfaceIndex++) { // - // sanity check: is the info pre-layed out - // - PC_ASSERT(InterfaceInfo->NumberOfPipes == m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].InterfaceDescriptor.bNumEndpoints); - PC_ASSERT(InterfaceInfo->Length != 0); + // find interface descriptor + // + CurrentInterfaceDescriptor = USBD_ParseConfigurationDescriptor(CurrentConfigurationDescriptor, InterfaceInfo->InterfaceNumber, InterfaceInfo->AlternateSetting); + + // + // sanity check + // + ASSERT(CurrentInterfaceDescriptor); + ASSERT(CurrentInterfaceDescriptor->bLength != 0); + ASSERT(InterfaceInfo->NumberOfPipes == CurrentInterfaceDescriptor->bNumEndpoints); + ASSERT(InterfaceInfo->Length != 0); #ifdef _MSC_VER PC_ASSERT(InterfaceInfo->Length == FIELD_OFFSET(USBD_INTERFACE_INFORMATION, Pipes[InterfaceInfo->NumberOfPipes])); #endif + DPRINT1("CUSBDevice::SelectConfiguration InterfaceNumber %lu AlternativeSetting %lu bNumEndpoints %lu\n", InterfaceInfo->InterfaceNumber, InterfaceInfo->AlternateSetting, CurrentInterfaceDescriptor->bNumEndpoints); + // // copy interface info // - InterfaceInfo->InterfaceHandle = (USBD_INTERFACE_HANDLE)&m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex]; - InterfaceInfo->Class = m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceClass; - InterfaceInfo->SubClass = m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceSubClass; - InterfaceInfo->Protocol = m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceProtocol; + InterfaceInfo->InterfaceHandle = (USBD_INTERFACE_HANDLE)CurrentInterfaceDescriptor; + InterfaceInfo->Class = CurrentInterfaceDescriptor->bInterfaceClass; + InterfaceInfo->SubClass = CurrentInterfaceDescriptor->bInterfaceSubClass; + InterfaceInfo->Protocol = CurrentInterfaceDescriptor->bInterfaceProtocol; InterfaceInfo->Reserved = 0; // // copy endpoint info // + StartPosition = CurrentInterfaceDescriptor; for(PipeIndex = 0; PipeIndex < InterfaceInfo->NumberOfPipes; PipeIndex++) { // + // find corresponding endpoint descriptor + // + CurrentEndpointDescriptor = (PUSB_ENDPOINT_DESCRIPTOR)USBD_ParseDescriptors(CurrentConfigurationDescriptor, CurrentConfigurationDescriptor->wTotalLength, StartPosition, USB_ENDPOINT_DESCRIPTOR_TYPE); + + // + // sanity checks + // + ASSERT(CurrentEndpointDescriptor); + ASSERT(CurrentEndpointDescriptor->bDescriptorType == USB_ENDPOINT_DESCRIPTOR_TYPE); + + // // copy pipe info // - InterfaceInfo->Pipes[PipeIndex].MaximumPacketSize = m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.wMaxPacketSize; - InterfaceInfo->Pipes[PipeIndex].EndpointAddress = m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bEndpointAddress; - InterfaceInfo->Pipes[PipeIndex].Interval = m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bInterval; - InterfaceInfo->Pipes[PipeIndex].PipeType = (USBD_PIPE_TYPE)m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bmAttributes; - InterfaceInfo->Pipes[PipeIndex].PipeHandle = (PVOID)&m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor; + InterfaceInfo->Pipes[PipeIndex].MaximumPacketSize = CurrentEndpointDescriptor->wMaxPacketSize; + InterfaceInfo->Pipes[PipeIndex].EndpointAddress = CurrentEndpointDescriptor->bEndpointAddress; + InterfaceInfo->Pipes[PipeIndex].Interval = CurrentEndpointDescriptor->bInterval; + InterfaceInfo->Pipes[PipeIndex].PipeType = (USBD_PIPE_TYPE)CurrentEndpointDescriptor->bmAttributes; + InterfaceInfo->Pipes[PipeIndex].PipeHandle = (PVOID)CurrentEndpointDescriptor; + + // + // move start position beyond the current endpoint descriptor + // + StartPosition = (PVOID)(CurrentEndpointDescriptor + 1); } // @@ -1161,7 +1013,7 @@ // // store configuration handle // - *ConfigurationHandle = &m_ConfigurationDescriptors[ConfigurationIndex]; + *ConfigurationHandle = m_ConfigurationDescriptors[0]; } // @@ -1177,65 +1029,49 @@ IN OUT PUSBD_INTERFACE_INFORMATION InterfaceInfo) { ULONG ConfigurationIndex = 0; - PUSB_CONFIGURATION Configuration; + PUSB_CONFIGURATION_DESCRIPTOR Configuration; ULONG PipeIndex; USB_DEFAULT_PIPE_SETUP_PACKET CtrlSetup; NTSTATUS Status; + PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor; + PUSB_ENDPOINT_DESCRIPTOR CurrentEndpointDescriptor; + PVOID StartPosition; // // FIXME support multiple configurations // - PC_ASSERT(&m_ConfigurationDescriptors[ConfigurationIndex] == (PUSB_CONFIGURATION)ConfigurationHandle); + PC_ASSERT(m_ConfigurationDescriptors[0] == (PUSB_CONFIGURATION_DESCRIPTOR)ConfigurationHandle); // // get configuration struct // - Configuration = (PUSB_CONFIGURATION)ConfigurationHandle; + Configuration = (PUSB_CONFIGURATION_DESCRIPTOR)ConfigurationHandle; // // sanity checks // - PC_ASSERT(Configuration->ConfigurationDescriptor.bNumInterfaces > InterfaceInfo->InterfaceNumber); - PC_ASSERT(Configuration->Interfaces[InterfaceInfo->InterfaceNumber].InterfaceDescriptor.bNumEndpoints == InterfaceInfo->NumberOfPipes); + PC_ASSERT(Configuration->bNumInterfaces > InterfaceInfo->InterfaceNumber); #ifdef _MSC_VER - PC_ASSERT(InterfaceInfo->Length == FIELD_OFFSET(USBD_INTERFACE_INFORMATION, Pipes[InterfaceInfo->NumberOfPipes])); + //PC_ASSERT(InterfaceInfo->Length == FIELD_OFFSET(USBD_INTERFACE_INFORMATION, Pipes[InterfaceInfo->NumberOfPipes])); #endif // - // copy pipe handles - // - for(PipeIndex = 0; PipeIndex < InterfaceInfo->NumberOfPipes; PipeIndex++) - { - // - // copy pipe handle - // - DPRINT1("PipeIndex %lu\n", PipeIndex); - DPRINT1("EndpointAddress %x\n", InterfaceInfo->Pipes[PipeIndex].EndpointAddress); - DPRINT1("Interval %d\n", InterfaceInfo->Pipes[PipeIndex].Interval); - DPRINT1("MaximumPacketSize %d\n", InterfaceInfo->Pipes[PipeIndex].MaximumPacketSize); - DPRINT1("MaximumTransferSize %d\n", InterfaceInfo->Pipes[PipeIndex].MaximumTransferSize); - DPRINT1("PipeFlags %d\n", InterfaceInfo->Pipes[PipeIndex].PipeFlags); - DPRINT1("PipeType %dd\n", InterfaceInfo->Pipes[PipeIndex].PipeType); - DPRINT1("UsbEndPoint %x\n", Configuration->Interfaces[InterfaceInfo->InterfaceNumber].EndPoints[PipeIndex].EndPointDescriptor.bEndpointAddress); - PC_ASSERT(Configuration->Interfaces[InterfaceInfo->InterfaceNumber].EndPoints[PipeIndex].EndPointDescriptor.bEndpointAddress == InterfaceInfo->Pipes[PipeIndex].EndpointAddress); - - InterfaceInfo->Pipes[PipeIndex].PipeHandle = &Configuration->Interfaces[InterfaceInfo->InterfaceNumber].EndPoints[PipeIndex].EndPointDescriptor; - - if (Configuration->Interfaces[InterfaceInfo->InterfaceNumber].EndPoints[PipeIndex].EndPointDescriptor.bmAttributes & (USB_ENDPOINT_TYPE_ISOCHRONOUS | USB_ENDPOINT_TYPE_INTERRUPT)) - { - // - // FIXME: check if enough bandwidth is available - // - } - } + // FIXME: check bandwidth + // + + // + // find interface number + // + InterfaceDescriptor = USBD_ParseConfigurationDescriptor(Configuration, InterfaceInfo->InterfaceNumber, InterfaceInfo->AlternateSetting); + ASSERT(InterfaceDescriptor); // // initialize setup packet // RtlZeroMemory(&CtrlSetup, sizeof(USB_DEFAULT_PIPE_SETUP_PACKET)); CtrlSetup.bRequest = USB_REQUEST_SET_INTERFACE; - CtrlSetup.wValue.W = Configuration->Interfaces[InterfaceInfo->InterfaceNumber].InterfaceDescriptor.bAlternateSetting; - CtrlSetup.wIndex.W = Configuration->Interfaces[InterfaceInfo->InterfaceNumber].InterfaceDescriptor.bInterfaceNumber; + CtrlSetup.wValue.W = InterfaceDescriptor->bAlternateSetting; + CtrlSetup.wIndex.W = InterfaceDescriptor->bInterfaceNumber; CtrlSetup.bmRequestType.B = 0x01; // @@ -1247,7 +1083,55 @@ // informal debug print // DPRINT1("CUSBDevice::SelectInterface AlternateSetting %x InterfaceNumber %x Status %x\n", InterfaceInfo->AlternateSetting, InterfaceInfo->InterfaceNumber, Status); - + DPRINT1("CUSBDevice::SelectInterface bInterfaceNumber %u bAlternateSetting %u NumberOfPipes %u Length %lu\n", + InterfaceDescriptor->bInterfaceNumber, InterfaceDescriptor->bAlternateSetting, InterfaceInfo->NumberOfPipes, InterfaceInfo->Length); + InterfaceInfo->InterfaceHandle = InterfaceDescriptor; + InterfaceInfo->NumberOfPipes = InterfaceDescriptor->bNumEndpoints; + + // + // are there end points + // + if (InterfaceDescriptor->bNumEndpoints) + { + // + // sanity check + // + ASSERT(InterfaceInfo->Length == sizeof(USBD_INTERFACE_INFORMATION) + (InterfaceDescriptor->bNumEndpoints > 1 ? sizeof(USBD_PIPE_INFORMATION) * (InterfaceDescriptor->bNumEndpoints - 1) : 0)); + + // + // store number of pipes + // + InterfaceInfo->NumberOfPipes = InterfaceDescriptor->bNumEndpoints; + + StartPosition = InterfaceDescriptor; + for(PipeIndex = 0; PipeIndex < InterfaceInfo->NumberOfPipes; PipeIndex++) + { + // + // find corresponding endpoint descriptor + // + CurrentEndpointDescriptor = (PUSB_ENDPOINT_DESCRIPTOR)USBD_ParseDescriptors(Configuration, Configuration->wTotalLength, StartPosition, USB_ENDPOINT_DESCRIPTOR_TYPE); + + // + // sanity checks + // + ASSERT(CurrentEndpointDescriptor); + ASSERT(CurrentEndpointDescriptor->bDescriptorType == USB_ENDPOINT_DESCRIPTOR_TYPE); + + // + // copy pipe info + // + InterfaceInfo->Pipes[PipeIndex].MaximumPacketSize = CurrentEndpointDescriptor->wMaxPacketSize; + InterfaceInfo->Pipes[PipeIndex].EndpointAddress = CurrentEndpointDescriptor->bEndpointAddress; + InterfaceInfo->Pipes[PipeIndex].Interval = CurrentEndpointDescriptor->bInterval; + InterfaceInfo->Pipes[PipeIndex].PipeType = (USBD_PIPE_TYPE)CurrentEndpointDescriptor->bmAttributes; + InterfaceInfo->Pipes[PipeIndex].PipeHandle = (PVOID)CurrentEndpointDescriptor; + + // + // move start position beyond the current endpoint descriptor + // + StartPosition = (PVOID)(CurrentEndpointDescriptor + 1); + } + } // // done // Modified: branches/usb-bringup/drivers/usb/usbohci/usb_queue.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbohci/usb_queue.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbohci/usb_queue.cpp [iso-8859-1] Wed May 25 02:11:06 2011 @@ -146,10 +146,10 @@ { case USB_ENDPOINT_TYPE_ISOCHRONOUS: case USB_ENDPOINT_TYPE_INTERRUPT: + case USB_ENDPOINT_TYPE_BULK: /* NOT IMPLEMENTED IN QUEUE */ Status = STATUS_NOT_SUPPORTED; break; - case USB_ENDPOINT_TYPE_BULK: case USB_ENDPOINT_TYPE_CONTROL: Status = STATUS_SUCCESS; break; Modified: branches/usb-bringup/drivers/usb/usbohci/usbohci.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbohci/usbohci.h [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbohci/usbohci.h [iso-8859-1] Wed May 25 02:11:06 2011 @@ -7,6 +7,13 @@ #include <hubbusif.h> #include <usbbusif.h> #include <usbioctl.h> + +extern +"C" +{ +#include <usbdlib.h> +} + // // FIXME: // #include <usbprotocoldefs.h>
13 years, 5 months
1
0
0
0
[janderwald] 51899: [USBD] - Add missing export
by janderwald@svn.reactos.org
Author: janderwald Date: Tue May 24 23:03:35 2011 New Revision: 51899 URL:
http://svn.reactos.org/svn/reactos?rev=51899&view=rev
Log: [USBD] - Add missing export Modified: branches/usb-bringup/drivers/usb/usbd/usbd.spec Modified: branches/usb-bringup/drivers/usb/usbd/usbd.spec URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbd/us…
============================================================================== --- branches/usb-bringup/drivers/usb/usbd/usbd.spec [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbd/usbd.spec [iso-8859-1] Tue May 24 23:03:35 2011 @@ -4,6 +4,7 @@ @ stdcall USBD_CreateConfigurationRequestEx(ptr ptr) @ stdcall USBD_CreateConfigurationRequest(ptr ptr) @ stdcall USBD_GetInterfaceLength(ptr ptr) +@ stdcall USBD_ParseConfigurationDescriptor(ptr long long) @ stdcall USBD_ParseConfigurationDescriptorEx(ptr ptr long long long long long) @ stdcall USBD_ParseDescriptors(ptr long ptr long) ;USBD_GetPdoRegistryParameters
13 years, 5 months
1
0
0
0
[pschweitzer] 51898: [NTOSKRNL] - Fix remove locks with debug block initialization in IoInitializeRemoveLockEx(). Before only their debug block was initialized, and not the lock itself... - Impleme...
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Tue May 24 21:21:54 2011 New Revision: 51898 URL:
http://svn.reactos.org/svn/reactos?rev=51898&view=rev
Log: [NTOSKRNL] - Fix remove locks with debug block initialization in IoInitializeRemoveLockEx(). Before only their debug block was initialized, and not the lock itself... - Implemented support remove locks debug blocks in IoAcquireRemoveLockEx(), IoReleaseRemoveLockEx() and IoReleaseRemoveLockAndWaitEx() This will help debugging in storage stack and is required since partmgr is using them. Modified: trunk/reactos/ntoskrnl/io/iomgr/remlock.c Modified: trunk/reactos/ntoskrnl/io/iomgr/remlock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/remlock.…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/remlock.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/remlock.c [iso-8859-1] Tue May 24 21:21:54 2011 @@ -5,6 +5,7 @@ * PURPOSE: Remove Lock Support * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) * Filip Navara (navaraf(a)reactos.org) + * Pierre Schweitzer (pierre.schweitzer(a)reactos.org) */ /* INCLUDES ******************************************************************/ @@ -12,6 +13,15 @@ #include <ntoskrnl.h> #define NDEBUG #include <debug.h> + +typedef struct _IO_REMOVE_LOCK_TRACKING_BLOCK +{ + SINGLE_LIST_ENTRY BlockEntry; + PVOID Tag; + LARGE_INTEGER LockMoment; + LPCSTR File; + ULONG Line; +} IO_REMOVE_LOCK_TRACKING_BLOCK; /* FUNCTIONS *****************************************************************/ @@ -29,26 +39,34 @@ PEXTENDED_IO_REMOVE_LOCK Lock = (PEXTENDED_IO_REMOVE_LOCK)RemoveLock; PAGED_CODE(); - /* Check if this is a debug lock */ - if (RemlockSize == sizeof(IO_REMOVE_LOCK_DBG_BLOCK)) - { - /* Clear the lock */ - RtlZeroMemory(Lock, RemlockSize); - - /* Setup debug parameters */ - Lock->Dbg.HighWatermark = HighWatermark; - Lock->Dbg.MaxLockedTicks = MaxLockedMinutes * 600000000; - Lock->Dbg.AllocateTag = AllocateTag; - KeInitializeSpinLock(&Lock->Dbg.Spin); - } - else - { - /* Otherwise, setup a free block */ - Lock->Common.Removed = FALSE; - Lock->Common.IoCount = 1; - KeInitializeEvent(&Lock->Common.RemoveEvent, - SynchronizationEvent, - FALSE); + ASSERT(HighWatermark < MAXLONG); + + /* If no lock given, nothing to do */ + if (!Lock) + { + return; + } + + switch (RemlockSize) + { + /* Check if this is a debug lock */ + case sizeof(IO_REMOVE_LOCK_DBG_BLOCK): + /* Setup debug parameters */ + Lock->Dbg.Signature = 'COLR'; + Lock->Dbg.HighWatermark = HighWatermark; + Lock->Dbg.MaxLockedTicks = KeQueryTimeIncrement() * MaxLockedMinutes * 600000000; + Lock->Dbg.AllocateTag = AllocateTag; + KeInitializeSpinLock(&(Lock->Dbg.Spin)); + Lock->Dbg.LowMemoryCount = 0; + Lock->Dbg.Blocks = NULL; + + case sizeof(IO_REMOVE_LOCK_COMMON_BLOCK): + /* Setup a free block */ + Lock->Common.Removed = FALSE; + Lock->Common.IoCount = 1; + KeInitializeEvent(&Lock->Common.RemoveEvent, + SynchronizationEvent, + FALSE); } } @@ -63,27 +81,51 @@ IN ULONG Line, IN ULONG RemlockSize) { + KIRQL OldIrql; + LONG LockValue; + PIO_REMOVE_LOCK_TRACKING_BLOCK TrackingBlock; PEXTENDED_IO_REMOVE_LOCK Lock = (PEXTENDED_IO_REMOVE_LOCK)RemoveLock; /* Increase the lock count */ - InterlockedIncrement(&Lock->Common.IoCount); + LockValue = InterlockedIncrement(&(Lock->Common.IoCount)); + ASSERT(LockValue > 0); if (!Lock->Common.Removed) { /* Check what kind of lock this is */ if (RemlockSize == sizeof(IO_REMOVE_LOCK_DBG_BLOCK)) { - /* FIXME: Not yet supported */ - DPRINT1("UNIMPLEMENTED\n"); - ASSERT(FALSE); + ASSERT(Lock->Dbg.HighWatermark == 0 || LockValue <= Lock->Dbg.HighWatermark); + + /* Allocate a tracking block */ + TrackingBlock = ExAllocatePoolWithTag(NonPagedPool, sizeof(IO_REMOVE_LOCK_TRACKING_BLOCK), Lock->Dbg.AllocateTag); + if (!TrackingBlock) + { + /* Keep count of failures for lock release and missing tags */ + InterlockedIncrement(&(Lock->Dbg.LowMemoryCount)); + } + else + { + /* Initialize block */ + RtlZeroMemory(TrackingBlock, sizeof(IO_REMOVE_LOCK_TRACKING_BLOCK)); + TrackingBlock->Tag = Tag; + TrackingBlock->File = File; + TrackingBlock->Line = Line; + KeQueryTickCount(&(TrackingBlock->LockMoment)); + + /* Queue the block */ + KeAcquireSpinLock(&(Lock->Dbg.Spin), &OldIrql); + PushEntryList((PSINGLE_LIST_ENTRY)&(Lock->Dbg.Blocks), &(TrackingBlock->BlockEntry)); + KeReleaseSpinLock(&(Lock->Dbg.Spin), OldIrql); + } } } else { /* Otherwise, decrement the count and check if it's gone */ - if (!InterlockedDecrement(&Lock->Common.IoCount)) + if (!InterlockedDecrement(&(Lock->Common.IoCount))) { /* Signal the event */ - KeSetEvent(&Lock->Common.RemoveEvent, IO_NO_INCREMENT, FALSE); + KeSetEvent(&(Lock->Common.RemoveEvent), IO_NO_INCREMENT, FALSE); } /* Return pending delete */ @@ -103,21 +145,92 @@ IN PVOID Tag, IN ULONG RemlockSize) { + KIRQL OldIrql; + LONG LockValue; + BOOLEAN TagFound; + LARGE_INTEGER CurrentMoment; + PSINGLE_LIST_ENTRY ListEntry; + PIO_REMOVE_LOCK_TRACKING_BLOCK TrackingBlock; PEXTENDED_IO_REMOVE_LOCK Lock = (PEXTENDED_IO_REMOVE_LOCK)RemoveLock; /* Check what kind of lock this is */ if (RemlockSize == sizeof(IO_REMOVE_LOCK_DBG_BLOCK)) { - /* FIXME: Not yet supported */ - DPRINT1("UNIMPLEMENTED\n"); - ASSERT(FALSE); + /* Acquire blocks queue */ + KeAcquireSpinLock(&(Lock->Dbg.Spin), &OldIrql); + + /* Get the release moment */ + KeQueryTickCount(&CurrentMoment); + + /* Start browsing tracking blocks to find a block that would match given tag */ + TagFound = FALSE; + for (ListEntry = (PSINGLE_LIST_ENTRY)&Lock->Dbg.Blocks; ListEntry; ListEntry = ListEntry->Next) + { + TrackingBlock = CONTAINING_RECORD(ListEntry, IO_REMOVE_LOCK_TRACKING_BLOCK, BlockEntry); + + /* First of all, check if the lock was locked for too long */ + if (CurrentMoment.QuadPart && + CurrentMoment.QuadPart - TrackingBlock->LockMoment.QuadPart > Lock->Dbg.MaxLockedTicks) + { + DPRINT("Lock %#08lx (with tag %#08lx) was supposed to be held at max %I64d ticks but lasted longer\n", + Lock, TrackingBlock->Tag, Lock->Dbg.MaxLockedTicks); + DPRINT("Lock was acquired in file %s at line %d\n", TrackingBlock->File, TrackingBlock->Line); + ASSERT(FALSE); + } + + /* If no tracking was found yet */ + if (TagFound == FALSE) + { + /* Check if the current one could match */ + if (TrackingBlock->Tag == Tag) + { + /* Yes, then remove it from the queue and free it */ + TagFound = TRUE; + if (ListEntry == (PSINGLE_LIST_ENTRY)&Lock->Dbg.Blocks) + { + /* Here it is head, remove it using macro */ + PopEntryList((PSINGLE_LIST_ENTRY)&(Lock->Dbg.Blocks)); + ExFreePoolWithTag(TrackingBlock, Lock->Dbg.AllocateTag); + } + else + { + /* It's not head, remove it "manually */ + ListEntry->Next = TrackingBlock->BlockEntry.Next; + ExFreePoolWithTag(TrackingBlock, Lock->Dbg.AllocateTag); + } + } + } + } + /* We're done, release queue lock */ + KeReleaseSpinLock(&(Lock->Dbg.Spin), OldIrql); + + /* If we didn't find any matching block */ + if (TagFound == FALSE) + { + /* Check if it was because we were low in memory + * If yes, then ignore, that's normal + */ + if (InterlockedDecrement(&(Lock->Dbg.LowMemoryCount) < 0)) + { + /* Otherwise signal the issue, it shouldn't happen */ + InterlockedIncrement(&(Lock->Dbg.LowMemoryCount)); + DPRINT("Failed finding block for tag: %#08lx\n", Tag); + ASSERT(FALSE); + } + } } /* Decrement the lock count */ - if (!InterlockedDecrement(&Lock->Common.IoCount)) - { + LockValue = InterlockedDecrement(&(Lock->Common.IoCount)); + ASSERT(LockValue >= 0); + + if (!LockValue) + { + /* Someone should be waiting... */ + ASSERT(Lock->Common.Removed); + /* Signal the event */ - KeSetEvent(&Lock->Common.RemoveEvent, IO_NO_INCREMENT, FALSE); + KeSetEvent(&(Lock->Common.RemoveEvent), IO_NO_INCREMENT, FALSE); } } @@ -130,15 +243,21 @@ IN PVOID Tag, IN ULONG RemlockSize) { + LONG LockValue; + PIO_REMOVE_LOCK_TRACKING_BLOCK TrackingBlock; PEXTENDED_IO_REMOVE_LOCK Lock = (PEXTENDED_IO_REMOVE_LOCK)RemoveLock; PAGED_CODE(); /* Remove the lock and decrement the count */ Lock->Common.Removed = TRUE; + LockValue = InterlockedDecrement(&Lock->Common.IoCount); + ASSERT(LockValue > 0); + + /* If we are still > 0, then wait for the others to remove lock */ if (InterlockedDecrement(&Lock->Common.IoCount) > 0) { /* Wait for it */ - KeWaitForSingleObject(&Lock->Common.RemoveEvent, + KeWaitForSingleObject(&(Lock->Common.RemoveEvent), Executive, KernelMode, FALSE, @@ -148,9 +267,20 @@ /* Check what kind of lock this is */ if (RemlockSize == sizeof(IO_REMOVE_LOCK_DBG_BLOCK)) { - /* FIXME: Not yet supported */ - DPRINT1("UNIMPLEMENTED\n"); - ASSERT(FALSE); + /* A block must be remaining */ + ASSERT(Lock->Dbg.Blocks); + + /* Get it */ + TrackingBlock = CONTAINING_RECORD(Lock->Dbg.Blocks, IO_REMOVE_LOCK_TRACKING_BLOCK, BlockEntry); + /* Tag should match */ + if (TrackingBlock->Tag != Tag) + { + DPRINT("Last tracking block tag invalid! Expected: %x, having: %x\n", Tag, TrackingBlock->Tag); + ASSERT(TrackingBlock->Tag != Tag); + } + + /* Release block */ + ExFreePoolWithTag(Lock->Dbg.Blocks, Lock->Dbg.AllocateTag); } }
13 years, 5 months
1
0
0
0
[gedmurphy] 51897: [SHELL32_NEW] - Merge 48792 and 49372 - Fix rbuild file, it really will build now.
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Tue May 24 19:14:42 2011 New Revision: 51897 URL:
http://svn.reactos.org/svn/reactos?rev=51897&view=rev
Log: [SHELL32_NEW] - Merge 48792 and 49372 - Fix rbuild file, it really will build now. Modified: branches/shell32_new-bringup/dll/win32/shell32/drive.cpp branches/shell32_new-bringup/dll/win32/shell32/shell32.rbuild branches/shell32_new-bringup/dll/win32/shell32/shelllink.cpp branches/shell32_new-bringup/dll/win32/shell32/shelllink.h Modified: branches/shell32_new-bringup/dll/win32/shell32/drive.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/dll/win32/s…
============================================================================== --- branches/shell32_new-bringup/dll/win32/shell32/drive.cpp [iso-8859-1] (original) +++ branches/shell32_new-bringup/dll/win32/shell32/drive.cpp [iso-8859-1] Tue May 24 19:14:42 2011 @@ -385,7 +385,6 @@ { WCHAR szResult[128]; LONGLONG Result; -#ifdef IOCTL_DISK_GET_LENGTH_INFO_IMPLEMENTED HANDLE hVolume; DWORD BytesReturned = 0; @@ -394,16 +393,13 @@ if (hVolume != INVALID_HANDLE_VALUE) { ret = DeviceIoControl(hVolume, IOCTL_DISK_GET_LENGTH_INFO, NULL, 0, (LPVOID)&TotalNumberOfBytes, sizeof(ULARGE_INTEGER), &BytesReturned, NULL); - if (ret && StrFormatByteSizeW(LengthInformation.Length.QuadPart, szResult, sizeof(szResult) / sizeof(WCHAR))) + if (ret && StrFormatByteSizeW(TotalNumberOfBytes.QuadPart, szResult, sizeof(szResult) / sizeof(WCHAR))) SendDlgItemMessageW(hwndDlg, 14007, WM_SETTEXT, (WPARAM)NULL, (LPARAM)szResult); CloseHandle(hVolume); } - TRACE("szResult %s hVOlume %p ret %d LengthInformation %ul Bytesreturned %d\n", debugstr_w(szResult), hVolume, ret, LengthInformation.Length.QuadPart, BytesReturned); -#else - if (ret && StrFormatByteSizeW(TotalNumberOfBytes.QuadPart, szResult, sizeof(szResult) / sizeof(WCHAR))) - SendDlgItemMessageW(hwndDlg, 14007, WM_SETTEXT, (WPARAM)NULL, (LPARAM)szResult); -#endif + + TRACE("szResult %s hVOlume %p ret %d LengthInformation %ul Bytesreturned %d\n", debugstr_w(szResult), hVolume, ret, TotalNumberOfBytes.QuadPart, BytesReturned); if (StrFormatByteSizeW(TotalNumberOfBytes.QuadPart - FreeBytesAvailable.QuadPart, szResult, sizeof(szResult) / sizeof(WCHAR))) SendDlgItemMessageW(hwndDlg, 14003, WM_SETTEXT, (WPARAM)NULL, (LPARAM)szResult); Modified: branches/shell32_new-bringup/dll/win32/shell32/shell32.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/dll/win32/s…
============================================================================== --- branches/shell32_new-bringup/dll/win32/shell32/shell32.rbuild [iso-8859-1] (original) +++ branches/shell32_new-bringup/dll/win32/shell32/shell32.rbuild [iso-8859-1] Tue May 24 19:14:42 2011 @@ -1,5 +1,5 @@ <group> -<module name="shell32_new" type="win32dll" baseaddress="${BASEADDRESS_SHELL32}" installbase="system32" installname="shell32_new.dll" allowwarnings="true" crt="msvcrt"> +<module name="shell32" type="win32dll" baseaddress="${BASEADDRESS_SHELL32}" installbase="system32" installname="shell32.dll" allowwarnings="true" crt="msvcrt"> <autoregister infsection="OleControlDlls" type="Both" /> <importlibrary definition="shell32.spec" /> <include base="shell32">.</include> 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] Tue May 24 19:14:42 2011 @@ -255,14 +255,14 @@ if( SUCCEEDED( r ) ) { - if ( sCurFile ) + if ( sLinkPath ) { - HeapFree(GetProcessHeap(), 0, sCurFile); + HeapFree(GetProcessHeap(), 0, sLinkPath); } - sCurFile = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, (wcslen(pszFileName)+1) * sizeof(WCHAR)); - if ( sCurFile ) + sLinkPath = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, (wcslen(pszFileName)+1) * sizeof(WCHAR)); + if ( sLinkPath ) { - wcscpy(sCurFile, pszFileName); + wcscpy(sLinkPath, pszFileName); } StartLinkProcessor( pszFileName ); @@ -289,13 +289,13 @@ { *ppszFileName = NULL; - if ( !sCurFile) + if ( !sLinkPath) { /* IPersistFile::GetCurFile called before IPersistFile::Save */ return S_FALSE; } - *ppszFileName = (LPOLESTR)CoTaskMemAlloc((wcslen(sCurFile)+1) * sizeof(WCHAR)); + *ppszFileName = (LPOLESTR)CoTaskMemAlloc((wcslen(sLinkPath)+1) * sizeof(WCHAR)); if (!*ppszFileName) { /* out of memory */ @@ -303,7 +303,7 @@ } /* copy last saved filename */ - wcscpy(*ppszFileName, sCurFile); + wcscpy(*ppszFileName, sLinkPath); return NOERROR; } Modified: branches/shell32_new-bringup/dll/win32/shell32/shelllink.h URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/dll/win32/s…
============================================================================== --- branches/shell32_new-bringup/dll/win32/shell32/shelllink.h [iso-8859-1] (original) +++ branches/shell32_new-bringup/dll/win32/shell32/shelllink.h [iso-8859-1] Tue May 24 19:14:42 2011 @@ -71,7 +71,6 @@ LPWSTR sComponent; volume_info volume; LPWSTR sLinkPath; - LPWSTR sCurFile; BOOL bRunAs; BOOL bDirty; INT iIdOpen; /* id of the "Open" entry in the context menu */
13 years, 5 months
1
0
0
0
[gedmurphy] 51896: [SHELL32_NEW] - Add many missing (or previously hidden) shell COM interfaces to the public headers. - The new C++ shell32 dll should now build.
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Tue May 24 19:06:33 2011 New Revision: 51896 URL:
http://svn.reactos.org/svn/reactos?rev=51896&view=rev
Log: [SHELL32_NEW] - Add many missing (or previously hidden) shell COM interfaces to the public headers. - The new C++ shell32 dll should now build. Modified: branches/shell32_new-bringup/include/psdk/appmgmt.h branches/shell32_new-bringup/include/psdk/shlguid.h branches/shell32_new-bringup/include/psdk/shlguid_undoc.h branches/shell32_new-bringup/include/psdk/shlobj.h branches/shell32_new-bringup/include/psdk/shlobj_undoc.h branches/shell32_new-bringup/include/psdk/shlwapi.h branches/shell32_new-bringup/include/psdk/shlwapi_undoc.h branches/shell32_new-bringup/include/reactos/wine/commctrl.h Modified: branches/shell32_new-bringup/include/psdk/appmgmt.h URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/include/psd…
============================================================================== --- branches/shell32_new-bringup/include/psdk/appmgmt.h [iso-8859-1] (original) +++ branches/shell32_new-bringup/include/psdk/appmgmt.h [iso-8859-1] Tue May 24 19:06:33 2011 @@ -18,6 +18,10 @@ #ifndef _APPMGMT_H #define _APPMGMT_H + +#ifdef __cplusplus +extern "C" { +#endif /* defined(__cplusplus) */ typedef struct _MANAGEDAPPLICATION { @@ -42,4 +46,8 @@ DWORD WINAPI CommandLineFromMsiDescriptor(WCHAR*,WCHAR*,DWORD*); DWORD WINAPI GetManagedApplications(GUID*,DWORD,DWORD,LPDWORD,PMANAGEDAPPLICATION*); +#ifdef __cplusplus +} /* extern "C" */ +#endif /* defined(__cplusplus) */ + #endif /* _APPMGMT_H */ Modified: branches/shell32_new-bringup/include/psdk/shlguid.h URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/include/psd…
============================================================================== --- branches/shell32_new-bringup/include/psdk/shlguid.h [iso-8859-1] (original) +++ branches/shell32_new-bringup/include/psdk/shlguid.h [iso-8859-1] Tue May 24 19:06:33 2011 @@ -57,27 +57,26 @@ DEFINE_GUID(IID_IProgressDialog, 0xEBBC7C04,0x315E,0x11D2,0xB6,0x2F,0x00,0x60,0x97,0xDF,0x5B,0xD4); -#ifndef __GNUC__ /* avoid duplicate definitions with shobjidl.h (FIXME) */ -DEFINE_GUID(IID_IDockingWindow, 0x012dd920L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8); -DEFINE_OLEGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0); -DEFINE_OLEGUID(IID_IExtractIconA, 0x000214EBL, 0, 0); -DEFINE_OLEGUID(IID_IExtractIconW, 0x000214FAL, 0, 0); -DEFINE_OLEGUID(IID_IContextMenu, 0x000214E4L, 0, 0); -DEFINE_OLEGUID(IID_IContextMenu2, 0x000214F4L, 0, 0); -DEFINE_OLEGUID(IID_ICommDlgBrowser, 0x000214F1L, 0, 0); -DEFINE_OLEGUID(IID_IShellBrowser, 0x000214E2L, 0, 0); -DEFINE_OLEGUID(IID_IShellView, 0x000214E3L, 0, 0); -DEFINE_OLEGUID(IID_IShellFolder, 0x000214E6L, 0, 0); -DEFINE_OLEGUID(IID_IShellExtInit, 0x000214E8L, 0, 0); -DEFINE_OLEGUID(IID_IPersistFolder, 0x000214EAL, 0, 0); -DEFINE_OLEGUID(IID_IShellLinkA, 0x000214EEL, 0, 0); -DEFINE_OLEGUID(IID_IEnumIDList, 0x000214F2L, 0, 0); -DEFINE_OLEGUID(IID_IShellLinkW, 0x000214F9L, 0, 0); -DEFINE_OLEGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0); -DEFINE_OLEGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0); -DEFINE_OLEGUID(IID_INewShortcutHookA, 0x000214E1L, 0, 0); -DEFINE_OLEGUID(IID_INewShortcutHookW, 0x000214F7L, 0, 0); -#endif +/* avoid duplicate definitions with shobjidl.h (FIXME) */ +/* DEFINE_GUID(IID_IDockingWindow, 0x012dd920L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8); */ +/* DEFINE_OLEGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0); */ +/* DEFINE_OLEGUID(IID_IExtractIconA, 0x000214EBL, 0, 0); */ +/* DEFINE_OLEGUID(IID_IExtractIconW, 0x000214FAL, 0, 0); */ +/* DEFINE_OLEGUID(IID_IContextMenu, 0x000214E4L, 0, 0); */ +/* DEFINE_OLEGUID(IID_IContextMenu2, 0x000214F4L, 0, 0); */ +/* DEFINE_OLEGUID(IID_ICommDlgBrowser, 0x000214F1L, 0, 0); */ +/* DEFINE_OLEGUID(IID_IShellBrowser, 0x000214E2L, 0, 0); */ +/* DEFINE_OLEGUID(IID_IShellView, 0x000214E3L, 0, 0); */ +/* DEFINE_OLEGUID(IID_IShellFolder, 0x000214E6L, 0, 0); */ +/* DEFINE_OLEGUID(IID_IShellExtInit, 0x000214E8L, 0, 0); */ +/* DEFINE_OLEGUID(IID_IPersistFolder, 0x000214EAL, 0, 0); */ +/* DEFINE_OLEGUID(IID_IShellLinkA, 0x000214EEL, 0, 0); */ +/* DEFINE_OLEGUID(IID_IEnumIDList, 0x000214F2L, 0, 0); */ +/* DEFINE_OLEGUID(IID_IShellLinkW, 0x000214F9L, 0, 0); */ +/* DEFINE_OLEGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0); */ +/* DEFINE_OLEGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0); */ +/* DEFINE_OLEGUID(IID_INewShortcutHookA, 0x000214E1L, 0, 0); */ +/* DEFINE_OLEGUID(IID_INewShortcutHookW, 0x000214F7L, 0, 0); */ DEFINE_GUID(CLSID_CUrlHistory, 0x3c374a40, 0xbae4, 0x11cf, 0xbf, 0x7d, 0x00, 0xaa, 0x00, 0x69, 0x46, 0xee); #define SID_SUrlHistory CLSID_CUrlHistory @@ -133,8 +132,6 @@ DEFINE_GUID(CLSID_ACListISF, 0x03c036f1, 0xa186, 0x11d0, 0x82, 0x4a, 0x00, 0xaa, 0x00, 0x5b, 0x043, 0x83); DEFINE_GUID(CLSID_ProgressDialog, 0xf8383852, 0xfcd3, 0x11d1, 0xa6, 0xb9, 0x0, 0x60, 0x97, 0xdf, 0x5b, 0xd4); - -DEFINE_GUID(CLSID_ShellItem, 0x2fe352ea, 0xfd1f, 0x11d2, 0xb1, 0xf4, 0x00, 0xc0, 0x4f, 0x8e, 0xeb, 0x3e); #define PSGUID_SHELLDETAILS {0x28636aa6, 0x953d, 0x11d2, 0xb5, 0xd6, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0xd0} DEFINE_GUID(FMTID_ShellDetails, 0x28636aa6, 0x953d, 0x11d2, 0xb5, 0xd6, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0xd0); Modified: branches/shell32_new-bringup/include/psdk/shlguid_undoc.h URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/include/psd…
============================================================================== --- branches/shell32_new-bringup/include/psdk/shlguid_undoc.h [iso-8859-1] (original) +++ branches/shell32_new-bringup/include/psdk/shlguid_undoc.h [iso-8859-1] Tue May 24 19:06:33 2011 @@ -1,4 +1,24 @@ +/* + * Copyright (C) 1999 Juergen Schmied + * Copyright (C) 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#ifndef __SHLGUID_UNDOC_H +#define __SHLGUID_UNDOC_H DEFINE_GUID(CLSID_RebarBandSite, 0xECD4FC4D, 0x521C, 0x11D0, 0xB7, 0x92, 0x00, 0xA0, 0xC9, 0x03, 0x12, 0xE1); DEFINE_GUID(CLSID_BandSiteMenu, 0xECD4FC4E, 0x521C, 0x11D0, 0xB7, 0x92, 0x00, 0xA0, 0xC9, 0x03, 0x12, 0xE1); DEFINE_GUID(IID_IBandSiteHelper, 0xD1E7AFEA, 0x6A2E, 0x11D0, 0x8C, 0x78, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xB4); @@ -11,60 +31,74 @@ DEFINE_GUID(IID_IShellBrowserService, 0x1307EE17, 0xEA83, 0x49EB, 0x96, 0xB2, 0x3A, 0x28, 0xE2, 0xD7, 0x04, 0x8A); //DEFINE_GUID(IID_IFolderView, 0xCDE725B0, 0xCCC9, 0x4519, 0x91, 0x7E, 0x32, 0x5D, 0x72, 0xFA, 0xB4, 0xCE); -DEFINE_GUID(SID_SProxyBrowser, 0x20C46561, 0x8491, 0x11CF, 0x96, 0x0C, 0x00, 0x80, 0xC7, 0xF4, 0xEE, 0x85); +DEFINE_GUID(SID_SProxyBrowser, 0x20C46561, 0x8491, 0x11CF, 0x96, 0x0C, 0x00, 0x80, 0xC7, 0xF4, 0xEE, 0x85); // this class lives in shell32.dll -DEFINE_GUID(IID_IGlobalFolderSettings, 0xEF8AD2D3, 0xAE36, 0x11D1, 0xB2, 0xD2, 0x00, 0x60, 0x97, 0xDF, 0x8C, 0x11); -DEFINE_GUID(CLSID_GlobalFolderSettings, 0xEF8AD2D1, 0xAE36, 0x11D1, 0xB2, 0xD2, 0x00, 0x60, 0x97, 0xDF, 0x8C, 0x11); -DEFINE_GUID(IID_IRegTreeOptions, 0xAF4F6511, 0xF982, 0x11D0, 0x85, 0x95, 0x00, 0xAA, 0x00, 0x4C, 0xD6, 0xD8); -DEFINE_GUID(CLSID_CRegTreeOptions, 0xAF4F6510, 0xF982, 0x11D0, 0x85, 0x95, 0x00, 0xAA, 0x00, 0x4C, 0xD6, 0xD8); -DEFINE_GUID(IID_IExplorerToolbar, 0x8455F0C1, 0x158F, 0x11D0, 0x89, 0xAE, 0x00, 0xA0, 0xC9, 0x0A, 0x90, 0xAC); +DEFINE_GUID(IID_IGlobalFolderSettings, 0xEF8AD2D3, 0xAE36, 0x11D1, 0xB2, 0xD2, 0x00, 0x60, 0x97, 0xDF, 0x8C, 0x11); +DEFINE_GUID(CLSID_GlobalFolderSettings, 0xEF8AD2D1, 0xAE36, 0x11D1, 0xB2, 0xD2, 0x00, 0x60, 0x97, 0xDF, 0x8C, 0x11); +DEFINE_GUID(IID_IRegTreeOptions, 0xAF4F6511, 0xF982, 0x11D0, 0x85, 0x95, 0x00, 0xAA, 0x00, 0x4C, 0xD6, 0xD8); +DEFINE_GUID(CLSID_CRegTreeOptions, 0xAF4F6510, 0xF982, 0x11D0, 0x85, 0x95, 0x00, 0xAA, 0x00, 0x4C, 0xD6, 0xD8); +DEFINE_GUID(IID_IExplorerToolbar, 0x8455F0C1, 0x158F, 0x11D0, 0x89, 0xAE, 0x00, 0xA0, 0xC9, 0x0A, 0x90, 0xAC); // not registered, lives in browseui.dll -DEFINE_GUID(CLSID_BrowserBar, 0x9581015C, 0xD08E, 0x11D0, 0x8D, 0x36, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8); +DEFINE_GUID(CLSID_BrowserBar, 0x9581015C, 0xD08E, 0x11D0, 0x8D, 0x36, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8); -DEFINE_GUID(CGID_DefViewFrame, 0x710EB7A1, 0x45ED, 0x11D0, 0x92, 0x4A, 0x00, 0x20, 0xAF, 0xC7, 0xAC, 0x4D); +DEFINE_GUID(CGID_DefViewFrame, 0x710EB7A1, 0x45ED, 0x11D0, 0x92, 0x4A, 0x00, 0x20, 0xAF, 0xC7, 0xAC, 0x4D); // browseui.dll -DEFINE_GUID(CLSID_SH_AddressBand, 0x01E04581, 0x4EEE, 0x11D0, 0xBF, 0xE9, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83); -DEFINE_GUID(CLSID_AddressEditBox, 0xA08C11D2, 0xA228, 0x11D0, 0x82, 0x5B, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83); -DEFINE_GUID(IID_IAddressEditBox, 0xA08C11D1, 0xA228, 0x11D0, 0x82, 0x5B, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83); +DEFINE_GUID(CLSID_SH_AddressBand, 0x01E04581, 0x4EEE, 0x11D0, 0xBF, 0xE9, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83); +DEFINE_GUID(CLSID_AddressEditBox, 0xA08C11D2, 0xA228, 0x11D0, 0x82, 0x5B, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83); +DEFINE_GUID(IID_IAddressEditBox, 0xA08C11D1, 0xA228, 0x11D0, 0x82, 0x5B, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83); -DEFINE_GUID(IID_IAddressBand, 0x106E86E1, 0x52B5, 0x11D0, 0xBF, 0xED, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83); -DEFINE_GUID(CLSID_BrandBand, 0x22BF0C20, 0x6DA7, 0x11D0, 0xB3, 0x73, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0x38); -DEFINE_GUID(SID_SBrandBand, 0x82A62DE8, 0x32AC, 0x4E4A, 0x99, 0x35, 0x90, 0x46, 0xC3, 0x78, 0xCF, 0x90); -DEFINE_GUID(CLSID_InternetToolbar, 0x5E6AB780, 0x7743, 0x11CF, 0xA1, 0x2B, 0x00, 0xAA, 0x00, 0x4A, 0xE8, 0x37); +DEFINE_GUID(IID_IAddressBand, 0x106E86E1, 0x52B5, 0x11D0, 0xBF, 0xED, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83); +DEFINE_GUID(CLSID_BrandBand, 0x22BF0C20, 0x6DA7, 0x11D0, 0xB3, 0x73, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0x38); +DEFINE_GUID(SID_SBrandBand, 0x82A62DE8, 0x32AC, 0x4E4A, 0x99, 0x35, 0x90, 0x46, 0xC3, 0x78, 0xCF, 0x90); +DEFINE_GUID(CLSID_InternetToolbar, 0x5E6AB780, 0x7743, 0x11CF, 0xA1, 0x2B, 0x00, 0xAA, 0x00, 0x4A, 0xE8, 0x37); -DEFINE_GUID(CGID_PrivCITCommands, 0x67077B95, 0x4F9D, 0x11D0, 0xB8, 0x84, 0x00, 0xAA, 0x00, 0xB6, 0x01, 0x04); -DEFINE_GUID(CGID_Theater, 0x0F12079C, 0xC193, 0x11D0, 0x8D, 0x49, 0x00, 0xC0, 0x4F, 0xC9, 0x9D, 0x61); -DEFINE_GUID(CGID_ShellBrowser, 0x3531F060, 0x22B3, 0x11D0, 0x96, 0x9E, 0x00, 0xAA, 0x00, 0xB6, 0x01, 0x04); +DEFINE_GUID(CGID_PrivCITCommands, 0x67077B95, 0x4F9D, 0x11D0, 0xB8, 0x84, 0x00, 0xAA, 0x00, 0xB6, 0x01, 0x04); +DEFINE_GUID(CGID_Theater, 0x0F12079C, 0xC193, 0x11D0, 0x8D, 0x49, 0x00, 0xC0, 0x4F, 0xC9, 0x9D, 0x61); +DEFINE_GUID(CGID_ShellBrowser, 0x3531F060, 0x22B3, 0x11D0, 0x96, 0x9E, 0x00, 0xAA, 0x00, 0xB6, 0x01, 0x04); -DEFINE_GUID(CLSID_SearchBand, 0x2559A1F0, 0x21D7, 0x11D4, 0xBD, 0xAF, 0x00, 0xC0, 0x4F, 0x60, 0xB9, 0xF0); -DEFINE_GUID(CLSID_TipOfTheDayBand, 0x4D5C8C25, 0xD075, 0x11D0, 0xB4, 0x16, 0x00, 0xC0, 0x4F, 0xB9, 0x03, 0x76); -DEFINE_GUID(CLSID_DiscussBand, 0xBDEADE7F, 0xC265, 0x11D0, 0xBC, 0xED, 0x00, 0xA0, 0xC9, 0x0A, 0xB5, 0x0F); -DEFINE_GUID(CLSID_SH_FavBand, 0xEFA24E61, 0xB078, 0x11D0, 0x89, 0xE4, 0x00, 0xC0, 0x4F, 0xC9, 0xE2, 0x6E); -DEFINE_GUID(CLSID_SH_HistBand, 0xEFA24E62, 0xB078, 0x11D0, 0x89, 0xE4, 0x00, 0xC0, 0x4F, 0xC9, 0xE2, 0x6E); -DEFINE_GUID(CLSID_ExplorerBand, 0xEFA24E64, 0xB078, 0x11D0, 0x89, 0xE4, 0x00, 0xC0, 0x4F, 0xC9, 0xE2, 0x6E); -DEFINE_GUID(CLSID_SH_SearchBand, 0x21569614, 0xB795, 0x46B1, 0x85, 0xF4, 0xE7, 0x37, 0xA8, 0xDC, 0x09, 0xAD); -DEFINE_GUID(CLSID_FileSearchBand, 0xC4EE31F3, 0x4768, 0x11D2, 0x5C, 0xBE, 0x00, 0xA0, 0xC9, 0xA8, 0x3D, 0xA1); +DEFINE_GUID(CLSID_SearchBand, 0x2559A1F0, 0x21D7, 0x11D4, 0xBD, 0xAF, 0x00, 0xC0, 0x4F, 0x60, 0xB9, 0xF0); +DEFINE_GUID(CLSID_TipOfTheDayBand, 0x4D5C8C25, 0xD075, 0x11D0, 0xB4, 0x16, 0x00, 0xC0, 0x4F, 0xB9, 0x03, 0x76); +DEFINE_GUID(CLSID_DiscussBand, 0xBDEADE7F, 0xC265, 0x11D0, 0xBC, 0xED, 0x00, 0xA0, 0xC9, 0x0A, 0xB5, 0x0F); +DEFINE_GUID(CLSID_SH_FavBand, 0xEFA24E61, 0xB078, 0x11D0, 0x89, 0xE4, 0x00, 0xC0, 0x4F, 0xC9, 0xE2, 0x6E); +DEFINE_GUID(CLSID_SH_HistBand, 0xEFA24E62, 0xB078, 0x11D0, 0x89, 0xE4, 0x00, 0xC0, 0x4F, 0xC9, 0xE2, 0x6E); +DEFINE_GUID(CLSID_ExplorerBand, 0xEFA24E64, 0xB078, 0x11D0, 0x89, 0xE4, 0x00, 0xC0, 0x4F, 0xC9, 0xE2, 0x6E); +DEFINE_GUID(CLSID_SH_SearchBand, 0x21569614, 0xB795, 0x46B1, 0x85, 0xF4, 0xE7, 0x37, 0xA8, 0xDC, 0x09, 0xAD); +DEFINE_GUID(CLSID_FileSearchBand, 0xC4EE31F3, 0x4768, 0x11D2, 0x5C, 0xBE, 0x00, 0xA0, 0xC9, 0xA8, 0x3D, 0xA1); // missing ResearchBand -DEFINE_GUID(IID_IBandNavigate, 0x3697C30B, 0xCD88, 0x11D0, 0x8A, 0x3E, 0x00, 0xC0, 0x4F, 0xC9, 0xE2, 0x6E); -DEFINE_GUID(IID_INamespaceProxy, 0xCF1609EC, 0xFA4B, 0x4818, 0xAB, 0x01, 0x55, 0x64, 0x33, 0x67, 0xE6, 0x6D); -DEFINE_GUID(IID_IBandProxy, 0x208CE801, 0x754B, 0x11D0, 0x80, 0xCA, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83); -DEFINE_GUID(CLSID_BandProxy, 0xF61FFEC1, 0x754F, 0x11D0, 0x80, 0xCA, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83); -DEFINE_GUID(SID_IBandProxy, 0x80243AC1, 0x0569, 0x11D1, 0xA7, 0xAE, 0x00, 0x60, 0x97, 0xDF, 0x5B, 0xD4); -DEFINE_GUID(CLSID_ShellSearchExt, 0x169A0691, 0x8DF9, 0x11D1, 0xA1, 0xC4, 0x00, 0xC0, 0x4F, 0xD7, 0x5D, 0x13); +DEFINE_GUID(IID_IBandNavigate, 0x3697C30B, 0xCD88, 0x11D0, 0x8A, 0x3E, 0x00, 0xC0, 0x4F, 0xC9, 0xE2, 0x6E); +DEFINE_GUID(IID_INamespaceProxy, 0xCF1609EC, 0xFA4B, 0x4818, 0xAB, 0x01, 0x55, 0x64, 0x33, 0x67, 0xE6, 0x6D); +DEFINE_GUID(IID_IBandProxy, 0x208CE801, 0x754B, 0x11D0, 0x80, 0xCA, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83); +DEFINE_GUID(CLSID_BandProxy, 0xF61FFEC1, 0x754F, 0x11D0, 0x80, 0xCA, 0x00, 0xAA, 0x00, 0x5B, 0x43, 0x83); +DEFINE_GUID(SID_IBandProxy, 0x80243AC1, 0x0569, 0x11D1, 0xA7, 0xAE, 0x00, 0x60, 0x97, 0xDF, 0x5B, 0xD4); +DEFINE_GUID(CLSID_ShellSearchExt, 0x169A0691, 0x8DF9, 0x11D1, 0xA1, 0xC4, 0x00, 0xC0, 0x4F, 0xD7, 0x5D, 0x13); -DEFINE_GUID(CLSID_CommonButtons, 0x1E79697E, 0x9CC5, 0x11D1, 0xA8, 0x3F, 0x00, 0xC0, 0x4F, 0xC9, 0x9D, 0x61); +DEFINE_GUID(CLSID_CommonButtons, 0x1E79697E, 0x9CC5, 0x11D1, 0xA8, 0x3F, 0x00, 0xC0, 0x4F, 0xC9, 0x9D, 0x61); -DEFINE_GUID(CGID_BrandCmdGroup, 0x25019D8C, 0x9EE0, 0x45C0, 0x88, 0x3B, 0x97, 0x2D, 0x48, 0x32, 0x5E, 0x18); +DEFINE_GUID(CGID_BrandCmdGroup, 0x25019D8C, 0x9EE0, 0x45C0, 0x88, 0x3B, 0x97, 0x2D, 0x48, 0x32, 0x5E, 0x18); -DEFINE_GUID(IID_INSCTree, 0x43A8F463, 0x4222, 0x11D2, 0xB6, 0x41, 0x00, 0x60, 0x97, 0xDF, 0x5B, 0xD4); -DEFINE_GUID(IID_INSCTree2, 0x801C1AD5, 0xC47C, 0x428C, 0x97, 0xAF, 0xE9, 0x91, 0xE4, 0x85, 0x7D, 0x97); +DEFINE_GUID(IID_INSCTree, 0x43A8F463, 0x4222, 0x11D2, 0xB6, 0x41, 0x00, 0x60, 0x97, 0xDF, 0x5B, 0xD4); +DEFINE_GUID(IID_INSCTree2, 0x801C1AD5, 0xC47C, 0x428C, 0x97, 0xAF, 0xE9, 0x91, 0xE4, 0x85, 0x7D, 0x97); -DEFINE_GUID(IID_IInitializeObject, 0x4622AD16, 0xFF23, 0x11D0, 0x8D, 0x34, 0x00, 0xA0, 0xC9, 0x0F, 0x27, 0x19); -DEFINE_GUID(IID_IBanneredBar, 0x596A9A94, 0x013E, 0x11D1, 0x8D, 0x34, 0x00, 0xA0, 0xC9, 0x0F, 0x27, 0x19); +DEFINE_GUID(IID_IInitializeObject, 0x4622AD16, 0xFF23, 0x11D0, 0x8D, 0x34, 0x00, 0xA0, 0xC9, 0x0F, 0x27, 0x19); +DEFINE_GUID(IID_IBanneredBar, 0x596A9A94, 0x013E, 0x11D1, 0x8D, 0x34, 0x00, 0xA0, 0xC9, 0x0F, 0x27, 0x19); + +DEFINE_GUID(CLSID_StartMenu, 0x4622AD11, 0xFF23, 0x11D0, 0x8D, 0x34, 0x00, 0xA0, 0xC9, 0x0F, 0x27, 0x19); +DEFINE_GUID(CLSID_MenuBandSite, 0xE13EF4E4, 0xD2F2, 0x11D0, 0x98, 0x16, 0x00, 0xC0, 0x4F, 0xD9, 0x19, 0x72); +DEFINE_GUID(SHELL32_AdvtShortcutProduct, 0x9DB1186F, 0x40DF, 0x11D1, 0xAA, 0x8C, 0x00, 0xC0, 0x4F, 0xB6, 0x78, 0x63); +DEFINE_GUID(SHELL32_AdvtShortcutComponent, 0x9DB1186E, 0x40DF, 0x11D1, 0xAA, 0x8C, 0x00, 0xC0, 0x4F, 0xB6, 0x78, 0x63); +DEFINE_GUID(CLSID_OpenWithMenu, 0x09799AFB, 0xAD67, 0x11D1, 0xAB, 0xCD, 0x00, 0xC0, 0x4F, 0xC3, 0x09, 0x36); + +DEFINE_GUID(CLSID_FontsFolderShortcut, 0xD20EA4E1, 0x3957, 0x11D2, 0xA4, 0x0B, 0x0C, 0x50, 0x20, 0x52, 0x41, 0x52); +DEFINE_GUID(CLSID_AdminFolderShortcut, 0xD20EA4E1, 0x3957, 0x11D2, 0xA4, 0x0B, 0x0C, 0x50, 0x20, 0x52, 0x41, 0x53); + +DEFINE_GUID(CLSID_FolderOptions, 0x6DFD7C5C, 0x2451, 0x11D3, 0xA2, 0x99, 0x00, 0xC0, 0x4F, 0x8E, 0xF6, 0xAF); + +// In theory, this is documented. But until I see an SDK header that defines it, it will be treated as undocumented... +DEFINE_GUID(CLSID_ShellItem, 0x2fe352ea, 0xfd1f, 0x11d2, 0xb1, 0xf4, 0x00, 0xc0, 0x4f, 0x8e, 0xeb, 0x3e); #define CGID_IExplorerToolbar IID_IExplorerToolbar #define SID_IExplorerToolbar IID_IExplorerToolbar @@ -74,4 +108,7 @@ #define CGID_MenuBand CLSID_MenuBand #define SID_STravelLogCursor IID_ITravelLogStg #define SID_IBandSite IID_IBandSite +#define SID_IFolderView IID_IFolderView +#define SID_IShellBrowser IID_IShellBrowser +#endif // __SHLGUID_UNDOC_H Modified: branches/shell32_new-bringup/include/psdk/shlobj.h URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/include/psd…
============================================================================== --- branches/shell32_new-bringup/include/psdk/shlobj.h [iso-8859-1] (original) +++ branches/shell32_new-bringup/include/psdk/shlobj.h [iso-8859-1] Tue May 24 19:06:33 2011 @@ -97,6 +97,7 @@ void WINAPI SHFree(LPVOID); BOOL WINAPI GetFileNameFromBrowse(HWND,LPWSTR,UINT,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR); HRESULT WINAPI SHGetInstanceExplorer(IUnknown**); +VOID WINAPI SHSetInstanceExplorer (IUnknown*); HRESULT WINAPI SHGetFolderPathAndSubDirA(HWND,int,HANDLE,DWORD,LPCSTR,LPSTR); HRESULT WINAPI SHGetFolderPathAndSubDirW(HWND,int,HANDLE,DWORD,LPCWSTR,LPWSTR); #define SHGetFolderPathAndSubDir WINELIB_NAME_AW(SHGetFolderPathAndSubDir); @@ -1458,7 +1459,7 @@ } SHChangeProductKeyAsIDList, *LPSHChangeProductKeyAsIDList; ULONG WINAPI SHChangeNotifyRegister(HWND hwnd, int fSources, LONG fEvents, UINT wMsg, - int cEntries, const SHChangeNotifyEntry *pshcne); + int cEntries, SHChangeNotifyEntry *pshcne); BOOL WINAPI SHChangeNotifyDeregister(ULONG ulID); HANDLE WINAPI SHChangeNotification_Lock(HANDLE hChangeNotification, DWORD dwProcessId, LPITEMIDLIST **pppidl, LONG *plEvent); @@ -1469,7 +1470,7 @@ /**************************************************************************** * SHCreateDirectory API */ -DWORD WINAPI SHCreateDirectory(HWND, LPCWSTR); +int WINAPI SHCreateDirectory(HWND, LPCWSTR); int WINAPI SHCreateDirectoryExA(HWND, LPCSTR, LPSECURITY_ATTRIBUTES); int WINAPI SHCreateDirectoryExW(HWND, LPCWSTR, LPSECURITY_ATTRIBUTES); #define SHCreateDirectoryEx WINELIB_NAME_AW(SHCreateDirectoryEx) @@ -1738,7 +1739,7 @@ #define MM_SUBMENUSHAVEIDS 0x00000002L #define MM_DONTREMOVESEPS 0x00000004L -HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags); +UINT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags); /**************************************************************************** @@ -1835,6 +1836,17 @@ STDMETHOD (GetPriority)(THIS_ int * pIPriority) PURE; }; +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IShellIconOverlayIdentifier_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IShellIconOverlayIdentifier_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IShellIconOverlayIdentifier_Release(p) (p)->lpVtbl->Release(p) +/*** IShellIconOverlayIdentifier methods ***/ +#define IShellIconOverlayIdentifier_IsMemberOf(p,a,b) (p)->lpVtbl->IsMemberOf(p,a,b) +#define IShellIconOverlayIdentifier_GetOverlayInfo(p,a,b,c,d) (p)->lpVtbl->GetOverlayInfo(p,a,b,c,d) +#define IShellIconOverlayIdentifier_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a) +#endif + #define ISIOI_ICONFILE 0x00000001 #define ISIOI_ICONINDEX 0x00000002 @@ -1856,12 +1868,12 @@ /***************************************************************************** * IDockingWindowSite interface */ -#define INTERFACE IDockingWindowSite +#define INTERFACE IDockingWindowSite DECLARE_INTERFACE_(IDockingWindowSite, IOleWindow) { // *** IUnknown methods *** STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE; // *** IOleWindow methods *** @@ -1875,6 +1887,60 @@ }; #undef INTERFACE +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDockingWindowSite_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDockingWindowSite_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDockingWindowSite_Release(p) (p)->lpVtbl->Release(p) +/*** IOleWindow methods ***/ +#define IDockingWindowSite_GetWindow(p,a) (p)->lpVtbl->GetWindow(p,a) +#define IDockingWindowSite_ContextSensitiveHelp(p,a) (p)->lpVtbl->ContextSensitiveHelp(p,a) +/*** IDockingWindowSite methods ***/ +#define IDockingWindowSite_GetBorderDW(p,a,b) (p)->lpVtbl->GetBorderDW(p,a,b) +#define IDockingWindowSite_RequestBorderSpaceDW(p,a,b) (p)->lpVtbl->RequestBorderSpaceDW(p,a,b) +#define IDockingWindowSite_SetBorderSpaceDW(p,a,b) (p)->lpVtbl->SetBorderSpaceDW(p,a,b) +#endif + +/***************************************************************************** + * IShellTaskScheduler interface + */ +#define REFTASKOWNERID REFGUID + +#define INTERFACE IShellTaskScheduler +DECLARE_INTERFACE_(IShellTaskScheduler, IUnknown) +{ + // *** IUnknown methods *** + STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // *** IShellTaskScheduler methods *** + STDMETHOD(AddTask)(THIS_ IRunnableTask *pTask, REFTASKOWNERID rtoid, DWORD_PTR lParam, DWORD dwPriority) PURE; + STDMETHOD(RemoveTasks)(THIS_ REFTASKOWNERID rtoid, DWORD_PTR lParam, BOOL fWaitIfRunning) PURE; + STDMETHOD_(UINT, CountTasks)(THIS_ REFTASKOWNERID rtoid) PURE; + STDMETHOD(Status)(THIS_ DWORD dwReleaseStatus, DWORD dwThreadTimeout) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IShellTaskScheduler_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IShellTaskScheduler_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IShellTaskScheduler_Release(p) (p)->lpVtbl->Release(p) +/*** IShellTaskScheduler methods ***/ +#define IShellTaskScheduler_AddTask(p,a,b,c,d) (p)->lpVtbl->AddTask(p,a,b,c,d) +#define IShellTaskScheduler_RemoveTasks(p,a,b,c) (p)->lpVtbl->RemoveTasks(p,a,b,c) +#define IShellTaskScheduler_CountTasks(p,a) (p)->lpVtbl->CountTasks(p,a) +#define IShellTaskScheduler_Status(p,a,b) (p)->lpVtbl->Status(p,a,b) +#endif + +typedef void (CALLBACK *PFNASYNCICONTASKBALLBACK)(LPCITEMIDLIST pidl, LPVOID pvData, LPVOID pvHint, INT iIconIndex, INT iOpenIconIndex); + +/***************************************************************************** + * Control Panel functions + */ +LRESULT WINAPI CallCPLEntry16(HINSTANCE hMod, FARPROC pFunc, HWND dw3, UINT dw4, LPARAM dw5, LPARAM dw6); + #ifdef __cplusplus } /* extern "C" */ #endif /* defined(__cplusplus) */ Modified: branches/shell32_new-bringup/include/psdk/shlobj_undoc.h URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/include/psd…
============================================================================== --- branches/shell32_new-bringup/include/psdk/shlobj_undoc.h [iso-8859-1] (original) +++ branches/shell32_new-bringup/include/psdk/shlobj_undoc.h [iso-8859-1] Tue May 24 19:06:33 2011 @@ -777,6 +777,7 @@ PROC lpfnCompare; } CREATEMRULISTW, *LPCREATEMRULISTW; +#define MRU_STRING 0x0 #define MRU_BINARY 0x1 #define MRU_CACHEWRITE 0x2 @@ -785,6 +786,20 @@ INT WINAPI AddMRUData(HANDLE,LPCVOID,DWORD); INT WINAPI FindMRUData(HANDLE,LPCVOID,DWORD,LPINT); VOID WINAPI FreeMRUList(HANDLE); + +INT WINAPI AddMRUStringW(HANDLE hList, LPCWSTR lpszString); +INT WINAPI AddMRUStringA(HANDLE hList, LPCSTR lpszString); +BOOL WINAPI DelMRUString(HANDLE hList, INT nItemPos); +INT WINAPI FindMRUStringW(HANDLE hList, LPCWSTR lpszString, LPINT lpRegNum); +INT WINAPI FindMRUStringA(HANDLE hList, LPCSTR lpszString, LPINT lpRegNum); +HANDLE WINAPI CreateMRUListLazyW(const CREATEMRULISTW *lpcml, DWORD dwParam2, + DWORD dwParam3, DWORD dwParam4); +HANDLE WINAPI CreateMRUListLazyA(const CREATEMRULISTA *lpcml, DWORD dwParam2, + DWORD dwParam3, DWORD dwParam4); +INT WINAPI EnumMRUListW(HANDLE hList, INT nItemPos, LPVOID lpBuffer, + DWORD nBufferSize); +INT WINAPI EnumMRUListA(HANDLE hList, INT nItemPos, LPVOID lpBuffer, + DWORD nBufferSize); #define DC_NOSENDMSG 0x2000 BOOL WINAPI DrawCaptionTempA(HWND,HDC,const RECT*,HFONT,HICON,LPCSTR,UINT); Modified: branches/shell32_new-bringup/include/psdk/shlwapi.h URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/include/psd…
============================================================================== --- branches/shell32_new-bringup/include/psdk/shlwapi.h [iso-8859-1] (original) +++ branches/shell32_new-bringup/include/psdk/shlwapi.h [iso-8859-1] Tue May 24 19:06:33 2011 @@ -319,12 +319,6 @@ #endif /* NO_SHLWAPI_REG */ -void WINAPI IUnknown_Set(IUnknown **ppunk, IUnknown *punk); -void WINAPI IUnknown_AtomicRelease(IUnknown **punk); -HRESULT WINAPI IUnknown_GetWindow(IUnknown *punk, HWND *phwnd); -HRESULT WINAPI IUnknown_SetSite(IUnknown *punk, IUnknown *punkSite); -HRESULT WINAPI IUnknown_GetSite(IUnknown *punk, REFIID riid, void **ppv); -HRESULT WINAPI IUnknown_QueryService(IUnknown *punk, REFGUID guidService, REFIID riid, void **ppvOut); /* Path functions */ #ifndef NO_SHLWAPI_PATH @@ -585,11 +579,6 @@ URL_SCHEME_MSSHELLROOTED, URL_SCHEME_MSSHELLIDLIST, URL_SCHEME_MSHELP, - URL_SCHEME_MSSHELLDEVICE, - URL_SCHEME_WILDCARD, - URL_SCHEME_SEARCH_MS, - URL_SCHEME_SEARCH, - URL_SCHEME_KNOWNFOLDER, URL_SCHEME_MAXVALUE } URL_SCHEME; @@ -654,7 +643,7 @@ HRESULT WINAPI UrlCanonicalizeA(LPCSTR,LPSTR,LPDWORD,DWORD); HRESULT WINAPI UrlCanonicalizeW(LPCWSTR,LPWSTR,LPDWORD,DWORD); -#define UrlCanonicalize WINELIB_NAME_AW(UrlCanonicalize) +#define UrlCanonicalize WINELIB_NAME_AW(UrlCanoncalize) HRESULT WINAPI UrlCombineA(LPCSTR,LPCSTR,LPSTR,LPDWORD,DWORD); HRESULT WINAPI UrlCombineW(LPCWSTR,LPCWSTR,LPWSTR,LPDWORD,DWORD); @@ -880,9 +869,6 @@ LPSTR WINAPI StrStrIA(LPCSTR,LPCSTR); LPWSTR WINAPI StrStrIW(LPCWSTR,LPCWSTR); #define StrStrI WINELIB_NAME_AW(StrStrI) - -LPWSTR WINAPI StrStrNW(LPCWSTR,LPCWSTR,UINT); -LPWSTR WINAPI StrStrNIW(LPCWSTR,LPCWSTR,UINT); int WINAPI StrToIntA(LPCSTR); int WINAPI StrToIntW(LPCWSTR); @@ -988,7 +974,6 @@ HRESULT WINAPI SHAutoComplete(HWND,DWORD); /* Threads */ -HRESULT WINAPI SHCreateThreadRef(LONG*, IUnknown**); HRESULT WINAPI SHGetThreadRef(IUnknown**); HRESULT WINAPI SHSetThreadRef(IUnknown*); HRESULT WINAPI SHReleaseThreadRef(void); @@ -1041,6 +1026,24 @@ ((ULONGLONG)(mnr)<< 32) | ((ULONGLONG)(bld)<< 16) | (ULONGLONG)(qfe)) HRESULT WINAPI DllInstall(BOOL,LPCWSTR) DECLSPEC_HIDDEN; + + +#if (_WIN32_IE >= 0x0600) +#define SHGVSPB_PERUSER 0x00000001 +#define SHGVSPB_ALLUSERS 0x00000002 +#define SHGVSPB_PERFOLDER 0x00000004 +#define SHGVSPB_ALLFOLDERS 0x00000008 +#define SHGVSPB_INHERIT 0x00000010 +#define SHGVSPB_ROAM 0x00000020 +#define SHGVSPB_NOAUTODEFAULTS 0x80000000 + +#define SHGVSPB_FOLDER (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER) +#define SHGVSPB_FOLDERNODEFAULTS (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER | SHGVSPB_NOAUTODEFAULTS) +#define SHGVSPB_USERDEFAULTS (SHGVSPB_PERUSER | SHGVSPB_ALLFOLDERS) +#define SHGVSPB_GLOBALDEAFAULTS (SHGVSPB_ALLUSERS | SHGVSPB_ALLFOLDERS) + +HRESULT WINAPI SHGetViewStatePropertyBag(LPCITEMIDLIST pidl, LPWSTR bag_name, DWORD flags, REFIID riid, void **ppv); +#endif /* (_WIN32_IE >= 0x0600) */ /* IsOS definitions */ @@ -1109,6 +1112,11 @@ HRESULT WINAPI QISearch(void* base, const QITAB *pqit, REFIID riid, void **ppv); +HANDLE WINAPI SHAllocShared(LPVOID pv, ULONG cb, DWORD pid); +BOOL WINAPI SHFreeShared(HANDLE hMem, DWORD pid); +LPVOID WINAPI SHLockShared(HANDLE hMem, DWORD pid); +BOOL WINAPI SHUnlockShared(LPVOID pv); + #include <poppack.h> #ifdef __cplusplus Modified: branches/shell32_new-bringup/include/psdk/shlwapi_undoc.h URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/include/psd…
============================================================================== --- branches/shell32_new-bringup/include/psdk/shlwapi_undoc.h [iso-8859-1] (original) +++ branches/shell32_new-bringup/include/psdk/shlwapi_undoc.h [iso-8859-1] Tue May 24 19:06:33 2011 @@ -45,9 +45,46 @@ long filler4; // unknown contents }; +BOOL WINAPI SHAboutInfoA(LPSTR lpszDest, DWORD dwDestLen); +BOOL WINAPI SHAboutInfoW(LPWSTR lpszDest, DWORD dwDestLen); +HRESULT WINAPI IUnknown_QueryStatus(IUnknown *lpUnknown, REFGUID pguidCmdGroup, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT* pCmdText); +HRESULT WINAPI IUnknown_Exec(IUnknown* lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT* pvaIn, VARIANT* pvaOut); +LONG WINAPI SHSetWindowBits(HWND hwnd, INT offset, UINT wMask, UINT wFlags); +HWND WINAPI SHSetParentHwnd(HWND hWnd, HWND hWndParent); +HRESULT WINAPI ConnectToConnectionPoint(IUnknown *lpUnkSink, REFIID riid, BOOL bAdviseOnly, IUnknown *lpUnknown, LPDWORD lpCookie, IConnectionPoint **lppCP); +DWORD WINAPI IUnknown_AtomicRelease(IUnknown **lpUnknown); +BOOL WINAPI SHIsSameObject(IUnknown *lpInt1, IUnknown *lpInt2); +HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd); +HRESULT WINAPI IUnknown_SetOwner(IUnknown *pUnk, ULONG arg); +HRESULT WINAPI IUnknown_SetSite(IUnknown *obj, IUnknown *site); +HRESULT WINAPI IUnknown_GetClassID(IUnknown *lpUnknown, CLSID *lpClassId); +HRESULT WINAPI IUnknown_QueryService(IUnknown* lpUnknown, REFGUID sid, REFIID riid, LPVOID *lppOut); +HRESULT WINAPI IUnknown_UIActivateIO(IUnknown *unknown, BOOL activate, LPMSG msg); +BOOL WINAPI SHLoadMenuPopup(HINSTANCE hInst, LPCWSTR szName); +void WINAPI SHPropagateMessage(HWND hWnd, UINT uiMsgId, WPARAM wParam, LPARAM lParam, BOOL bSend); +DWORD WINAPI SHRemoveAllSubMenus(HMENU hMenu); +UINT WINAPI SHEnableMenuItem(HMENU hMenu, UINT wItemID, BOOL bEnable); +DWORD WINAPI SHCheckMenuItem(HMENU hMenu, UINT uID, BOOL bCheck); +DWORD WINAPI SHRegisterClassA(WNDCLASSA *wndclass); +BOOL WINAPI SHSimulateDrop(IDropTarget *pDrop, IDataObject *pDataObj, DWORD grfKeyState, PPOINTL lpPt, DWORD* pdwEffect); +HRESULT WINAPI IUnknown_TranslateAcceleratorOCS(IUnknown *lpUnknown, LPMSG lpMsg, DWORD dwModifiers); +HRESULT WINAPI IUnknown_OnFocusOCS(IUnknown *lpUnknown, BOOL fGotFocus); +HRESULT WINAPI IUnknown_HandleIRestrict(LPUNKNOWN lpUnknown, PVOID lpArg1, PVOID lpArg2, PVOID lpArg3, PVOID lpArg4); +HMENU WINAPI SHGetMenuFromID(HMENU hMenu, UINT uID); +DWORD WINAPI SHGetCurColorRes(); +DWORD WINAPI SHWaitForSendMessageThread(HANDLE hand, DWORD dwTimeout); +HRESULT WINAPI SHIsExpandableFolder(LPSHELLFOLDER lpFolder, LPCITEMIDLIST pidl); +DWORD WINAPI SHFillRectClr(HDC hDC, LPCRECT pRect, COLORREF cRef); +int WINAPI SHSearchMapInt(const int *lpKeys, const int *lpValues, int iLen, int iKey); +VOID WINAPI IUnknown_Set(IUnknown **lppDest, IUnknown *lpUnknown); +HRESULT WINAPI MayQSForward(IUnknown* lpUnknown, PVOID lpReserved, REFGUID riidCmdGrp, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText); +HRESULT WINAPI MayExecForward(IUnknown* lpUnknown, INT iUnk, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); +HRESULT WINAPI IsQSForward(REFGUID pguidCmdGroup,ULONG cCmds, OLECMD *prgCmds); +BOOL WINAPI SHIsChildOrSelf(HWND hParent, HWND hChild); + void WINAPI InitOCHostClass(long param8); long WINAPI SHOpenFolderWindow(IEThreadParamBlock *param8); -void WINAPI SHCreateSavedWindows(void); +void WINAPI SHCreateSavedWindows(); long WINAPI SHCreateFromDesktop(long param8); long WINAPI SHExplorerParseCmdLine(LPCTSTR commandLine); void WINAPI UEMRegisterNotify(long param8, long paramC); @@ -59,11 +96,11 @@ long WINAPI SHParseIECommandLine(long param8, long paramC); void WINAPI SHDestroyIETHREADPARAM(IEThreadParamBlock *param); HRESULT WINAPI SHOnCWMCommandLine(long param8); -LPITEMIDLIST WINAPI Channel_GetFolderPidl(void); +LPITEMIDLIST WINAPI Channel_GetFolderPidl(); IUnknown *WINAPI ChannelBand_Create(LPITEMIDLIST pidl); HRESULT WINAPI Channels_SetBandInfoSFB(IUnknown *param8); HRESULT WINAPI IUnknown_SetBandInfoSFB(IUnknown *param8, long paramC); -HRESULT WINAPI Channel_QuickLaunch(void); +HRESULT WINAPI Channel_QuickLaunch(); HRESULT WINAPI SHGetNavigateTarget(long param8, long paramC, long param10, long param14); HRESULT WINAPI GetInfoTip(IUnknown *param8, long paramC, LPTSTR *param10, long cchMax); HRESULT WINAPI SHEnumClassesOfCategories(long param8, long paramC, long param10, long param14, long param18); Modified: branches/shell32_new-bringup/include/reactos/wine/commctrl.h URL:
http://svn.reactos.org/svn/reactos/branches/shell32_new-bringup/include/rea…
============================================================================== --- branches/shell32_new-bringup/include/reactos/wine/commctrl.h [iso-8859-1] (original) +++ branches/shell32_new-bringup/include/reactos/wine/commctrl.h [iso-8859-1] Tue May 24 19:06:33 2011 @@ -10,7 +10,11 @@ #define _WIN32_IE 0x0501 #endif -#include <psdk/commctrl.h> +#include_next <commctrl.h> + +#ifdef __cplusplus +extern "C" { +#endif #undef DPA_GetPtr LPVOID WINAPI DPA_GetPtr(HDPA, INT); @@ -69,4 +73,8 @@ #define TB_UNKWN45D (WM_USER+93) #define TB_UNKWN464 (WM_USER+100) +#ifdef __cplusplus +} +#endif + #endif /* _INC_COMMCTRL_WINE */
13 years, 5 months
1
0
0
0
[gedmurphy] 51895: [SHELL32_NEW] - Rename the cpp based directory
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Tue May 24 19:04:11 2011 New Revision: 51895 URL:
http://svn.reactos.org/svn/reactos?rev=51895&view=rev
Log: [SHELL32_NEW] - Rename the cpp based directory Added: branches/shell32_new-bringup/dll/win32/shell32/ - copied from r51893, branches/shell32_new-bringup/dll/win32/shell32_new/ Removed: branches/shell32_new-bringup/dll/win32/shell32_new/
13 years, 5 months
1
0
0
0
[gedmurphy] 51894: [SHELL32_NEW] - Remove the old C based dll.
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Tue May 24 19:02:10 2011 New Revision: 51894 URL:
http://svn.reactos.org/svn/reactos?rev=51894&view=rev
Log: [SHELL32_NEW] - Remove the old C based dll. Removed: branches/shell32_new-bringup/dll/win32/shell32/
13 years, 5 months
1
0
0
0
[gedmurphy] 51893: This really needs to go in a branch. It needs heavy testing and can't coincide with the current shell32 due to PSDK interface changes
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Tue May 24 18:40:34 2011 New Revision: 51893 URL:
http://svn.reactos.org/svn/reactos?rev=51893&view=rev
Log: This really needs to go in a branch. It needs heavy testing and can't coincide with the current shell32 due to PSDK interface changes Added: branches/shell32_new-bringup/ (props changed) - copied from r51892, trunk/reactos/ Propchange: branches/shell32_new-bringup/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Tue May 24 18:40:34 2011 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: branches/shell32_new-bringup/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: branches/shell32_new-bringup/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: branches/shell32_new-bringup/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Tue May 24 18:40:34 2011 @@ -1,0 +1,14 @@ +*.iso +makefile.auto +makefile-*.auto +config-*.rbuild +obj-* +output-* +reactos +reactos.* +RosBE-Logs +*.sln +*.ncb +*.suo +versionreport.xml +config.rbuild Propchange: branches/shell32_new-bringup/ ------------------------------------------------------------------------------ --- svn:mergeinfo (added) +++ svn:mergeinfo Tue May 24 18:40:34 2011 @@ -1,0 +1,6 @@ +/branches/cmake-bringup:50484,50693,50719 +/branches/header-work:45691-47721 +/branches/reactos-yarotows:45219-46371,46373-48025,48027-49273 +/branches/reactx/reactos:49994-49995 +/branches/ros-amd64-bringup:36852 +/branches/ros-amd64-bringup/reactos:34711-34712,34741,34743,34770,34780-34782,34803,34812,34839,34842,34864,34870,34874,34877,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35655,35683,35739,35746,35762,35771,35777,35781,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36011-36013,36172,36360,36380,36388-36389,36393,36397,36443,36445,36475,36502-36503,36505,36570,36614,36852,36898-36899,36930,36936,36949,36951,36958,36961,36964,36969,36972,36987-36988,36990,36992,37019,37322-37323,37333-37334,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38092,38100,38148-38151,38264-38265,38268,38355,39151,39333,39335,39345,39639,40120,40122-40123,40125,40127-40128,40155,40247,40324,40608,40753,40926-40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41070,41082-41086,41097-41098,41101,41449,41479-41480,41483-41485,41499-41500,41502,41531,41536,41540,41546-41547,41549,43080,43426,43451,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43836,43838-43840,43852,43857-43858,43860,43905-43907,43952,43954,43965,43969,43979,43981,43992,44002,44036-44037,44039-44040,44044-44045,44053,44065,44095,44123,44143-44144,44205,44238,44257,44259,44294,44338-44339,44385,44389,44391,44426,44460,44467-44468,44470-44471,44499,44501,44503-44504,44506,44510-44512,44521,44523-44526,44530,44540,44601,44634,44639,44772,44818,45124,45126-45127,45430,46394,46404,46478,46511,46523-46524,46526,46534-46535,46537-46539,46589,46805,46868,47472,47846-47847,47878,47882 Propchange: branches/shell32_new-bringup/ ------------------------------------------------------------------------------ tsvn:logminsize = 10
13 years, 5 months
1
0
0
0
[janderwald] 51892: [USBOHCI] - Don't allocate buffer twice - Cleanup endpoint / general transfer descriptors
by janderwald@svn.reactos.org
Author: janderwald Date: Tue May 24 18:29:57 2011 New Revision: 51892 URL:
http://svn.reactos.org/svn/reactos?rev=51892&view=rev
Log: [USBOHCI] - Don't allocate buffer twice - Cleanup endpoint / general transfer descriptors Modified: branches/usb-bringup/drivers/usb/usbohci/usb_queue.cpp branches/usb-bringup/drivers/usb/usbohci/usb_request.cpp Modified: branches/usb-bringup/drivers/usb/usbohci/usb_queue.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbohci/usb_queue.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbohci/usb_queue.cpp [iso-8859-1] Tue May 24 18:29:57 2011 @@ -167,6 +167,8 @@ // // request not supported, please try later // + DPRINT1("Request Type %x not supported\n", Type); + ASSERT(FALSE); return Status; } @@ -389,7 +391,7 @@ // // FIXME: check if complete // - + ASSERT(Request->IsRequestComplete()); // // release request // Modified: branches/usb-bringup/drivers/usb/usbohci/usb_request.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbohci/usb_request.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbohci/usb_request.cpp [iso-8859-1] Tue May 24 18:29:57 2011 @@ -706,7 +706,7 @@ // // now create the data descriptor // - Status = CreateGeneralTransferDescriptor(&DataDescriptor, m_TransferBufferLength); + Status = CreateGeneralTransferDescriptor(&DataDescriptor, 0); if (!NT_SUCCESS(Status)) { // @@ -924,6 +924,8 @@ CUSBRequest::CompletionCallback( struct _OHCI_ENDPOINT_DESCRIPTOR * OutDescriptor) { + POHCI_GENERAL_TD TransferDescriptor, NextTransferDescriptor; + DPRINT1("CUSBRequest::CompletionCallback\n"); // @@ -937,6 +939,45 @@ // // FIXME: cleanup descriptors // + + // + // get first general transfer descriptor + // + TransferDescriptor = (POHCI_GENERAL_TD)OutDescriptor->HeadLogicalDescriptor; + + while(TransferDescriptor) + { + // + // get next + // + NextTransferDescriptor = (POHCI_GENERAL_TD)TransferDescriptor->NextLogicalDescriptor; + + // + // is there a buffer associated + // + if (TransferDescriptor->BufferSize) + { + // + // release buffer + // + m_DmaManager->Release(TransferDescriptor->BufferLogical, TransferDescriptor->BufferSize); + } + + // + // release descriptor + // + m_DmaManager->Release(TransferDescriptor, sizeof(OHCI_GENERAL_TD)); + + // + // move to next + // + TransferDescriptor = NextTransferDescriptor; + } + + // + // release endpoint descriptor + // + m_DmaManager->Release(OutDescriptor, sizeof(OHCI_ENDPOINT_DESCRIPTOR)); // // signal completion event
13 years, 5 months
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
52
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
Results per page:
10
25
50
100
200