ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
January 2012
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
19 participants
559 discussions
Start a n
N
ew thread
[cgutman] 54897: [NDISUIO] - Store the correct length in Irp->IoStatus.Information so bytes don't get chopped off - Fix multiple bugs in the receive path (which now works correctly) [WLANCONF] - Us...
by cgutman@svn.reactos.org
Author: cgutman Date: Tue Jan 10 01:52:18 2012 New Revision: 54897 URL:
http://svn.reactos.org/svn/reactos?rev=54897&view=rev
Log: [NDISUIO] - Store the correct length in Irp->IoStatus.Information so bytes don't get chopped off - Fix multiple bugs in the receive path (which now works correctly) [WLANCONF] - Use the correct length for NDIS requests - Indicate success to the console for -c or -d - Print current association info if called with no parameters Modified: branches/wlan-bringup/base/applications/network/wlanconf/wlanconf.c branches/wlan-bringup/drivers/network/ndisuio/ioctl.c branches/wlan-bringup/drivers/network/ndisuio/ndisuio.h branches/wlan-bringup/drivers/network/ndisuio/protocol.c Modified: branches/wlan-bringup/base/applications/network/wlanconf/wlanconf.c URL:
http://svn.reactos.org/svn/reactos/branches/wlan-bringup/base/applications/…
============================================================================== --- branches/wlan-bringup/base/applications/network/wlanconf/wlanconf.c [iso-8859-1] (original) +++ branches/wlan-bringup/base/applications/network/wlanconf/wlanconf.c [iso-8859-1] Tue Jan 10 01:52:18 2012 @@ -94,7 +94,7 @@ PNDISUIO_QUERY_OID QueryOid; DWORD QueryOidSize; - QueryOidSize = sizeof(NDISUIO_QUERY_OID) + sizeof(NDIS_802_11_SSID); + QueryOidSize = FIELD_OFFSET(NDISUIO_QUERY_OID, Data) + sizeof(NDIS_802_11_SSID); QueryOid = HeapAlloc(GetProcessHeap(), 0, QueryOidSize); if (!QueryOid) return FALSE; @@ -216,8 +216,11 @@ 0, &dwBytesReturned, NULL); - - return bSuccess; + if (!bSuccess) + return FALSE; + + _tprintf(_T("The operation completed successfully.\n")); + return TRUE; } static @@ -266,6 +269,263 @@ } BOOL +WlanPrintCurrentStatus(HANDLE hAdapter) +{ + PNDISUIO_QUERY_OID QueryOid; + DWORD QueryOidSize; + BOOL bSuccess; + DWORD dwBytesReturned; + PNDIS_802_11_SSID SsidInfo; + CHAR SsidBuffer[NDIS_802_11_LENGTH_SSID + 1]; + DWORD i; + + QueryOidSize = FIELD_OFFSET(NDISUIO_QUERY_OID, Data) + sizeof(NDIS_802_11_SSID); + QueryOid = HeapAlloc(GetProcessHeap(), 0, QueryOidSize); + if (!QueryOid) + return FALSE; + + QueryOid->Oid = OID_802_11_SSID; + SsidInfo = (PNDIS_802_11_SSID)QueryOid->Data; + + bSuccess = DeviceIoControl(hAdapter, + IOCTL_NDISUIO_QUERY_OID_VALUE, + QueryOid, + QueryOidSize, + QueryOid, + QueryOidSize, + &dwBytesReturned, + NULL); + if (!bSuccess) + { + HeapFree(GetProcessHeap(), 0, QueryOid); + return FALSE; + } + + if (SsidInfo->SsidLength == 0) + { + _tprintf(_T("\nWLAN disconnected\n")); + HeapFree(GetProcessHeap(), 0, QueryOid); + return TRUE; + } + else + { + _tprintf(_T("\nCurrent wireless association information:\n\n")); + } + + /* Copy the SSID to our internal buffer and terminate it */ + RtlCopyMemory(SsidBuffer, SsidInfo->Ssid, SsidInfo->SsidLength); + SsidBuffer[SsidInfo->SsidLength] = 0; + + _tprintf(_T("SSID: %s\n"), SsidBuffer); + + HeapFree(GetProcessHeap(), 0, QueryOid); + QueryOidSize = FIELD_OFFSET(NDISUIO_QUERY_OID, Data) + sizeof(NDIS_802_11_MAC_ADDRESS); + QueryOid = HeapAlloc(GetProcessHeap(), 0, QueryOidSize); + if (!QueryOid) + return FALSE; + + QueryOid->Oid = OID_802_11_BSSID; + + bSuccess = DeviceIoControl(hAdapter, + IOCTL_NDISUIO_QUERY_OID_VALUE, + QueryOid, + QueryOidSize, + QueryOid, + QueryOidSize, + &dwBytesReturned, + NULL); + if (!bSuccess) + { + HeapFree(GetProcessHeap(), 0, QueryOid); + return FALSE; + } + + _tprintf(_T("BSSID: ")); + for (i = 0; i < sizeof(NDIS_802_11_MAC_ADDRESS); i++) + { + UINT BssidData = QueryOid->Data[i]; + + _tprintf(_T("%.2x"), BssidData); + + if (i != sizeof(NDIS_802_11_MAC_ADDRESS) - 1) + _tprintf(_T(":")); + } + _tprintf(_T("\n")); + + HeapFree(GetProcessHeap(), 0, QueryOid); + QueryOidSize = sizeof(NDISUIO_QUERY_OID); + QueryOid = HeapAlloc(GetProcessHeap(), 0, QueryOidSize); + if (!QueryOid) + return FALSE; + + QueryOid->Oid = OID_802_11_INFRASTRUCTURE_MODE; + + bSuccess = DeviceIoControl(hAdapter, + IOCTL_NDISUIO_QUERY_OID_VALUE, + QueryOid, + QueryOidSize, + QueryOid, + QueryOidSize, + &dwBytesReturned, + NULL); + if (!bSuccess) + { + HeapFree(GetProcessHeap(), 0, QueryOid); + return FALSE; + } + + _tprintf(_T("Network mode: %s\n"), (*(PUINT)QueryOid->Data == Ndis802_11IBSS) ? "Adhoc" : "Infrastructure"); + + QueryOid->Oid = OID_802_11_WEP_STATUS; + + bSuccess = DeviceIoControl(hAdapter, + IOCTL_NDISUIO_QUERY_OID_VALUE, + QueryOid, + QueryOidSize, + QueryOid, + QueryOidSize, + &dwBytesReturned, + NULL); + if (!bSuccess) + { + HeapFree(GetProcessHeap(), 0, QueryOid); + return FALSE; + } + + _tprintf(_T("WEP enabled: %s\n"), (*(PUINT)QueryOid->Data == Ndis802_11WEPEnabled) ? "Yes" : "No"); + + _tprintf("\n"); + QueryOid->Oid = OID_802_11_RSSI; + + bSuccess = DeviceIoControl(hAdapter, + IOCTL_NDISUIO_QUERY_OID_VALUE, + QueryOid, + QueryOidSize, + QueryOid, + QueryOidSize, + &dwBytesReturned, + NULL); + if (bSuccess) + { + /* This OID is optional */ + _tprintf(_T("RSSI: %i dBm\n"), *(PINT)QueryOid->Data); + } + + QueryOid->Oid = OID_802_11_TX_POWER_LEVEL; + + bSuccess = DeviceIoControl(hAdapter, + IOCTL_NDISUIO_QUERY_OID_VALUE, + QueryOid, + QueryOidSize, + QueryOid, + QueryOidSize, + &dwBytesReturned, + NULL); + if (bSuccess) + { + /* This OID is optional */ + _tprintf(_T("Transmission power: %d mW\n"), *(PUINT)QueryOid->Data); + } + + _tprintf(_T("\n")); + + QueryOid->Oid = OID_802_11_NUMBER_OF_ANTENNAS; + + bSuccess = DeviceIoControl(hAdapter, + IOCTL_NDISUIO_QUERY_OID_VALUE, + QueryOid, + QueryOidSize, + QueryOid, + QueryOidSize, + &dwBytesReturned, + NULL); + if (bSuccess) + { + /* This OID is optional */ + _tprintf(_T("Antenna count: %d\n"), *(PUINT)QueryOid->Data); + } + + QueryOid->Oid = OID_802_11_TX_ANTENNA_SELECTED; + + bSuccess = DeviceIoControl(hAdapter, + IOCTL_NDISUIO_QUERY_OID_VALUE, + QueryOid, + QueryOidSize, + QueryOid, + QueryOidSize, + &dwBytesReturned, + NULL); + if (bSuccess) + { + UINT TransmitAntenna = *(PUINT)QueryOid->Data; + + if (TransmitAntenna != 0xFFFFFFFF) + _tprintf(_T("Transmit antenna: %d\n"), TransmitAntenna); + else + _tprintf(_T("Transmit antenna: Any\n")); + } + + QueryOid->Oid = OID_802_11_RX_ANTENNA_SELECTED; + + bSuccess = DeviceIoControl(hAdapter, + IOCTL_NDISUIO_QUERY_OID_VALUE, + QueryOid, + QueryOidSize, + QueryOid, + QueryOidSize, + &dwBytesReturned, + NULL); + if (bSuccess) + { + UINT ReceiveAntenna = *(PUINT)QueryOid->Data; + + if (ReceiveAntenna != 0xFFFFFFFF) + _tprintf(_T("Receive antenna: %d\n"), ReceiveAntenna); + else + _tprintf(_T("Receive antenna: Any\n")); + } + + _tprintf(_T("\n")); + + QueryOid->Oid = OID_802_11_FRAGMENTATION_THRESHOLD; + + bSuccess = DeviceIoControl(hAdapter, + IOCTL_NDISUIO_QUERY_OID_VALUE, + QueryOid, + QueryOidSize, + QueryOid, + QueryOidSize, + &dwBytesReturned, + NULL); + if (bSuccess) + { + /* This OID is optional */ + _tprintf(_T("Fragmentation threshold: %d bytes\n"), *(PUINT)QueryOid->Data); + } + + QueryOid->Oid = OID_802_11_RTS_THRESHOLD; + + bSuccess = DeviceIoControl(hAdapter, + IOCTL_NDISUIO_QUERY_OID_VALUE, + QueryOid, + QueryOidSize, + QueryOid, + QueryOidSize, + &dwBytesReturned, + NULL); + if (bSuccess) + { + /* This OID is optional */ + _tprintf(_T("RTS threshold: %d bytes\n"), *(PUINT)QueryOid->Data); + } + + HeapFree(GetProcessHeap(), 0, QueryOid); + + _tprintf(_T("\n")); + return TRUE; +} + +BOOL WlanConnect(HANDLE hAdapter) { BOOL bSuccess; @@ -321,7 +581,8 @@ HeapFree(GetProcessHeap(), 0, SetOid); - SetOidSize = sizeof(NDISUIO_SET_OID) + FIELD_OFFSET(NDIS_802_11_WEP, KeyMaterial) + + SetOidSize = FIELD_OFFSET(NDISUIO_SET_OID, Data) + + FIELD_OFFSET(NDIS_802_11_WEP, KeyMaterial) + (strlen(sWepKey) >> 1); SetOid = HeapAlloc(GetProcessHeap(), 0, SetOidSize); if (!SetOid) @@ -378,7 +639,7 @@ } HeapFree(GetProcessHeap(), 0, SetOid); - SetOidSize = sizeof(NDISUIO_SET_OID) + sizeof(NDIS_802_11_MAC_ADDRESS); + SetOidSize = FIELD_OFFSET(NDISUIO_SET_OID, Data) + sizeof(NDIS_802_11_MAC_ADDRESS); SetOid = HeapAlloc(GetProcessHeap(), 0, SetOidSize); if (!SetOid) return FALSE; @@ -402,7 +663,7 @@ } HeapFree(GetProcessHeap(), 0, SetOid); - SetOidSize = sizeof(NDISUIO_SET_OID) + sizeof(NDIS_802_11_SSID); + SetOidSize = FIELD_OFFSET(NDISUIO_SET_OID, Data) + sizeof(NDIS_802_11_SSID); SetOid = HeapAlloc(GetProcessHeap(), 0, SetOidSize); if (!SetOid) return FALSE; @@ -425,7 +686,11 @@ HeapFree(GetProcessHeap(), 0, SetOid); - return bSuccess; + if (!bSuccess) + return FALSE; + + _tprintf(_T("The operation completed successfully.\n")); + return TRUE; } BOOL @@ -546,7 +811,8 @@ " -w WEP Specifies a WEP key to use.\n" " -a Specifies the target network is ad-hoc\n" " -d Disconnects from the current AP.\n" - " -s Scans and displays a list of access points in range.\n")); + " -s Scans and displays a list of access points in range.\n\n" + " Passing no parameters will print information about the current WLAN connection\n")); } @@ -599,12 +865,6 @@ } } - if (!bScan && !bDisconnect && !bConnect) - { - Usage(); - return FALSE; - } - return TRUE; } @@ -640,7 +900,7 @@ return -1; } } - else + else if (bConnect) { if (!WlanConnect(hAdapter)) { @@ -649,6 +909,15 @@ return -1; } } + else + { + if (!WlanPrintCurrentStatus(hAdapter)) + { + DoFormatMessage(GetLastError()); + CloseHandle(hAdapter); + return -1; + } + } CloseHandle(hAdapter); return 0; Modified: branches/wlan-bringup/drivers/network/ndisuio/ioctl.c URL:
http://svn.reactos.org/svn/reactos/branches/wlan-bringup/drivers/network/nd…
============================================================================== --- branches/wlan-bringup/drivers/network/ndisuio/ioctl.c [iso-8859-1] (original) +++ branches/wlan-bringup/drivers/network/ndisuio/ioctl.c [iso-8859-1] Tue Jan 10 01:52:18 2012 @@ -160,8 +160,16 @@ /* Setup the NDIS request */ Request.RequestType = NdisRequestSetInformation; Request.DATA.SET_INFORMATION.Oid = SetOidRequest->Oid; - Request.DATA.SET_INFORMATION.InformationBuffer = SetOidRequest->Data; Request.DATA.SET_INFORMATION.InformationBufferLength = RequestLength - sizeof(NDIS_OID); + if (Request.DATA.SET_INFORMATION.InformationBufferLength != 0) + { + Request.DATA.SET_INFORMATION.InformationBuffer = SetOidRequest->Data; + } + else + { + Request.DATA.SET_INFORMATION.InformationBuffer = NULL; + } + Request.DATA.SET_INFORMATION.BytesRead = 0; DPRINT("Setting OID 0x%x on adapter %wZ\n", SetOidRequest->Oid, &AdapterContext->DeviceName); @@ -182,7 +190,9 @@ } /* Return the bytes read */ - if (NT_SUCCESS(Status)) Irp->IoStatus.Information = Request.DATA.SET_INFORMATION.BytesRead; + if (NT_SUCCESS(Status)) Irp->IoStatus.Information = sizeof(NDIS_OID) + Request.DATA.SET_INFORMATION.BytesRead; + + DPRINT("Final request status: 0x%x (%d)\n", Status, Irp->IoStatus.Information); } else { @@ -216,9 +226,17 @@ /* Setup the NDIS request */ Request.RequestType = NdisRequestQueryInformation; Request.DATA.QUERY_INFORMATION.Oid = QueryOidRequest->Oid; - Request.DATA.QUERY_INFORMATION.InformationBuffer = QueryOidRequest->Data; Request.DATA.QUERY_INFORMATION.InformationBufferLength = RequestLength - sizeof(NDIS_OID); - + if (Request.DATA.QUERY_INFORMATION.InformationBufferLength != 0) + { + Request.DATA.QUERY_INFORMATION.InformationBuffer = QueryOidRequest->Data; + } + else + { + Request.DATA.QUERY_INFORMATION.InformationBuffer = NULL; + } + Request.DATA.QUERY_INFORMATION.BytesWritten = 0; + DPRINT("Querying OID 0x%x on adapter %wZ\n", QueryOidRequest->Oid, &AdapterContext->DeviceName); /* Dispatch the request */ @@ -238,7 +256,9 @@ } /* Return the bytes written */ - if (NT_SUCCESS(Status)) Irp->IoStatus.Information = Request.DATA.QUERY_INFORMATION.BytesWritten; + if (NT_SUCCESS(Status)) Irp->IoStatus.Information = sizeof(NDIS_OID) + Request.DATA.QUERY_INFORMATION.BytesWritten; + + DPRINT("Final request status: 0x%x (%d)\n", Status, Irp->IoStatus.Information); } else { Modified: branches/wlan-bringup/drivers/network/ndisuio/ndisuio.h URL:
http://svn.reactos.org/svn/reactos/branches/wlan-bringup/drivers/network/nd…
============================================================================== --- branches/wlan-bringup/drivers/network/ndisuio/ndisuio.h [iso-8859-1] (original) +++ branches/wlan-bringup/drivers/network/ndisuio/ndisuio.h [iso-8859-1] Tue Jan 10 01:52:18 2012 @@ -36,6 +36,9 @@ /* Receive packet list */ LIST_ENTRY PacketList; KEVENT PacketReadEvent; + + /* Mac options */ + ULONG MacOptions; /* Device name */ UNICODE_STRING DeviceName; Modified: branches/wlan-bringup/drivers/network/ndisuio/protocol.c URL:
http://svn.reactos.org/svn/reactos/branches/wlan-bringup/drivers/network/nd…
============================================================================== --- branches/wlan-bringup/drivers/network/ndisuio/protocol.c [iso-8859-1] (original) +++ branches/wlan-bringup/drivers/network/ndisuio/protocol.c [iso-8859-1] Tue Jan 10 01:52:18 2012 @@ -116,13 +116,15 @@ PNDIS_PACKET Packet; NDIS_STATUS Status; UINT BytesTransferred; + + DPRINT("Received a %d byte packet\n", PacketSize); /* Discard if nobody is waiting for it */ if (AdapterContext->OpenCount == 0) return NDIS_STATUS_NOT_ACCEPTED; /* Allocate a buffer to hold the packet data and header */ - PacketBuffer = ExAllocatePool(NonPagedPool, PacketSize); + PacketBuffer = ExAllocatePool(NonPagedPool, PacketSize + HeaderBufferSize); if (!PacketBuffer) return NDIS_STATUS_NOT_ACCEPTED; @@ -137,13 +139,167 @@ } /* Transfer the packet data into our data buffer */ - NdisTransferData(&Status, - AdapterContext->BindingHandle, - MacReceiveContext, - 0, - PacketSize, - Packet, - &BytesTransferred); + if (LookaheadBufferSize == PacketSize) + { + NdisCopyLookaheadData((PVOID)((PUCHAR)PacketBuffer + HeaderBufferSize), + LookAheadBuffer, + PacketSize, + AdapterContext->MacOptions); + BytesTransferred = PacketSize; + } + else + { + NdisTransferData(&Status, + AdapterContext->BindingHandle, + MacReceiveContext, + 0, + PacketSize, + Packet, + &BytesTransferred); + if (Status == NDIS_STATUS_PENDING) + { + KeWaitForSingleObject(&AdapterContext->AsyncEvent, + Executive, + KernelMode, + FALSE, + NULL); + Status = AdapterContext->AsyncStatus; + } + if (Status != NDIS_STATUS_SUCCESS) + { + DPRINT1("Failed to transfer data with status 0x%x\n", Status); + CleanupAndFreePacket(Packet, TRUE); + return NDIS_STATUS_NOT_ACCEPTED; + } + } + + /* Copy the header data */ + RtlCopyMemory(PacketBuffer, HeaderBuffer, HeaderBufferSize); + + /* Free the packet descriptor and buffers + but not the pool because we still need it */ + CleanupAndFreePacket(Packet, FALSE); + + /* Allocate a packet entry from pool */ + PacketEntry = ExAllocatePool(NonPagedPool, sizeof(NDISUIO_PACKET_ENTRY) + BytesTransferred + HeaderBufferSize - 1); + if (!PacketEntry) + { + ExFreePool(PacketBuffer); + return NDIS_STATUS_RESOURCES; + } + + /* Initialize the packet entry and copy in packet data */ + PacketEntry->PacketLength = BytesTransferred + HeaderBufferSize; + RtlCopyMemory(PacketEntry->PacketData, PacketBuffer, PacketEntry->PacketLength); + + /* Free the old buffer */ + ExFreePool(PacketBuffer); + + /* Insert the packet on the adapter's packet list */ + ExInterlockedInsertTailList(&AdapterContext->PacketList, + &PacketEntry->ListEntry, + &AdapterContext->Spinlock); + + /* Signal the read event */ + KeSetEvent(&AdapterContext->PacketReadEvent, + IO_NETWORK_INCREMENT, + FALSE); + + return NDIS_STATUS_SUCCESS; +} + +VOID +NTAPI +NduReceiveComplete(NDIS_HANDLE ProtocolBindingContext) +{ + /* No op */ +} + +VOID +NTAPI +NduStatus(NDIS_HANDLE ProtocolBindingContext, + NDIS_STATUS GeneralStatus, + PVOID StatusBuffer, + UINT StatusBufferSize) +{ + /* FIXME: Implement status tracking */ +} + +VOID +NTAPI +NduStatusComplete(NDIS_HANDLE ProtocolBindingContext) +{ + /* FIXME: Implement status tracking */ +} + +static +NDIS_STATUS +UnbindAdapterByContext(PNDISUIO_ADAPTER_CONTEXT AdapterContext) +{ + KIRQL OldIrql; + PLIST_ENTRY CurrentEntry; + PNDISUIO_OPEN_ENTRY OpenEntry; + PNDISUIO_PACKET_ENTRY PacketEntry; + NDIS_STATUS Status; + + DPRINT("Unbinding adapter %wZ\n", &AdapterContext->DeviceName); + + /* FIXME: We don't do anything with outstanding reads */ + + /* Remove the adapter context from the global list */ + KeAcquireSpinLock(&GlobalAdapterListLock, &OldIrql); + RemoveEntryList(&AdapterContext->ListEntry); + KeReleaseSpinLock(&GlobalAdapterListLock, OldIrql); + + /* Free the device name string */ + RtlFreeUnicodeString(&AdapterContext->DeviceName); + + /* Invalidate all handles to this adapter */ + CurrentEntry = AdapterContext->OpenEntryList.Flink; + while (CurrentEntry != &AdapterContext->OpenEntryList) + { + OpenEntry = CONTAINING_RECORD(CurrentEntry, NDISUIO_OPEN_ENTRY, ListEntry); + + /* Make sure the entry is sane */ + ASSERT(OpenEntry->FileObject); + + /* Remove the adapter context pointer */ + ASSERT(AdapterContext == OpenEntry->FileObject->FsContext); + OpenEntry->FileObject->FsContext = NULL; + AdapterContext->OpenCount--; + + /* Remove the open entry pointer */ + ASSERT(OpenEntry == OpenEntry->FileObject->FsContext2); + OpenEntry->FileObject->FsContext2 = NULL; + + /* Move to the next entry */ + CurrentEntry = CurrentEntry->Flink; + + /* Free the open entry */ + ExFreePool(OpenEntry); + } + + /* If this fails, we have a refcount mismatch somewhere */ + ASSERT(AdapterContext->OpenCount == 0); + + /* Free all pending packet entries */ + CurrentEntry = AdapterContext->PacketList.Flink; + while (CurrentEntry != &AdapterContext->PacketList) + { + PacketEntry = CONTAINING_RECORD(CurrentEntry, NDISUIO_PACKET_ENTRY, ListEntry); + + /* Move to the next entry */ + CurrentEntry = CurrentEntry->Flink; + + /* Free the packet entry */ + ExFreePool(PacketEntry); + } + + /* Send the close request */ + NdisCloseAdapter(&Status, + AdapterContext->BindingHandle); + + /* Wait for a pending close */ if (Status == NDIS_STATUS_PENDING) { KeWaitForSingleObject(&AdapterContext->AsyncEvent, @@ -153,149 +309,6 @@ NULL); Status = AdapterContext->AsyncStatus; } - if (Status != NDIS_STATUS_SUCCESS) - { - DPRINT1("Failed to transfer data with status 0x%x\n", Status); - CleanupAndFreePacket(Packet, TRUE); - return NDIS_STATUS_NOT_ACCEPTED; - } - - /* Copy the header data */ - RtlCopyMemory(PacketBuffer, HeaderBuffer, HeaderBufferSize); - - /* Free the packet descriptor and buffers - but not the pool because we still need it */ - CleanupAndFreePacket(Packet, FALSE); - - /* Allocate a packet entry from pool */ - PacketEntry = ExAllocatePool(NonPagedPool, sizeof(NDISUIO_PACKET_ENTRY) + BytesTransferred + HeaderBufferSize - 1); - if (!PacketEntry) - { - ExFreePool(PacketBuffer); - return NDIS_STATUS_RESOURCES; - } - - /* Initialize the packet entry and copy in packet data */ - PacketEntry->PacketLength = BytesTransferred + HeaderBufferSize; - RtlCopyMemory(&PacketEntry->PacketData[0], PacketBuffer, PacketEntry->PacketLength); - - /* Free the old buffer */ - ExFreePool(PacketBuffer); - - /* Insert the packet on the adapter's packet list */ - ExInterlockedInsertTailList(&AdapterContext->PacketList, - &PacketEntry->ListEntry, - &AdapterContext->Spinlock); - - /* Signal the read event */ - KeSetEvent(&AdapterContext->PacketReadEvent, - IO_NETWORK_INCREMENT, - FALSE); - - return NDIS_STATUS_SUCCESS; -} - -VOID -NTAPI -NduReceiveComplete(NDIS_HANDLE ProtocolBindingContext) -{ - /* No op */ -} - -VOID -NTAPI -NduStatus(NDIS_HANDLE ProtocolBindingContext, - NDIS_STATUS GeneralStatus, - PVOID StatusBuffer, - UINT StatusBufferSize) -{ - /* FIXME: Implement status tracking */ -} - -VOID -NTAPI -NduStatusComplete(NDIS_HANDLE ProtocolBindingContext) -{ - /* FIXME: Implement status tracking */ -} - -static -NDIS_STATUS -UnbindAdapterByContext(PNDISUIO_ADAPTER_CONTEXT AdapterContext) -{ - KIRQL OldIrql; - PLIST_ENTRY CurrentEntry; - PNDISUIO_OPEN_ENTRY OpenEntry; - PNDISUIO_PACKET_ENTRY PacketEntry; - NDIS_STATUS Status; - - DPRINT("Unbinding adapter %wZ\n", &AdapterContext->DeviceName); - - /* FIXME: We don't do anything with outstanding reads */ - - /* Remove the adapter context from the global list */ - KeAcquireSpinLock(&GlobalAdapterListLock, &OldIrql); - RemoveEntryList(&AdapterContext->ListEntry); - KeReleaseSpinLock(&GlobalAdapterListLock, OldIrql); - - /* Free the device name string */ - RtlFreeUnicodeString(&AdapterContext->DeviceName); - - /* Invalidate all handles to this adapter */ - CurrentEntry = AdapterContext->OpenEntryList.Flink; - while (CurrentEntry != &AdapterContext->OpenEntryList) - { - OpenEntry = CONTAINING_RECORD(CurrentEntry, NDISUIO_OPEN_ENTRY, ListEntry); - - /* Make sure the entry is sane */ - ASSERT(OpenEntry->FileObject); - - /* Remove the adapter context pointer */ - ASSERT(AdapterContext == OpenEntry->FileObject->FsContext); - OpenEntry->FileObject->FsContext = NULL; - AdapterContext->OpenCount--; - - /* Remove the open entry pointer */ - ASSERT(OpenEntry == OpenEntry->FileObject->FsContext2); - OpenEntry->FileObject->FsContext2 = NULL; - - /* Move to the next entry */ - CurrentEntry = CurrentEntry->Flink; - - /* Free the open entry */ - ExFreePool(OpenEntry); - } - - /* If this fails, we have a refcount mismatch somewhere */ - ASSERT(AdapterContext->OpenCount == 0); - - /* Free all pending packet entries */ - CurrentEntry = AdapterContext->PacketList.Flink; - while (CurrentEntry != &AdapterContext->PacketList) - { - PacketEntry = CONTAINING_RECORD(CurrentEntry, NDISUIO_PACKET_ENTRY, ListEntry); - - /* Move to the next entry */ - CurrentEntry = CurrentEntry->Flink; - - /* Free the packet entry */ - ExFreePool(PacketEntry); - } - - /* Send the close request */ - NdisCloseAdapter(&Status, - AdapterContext->BindingHandle); - - /* Wait for a pending close */ - if (Status == NDIS_STATUS_PENDING) - { - KeWaitForSingleObject(&AdapterContext->AsyncEvent, - Executive, - KernelMode, - FALSE, - NULL); - Status = AdapterContext->AsyncStatus; - } /* Free the context */ ExFreePool(AdapterContext); @@ -312,6 +325,7 @@ NDIS_MEDIUM SupportedMedia[1] = {NdisMedium802_3}; UINT SelectedMedium; NDIS_STATUS Status; + NDIS_REQUEST Request; /* Allocate the adapter context */ AdapterContext = ExAllocatePool(NonPagedPool, sizeof(*AdapterContext)); @@ -404,6 +418,51 @@ return Status; } + /* Get the MAC options */ + Request.RequestType = NdisRequestQueryInformation; + Request.DATA.QUERY_INFORMATION.Oid = OID_GEN_MAC_OPTIONS; + Request.DATA.QUERY_INFORMATION.InformationBuffer = &AdapterContext->MacOptions; + Request.DATA.QUERY_INFORMATION.InformationBufferLength = sizeof(ULONG); + NdisRequest(&Status, + AdapterContext->BindingHandle, + &Request); + + /* Wait for a pending request */ + if (Status == NDIS_STATUS_PENDING) + { + KeWaitForSingleObject(&AdapterContext->AsyncEvent, + Executive, + KernelMode, + FALSE, + NULL); + Status = AdapterContext->AsyncStatus; + } + + /* Check the final status */ + if (Status != NDIS_STATUS_SUCCESS) + { + NDIS_STATUS CloseStatus; + + DPRINT1("Failed to get MAC options with status 0x%x\n", Status); + + NdisCloseAdapter(&CloseStatus, + AdapterContext->BindingHandle); + if (CloseStatus == NDIS_STATUS_PENDING) + { + KeWaitForSingleObject(&AdapterContext->AsyncEvent, + Executive, + KernelMode, + FALSE, + NULL); + } + + NdisFreePacketPool(AdapterContext->PacketPoolHandle); + NdisFreeBufferPool(AdapterContext->BufferPoolHandle); + RtlFreeUnicodeString(&AdapterContext->DeviceName); + ExFreePool(AdapterContext); + return Status; + } + /* Add the adapter context to the global list */ ExInterlockedInsertTailList(&GlobalAdapterList, &AdapterContext->ListEntry,
12 years, 11 months
1
0
0
0
[cgutman] 54896: [NDIS] - NdisGetCurrentSystemTime can be called at any IRQL - Fixes assertions running the RTL8185 driver
by cgutman@svn.reactos.org
Author: cgutman Date: Tue Jan 10 01:23:35 2012 New Revision: 54896 URL:
http://svn.reactos.org/svn/reactos?rev=54896&view=rev
Log: [NDIS] - NdisGetCurrentSystemTime can be called at any IRQL - Fixes assertions running the RTL8185 driver Modified: branches/wlan-bringup/drivers/network/ndis/ndis/time.c Modified: branches/wlan-bringup/drivers/network/ndis/ndis/time.c URL:
http://svn.reactos.org/svn/reactos/branches/wlan-bringup/drivers/network/nd…
============================================================================== --- branches/wlan-bringup/drivers/network/ndis/ndis/time.c [iso-8859-1] (original) +++ branches/wlan-bringup/drivers/network/ndis/ndis/time.c [iso-8859-1] Tue Jan 10 01:23:35 2012 @@ -57,10 +57,9 @@ * ARGUMENTS: * pSystemTime: pointer to the returned system time * NOTES: - * - call at IRQL <= DISPATCH_LEVEL - */ -{ - ASSERT_IRQL(DISPATCH_LEVEL); + * - call at any IRQL + */ +{ ASSERT(pSystemTime); KeQuerySystemTime (pSystemTime);
12 years, 11 months
1
0
0
0
[cgutman] 54895: [PCNET] - Apply the same hack for OID_GEN_MEDIA_CONNECT_STATUS as we did for OID_GEN_HARDWARE_STATUS (since media state detection is broken for certain adapters) [DHCPCSVC] - Keep ...
by cgutman@svn.reactos.org
Author: cgutman Date: Tue Jan 10 00:44:16 2012 New Revision: 54895 URL:
http://svn.reactos.org/svn/reactos?rev=54895&view=rev
Log: [PCNET] - Apply the same hack for OID_GEN_MEDIA_CONNECT_STATUS as we did for OID_GEN_HARDWARE_STATUS (since media state detection is broken for certain adapters) [DHCPCSVC] - Keep the adapter thread running to handle media state changes [TCPIP] - Fix media state detection which was totally broken because it was using the wrong OID Modified: branches/wlan-bringup/dll/win32/dhcpcsvc/dhcp/adapter.c branches/wlan-bringup/drivers/network/dd/pcnet/requests.c branches/wlan-bringup/drivers/network/tcpip/datalink/lan.c branches/wlan-bringup/lib/drivers/ip/network/interface.c Modified: branches/wlan-bringup/dll/win32/dhcpcsvc/dhcp/adapter.c URL:
http://svn.reactos.org/svn/reactos/branches/wlan-bringup/dll/win32/dhcpcsvc…
============================================================================== --- branches/wlan-bringup/dll/win32/dhcpcsvc/dhcp/adapter.c [iso-8859-1] (original) +++ branches/wlan-bringup/dll/win32/dhcpcsvc/dhcp/adapter.c [iso-8859-1] Tue Jan 10 00:44:16 2012 @@ -345,15 +345,12 @@ DH_DbgPrint(MID_TRACE,("Adapter %d was rejected\n", Table->table[i].dwIndex)); } +#if 0 Error = NotifyAddrChange(NULL, NULL); -#if 0 if (Error != NO_ERROR) break; #else - if (AdapterCount) - break; - else - Sleep(3000); + Sleep(3000); #endif } while (TRUE); Modified: branches/wlan-bringup/drivers/network/dd/pcnet/requests.c URL:
http://svn.reactos.org/svn/reactos/branches/wlan-bringup/drivers/network/dd…
============================================================================== --- branches/wlan-bringup/drivers/network/dd/pcnet/requests.c [iso-8859-1] (original) +++ branches/wlan-bringup/drivers/network/dd/pcnet/requests.c [iso-8859-1] Tue Jan 10 00:44:16 2012 @@ -266,7 +266,7 @@ case OID_GEN_MEDIA_CONNECT_STATUS: { - GenericULONG = Adapter->MediaState; + GenericULONG = (ULONG)NdisMediaStateConnected; /* Adapter->MediaState */ break; } Modified: branches/wlan-bringup/drivers/network/tcpip/datalink/lan.c URL:
http://svn.reactos.org/svn/reactos/branches/wlan-bringup/drivers/network/tc…
============================================================================== --- branches/wlan-bringup/drivers/network/tcpip/datalink/lan.c [iso-8859-1] (original) +++ branches/wlan-bringup/drivers/network/tcpip/datalink/lan.c [iso-8859-1] Tue Jan 10 00:44:16 2012 @@ -185,7 +185,9 @@ case OID_GEN_HARDWARE_STATUS: *Result = NdisHardwareStatusReady; return STATUS_SUCCESS; - + case OID_GEN_MEDIA_CONNECT_STATUS: + *Result = NdisMediaStateConnected; + return STATUS_SUCCESS; default: return STATUS_INVALID_PARAMETER; } Modified: branches/wlan-bringup/lib/drivers/ip/network/interface.c URL:
http://svn.reactos.org/svn/reactos/branches/wlan-bringup/lib/drivers/ip/net…
============================================================================== --- branches/wlan-bringup/lib/drivers/ip/network/interface.c [iso-8859-1] (original) +++ branches/wlan-bringup/lib/drivers/ip/network/interface.c [iso-8859-1] Tue Jan 10 00:44:16 2012 @@ -196,27 +196,26 @@ return NULL; } -NTSTATUS GetInterfaceConnectionStatus -( PIP_INTERFACE Interface, PULONG Result ) { - NTSTATUS Status = TcpipLanGetDwordOid - ( Interface, OID_GEN_HARDWARE_STATUS, Result ); - if( NT_SUCCESS(Status) ) switch( *Result ) { - case NdisHardwareStatusReady: +NTSTATUS GetInterfaceConnectionStatus(PIP_INTERFACE Interface, PULONG Result) +{ + NTSTATUS Status; + + /* Query OID_GEN_MEDIA_CONNECT_STATUS for connection status information */ + Status = TcpipLanGetDwordOid(Interface, OID_GEN_MEDIA_CONNECT_STATUS, Result); + if (!NT_SUCCESS(Status)) + return Status; + + /* Translate the result into MIB_IF_OPER_STATUS_XXX */ + if (*Result == NdisMediaStateConnected) + { + /* Up and running */ *Result = MIB_IF_OPER_STATUS_OPERATIONAL; - break; - case NdisHardwareStatusInitializing: - *Result = MIB_IF_OPER_STATUS_CONNECTING; - break; - case NdisHardwareStatusReset: + } + else + { + /* Down */ *Result = MIB_IF_OPER_STATUS_DISCONNECTED; - break; - case NdisHardwareStatusNotReady: - *Result = MIB_IF_OPER_STATUS_DISCONNECTED; - break; - case NdisHardwareStatusClosing: - default: - *Result = MIB_IF_OPER_STATUS_NON_OPERATIONAL; - break; - } - return Status; -} + } + + return STATUS_SUCCESS; +}
12 years, 11 months
1
0
0
0
[rharabien] 54894: [SHELL32] - Add item icons to New menu - Fix some leaks in New menu - Properly handle New Folder and New Link items
by rharabien@svn.reactos.org
Author: rharabien Date: Mon Jan 9 23:01:01 2012 New Revision: 54894 URL:
http://svn.reactos.org/svn/reactos?rev=54894&view=rev
Log: [SHELL32] - Add item icons to New menu - Fix some leaks in New menu - Properly handle New Folder and New Link items Modified: trunk/reactos/dll/win32/shell32/newmenu.cpp trunk/reactos/dll/win32/shell32/newmenu.h trunk/reactos/dll/win32/shell32/openwithmenu.cpp trunk/reactos/dll/win32/shell32/openwithmenu.h Modified: trunk/reactos/dll/win32/shell32/newmenu.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/newmenu.…
============================================================================== --- trunk/reactos/dll/win32/shell32/newmenu.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/newmenu.cpp [iso-8859-1] Mon Jan 9 23:01:01 2012 @@ -3,6 +3,7 @@ * * Copyright 2007 Johannes Anderwald (janderwald(a)reactos.org) * Copyright 2009 Andrew Hill + * Copyright 2012 Rafal Harabien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -26,132 +27,83 @@ CNewMenu::CNewMenu() { m_wszPath = NULL; - m_pShellItems = NULL; + m_pItems = NULL; + m_pLinkItem = NULL; m_pSite = NULL; + m_hbmFolder = NULL; + m_hbmLink = NULL; } CNewMenu::~CNewMenu() { - UnloadShellItems(); - if (m_hSubMenu) - CleanupMenu(); -} - -void CNewMenu::CleanupMenu() -{ - INT Count, Index; - MENUITEMINFOW mii; - - /* get item count */ - Count = GetMenuItemCount(m_hSubMenu); - if (Count == -1) - return; - - /* setup menuitem info */ - ZeroMemory(&mii, sizeof(mii)); - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_DATA | MIIM_FTYPE | MIIM_CHECKMARKS; - - for(Index = 0; Index < Count; Index++) - { - if (GetMenuItemInfoW(m_hSubMenu, Index, TRUE, &mii)) - { - if (mii.hbmpChecked) - DeleteObject(mii.hbmpChecked); - } - } + UnloadAllItems(); + if (m_hbmFolder) + DeleteObject(m_hbmFolder); + if (m_hbmLink) + DeleteObject(m_hbmLink); } void CNewMenu::UnloadItem(SHELLNEW_ITEM *pItem) { - // bail if the item is clearly invalid - if (NULL == pItem) - return; - - if (NULL != pItem->pwszTarget) - free(pItem->pwszTarget); - + /* Note: free allows NULL as argument */ + free(pItem->pData); free(pItem->pwszDesc); - free(pItem->pwszIcon); free(pItem->pwszExt); + if (pItem->hBitmap) + DeleteObject(pItem->hBitmap); + HeapFree(GetProcessHeap(), 0, pItem); } -void CNewMenu::UnloadShellItems() +void CNewMenu::UnloadAllItems() { SHELLNEW_ITEM *pCurItem; - while (m_pShellItems) - { - pCurItem = m_pShellItems; - m_pShellItems = m_pShellItems->pNext; + /* Unload normal items */ + while (m_pItems) + { + pCurItem = m_pItems; + m_pItems = m_pItems->pNext; UnloadItem(pCurItem); } -} - -BOOL CNewMenu::GetKeyDescription(LPCWSTR pwszExt, LPWSTR pwszResult) + + /* Unload link item */ + if (m_pLinkItem) + UnloadItem(m_pLinkItem); + m_pLinkItem = NULL; +} + +static HBITMAP IconToBitmap(HICON hIcon) +{ + HDC hdc, hdcScr; + HBITMAP hbm, hbmOld; + RECT rc; + + hdcScr = GetDC(NULL); + hdc = CreateCompatibleDC(hdcScr); + SetRect(&rc, 0, 0, GetSystemMetrics(SM_CXMENUCHECK), GetSystemMetrics(SM_CYMENUCHECK)); + hbm = CreateCompatibleBitmap(hdcScr, rc.right, rc.bottom); + ReleaseDC(NULL, hdcScr); + + hbmOld = (HBITMAP)SelectObject(hdc, hbm); + FillRect(hdc, &rc, (HBRUSH)(COLOR_MENU + 1)); + if (!DrawIconEx(hdc, 0, 0, hIcon, rc.right, rc.bottom, 0, NULL, DI_NORMAL)) + ERR("DrawIcon failed: %x\n", GetLastError()); + SelectObject(hdc, hbmOld); + + DeleteDC(hdc); + + return hbm; +} + +CNewMenu::SHELLNEW_ITEM *CNewMenu::LoadItem(LPCWSTR pwszExt) { HKEY hKey; - DWORD cbDesc; - WCHAR wszDesc[100]; - LONG Result; - - TRACE("GetKeyDescription: keyname %s\n", debugstr_w(pwszExt)); - - if (RegOpenKeyExW(HKEY_CLASSES_ROOT, pwszExt, 0, KEY_READ, &hKey) != ERROR_SUCCESS) - return FALSE; - - /* Get user friendly name */ - if (RegLoadMUIStringW(hKey, L"\\FriendlyTypeName", pwszResult, MAX_PATH, &cbDesc, 0, NULL) == ERROR_SUCCESS) - { - TRACE("result %s\n", debugstr_w(pwszResult)); - RegCloseKey(hKey); - return TRUE; - } - - /* Fetch default value */ - cbDesc = sizeof(wszDesc); - Result = RegGetValueW(hKey, NULL, L"", RRF_RT_REG_SZ, NULL, wszDesc, &cbDesc); - if(Result == ERROR_SUCCESS) - { - if (wcscmp(pwszExt, wszDesc) != 0) - { - /* recurse for to a linked key */ - if (!GetKeyDescription(wszDesc, pwszResult)) - { - /* use description */ - wcscpy(pwszResult, wszDesc); - } - } - else - { - /* use default value as description */ - wcscpy(pwszResult, wszDesc); - } - } - else - { - /* registry key w/o default key?? */ - ERR("RegGetValue failed with %x\n", Result); - wcscpy(pwszResult, pwszExt); - } - - RegCloseKey(hKey); - return TRUE; -} - -CNewMenu::SHELLNEW_ITEM *CNewMenu::LoadItem(LPCWSTR pwszExt) -{ - HKEY hKey; - DWORD dwIndex = 0; WCHAR wszBuf[MAX_PATH]; - WCHAR wszCommand[MAX_PATH]; - WCHAR wszDesc[MAX_PATH] = L""; - WCHAR wszIcon[MAX_PATH] = L""; - DWORD cchName, cbCommand; - SHELLNEW_ITEM *pNewItem = NULL; + BYTE *pData = NULL; + DWORD cbData; StringCbPrintfW(wszBuf, sizeof(wszBuf), L"%s\\ShellNew", pwszExt); @@ -164,59 +116,68 @@ } /* Find first valid value */ - while (TRUE) - { - cchName = _countof(wszBuf); - cbCommand = sizeof(wszCommand); - if (RegEnumValueW(hKey, dwIndex++, wszBuf, &cchName, NULL, NULL, (LPBYTE)wszCommand, &cbCommand) != ERROR_SUCCESS) - break; - - SHELLNEW_TYPE Type = SHELLNEW_TYPE_INVALID; - LPWSTR pwszTarget = wszCommand; - - TRACE("wszBuf %s wszCommand %s\n", debugstr_w(wszBuf), debugstr_w(wszCommand)); - - /* Handle different types */ - if (!wcsicmp(wszBuf, L"Command")) - Type = SHELLNEW_TYPE_COMMAND; - else if (!wcsicmp(wszBuf, L"Data")) - Type = SHELLNEW_TYPE_DATA; - else if (!wcsicmp(wszBuf, L"FileName")) - Type = SHELLNEW_TYPE_FILENAME; - else if (!wcsicmp(wszBuf, L"NullFile")) + struct + { + LPCSTR pszName; + SHELLNEW_TYPE Type; + BOOL bNeedData; + BOOL bStr; + } Types[] = { + {"FileName", SHELLNEW_TYPE_FILENAME, TRUE, TRUE}, + {"Command", SHELLNEW_TYPE_COMMAND, TRUE, TRUE}, + {"Data", SHELLNEW_TYPE_DATA, TRUE, FALSE}, + {"NullFile", SHELLNEW_TYPE_NULLFILE, FALSE}, + {NULL} + }; + UINT i; + + for (i = 0; Types[i].pszName; ++i) + { + /* Note: We are using ANSI function because strings can be treated as data */ + cbData = 0; + DWORD dwFlags = Types[i].bStr ? RRF_RT_REG_SZ|RRF_RT_REG_EXPAND_SZ : RRF_RT_ANY; + if (RegGetValueA(hKey, NULL, Types[i].pszName, dwFlags, NULL, NULL, &cbData) == ERROR_SUCCESS) { - Type = SHELLNEW_TYPE_NULLFILE; - pwszTarget = NULL; - } - - /* Create new item */ - if (Type != SHELLNEW_TYPE_INVALID) - { - pNewItem = (SHELLNEW_ITEM *)HeapAlloc(GetProcessHeap(), 0, sizeof(SHELLNEW_ITEM)); - if (!pNewItem) - break; - - pNewItem->Type = Type; - if (pwszTarget) - pNewItem->pwszTarget = _wcsdup(pwszTarget); - else - pNewItem->pwszTarget = NULL; - - GetKeyDescription(pwszExt, wszDesc); - pNewItem->pwszDesc = _wcsdup(wszDesc); - pNewItem->pwszIcon = _wcsdup(wszIcon); - pNewItem->pwszExt = _wcsdup(pwszExt); - pNewItem->pNext = NULL; + if (Types[i].bNeedData && cbData > 0) + { + pData = (BYTE*)malloc(cbData); + RegGetValueA(hKey, NULL, Types[i].pszName, dwFlags, NULL, pData, &cbData); + } break; } } - RegCloseKey(hKey); + + /* Was any key found? */ + if (!Types[i].pszName) + return NULL; + + SHFILEINFO fi; + if (!SHGetFileInfoW(pwszExt, FILE_ATTRIBUTE_NORMAL, &fi, sizeof(fi), SHGFI_USEFILEATTRIBUTES|SHGFI_TYPENAME|SHGFI_ICON|SHGFI_SMALLICON)) + return NULL; + + /* Create new item */ + SHELLNEW_ITEM *pNewItem = (SHELLNEW_ITEM *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SHELLNEW_ITEM)); + if (!pNewItem) + { + free(pData); + return NULL; + } + + TRACE("new item %ls\n", fi.szTypeName); + pNewItem->Type = Types[i].Type; + pNewItem->pData = pData; + pNewItem->cbData = pData ? cbData : 0; + pNewItem->pwszExt = _wcsdup(pwszExt); + pNewItem->pwszDesc = _wcsdup(fi.szTypeName); + if (fi.hIcon) + pNewItem->hBitmap = IconToBitmap(fi.hIcon); + return pNewItem; } BOOL -CNewMenu::LoadShellNewItems() +CNewMenu::LoadAllItems() { DWORD dwIndex = 0; WCHAR wszName[MAX_PATH]; @@ -224,28 +185,21 @@ SHELLNEW_ITEM *pCurItem = NULL; /* If there are any unload them */ - UnloadShellItems(); + UnloadAllItems(); /* Enumerate all extesions */ while (RegEnumKeyW(HKEY_CLASSES_ROOT, dwIndex++, wszName, _countof(wszName)) == ERROR_SUCCESS) { - if (wszName[0] != '.' || wcsicmp(wszName, L".lnk") == 0) + if (wszName[0] != L'.') continue; pNewItem = LoadItem(wszName); if (pNewItem) { - if (!wcsicmp(pNewItem->pwszExt, L".lnk")) - { - /* FIXME: Should we load them? - Add lnk handlers to begin of the list */ - if (m_pShellItems) - { - pNewItem->pNext = m_pShellItems; - m_pShellItems = pNewItem; - } - else - m_pShellItems = pCurItem = pNewItem; + if (wcsicmp(pNewItem->pwszExt, L".lnk") == 0) + { + /* Link handler */ + m_pLinkItem = pNewItem; } else { @@ -256,51 +210,38 @@ pCurItem = pNewItem; } else - pCurItem = m_pShellItems = pNewItem; + pCurItem = m_pItems = pNewItem; } } } - if (m_pShellItems == NULL) + if (!m_pLinkItem) + { + m_pLinkItem = (SHELLNEW_ITEM *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SHELLNEW_ITEM)); + if (m_pLinkItem) + { + m_pLinkItem->Type = SHELLNEW_TYPE_NULLFILE; + m_pLinkItem->pwszDesc = _wcsdup(L"Link"); + m_pLinkItem->pwszExt = _wcsdup(L".lnk"); + } + } + + if (m_pItems == NULL) return FALSE; else return TRUE; } -static HBITMAP IconToBitmap(HICON hIcon) -{ - HDC hdc, hdcScr; - HBITMAP hbm, hbmOld; - RECT rc; - - hdcScr = GetDC(NULL); - hdc = CreateCompatibleDC(hdcScr); - SetRect(&rc, 0, 0, GetSystemMetrics(SM_CXMENUCHECK), GetSystemMetrics(SM_CYMENUCHECK)); - hbm = CreateCompatibleBitmap(hdcScr, rc.right, rc.bottom); - ReleaseDC(NULL, hdcScr); - - hbmOld = (HBITMAP)SelectObject(hdc, hbm); - FillRect(hdc, &rc, (HBRUSH)(COLOR_MENU + 1)); - if (!DrawIconEx(hdc, 0, 0, hIcon, rc.right, rc.bottom, 0, NULL, DI_NORMAL)) - ERR("DrawIcon failed: %x\n", GetLastError()); - SelectObject(hdc, hbmOld); - - DeleteDC(hdc); - - return hbm; -} - UINT CNewMenu::InsertShellNewItems(HMENU hMenu, UINT idCmdFirst, UINT Pos) { MENUITEMINFOW mii; WCHAR wszBuf[256]; - HICON hIcon; UINT idCmd = idCmdFirst; - if (m_pShellItems == NULL) - { - if (!LoadShellNewItems()) + if (m_pItems == NULL) + { + if (!LoadAllItems()) return 0; } @@ -315,11 +256,10 @@ mii.dwTypeData = wszBuf; mii.cch = wcslen(mii.dwTypeData); mii.wID = idCmd; - hIcon = (HICON)LoadImage(shell32_hInstance, MAKEINTRESOURCE(IDI_SHELL_FOLDER), IMAGE_ICON, 0, 0, 0); - if (hIcon) + if (m_hbmFolder) { mii.fMask |= MIIM_CHECKMARKS; - mii.hbmpChecked = mii.hbmpUnchecked = IconToBitmap(hIcon); + mii.hbmpChecked = mii.hbmpUnchecked = m_hbmFolder; } if (InsertMenuItemW(hMenu, Pos++, TRUE, &mii)) ++idCmd; @@ -329,12 +269,11 @@ wszBuf[0] = 0; mii.dwTypeData = wszBuf; mii.cch = wcslen(mii.dwTypeData); - mii.wID = idCmdFirst++; - hIcon = (HICON)LoadImage(shell32_hInstance, MAKEINTRESOURCE(IDI_SHELL_SHORTCUT), IMAGE_ICON, 0, 0, 0); - if (hIcon) + mii.wID = idCmd; + if (m_hbmLink) { mii.fMask |= MIIM_CHECKMARKS; - mii.hbmpChecked = mii.hbmpUnchecked = IconToBitmap(hIcon); + mii.hbmpChecked = mii.hbmpUnchecked = m_hbmLink; } if (InsertMenuItemW(hMenu, Pos++, TRUE, &mii)) ++idCmd; @@ -346,22 +285,22 @@ InsertMenuItemW(hMenu, Pos++, TRUE, &mii); /* Insert rest of items */ - mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE | MIIM_DATA; - /* - * FIXME: - * implement loading of icons - * and using MFT_OWNERDRAWN - */ mii.fType = MFT_STRING; mii.fState = MFS_ENABLED; - SHELLNEW_ITEM *pCurItem = m_pShellItems; + SHELLNEW_ITEM *pCurItem = m_pItems; while (pCurItem) { TRACE("szDesc %s\n", debugstr_w(pCurItem->pwszDesc)); + mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE | MIIM_DATA; mii.dwTypeData = pCurItem->pwszDesc; mii.cch = wcslen(mii.dwTypeData); mii.wID = idCmd; + if (pCurItem->hBitmap) + { + mii.fMask |= MIIM_CHECKMARKS; + mii.hbmpChecked = mii.hbmpUnchecked = pCurItem->hBitmap; + } if (InsertMenuItemW(hMenu, Pos++, TRUE, &mii)) ++idCmd; pCurItem = pCurItem->pNext; @@ -370,34 +309,86 @@ return idCmd - idCmdFirst; } -HRESULT -CNewMenu::DoShellNewCmd(LPCMINVOKECOMMANDINFO lpcmi, IShellView *psv) -{ - SHELLNEW_ITEM *pCurItem = m_pShellItems; +CNewMenu::SHELLNEW_ITEM *CNewMenu::FindItemFromIdOffset(UINT IdOffset) +{ + if (IdOffset == 0) + return NULL; /* Folder */ + + if (IdOffset == 1) + return m_pLinkItem; /* shortcut */ + + /* Find shell new item */ + SHELLNEW_ITEM *pItem = m_pItems; + for (UINT i = 2; pItem; ++i) + { + if (i == IdOffset) + break; + + pItem = pItem->pNext; + } + + return pItem; +} + +HRESULT CNewMenu::CreateNewFolder(IShellView *psv) +{ + WCHAR wszName[MAX_PATH]; + CComPtr<ISFHelper> psfhlp; + CComPtr<IFolderView> pFolderView; + CComPtr<IShellFolder> pParentFolder; + HRESULT hr; + + //if (m_pSite == NULL) + // return E_FAIL; + + /* Get current folder */ + hr = IUnknown_QueryService(psv, SID_IFolderView, IID_IFolderView, (void **)&pFolderView); + if (FAILED(hr)) + return hr; + + hr = pFolderView->GetFolder(IID_IShellFolder, (void **)&pParentFolder); + if (FAILED(hr)) + return hr; + + hr = pParentFolder->QueryInterface(IID_ISFHelper, (LPVOID*)&psfhlp); + if (FAILED(hr)) + return hr; + + LPITEMIDLIST pidl; + + /* Get unique name and create a folder */ + hr = psfhlp->GetUniqueName(wszName, _countof(wszName)); + if (hr != S_OK) + return hr; + hr = psfhlp->AddFolder(0, wszName, &pidl); + if (hr != S_OK) + { + WCHAR wszBuf[256]; + StringCbPrintfW(wszBuf, sizeof(wszBuf), L"Cannot create folder: %s", wszName); + MessageBoxW(NULL, wszBuf, L"Cannot create folder", MB_OK|MB_ICONERROR); + return hr; + } + + /* Do a labeledit */ + psv->Refresh(); + psv->SelectItem(pidl, SVSI_DESELECTOTHERS | SVSI_EDIT | SVSI_ENSUREVISIBLE | + SVSI_FOCUSED | SVSI_SELECT); + + SHFree(pidl); + return S_OK; +} + +HRESULT CNewMenu::CreateNewItem(SHELLNEW_ITEM *pItem, LPCMINVOKECOMMANDINFO lpcmi, IShellView *psv) +{ LPITEMIDLIST pidl; STRRET strTemp; WCHAR wszBuf[MAX_PATH]; WCHAR wszPath[MAX_PATH]; - UINT i, idCmd = LOWORD(lpcmi->lpVerb); CComPtr<IFolderView> pFolderView; CComPtr<IShellFolder> pParentFolder; CComPtr<IPersistFolder3> psf; HRESULT hr; - /* Find shell new item */ - for (i = 1; pCurItem; ++i) - { - if (i == idCmd) - break; - - pCurItem = pCurItem->pNext; - } - - if (!pCurItem) - return E_UNEXPECTED; - //if (m_pSite == NULL) - // return E_FAIL; - /* Get current folder */ hr = IUnknown_QueryService(psv, SID_IFolderView, IID_IFolderView, (void **)&pFolderView); if (FAILED(hr)) @@ -427,7 +418,7 @@ } StrRetToBufW(&strTemp, pidl, wszPath, _countof(wszPath)); - switch (pCurItem->Type) + switch (pItem->Type) { case SHELLNEW_TYPE_COMMAND: { @@ -436,7 +427,7 @@ STARTUPINFOW si; PROCESS_INFORMATION pi; - if (!ExpandEnvironmentStringsW(pCurItem->pwszTarget, wszBuf, MAX_PATH)) + if (!ExpandEnvironmentStringsW((LPWSTR)pItem->pData, wszBuf, MAX_PATH)) { TRACE("ExpandEnvironmentStrings failed\n"); break; @@ -475,41 +466,35 @@ /* Build new file name */ LoadStringW(shell32_hInstance, FCIDM_SHVIEW_NEW, wszBuf, _countof(wszBuf)); StringCchCatExW(wszPath, _countof(wszPath), L"\\", &pwszFilename, &cchFilenameMax, 0); - StringCchPrintfW(pwszFilename, cchFilenameMax, L"%s %s%s", wszBuf, pCurItem->pwszDesc, pCurItem->pwszExt); + StringCchPrintfW(pwszFilename, cchFilenameMax, L"%s %s%s", wszBuf, pItem->pwszDesc, pItem->pwszExt); /* Find unique name */ - for (i = 2; PathFileExistsW(wszPath); ++i) - { - StringCchPrintfW(pwszFilename, cchFilenameMax, L"%s %s (%u)%s", wszBuf, pCurItem->pwszDesc, i, pCurItem->pwszExt); + for (UINT i = 2; PathFileExistsW(wszPath); ++i) + { + StringCchPrintfW(pwszFilename, cchFilenameMax, L"%s %s (%u)%s", wszBuf, pItem->pwszDesc, i, pItem->pwszExt); TRACE("New Filename %ls\n", pwszFilename); } - if (pCurItem->Type == SHELLNEW_TYPE_DATA || pCurItem->Type == SHELLNEW_TYPE_NULLFILE) - { - /* Create new file */ - HANDLE hFile = CreateFileW(wszPath, GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); - if (hFile != INVALID_HANDLE_VALUE) + /* Create new file */ + HANDLE hFile = CreateFileW(wszPath, GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); + if (hFile != INVALID_HANDLE_VALUE) + { + if (pItem->Type == SHELLNEW_TYPE_DATA) { - if (pCurItem->Type == SHELLNEW_TYPE_DATA) - { - /* Write a content */ - CHAR szTemp[256]; - DWORD cbWritten, cbTemp = WideCharToMultiByte(CP_ACP, 0, pCurItem->pwszTarget, -1, szTemp, _countof(szTemp), NULL, NULL); - if (cbTemp) - WriteFile(hFile, (LPCVOID)szTemp, cbTemp, &cbWritten, NULL); - else - ERR("WideCharToMultiByte failed\n"); - } - - /* Close file now */ - CloseHandle(hFile); + /* Write a content */ + DWORD cbWritten; + WriteFile(hFile, pItem->pData, pItem->cbData, &cbWritten, NULL); } - else bSuccess = FALSE; - } - else if (pCurItem->Type == SHELLNEW_TYPE_FILENAME) + + /* Close file now */ + CloseHandle(hFile); + } else + bSuccess = FALSE; + + if (pItem->Type == SHELLNEW_TYPE_FILENAME) { /* Copy file */ - bSuccess = CopyFileW(pCurItem->pwszTarget, wszPath, FALSE); + bSuccess = CopyFileW((LPWSTR)pItem->pData, wszPath, FALSE); } /* Show message if we failed */ @@ -517,6 +502,15 @@ { TRACE("Notifying fs %s\n", debugstr_w(wszPath)); SHChangeNotify(SHCNE_CREATE, SHCNF_PATHW, (LPCVOID)wszPath, NULL); + psv->Refresh(); + + LPITEMIDLIST pidl; + hr = _ILCreateFromPathW(wszPath, &pidl); + if (SUCCEEDED(hr)) + { + psv->SelectItem(pidl, SVSI_DESELECTOTHERS|SVSI_EDIT|SVSI_ENSUREVISIBLE|SVSI_FOCUSED|SVSI_SELECT); + ILFree(pidl); + } } else { @@ -529,52 +523,8 @@ ERR("Invalid type\n"); break; } + return S_OK; -} - -void CNewMenu::CreateNewFolder(IShellView *psv) -{ - WCHAR wszName[MAX_PATH]; - CComPtr<ISFHelper> psfhlp; - CComPtr<IFolderView> pFolderView; - CComPtr<IShellFolder> pParentFolder; - HRESULT hr; - - //if (m_pSite == NULL) - // return; - - /* Get current folder */ - hr = IUnknown_QueryService(psv, SID_IFolderView, IID_IFolderView, (void **)&pFolderView); - if (FAILED(hr)) - return; - - hr = pFolderView->GetFolder(IID_IShellFolder, (void **)&pParentFolder); - if (FAILED(hr)) - return; - - hr = pParentFolder->QueryInterface(IID_ISFHelper, (LPVOID*)&psfhlp); - if (SUCCEEDED(hr)) - { - LPITEMIDLIST pidl; - - /* Get unique name and create a folder */ - if (psfhlp->GetUniqueName(wszName, _countof(wszName)) != S_OK) - return; - if (psfhlp->AddFolder(0, wszName, &pidl) != S_OK) - { - WCHAR wszBuf[256]; - StringCbPrintfW(wszBuf, sizeof(wszBuf), L"Cannot create folder: %s", wszName); - MessageBoxW(NULL, wszBuf, L"Cannot create folder", MB_OK|MB_ICONERROR); - return; - } - - /* Do a labeledit */ - psv->Refresh(); - psv->SelectItem(pidl, SVSI_DESELECTOTHERS | SVSI_EDIT | SVSI_ENSUREVISIBLE | - SVSI_FOCUSED | SVSI_SELECT); - - SHFree(pidl); - } } HRESULT STDMETHODCALLTYPE CNewMenu::SetSite(IUnknown *pUnkSite) @@ -612,21 +562,20 @@ return E_FAIL; m_hSubMenu = CreateMenu(); + if (!m_hSubMenu) + return E_FAIL; + + cItems = InsertShellNewItems(m_hSubMenu, idCmdFirst, 0); + memset(&mii, 0, sizeof(mii)); mii.cbSize = sizeof(mii); - mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE; + mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE | MIIM_SUBMENU; mii.fType = MFT_STRING; mii.wID = -1; mii.dwTypeData = wszNew; mii.cch = wcslen(mii.dwTypeData); mii.fState = MFS_ENABLED; - - if (m_hSubMenu) - { - cItems = InsertShellNewItems(m_hSubMenu, idCmdFirst, 0); - mii.fMask |= MIIM_SUBMENU; - mii.hSubMenu = m_hSubMenu; - } + mii.hSubMenu = m_hSubMenu; if (!InsertMenuItemW(hMenu, indexMenu, TRUE, &mii)) return E_FAIL; @@ -638,23 +587,23 @@ WINAPI CNewMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpici) { - LPSHELLBROWSER lpSB; - LPSHELLVIEW lpSV = NULL; - HRESULT hr; - + IShellBrowser *lpSB = NULL; + CComPtr<IShellView> lpSV = NULL; + HRESULT hr = E_FAIL; + + /* Note: CWM_GETISHELLBROWSER returns shell browser without adding reference */ lpSB = (LPSHELLBROWSER)SendMessageA(lpici->hwnd, CWM_GETISHELLBROWSER, 0, 0); if (lpSB) lpSB->QueryActiveShellView(&lpSV); if (LOWORD(lpici->lpVerb) == 0) - { - CreateNewFolder(lpSV); - return S_OK; - } - - hr = DoShellNewCmd(lpici, lpSV); - if (SUCCEEDED(hr) && lpSV) - lpSV->Refresh(); + hr = CreateNewFolder(lpSV); + else + { + SHELLNEW_ITEM *pItem = FindItemFromIdOffset(LOWORD(lpici->lpVerb)); + if (pItem) + hr = CreateNewItem(pItem, lpici, lpSV); + } TRACE("CNewMenu::InvokeCommand %x\n", hr); return hr; @@ -676,11 +625,8 @@ HRESULT WINAPI -CNewMenu::HandleMenuMsg(UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - UNIMPLEMENTED; +CNewMenu::HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam) +{ return S_OK; } @@ -688,5 +634,10 @@ CNewMenu::Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID) { + HICON hIcon = (HICON)LoadImage(shell32_hInstance, MAKEINTRESOURCE(IDI_SHELL_FOLDER), IMAGE_ICON, 0, 0, LR_SHARED); + m_hbmFolder = hIcon ? IconToBitmap(hIcon) : NULL; + hIcon = (HICON)LoadImage(shell32_hInstance, MAKEINTRESOURCE(IDI_SHELL_SHORTCUT), IMAGE_ICON, 0, 0, LR_SHARED); + m_hbmLink = hIcon ? IconToBitmap(hIcon) : NULL; + return S_OK; } Modified: trunk/reactos/dll/win32/shell32/newmenu.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/newmenu.…
============================================================================== --- trunk/reactos/dll/win32/shell32/newmenu.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/newmenu.h [iso-8859-1] Mon Jan 9 23:01:01 2012 @@ -3,6 +3,7 @@ * * Copyright 2007 Johannes Anderwald (janderwald(a)reactos.org) * Copyright 2009 Andrew Hill + * Copyright 2012 Rafal Harabien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -43,26 +44,28 @@ { SHELLNEW_TYPE Type; LPWSTR pwszExt; - LPWSTR pwszTarget; + PBYTE pData; + ULONG cbData; LPWSTR pwszDesc; - LPWSTR pwszIcon; + HBITMAP hBitmap; SHELLNEW_ITEM *pNext; }; LPWSTR m_wszPath; - SHELLNEW_ITEM *m_pShellItems; + SHELLNEW_ITEM *m_pItems; + SHELLNEW_ITEM *m_pLinkItem; IUnknown *m_pSite; HMENU m_hSubMenu; + HBITMAP m_hbmFolder, m_hbmLink; - void CleanupMenu(); - static BOOL GetKeyDescription(LPCWSTR pwszExt, LPWSTR pwszResult); SHELLNEW_ITEM *LoadItem(LPCWSTR pwszExt); void UnloadItem(SHELLNEW_ITEM *pItem); - void UnloadShellItems(); - BOOL LoadShellNewItems(); + void UnloadAllItems(); + BOOL LoadAllItems(); UINT InsertShellNewItems(HMENU hMenu, UINT idFirst, UINT idMenu); - HRESULT DoShellNewCmd(LPCMINVOKECOMMANDINFO lpcmi, IShellView *psv); - void CreateNewFolder(IShellView *psv); + SHELLNEW_ITEM *FindItemFromIdOffset(UINT IdOffset); + HRESULT CreateNewFolder(IShellView *psv); + HRESULT CreateNewItem(SHELLNEW_ITEM *pItem, LPCMINVOKECOMMANDINFO lpcmi, IShellView *psv); public: CNewMenu(); Modified: trunk/reactos/dll/win32/shell32/openwithmenu.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/openwith…
============================================================================== --- trunk/reactos/dll/win32/shell32/openwithmenu.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/openwithmenu.cpp [iso-8859-1] Mon Jan 9 23:01:01 2012 @@ -3,6 +3,7 @@ * * Copyright 2007 Johannes Anderwald <janderwald(a)reactos.org> * Copyright 2009 Andrew Hill + * Copyright 2012 Rafal Harabien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Modified: trunk/reactos/dll/win32/shell32/openwithmenu.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/openwith…
============================================================================== --- trunk/reactos/dll/win32/shell32/openwithmenu.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/openwithmenu.h [iso-8859-1] Mon Jan 9 23:01:01 2012 @@ -3,6 +3,7 @@ * * Copyright 2007 Johannes Anderwald <janderwald(a)reactos.org> * Copyright 2009 Andrew Hill + * Copyright 2012 Rafal Harabien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public
12 years, 11 months
1
0
0
0
[spetreolle] 54893: [SVCHOST] Convert to Unicode. Fix buffer overruns and bad maths when UNICODE is defined. Patch by Samuel Serapion.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Mon Jan 9 22:47:16 2012 New Revision: 54893 URL:
http://svn.reactos.org/svn/reactos?rev=54893&view=rev
Log: [SVCHOST] Convert to Unicode. Fix buffer overruns and bad maths when UNICODE is defined. Patch by Samuel Serapion. Modified: trunk/reactos/base/services/svchost/CMakeLists.txt trunk/reactos/base/services/svchost/svchost.c trunk/reactos/base/services/svchost/svchost.rbuild Modified: trunk/reactos/base/services/svchost/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/svchost/CMak…
============================================================================== --- trunk/reactos/base/services/svchost/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/base/services/svchost/CMakeLists.txt [iso-8859-1] Mon Jan 9 22:47:16 2012 @@ -1,6 +1,6 @@ add_executable(svchost svchost.c svchost.rc) -set_module_type(svchost win32cui) +set_module_type(svchost win32cui UNICODE) add_importlibs(svchost advapi32 msvcrt kernel32 ntdll) add_cd_file(TARGET svchost DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/base/services/svchost/svchost.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/svchost/svch…
============================================================================== --- trunk/reactos/base/services/svchost/svchost.c [iso-8859-1] (original) +++ trunk/reactos/base/services/svchost/svchost.c [iso-8859-1] Mon Jan 9 22:47:16 2012 @@ -93,7 +93,7 @@ } /* Convert possible %SystemRoot% to a real path */ - BufferSize = ExpandEnvironmentStrings(Buffer, DllPath, sizeof(DllPath)); + BufferSize = ExpandEnvironmentStrings(Buffer, DllPath, _countof(DllPath)); if (0 == BufferSize) { DPRINT1("Invalid ServiceDll path: %s\n", Buffer); @@ -124,7 +124,7 @@ } memset(Service, 0, sizeof(SERVICE)); - Service->Name = HeapAlloc(GetProcessHeap(), 0, _tcslen(ServiceName) + sizeof(TCHAR)); + Service->Name = HeapAlloc(GetProcessHeap(), 0, (_tcslen(ServiceName)+1) * sizeof(TCHAR)); if (NULL == Service->Name) { DPRINT1("Not enough memory for service: %s\n", ServiceName); @@ -199,7 +199,7 @@ if (TRUE == PrepareService(ServiceName)) ++NrOfServices; - BufferIndex += (Length + 1) * sizeof(TCHAR); + BufferIndex += Length + 1; ServiceName = &Buffer[BufferIndex]; } @@ -238,7 +238,7 @@ PSERVICE Service = FirstService; /* Fill the service table */ - for (i = 0; i < NrOfServices; ++i) + for (i = 0; i < NrOfServices; i++) { DPRINT("Loading service: %s\n", Service->Name); ServiceTable[i].lpServiceName = Service->Name; @@ -251,7 +251,7 @@ ServiceTable[i].lpServiceProc = NULL; if (FALSE == StartServiceCtrlDispatcher(ServiceTable)) - printf("Failed to start service control dispatcher, ErrorCode: %lu\n", GetLastError()); + DPRINT1("Failed to start service control dispatcher, ErrorCode: %lu\n", GetLastError()); HeapFree(GetProcessHeap(), 0, ServiceTable); } @@ -260,7 +260,7 @@ DPRINT1("Not enough memory for the service table, trying to allocate %u bytes\n", sizeof(SERVICE_TABLE_ENTRY) * (NrOfServices + 1)); } - DPRINT1("Freeing services...\n"); + DPRINT("Freeing services...\n"); FreeServices(); return 0; Modified: trunk/reactos/base/services/svchost/svchost.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/svchost/svch…
============================================================================== --- trunk/reactos/base/services/svchost/svchost.rbuild [iso-8859-1] (original) +++ trunk/reactos/base/services/svchost/svchost.rbuild [iso-8859-1] Mon Jan 9 22:47:16 2012 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> -<module name="svchost" type="win32cui" installbase="system32" installname="svchost.exe"> +<module name="svchost" type="win32cui" installbase="system32" installname="svchost.exe" unicode="yes"> <include base="svchost">.</include> <library>advapi32</library> <file>svchost.c</file>
12 years, 11 months
1
0
0
0
[tkreuzer] 54892: remove leftover spotted by Amine
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Jan 9 22:06:04 2012 New Revision: 54892 URL:
http://svn.reactos.org/svn/reactos?rev=54892&view=rev
Log: remove leftover spotted by Amine Modified: trunk/reactos/include/ddk/ntstrsafe.h Modified: trunk/reactos/include/ddk/ntstrsafe.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntstrsafe.h?re…
============================================================================== --- trunk/reactos/include/ddk/ntstrsafe.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/ntstrsafe.h [iso-8859-1] Mon Jan 9 22:06:04 2012 @@ -2069,9 +2069,6 @@ #ifdef _MSC_VER #pragma warning(pop) -#ifdef _PREFAST_ -#pragma prefast(pop) -#endif /* _PREFAST_ */ #endif /* _MSC_VER */ #endif /* _NTSTRSAFE_H_INCLUDED_ */
12 years, 11 months
1
0
0
0
[tkreuzer] 54891: [PSDK/DDK] - Add MAX_NATURAL_ALIGNMENT, MEMORY_ALLOCATION_ALIGNMENT and PROBE_ALIGNMENT defintions to ntdef.h - disable prefast warnings about banned api usage, dpc access and seh...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Jan 9 21:55:56 2012 New Revision: 54891 URL:
http://svn.reactos.org/svn/reactos?rev=54891&view=rev
Log: [PSDK/DDK] - Add MAX_NATURAL_ALIGNMENT, MEMORY_ALLOCATION_ALIGNMENT and PROBE_ALIGNMENT defintions to ntdef.h - disable prefast warnings about banned api usage, dpc access and seh filter expression - annotate string types (PSTR, etc) as _Null_terminated_ Modified: trunk/reactos/include/crt/stdio.h trunk/reactos/include/ddk/ntstrsafe.h trunk/reactos/include/ddk/wdm.h trunk/reactos/include/psdk/ntdef.h trunk/reactos/include/xdk/iofuncs.h Modified: trunk/reactos/include/crt/stdio.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/stdio.h?rev=54…
============================================================================== --- trunk/reactos/include/crt/stdio.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/stdio.h [iso-8859-1] Mon Jan 9 21:55:56 2012 @@ -300,7 +300,17 @@ _CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,va_list _Args); #ifndef __NO_ISOCEXT /* externs in libmingwex.a */ _CRTIMP int __cdecl snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...); - __CRT_INLINE int __cdecl vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, va_list arg) { return _vsnwprintf(s,n,format,arg); } + __CRT_INLINE int __cdecl vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, va_list arg) + { +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:28719) /* disable banned api usage warning */ +#endif /* _MSC_VER */ + return _vsnwprintf(s,n,format,arg); +#ifdef _MSC_VER +#pragma warning(pop) +#endif /* _MSC_VER */ + } _CRTIMP int __cdecl vwscanf (const wchar_t *, va_list); _CRTIMP int __cdecl vfwscanf (FILE *,const wchar_t *,va_list); _CRTIMP int __cdecl vswscanf (const wchar_t *,const wchar_t *,va_list); Modified: trunk/reactos/include/ddk/ntstrsafe.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntstrsafe.h?re…
============================================================================== --- trunk/reactos/include/ddk/ntstrsafe.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/ntstrsafe.h [iso-8859-1] Mon Jan 9 21:55:56 2012 @@ -9,6 +9,11 @@ #include <stdio.h> #include <string.h> #include <stdarg.h> + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:28719) /* disable banned api usage warning */ +#endif /* _MSC_VER */ #ifndef C_ASSERT #ifdef _MSC_VER @@ -2062,4 +2067,11 @@ #define RtlStringLengthWorkerA RtlStringLengthWorkerA_instead_use_StringCchLengthA_or_StringCbLengthA; #define RtlStringLengthWorkerW RtlStringLengthWorkerW_instead_use_StringCchLengthW_or_StringCbLengthW; -#endif +#ifdef _MSC_VER +#pragma warning(pop) +#ifdef _PREFAST_ +#pragma prefast(pop) +#endif /* _PREFAST_ */ +#endif /* _MSC_VER */ + +#endif /* _NTSTRSAFE_H_INCLUDED_ */ Modified: trunk/reactos/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=5489…
============================================================================== --- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Mon Jan 9 21:55:56 2012 @@ -13027,9 +13027,16 @@ IN PDEVICE_OBJECT DeviceObject, IN PIO_DPC_ROUTINE DpcRoutine) { +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:28128) +#endif KeInitializeThreadedDpc(&DeviceObject->Dpc, (PKDEFERRED_ROUTINE) DpcRoutine, DeviceObject ); +#ifdef _MSC_VER +#pragma warning(pop) +#endif } #endif Modified: trunk/reactos/include/psdk/ntdef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntdef.h?rev=5…
============================================================================== --- trunk/reactos/include/psdk/ntdef.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ntdef.h [iso-8859-1] Mon Jan 9 21:55:56 2012 @@ -26,6 +26,7 @@ #include <basetsd.h> #include <excpt.h> #include <sdkddkver.h> +#include <specstrings.h> // FIXME: Shouldn't be included! #include <stdarg.h> @@ -167,12 +168,19 @@ #define UNALIGNED64 #endif +#if defined(_WIN64) || defined(_M_ALPHA) +#define MAX_NATURAL_ALIGNMENT sizeof(ULONGLONG) +#define MEMORY_ALLOCATION_ALIGNMENT 16 +#else +#define MAX_NATURAL_ALIGNMENT sizeof(ULONG) +#define MEMORY_ALLOCATION_ALIGNMENT 8 +#endif + #if defined(_M_MRX000) && !(defined(MIDL_PASS) || defined(RC_INVOKED)) && defined(ENABLE_RESTRICTED) #define RESTRICTED_POINTER __restrict #else #define RESTRICTED_POINTER #endif - #define ARGUMENT_PRESENT(ArgumentPointer) \ ((CHAR*)((ULONG_PTR)(ArgumentPointer)) != (CHAR*)NULL) @@ -195,6 +203,14 @@ #define TYPE_ALIGNMENT(t) __alignof(t) #else #define TYPE_ALIGNMENT(t) FIELD_OFFSET(struct { char x; t test; }, test) +#endif + +#if defined(_AMD64_) || defined(_X86_) +#define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT(ULONG) +#elif defined(_IA64_) || defined(_ARM_) +#define PROBE_ALIGNMENT(_s) max((TYPE_ALIGNMENT(_s), TYPE_ALIGNMENT(ULONG)) +#else +#error "unknown architecture" #endif /* Calling Conventions */ @@ -358,11 +374,11 @@ /* ANSI (Multi-byte Character) types */ typedef CHAR *PCHAR, *LPCH, *PCH; typedef CONST CHAR *LPCCH, *PCCH; -typedef CHAR *NPSTR, *LPSTR, *PSTR; -typedef PSTR *PZPSTR; -typedef CONST PSTR *PCZPSTR; -typedef CONST CHAR *LPCSTR, *PCSTR; -typedef PCSTR *PZPCSTR; +typedef _Null_terminated_ CHAR *NPSTR, *LPSTR, *PSTR; +typedef _Null_terminated_ PSTR *PZPSTR; +typedef _Null_terminated_ CONST PSTR *PCZPSTR; +typedef _Null_terminated_ CONST CHAR *LPCSTR, *PCSTR; +typedef _Null_terminated_ PCSTR *PZPCSTR; /* Pointer to an Asciiz string */ typedef CHAR *PSZ; @@ -372,13 +388,13 @@ typedef wchar_t WCHAR; typedef WCHAR *PWCHAR, *LPWCH, *PWCH; typedef CONST WCHAR *LPCWCH, *PCWCH; -typedef WCHAR *NWPSTR, *LPWSTR, *PWSTR; -typedef PWSTR *PZPWSTR; -typedef CONST PWSTR *PCZPWSTR; -typedef WCHAR UNALIGNED *LPUWSTR, *PUWSTR; -typedef CONST WCHAR *LPCWSTR, *PCWSTR; -typedef PCWSTR *PZPCWSTR; -typedef CONST WCHAR UNALIGNED *LPCUWSTR, *PCUWSTR; +typedef _Null_terminated_ WCHAR *NWPSTR, *LPWSTR, *PWSTR; +typedef _Null_terminated_ PWSTR *PZPWSTR; +typedef _Null_terminated_ CONST PWSTR *PCZPWSTR; +typedef _Null_terminated_ WCHAR UNALIGNED *LPUWSTR, *PUWSTR; +typedef _Null_terminated_ CONST WCHAR *LPCWSTR, *PCWSTR; +typedef _Null_terminated_ PCWSTR *PZPCWSTR; +typedef _Null_terminated_ CONST WCHAR UNALIGNED *LPCUWSTR, *PCUWSTR; /* Cardinal Data Types */ typedef char CCHAR, *PCCHAR; @@ -488,8 +504,8 @@ USHORT Length; USHORT MaximumLength; ULONG Buffer; -} STRING32, *PSTRING32, - UNICODE_STRING32, *PUNICODE_STRING32, +} STRING32, *PSTRING32, + UNICODE_STRING32, *PUNICODE_STRING32, ANSI_STRING32, *PANSI_STRING32; typedef struct _STRING64 { @@ -497,7 +513,7 @@ USHORT MaximumLength; ULONGLONG Buffer; } STRING64, *PSTRING64, - UNICODE_STRING64, *PUNICODE_STRING64, + UNICODE_STRING64, *PUNICODE_STRING64, ANSI_STRING64, *PANSI_STRING64; /* LangID and NLS */ Modified: trunk/reactos/include/xdk/iofuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/iofuncs.h?rev=…
============================================================================== --- trunk/reactos/include/xdk/iofuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/iofuncs.h [iso-8859-1] Mon Jan 9 21:55:56 2012 @@ -2658,10 +2658,17 @@ IN PDEVICE_OBJECT DeviceObject, IN PIO_DPC_ROUTINE DpcRoutine) { +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:28128) +#endif KeInitializeThreadedDpc(&DeviceObject->Dpc, (PKDEFERRED_ROUTINE) DpcRoutine, DeviceObject ); -} +#ifdef _MSC_VER +#pragma warning(pop) #endif +} +#endif $endif (_WDMDDK_)
12 years, 11 months
1
0
0
0
[cgutman] 54890: [WLANCONF] - Display fractional rates correctly (5.5 Mbps for example)
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Jan 9 20:19:33 2012 New Revision: 54890 URL:
http://svn.reactos.org/svn/reactos?rev=54890&view=rev
Log: [WLANCONF] - Display fractional rates correctly (5.5 Mbps for example) Modified: branches/wlan-bringup/base/applications/network/wlanconf/wlanconf.c Modified: branches/wlan-bringup/base/applications/network/wlanconf/wlanconf.c URL:
http://svn.reactos.org/svn/reactos/branches/wlan-bringup/base/applications/…
============================================================================== --- branches/wlan-bringup/base/applications/network/wlanconf/wlanconf.c [iso-8859-1] (original) +++ branches/wlan-bringup/base/applications/network/wlanconf/wlanconf.c [iso-8859-1] Mon Jan 9 20:19:33 2012 @@ -514,9 +514,16 @@ Rate = Rate & 0x7F; /* SupportedRates are in units of .5 */ - Rate = Rate >> 1; - - _tprintf(_T("%u "), Rate); + if (Rate & 0x01) + { + /* Bit 0 is set so we need to add 0.5 */ + _tprintf(_T("%u.5 "), (Rate >> 1)); + } + else + { + /* Bit 0 is clear so just print the conversion */ + _tprintf(_T("%u "), (Rate >> 1)); + } } } _tprintf(_T("\n"));
12 years, 11 months
1
0
0
0
[iut2011] 54889: [MMC] Add new library for MMC GUIDs.
by iut2011@svn.reactos.org
Author: iut2011 Date: Mon Jan 9 07:19:41 2012 New Revision: 54889 URL:
http://svn.reactos.org/svn/reactos?rev=54889&view=rev
Log: [MMC] Add new library for MMC GUIDs. Added: branches/iut-mmc/lib/sdk/mmc/ (with props) branches/iut-mmc/lib/sdk/mmc/CMakeLists.txt (with props) branches/iut-mmc/lib/sdk/mmc/mmc.rbuild (with props) branches/iut-mmc/lib/sdk/mmc/mmciid.c (with props) Modified: branches/iut-mmc/lib/sdk/CMakeLists.txt branches/iut-mmc/lib/sdk/sdk.rbuild Modified: branches/iut-mmc/lib/sdk/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/iut-mmc/lib/sdk/CMakeLists.txt?…
============================================================================== --- branches/iut-mmc/lib/sdk/CMakeLists.txt [iso-8859-1] (original) +++ branches/iut-mmc/lib/sdk/CMakeLists.txt [iso-8859-1] Mon Jan 9 07:19:41 2012 @@ -3,6 +3,7 @@ add_subdirectory(delayimp) add_subdirectory(dxguid) add_subdirectory(ioevent) +add_subdirectory(mmc) add_subdirectory(nt) add_subdirectory(scrnsave) add_subdirectory(strmiids) Propchange: branches/iut-mmc/lib/sdk/mmc/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Mon Jan 9 07:19:41 2012 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: branches/iut-mmc/lib/sdk/mmc/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: branches/iut-mmc/lib/sdk/mmc/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: branches/iut-mmc/lib/sdk/mmc/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: branches/iut-mmc/lib/sdk/mmc/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/iut-mmc/lib/sdk/mmc/CMakeLists.…
============================================================================== --- branches/iut-mmc/lib/sdk/mmc/CMakeLists.txt (added) +++ branches/iut-mmc/lib/sdk/mmc/CMakeLists.txt [iso-8859-1] Mon Jan 9 07:19:41 2012 @@ -1,0 +1,2 @@ + +add_library(mmclib mmciid.c) Propchange: branches/iut-mmc/lib/sdk/mmc/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/iut-mmc/lib/sdk/mmc/mmc.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/iut-mmc/lib/sdk/mmc/mmc.rbuild?…
============================================================================== --- branches/iut-mmc/lib/sdk/mmc/mmc.rbuild (added) +++ branches/iut-mmc/lib/sdk/mmc/mmc.rbuild [iso-8859-1] Mon Jan 9 07:19:41 2012 @@ -1,0 +1,5 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> +<module name="mmclib" type="staticlibrary"> + <file>mmciid.c</file> +</module> Propchange: branches/iut-mmc/lib/sdk/mmc/mmc.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/iut-mmc/lib/sdk/mmc/mmciid.c URL:
http://svn.reactos.org/svn/reactos/branches/iut-mmc/lib/sdk/mmc/mmciid.c?re…
============================================================================== --- branches/iut-mmc/lib/sdk/mmc/mmciid.c (added) +++ branches/iut-mmc/lib/sdk/mmc/mmciid.c [iso-8859-1] Mon Jan 9 07:19:41 2012 @@ -1,0 +1,117 @@ +/* + * MMC GUID definitions + * + * Copyright 2011 Alexandre Denis (alec.pro2(a)gmail.com) + * + * 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 + */ + +#include "windef.h" +#include "initguid.h" + +DEFINE_GUID(CLSID_Application, 0x49b2791a, 0xb1ae, 0x4c90, 0x9b, 0x8e ,0xe8, 0x60, 0x60, 0xba, 0x7, 0xf8); +DEFINE_GUID(CLSID_ConsolePower, 0xf0285374, 0xdff1, 0x11d3, 0xb4, 0x33 ,00, 0xc0, 0xc0, 0x4f, 0x8e, 0xcd); +DEFINE_GUID(CLSID_ExecutivePlatform, 0xb3fd5602, 0xeb0f, 0x415e, 0x9f, 0x32 ,0x75, 0xda, 0xda, 0x39, 0x1d, 0x6b); +DEFINE_GUID(CLSID_FrameworkSnapInFactory, 0xd5ab5662, 0x131d, 0x453d, 0x88, 0xc8 ,0x9b, 0xba, 0xba, 0x87, 0x50, 0x2a); +DEFINE_GUID(CLSID_MMCVersionInfo, 0xd6fedb1d, 0xcf21, 0x4bd9, 0xaf, 0x3b ,0xc5, 0x46, 0x46, 0x8e, 0x9c, 0x66); +DEFINE_GUID(CLSID_SnapInFailureReporter, 0x4a65d267, 0x1539, 0x4bd1, 0x92, 0x1d ,0x1c, 0x49, 0x49, 0xb3, 0xe5, 0x8e); +DEFINE_GUID(CLSID_WaitDialog, 0x2d11cf10, 0x4fe0, 0x45b2, 0x88, 0xdf ,0x6f, 0xfb, 0xfb, 0xf9, 0x2b, 0xe9); +DEFINE_GUID(DIID_AppEvents, 0xfc7a4252, 0x78ac, 0x4532, 0x8c, 0x5a ,0x56, 0x3c, 0x3c, 0xfe, 0x13, 0x88); +DEFINE_GUID(IID_Column, 0xfd1c5f63, 0x2b16, 0x4d06, 0x9a, 0xb3 ,0xf4, 0x53, 0x53, 0x50, 0xb9, 0x40); +DEFINE_GUID(IID_Columns, 0x383d4d97, 0xfc44, 0x478b, 0xb1, 0x39 ,0x63, 0x23, 0x23, 0xdc, 0x48, 0x61); +DEFINE_GUID(IID_ContextMenu, 0xdab39ce0, 0x25e6, 0x4e07, 0x83, 0x62 ,0xba, 0x9c, 0x9c, 0x95, 0x70, 0x65); +DEFINE_GUID(IID_Document, 0x225120d6, 0x1e0f, 0x40a3, 0x93, 0xfe ,0x10, 0x79, 0x79, 0xe6, 0xa8, 0x1); +DEFINE_GUID(IID_Extension, 0xad4d6ca6, 0x912f, 0x409b, 0xa2, 0x6e ,0x7f, 0xd2, 0xd2, 0x34, 0xae, 0xf5); +DEFINE_GUID(IID_Extensions, 0x82dbea43, 0x8ca4, 0x44bc, 0xa2, 0xca ,0xd1, 0x87, 0x87, 0x41, 0x5, 0x9e); +DEFINE_GUID(IID_Frame, 0xe5e2d970, 0x5bb3, 0x4306, 0x88, 0x4 ,0xb0, 0x96, 0x96, 0x8a, 0x31, 0xc8); +DEFINE_GUID(IID_IActionsPane, 0xd55cd1d0, 0x1b5, 0x4842, 0xb3, 0x44 ,0xd6, 0x1, 0x1, 0x56, 0x4e, 0xa2); +DEFINE_GUID(IID_IColumnData, 0x547c1354, 0x24d, 0x11d3, 0xa7, 0x7 ,00, 0xc0, 0xc0, 0x4f, 0x8e, 0xf4); +DEFINE_GUID(IID_IComponent, 0x43136eb2, 0xd36c, 0x11cf, 0xad, 0xbc ,00, 0xaa, 0xaa, 00, 0xa8, 00); +DEFINE_GUID(IID_IComponent2, 0x79a2d615, 0x4a10, 0x4ed4, 0x8c, 0x65 ,0x86, 0x33, 0x33, 0xf9, 0x33, 0x50); +DEFINE_GUID(IID_IComponentData, 0x955ab28a, 0x5218, 0x11d0, 0xa9, 0x85 ,00, 0xc0, 0xc0, 0x4f, 0xd8, 0xd5); +DEFINE_GUID(IID_IComponentData2, 0xcca0f2d2, 0x82de, 0x41b5, 0xbf, 0x47 ,0x3b, 0x20, 0x20, 0x76, 0x27, 0x3d); +DEFINE_GUID(IID_IComponentPrivate, 0x734cf88d, 0x4250, 0x470e, 0xba, 0x34 ,0x93, 0xd9, 0xd9, 0x56, 0x12, 0x4f); +DEFINE_GUID(IID_IConsole, 0x43136eb1, 0xd36c, 0x11cf, 0xad, 0xbc ,00, 0xaa, 0xaa, 00, 0xa8, 00); +DEFINE_GUID(IID_IConsole2, 0x103d842a, 0xaa63, 0x11d1, 0xa7, 0xe1 ,00, 0xc0, 0xc0, 0x4f, 0xd8, 0xd5); +DEFINE_GUID(IID_IConsole3, 0x4f85efdb, 0xd0e1, 0x498c, 0x8d, 0x4a ,0xd0, 0x10, 0x10, 0xdf, 0xdd, 0x40); +DEFINE_GUID(IID_IConsole4, 0x25f01e57, 0x83c8, 0x4be0, 0xbe, 0x9c ,0xeb, 0x32, 0x32, 0x12, 0xe3, 0xac); +DEFINE_GUID(IID_IConsoleNameSpace, 0xbedeb620, 0xf24d, 0x11cf, 0x8a, 0xfc ,00, 0xaa, 0xaa, 00, 0x3c, 0xa9); +DEFINE_GUID(IID_IConsoleNameSpace2, 0x255f18cc, 0x65db, 0x11d1, 0xa7, 0xdc ,00, 0xc0, 0xc0, 0x4f, 0xd8, 0xd5); +DEFINE_GUID(IID_IConsolePower, 0x1cfbdd0e, 0x62ca, 0x49ce, 0xa3, 0xaf ,0xdb, 0xb2, 0xb2, 0xde, 0x61, 0xb0); +DEFINE_GUID(IID_IConsolePowerSink, 0x3333759f, 0xfe4f, 0x4975, 0xb1, 0x43 ,0xfe, 0xc0, 0xc0, 0xa5, 0xdd, 0x6d); +DEFINE_GUID(IID_IConsoleVerb, 0xe49f7a60, 0x74af, 0x11d0, 0xa2, 0x86 ,00, 0xc0, 0xc0, 0x4f, 0xd8, 0xfe); +DEFINE_GUID(IID_IContextMenuCallback, 0x43136eb7, 0xd36c, 0x11cf, 0xad, 0xbc ,00, 0xaa, 0xaa, 00, 0xa8, 00); +DEFINE_GUID(IID_IContextMenuCallback2, 0xe178bc0e, 0x2ed0, 0x4b5e, 0x80, 0x97 ,0x42, 0xc9, 0xc9, 0x8, 0x7e, 0x8b); +DEFINE_GUID(IID_IContextMenuProvider, 0x43136eb6, 0xd36c, 0x11cf, 0xad, 0xbc ,00, 0xaa, 0xaa, 00, 0xa8, 00); +DEFINE_GUID(IID_IControlbar, 0x69fb811e, 0x6c1c, 0x11d0, 0xa2, 0xcb ,00, 0xc0, 0xc0, 0x4f, 0xd9, 0x9); +DEFINE_GUID(IID_ICustomInitializationWizard, 0x15363ca4, 0xe235, 0x44f2, 0x87, 0x8c ,0xc5, 0xe6, 0xe6, 0x5b, 0xc3, 0x42); +DEFINE_GUID(IID_IDisplayHelp, 0xcc593830, 0xb926, 0x11d1, 0x80, 0x63 ,00, 00, 00, 0xf8, 0x75, 0xa9); +DEFINE_GUID(IID_IEnumTASK, 0x338698b1, 0x5a02, 0x11d1, 0x9f, 0xec ,00, 0x60, 0x60, 0x8, 0x32, 0xdb); +DEFINE_GUID(IID_IExecutivePlatform, 0x8d0203ce, 0xd4f9, 0x4641, 0x95, 0x58 ,0xd9, 0xb1, 0xb1, 0xc1, 0x8f, 0xa9); +DEFINE_GUID(IID_IExtendActionsPane, 0xc60ce72c, 0xe13b, 0x4775, 0xbc, 0x1d ,0xc8, 0x33, 0x33, 0xf6, 0xea, 0x1e); +DEFINE_GUID(IID_IExtendContextMenu, 0x4f3b7a4f, 0xcfac, 0x11cf, 0xb8, 0xe3 ,00, 0xc0, 0xc0, 0x4f, 0xd8, 0xd5); +DEFINE_GUID(IID_IExtendControlbar, 0x49506520, 0x6f40, 0x11d0, 0xa9, 0x8b ,00, 0xc0, 0xc0, 0x4f, 0xd8, 0xd5); +DEFINE_GUID(IID_IExtendPropertySheet, 0x85de64dc, 0xef21, 0x11cf, 0xa2, 0x85 ,00, 0xc0, 0xc0, 0x4f, 0xd8, 0xdb); +DEFINE_GUID(IID_IExtendPropertySheet2, 0xb7a87232, 0x4a51, 0x11d1, 0xa7, 0xea ,00, 0xc0, 0xc0, 0x4f, 0xd9, 0x9); +DEFINE_GUID(IID_IExtendPropertySheetPrivate, 0x27aea402, 0x2c17, 0x4a18, 0xb0, 0x17 ,0xe5, 0xa6, 0xa6, 0xea, 0x63, 0xc6); +DEFINE_GUID(IID_IExtendTaskPad, 0x8dee6511, 0x554d, 0x11d1, 0x9f, 0xea ,00, 0x60, 0x60, 0x8, 0x32, 0xdb); +DEFINE_GUID(IID_IExtendView, 0x89995cee, 0xd2ed, 0x4c0e, 0xae, 0x5e ,0xdf, 0x7e, 0x7e, 0x76, 0xf3, 0xfa); +DEFINE_GUID(IID_IFormHost, 0xb5f3b64d, 0xb22e, 0x4ea4, 0x9b, 0x98 ,0x53, 0x1, 0x1, 0x6f, 0x1a, 0x7a); +DEFINE_GUID(IID_IFormViewAccessibility, 0xe693927, 0xc23f, 0x41b0, 0x95, 0x19 ,0xd9, 0x30, 0x30, 0x57, 0x25, 0x47); +DEFINE_GUID(IID_IHeaderCtrl, 0x43136eb3, 0xd36c, 0x11cf, 0xad, 0xbc ,00, 0xaa, 0xaa, 00, 0xa8, 00); +DEFINE_GUID(IID_IHeaderCtrl2, 0x9757abb8, 0x1b32, 0x11d1, 0xa7, 0xce ,00, 0xc0, 0xc0, 0x4f, 0xd8, 0xd5); +DEFINE_GUID(IID_IImageList, 0x43136eb8, 0xd36c, 0x11cf, 0xad, 0xbc ,00, 0xaa, 0xaa, 00, 0xa8, 00); +DEFINE_GUID(IID_IMMCVersionInfo, 0xa8d2c5fe, 0xcdcb, 0x4b9d, 0xbd, 0xe5 ,0xa2, 0x73, 0x73, 0x43, 0xff, 0x54); +DEFINE_GUID(IID_IMenuButton, 0x951ed750, 0xd080, 0x11d0, 0xb1, 0x97 ,00, 00, 00, 00, 00, 00); +DEFINE_GUID(IID_IMessageView, 0x80f94174, 0xfccc, 0x11d2, 0xb9, 0x91 ,00, 0xc0, 0xc0, 0x4f, 0x8e, 0xcd); +DEFINE_GUID(IID_INodeProperties, 0x15bc4d24, 0xa522, 0x4406, 0xaa, 0x55 ,0x7, 0x49, 0x49, 0x53, 0x7a, 0x68); +DEFINE_GUID(IID_IPropertySheetCallback, 0x85de64dd, 0xef21, 0x11cf, 0xa2, 0x85 ,00, 0xc0, 0xc0, 0x4f, 0xd8, 0xdb); +DEFINE_GUID(IID_IPropertySheetProvider, 0x85de64de, 0xef21, 0x11cf, 0xa2, 0x85 ,00, 0xc0, 0xc0, 0x4f, 0xd8, 0xdb); +DEFINE_GUID(IID_IReportSnapInFailure, 0x1fed3df6, 0x2c3f, 0x461a, 0xba, 0x20 ,0x4b, 0x1d, 0x1d, 0xf6, 0x56, 0x9a); +DEFINE_GUID(IID_IRequiredExtensions, 0x72782d7a, 0xa4a0, 0x11d1, 0xaf, 0xf ,00, 0xc0, 0xc0, 0x4f, 0xb6, 0xdd); +DEFINE_GUID(IID_IResultData, 0x31da5fa0, 0xe0eb, 0x11cf, 0x9f, 0x21 ,00, 0xaa, 0xaa, 00, 0x3c, 0xa9); +DEFINE_GUID(IID_IResultData2, 0xf36e0eb, 0xa7f1, 0x4a81, 0xbe, 0x5a ,0x92, 0x47, 0x47, 0xf7, 0xde, 0x4b); +DEFINE_GUID(IID_IResultData3, 0xaef53ae7, 0x99ae, 0x48b4, 0xa7, 0x80 ,0x26, 0x81, 0x81, 0xcf, 0x40, 0x57); +DEFINE_GUID(IID_IResultDataCompare, 0xe8315a52, 0x7a1a, 0x11d0, 0xa2, 0xd2 ,00, 0xc0, 0xc0, 0x4f, 0xd9, 0x9); +DEFINE_GUID(IID_IResultDataCompareEx, 0x96933476, 0x251, 0x11d3, 0xae, 0xb0 ,00, 0xc0, 0xc0, 0x4f, 0x8e, 0xcd); +DEFINE_GUID(IID_IResultOwnerData, 0x9cb396d8, 0xea83, 0x11d0, 0xae, 0xf1 ,00, 0xc0, 0xc0, 0x4f, 0xb6, 0xdd); +DEFINE_GUID(IID_ISnapInConsoleStatus, 0xfb59d905, 0x555b, 0x4892, 0xac, 0xd1 ,0xbd, 0xb, 0xb, 0x3d, 0xea, 0x73); +DEFINE_GUID(IID_ISnapInFactory, 0x1546faac, 0x79a6, 0x4403, 0x9f, 0xe2 ,0x86, 0x1b, 0x1b, 0x9c, 0x88, 0x45); +DEFINE_GUID(IID_ISnapinAbout, 0x1245208c, 0xa151, 0x11d0, 0xa7, 0xd7 ,00, 0xc0, 0xc0, 0x4f, 0xd9, 0x9); +DEFINE_GUID(IID_ISnapinHelp, 0xa6b15ace, 0xdf59, 0x11d0, 0xa7, 0xdd ,00, 0xc0, 0xc0, 0x4f, 0xd9, 0x9); +DEFINE_GUID(IID_ISnapinHelp2, 0x4861a010, 0x20f9, 0x11d2, 0xa5, 0x10 ,00, 0xc0, 0xc0, 0x4f, 0xb6, 0xdd); +DEFINE_GUID(IID_ISnapinProperties, 0xf7889da9, 0x4a02, 0x4837, 0xbf, 0x89 ,0x1a, 0x6f, 0x6f, 0x2a, 0x2, 0x10); +DEFINE_GUID(IID_ISnapinPropertiesCallback, 0xa50fa2e5, 0x7e61, 0x45eb, 0xa8, 0xd4 ,0x9a, 0x7, 0x7, 0xb3, 0xe8, 0x51); +DEFINE_GUID(IID_IStringTable, 0xde40b7a4, 0xf65, 0x11d2, 0x8e, 0x25 ,00, 0xc0, 0xc0, 0x4f, 0x8e, 0xcd); +DEFINE_GUID(IID_IToolbar, 0x43136eb9, 0xd36c, 0x11cf, 0xad, 0xbc ,00, 0xaa, 0xaa, 00, 0xa8, 00); +DEFINE_GUID(IID_IViewExtensionCallback, 0x34dd928a, 0x7599, 0x41e5, 0x9f, 0x5e ,0xd6, 0xbc, 0xbc, 0x30, 0x62, 0xc2); +DEFINE_GUID(IID_IWaitCursor, 0x7dfcf9be, 0x9a2b, 0x4e32, 0x9e, 0x3e ,0x96, 0x20, 0x20, 0x66, 0x17, 0xb5); +DEFINE_GUID(IID_IWaitDialog, 0x92b4ff02, 0x8e4, 0x40e5, 0xa5, 0xa6 ,0x62, 0x4f, 0x4f, 0x89, 0x70, 0xc1); +DEFINE_GUID(IID_IWaitDialogCancelCallback, 0xbfd57ccb, 0x78f2, 0x4ab8, 0x91, 0x73 ,0x41, 0x54, 0x54, 0xf, 0x51, 0xa3); +DEFINE_GUID(IID_MenuItem, 0x178fad1, 0xb361, 0x4b27, 0x96, 0xad ,0x67, 0xc5, 0xc5, 0x7e, 0xbf, 0x2e); +DEFINE_GUID(IID_Node, 0xf81ed800, 0x7839, 0x4447, 0x94, 0x5d ,0x8e, 0x15, 0x15, 0xda, 0x59, 0xca); +DEFINE_GUID(IID_Nodes, 0x313b01df, 0xb22f, 0x4d42, 0xb1, 0xb8 ,0x48, 0x3c, 0x3c, 0xdc, 0xf5, 0x1d); +DEFINE_GUID(IID_Properties, 0x2886abc2, 0xa425, 0x42b2, 0x91, 0xc6 ,0xe2, 0x5c, 0x5c, 0xe, 0x4, 0x58); +DEFINE_GUID(IID_Property, 0x4600c3a5, 0xe301, 0x41d8, 0xb6, 0xd0 ,0xef, 0x2e, 0x2e, 0x42, 0x12, 0xe0); +DEFINE_GUID(IID_ScopeNamespace, 0xebbb48dc, 0x1a3b, 0x4d86, 0xb7, 0x86 ,0xc2, 0x1b, 0x1b, 0x28, 0x38, 0x90); +DEFINE_GUID(IID_SnapIn, 0x3be910f6, 0x3459, 0x49c6, 0xa1, 0xbb ,0x41, 0xe6, 0xe6, 0xbe, 0x9d, 0xf3); +DEFINE_GUID(IID_SnapIns, 0x2ef3de1d, 0xb12a, 0x49d1, 0x92, 0xc5 ,0xb, 00, 00, 0x79, 0x87, 0x68); +DEFINE_GUID(IID_View, 0x6efc2da2, 0xb38c, 0x457e, 0x9a, 0xbb ,0xed, 0x2d, 0x2d, 0x18, 0x9b, 0x8c); +DEFINE_GUID(IID_Views, 0xd6b8c29d, 0xa1ff, 0x4d72, 0xaa, 0xb0 ,0xe3, 0x81, 0x81, 0xe9, 0xb9, 0x33); +DEFINE_GUID(IID__AppEvents, 0xde46cbdd, 0x53f5, 0x4635, 0xaf, 0x54 ,0x4f, 0xe7, 0xe7, 0x1e, 0x92, 0x3d); +DEFINE_GUID(IID__Application, 0xa3afb9cc, 0xb653, 0x4741, 0x86, 0xab ,0xf0, 0x47, 0x47, 0xe, 0xc1, 0x38); +DEFINE_GUID(IID__EventConnector, 0xc0bccd30, 0xde44, 0x4528, 0x84, 0x3 ,0xa0, 0x5a, 0x5a, 0x6a, 0x1c, 0xc8); +DEFINE_GUID(LIBID_MMC20, 0x8e80422b, 0xcac4, 0x472b, 0xb2, 0x72 ,0x96, 0x35, 0x35, 0xf1, 0xdf, 0xef); +DEFINE_GUID(LIBID_MMCVersionLib, 0x9eecdd85, 0xb715, 0x4188, 0x8a, 0x72 ,0x61, 0x15, 0x15, 0x9a, 0xbd, 0xb8); Propchange: branches/iut-mmc/lib/sdk/mmc/mmciid.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: branches/iut-mmc/lib/sdk/sdk.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/iut-mmc/lib/sdk/sdk.rbuild?rev=…
============================================================================== --- branches/iut-mmc/lib/sdk/sdk.rbuild [iso-8859-1] (original) +++ branches/iut-mmc/lib/sdk/sdk.rbuild [iso-8859-1] Mon Jan 9 07:19:41 2012 @@ -14,6 +14,9 @@ <directory name="ioevent"> <xi:include href="ioevent/ioevent.rbuild" /> </directory> + <directory name="mmc"> + <xi:include href="mmc/mmc.rbuild" /> + </directory> <directory name="nt"> <xi:include href="nt/nt.rbuild" /> </directory>
12 years, 11 months
1
0
0
0
[cgutman] 54888: [WLANCONF] - Use a different method for determining if an adapter supports 802.11 networks so it works on drivers that don't implement OID_GEN_PHYSICAL_MEDIUM
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Jan 9 03:17:23 2012 New Revision: 54888 URL:
http://svn.reactos.org/svn/reactos?rev=54888&view=rev
Log: [WLANCONF] - Use a different method for determining if an adapter supports 802.11 networks so it works on drivers that don't implement OID_GEN_PHYSICAL_MEDIUM Modified: branches/wlan-bringup/base/applications/network/wlanconf/wlanconf.c Modified: branches/wlan-bringup/base/applications/network/wlanconf/wlanconf.c URL:
http://svn.reactos.org/svn/reactos/branches/wlan-bringup/base/applications/…
============================================================================== --- branches/wlan-bringup/base/applications/network/wlanconf/wlanconf.c [iso-8859-1] (original) +++ branches/wlan-bringup/base/applications/network/wlanconf/wlanconf.c [iso-8859-1] Mon Jan 9 03:17:23 2012 @@ -91,23 +91,30 @@ { BOOL bSuccess; DWORD dwBytesReturned; - NDISUIO_QUERY_OID QueryOid; - - /* NDIS 5.1 WLAN drivers must support this OID */ - QueryOid.Oid = OID_GEN_PHYSICAL_MEDIUM; + PNDISUIO_QUERY_OID QueryOid; + DWORD QueryOidSize; + + QueryOidSize = sizeof(NDISUIO_QUERY_OID) + sizeof(NDIS_802_11_SSID); + QueryOid = HeapAlloc(GetProcessHeap(), 0, QueryOidSize); + if (!QueryOid) + return FALSE; + + /* We're just going to do a OID_802_11_SSID query. WLAN drivers should + * always succeed this query (returning SsidLength = 0 if not associated) */ + QueryOid->Oid = OID_802_11_SSID; bSuccess = DeviceIoControl(hAdapter, IOCTL_NDISUIO_QUERY_OID_VALUE, - &QueryOid, - sizeof(QueryOid), - &QueryOid, - sizeof(QueryOid), - &dwBytesReturned, - NULL); - if (!bSuccess || *(PULONG)QueryOid.Data != NdisPhysicalMediumWirelessLan) - return FALSE; - - return TRUE; + QueryOid, + QueryOidSize, + QueryOid, + QueryOidSize, + &dwBytesReturned, + NULL); + + HeapFree(GetProcessHeap(), 0, QueryOid); + + return bSuccess; } HANDLE
12 years, 11 months
1
0
0
0
← Newer
1
...
44
45
46
47
48
49
50
...
56
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Results per page:
10
25
50
100
200