ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
September 2008
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
27 participants
747 discussions
Start a n
N
ew thread
[cgutman] 36004: - Fix a code typo
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Sep 6 15:52:54 2008 New Revision: 36004 URL:
http://svn.reactos.org/svn/reactos?rev=36004&view=rev
Log: - Fix a code typo Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/main.c Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/main.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/main.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/main.c [iso-8859-1] Sat Sep 6 15:52:54 2008 @@ -711,8 +711,8 @@ /* Setup network layer and transport layer entities */ KeInitializeSpinLock(&EntityListLock); EntityList = ExAllocatePool(NonPagedPool, sizeof(TDIEntityID) * MAX_TDI_ENTITIES ); - if (!NT_SUCCESS(Status)) { - TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); + if (!EntityList) { + TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); TiUnload(DriverObject); return STATUS_INSUFFICIENT_RESOURCES; }
16 years, 3 months
1
0
0
0
[cgutman] 36003: - Use NewBuf instead of Data so we actually use the buffer we allocate
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Sep 6 15:42:10 2008 New Revision: 36003 URL:
http://svn.reactos.org/svn/reactos?rev=36003&view=rev
Log: - Use NewBuf instead of Data so we actually use the buffer we allocate Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/buffer.c Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/buffer.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/buffer.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/buffer.c [iso-8859-1] Sat Sep 6 15:42:10 2008 @@ -323,7 +323,7 @@ RtlCopyMemory( NewBuf, Data, Length ); } else NewBuf = Data; - NdisAllocateBuffer( &Status, &Buffer, GlobalBufferPool, Data, Length ); + NdisAllocateBuffer( &Status, &Buffer, GlobalBufferPool, NewBuf, Length ); if( Status != NDIS_STATUS_SUCCESS ) return Status; NdisChainBufferAtFront( Packet, Buffer );
16 years, 3 months
1
0
0
0
[cgutman] 36002: - Return NDIS_STATUS_RESOURCES not STATUS_NO_MEMORY
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Sep 6 15:37:06 2008 New Revision: 36002 URL:
http://svn.reactos.org/svn/reactos?rev=36002&view=rev
Log: - Return NDIS_STATUS_RESOURCES not STATUS_NO_MEMORY Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/buffer.c Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/buffer.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/buffer.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/buffer.c [iso-8859-1] Sat Sep 6 15:37:06 2008 @@ -319,7 +319,7 @@ if( Copy ) { NewBuf = ExAllocatePool( NonPagedPool, Length ); - if( !NewBuf ) return STATUS_NO_MEMORY; + if( !NewBuf ) return NDIS_STATUS_RESOURCES; RtlCopyMemory( NewBuf, Data, Length ); } else NewBuf = Data;
16 years, 3 months
1
0
0
0
[cgutman] 36001: - Return TDI_NO_RESOURCES instead of TDI_INVALID_REQUEST when we can't allocate memory
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Sep 6 15:27:56 2008 New Revision: 36001 URL:
http://svn.reactos.org/svn/reactos?rev=36001&view=rev
Log: - Return TDI_NO_RESOURCES instead of TDI_INVALID_REQUEST when we can't allocate memory Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/iinfo.c Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/iinfo.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/iinfo.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/iinfo.c [iso-8859-1] Sat Sep 6 15:27:56 2008 @@ -29,7 +29,7 @@ (PIFENTRY)ExAllocatePool( NonPagedPool, sizeof(IFENTRY) + MAX_IFDESCR_LEN ); - if( !OutData ) return TDI_INVALID_REQUEST; /* Out of memory */ + if( !OutData ) return TDI_NO_RESOURCES; /* Out of memory */ RtlZeroMemory( OutData, sizeof(IFENTRY) + MAX_IFDESCR_LEN );
16 years, 3 months
1
0
0
0
[cgutman] 36000: - Code cleanup
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Sep 6 15:18:42 2008 New Revision: 36000 URL:
http://svn.reactos.org/svn/reactos?rev=36000&view=rev
Log: - Code cleanup Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/stubs.c Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/stubs.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/ndis/ndis/stubs.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/ndis/ndis/stubs.c [iso-8859-1] Sat Sep 6 15:18:42 2008 @@ -321,9 +321,6 @@ FILE_SYNCHRONOUS_IO_NONALERT, // ULONG CreateOptions 0, // PVOID EaBuffer 0 ); // ULONG EaLength - - //if ( !NT_SUCCESS(*Status) ) - // goto cleanup; cleanup: if ( FullFileName.Buffer != NULL )
16 years, 3 months
1
0
0
0
[arty] 35999: Overhaul CcCopyRead.
by arty@svn.reactos.org
Author: arty Date: Sat Sep 6 14:27:10 2008 New Revision: 35999 URL:
http://svn.reactos.org/svn/reactos?rev=35999&view=rev
Log: Overhaul CcCopyRead. Modified: branches/arty-newcc/ntoskrnl/cache/copysup.c Modified: branches/arty-newcc/ntoskrnl/cache/copysup.c URL:
http://svn.reactos.org/svn/reactos/branches/arty-newcc/ntoskrnl/cache/copys…
============================================================================== --- branches/arty-newcc/ntoskrnl/cache/copysup.c [iso-8859-1] (original) +++ branches/arty-newcc/ntoskrnl/cache/copysup.c [iso-8859-1] Sat Sep 6 14:27:10 2008 @@ -35,64 +35,66 @@ OUT PVOID Buffer, OUT PIO_STATUS_BLOCK IoStatus) { - INT i, Count; - PCHAR ReadBuf; - ULONG ReadLen; - PVOID Bcbs[CACHE_NUM_SECTIONS]; - PVOID ReadBuffers[CACHE_NUM_SECTIONS]; - - DPRINT - ("CcCopyRead(%x,%x,%d,%d,%x)\n", - FileObject, - FileOffset->LowPart, - Length, - Wait, - Buffer); - - for (ReadLen = Length, i = 0; - ReadLen > 0; - ReadLen -= min(ReadLen, CACHE_STRIPE), i++) - { - if (!CcPinRead - (FileObject, - FileOffset, - min(ReadLen, CACHE_STRIPE), - Wait ? PIN_WAIT : PIN_IF_BCB, - &Bcbs[i], - &ReadBuffers[i])) - { - --i; - while (i >= 0) - CcUnpinData(Bcbs[i--]); - IoStatus->Status = STATUS_UNSUCCESSFUL; - IoStatus->Information = 0; - DPRINT("Failed CcCopyRead\n"); - return FALSE; - } - } - - Count = i; - - DPRINT("Copying %d bytes for Read (%d buffers)\n", Length, Count); - for (i = 0; i < Count; i++) - { - DPRINT(" %d: [#%02x:%x]\n", i, Bcbs[i], ReadBuffers[i]); - } - - for (ReadBuf = (PCHAR)Buffer, ReadLen = Length, i = 0; - ReadLen > 0; - ReadBuf += CACHE_STRIPE, ReadLen -= min(ReadLen, CACHE_STRIPE), i++) - RtlCopyMemory(ReadBuf, ReadBuffers[i], min(ReadLen, CACHE_STRIPE)); - - for (i = 0; i < Count; i++) - CcUnpinData(Bcbs[i]); - - IoStatus->Status = STATUS_SUCCESS; - IoStatus->Information = Length; - - DPRINT("Done with CcCopyRead\n"); - - return TRUE; + PCHAR ReadBuffer; + ULONG ReadLen; + PVOID Bcb; + PCHAR BufferTarget = (PCHAR)Buffer; + LARGE_INTEGER CacheOffset, EndOfExtent, NextOffset; + + DPRINT + ("CcCopyRead(%x,%x,%d,%d,%x)\n", + FileObject, + FileOffset->LowPart, + Length, + Wait, + Buffer); + + CacheOffset.QuadPart = FileOffset->QuadPart; + EndOfExtent.QuadPart = FileOffset->QuadPart + Length; + + while (CacheOffset.QuadPart < EndOfExtent.QuadPart) + { + NextOffset.QuadPart = (CacheOffset.QuadPart + CACHE_STRIPE) & ~(CACHE_STRIPE-1); + ReadLen = EndOfExtent.QuadPart - CacheOffset.QuadPart; + if (CacheOffset.QuadPart + ReadLen > NextOffset.QuadPart) + { + ReadLen = NextOffset.QuadPart - CacheOffset.QuadPart; + } + + DPRINT("Reading %d bytes in this go (at %08x%08x)\n", ReadLen, CacheOffset.HighPart, CacheOffset.LowPart); + + if (!CcPinRead + (FileObject, + &CacheOffset, + ReadLen, + Wait ? PIN_WAIT : PIN_IF_BCB, + &Bcb, + (PVOID*)&ReadBuffer)) + { + IoStatus->Status = STATUS_UNSUCCESSFUL; + IoStatus->Information = 0; + DPRINT("Failed CcCopyRead\n"); + return FALSE; + } + + DPRINT("Copying %d bytes at %08x%08x\n", ReadLen, CacheOffset.HighPart, CacheOffset.LowPart); + RtlCopyMemory + (BufferTarget, + ReadBuffer, + ReadLen); + + BufferTarget += ReadLen; + + CacheOffset = NextOffset; + CcUnpinData(Bcb); + } + + IoStatus->Status = STATUS_SUCCESS; + IoStatus->Information = Length; + + DPRINT("Done with CcCopyRead\n"); + + return TRUE; } VOID
16 years, 3 months
1
0
0
0
[arty] 35998: Switch back to our simple read method that includes short reads at EOF. Implement misaligned reads in cdfs. We can boot to 'Detecting devices' and get a moving mouse on the livecd.
by arty@svn.reactos.org
Author: arty Date: Sat Sep 6 14:03:00 2008 New Revision: 35998 URL:
http://svn.reactos.org/svn/reactos?rev=35998&view=rev
Log: Switch back to our simple read method that includes short reads at EOF. Implement misaligned reads in cdfs. We can boot to 'Detecting devices' and get a moving mouse on the livecd. Modified: branches/arty-newcc/drivers/filesystems/cdfs/rw.c branches/arty-newcc/ntoskrnl/mm/section.c Modified: branches/arty-newcc/drivers/filesystems/cdfs/rw.c URL:
http://svn.reactos.org/svn/reactos/branches/arty-newcc/drivers/filesystems/…
============================================================================== --- branches/arty-newcc/drivers/filesystems/cdfs/rw.c [iso-8859-1] (original) +++ branches/arty-newcc/drivers/filesystems/cdfs/rw.c [iso-8859-1] Sat Sep 6 14:03:00 2008 @@ -87,6 +87,10 @@ FileSizes.FileSize = Fcb->RFCB.FileSize; FileSizes.ValidDataLength = Fcb->RFCB.ValidDataLength; + DPRINT("Attach FCB to File: Size %08x%08x\n", + Fcb->RFCB.ValidDataLength.HighPart, + Fcb->RFCB.ValidDataLength.LowPart); + CcInitializeCacheMap(FileObject, &FileSizes, FALSE, @@ -108,25 +112,65 @@ if ((ReadOffset % BLOCKSIZE) != 0 || (Length % BLOCKSIZE) != 0) { - return STATUS_INVALID_PARAMETER; - } - - if (ReadOffset + Length > ROUND_UP(Fcb->Entry.DataLengthL, BLOCKSIZE)) - Length = ROUND_UP(Fcb->Entry.DataLengthL, BLOCKSIZE) - ReadOffset; - - Status = CdfsReadSectors(DeviceExt->StorageDevice, - Fcb->Entry.ExtentLocationL + (ReadOffset / BLOCKSIZE), - Length / BLOCKSIZE, - Buffer, - FALSE); - if (NT_SUCCESS(Status)) - { - *LengthRead = Length; - if (Length + ReadOffset > Fcb->Entry.DataLengthL) - { - memset(Buffer + Fcb->Entry.DataLengthL - ReadOffset, - 0, - Length + ReadOffset - Fcb->Entry.DataLengthL); + /* Then we need to do a partial or misaligned read ... */ + PVOID PageBuf = ExAllocatePool(NonPagedPool, BLOCKSIZE); + PCHAR ReadInPage = (PCHAR)PageBuf + (ReadOffset & (BLOCKSIZE - 1)); + PCHAR TargetRead = (PCHAR)Buffer; + ULONG ActualReadOffset, EndOfExtent, ReadLen; + + if (!PageBuf) + { + return STATUS_NO_MEMORY; + } + + ActualReadOffset = ReadOffset & ~(BLOCKSIZE - 1); + EndOfExtent = ReadOffset + Length; + + while (ActualReadOffset < EndOfExtent) + { + Status = CdfsReadSectors + (DeviceExt->StorageDevice, + Fcb->Entry.ExtentLocationL + (ActualReadOffset / BLOCKSIZE), + 1, + PageBuf, + FALSE); + + if (!NT_SUCCESS(Status)) + break; + + ReadLen = BLOCKSIZE - (ActualReadOffset & (BLOCKSIZE - 1)); + if (ReadLen > EndOfExtent - ActualReadOffset) + { + ReadLen = EndOfExtent - ActualReadOffset; + } + + RtlCopyMemory(TargetRead, ReadInPage, ReadLen); + + ActualReadOffset += ReadLen; + TargetRead += ReadLen; + } + + ExFreePool(PageBuf); + } + else + { + if (ReadOffset + Length > ROUND_UP(Fcb->Entry.DataLengthL, BLOCKSIZE)) + Length = ROUND_UP(Fcb->Entry.DataLengthL, BLOCKSIZE) - ReadOffset; + + Status = CdfsReadSectors(DeviceExt->StorageDevice, + Fcb->Entry.ExtentLocationL + (ReadOffset / BLOCKSIZE), + Length / BLOCKSIZE, + Buffer, + FALSE); + if (NT_SUCCESS(Status)) + { + *LengthRead = Length; + if (Length + ReadOffset > Fcb->Entry.DataLengthL) + { + memset(Buffer + Fcb->Entry.DataLengthL - ReadOffset, + 0, + Length + ReadOffset - Fcb->Entry.DataLengthL); + } } } Modified: branches/arty-newcc/ntoskrnl/mm/section.c URL:
http://svn.reactos.org/svn/reactos/branches/arty-newcc/ntoskrnl/mm/section.…
============================================================================== --- branches/arty-newcc/ntoskrnl/mm/section.c [iso-8859-1] (original) +++ branches/arty-newcc/ntoskrnl/mm/section.c [iso-8859-1] Sat Sep 6 14:03:00 2008 @@ -147,34 +147,54 @@ ULONG Length, PIO_STATUS_BLOCK ReadStatus) { - PMDL Mdl; + NTSTATUS Status; + PIRP Irp = NULL; KEVENT ReadWait; - NTSTATUS Status = STATUS_SUCCESS; - - KeInitializeEvent(&ReadWait, SynchronizationEvent, FALSE); - - Mdl = IoAllocateMdl(Buffer, Length, FALSE, TRUE, NULL); - - if (!Mdl) return STATUS_NO_MEMORY; - - _SEH_TRY + PDEVICE_OBJECT DeviceObject; + PIO_STACK_LOCATION IrpSp; + + ASSERT(FileObject); + ASSERT(FileOffset); + ASSERT(Buffer); + ASSERT(ReadStatus); + + DeviceObject = MmGetDeviceObjectForFile(FileObject); + + ASSERT(DeviceObject); + + DPRINT1 + ("PAGING READ: FileObject %x Offset %x Length %d\n", + &FileObject, + FileOffset->LowPart, + Length); + + KeInitializeEvent(&ReadWait, NotificationEvent, FALSE); + + Irp = IoBuildAsynchronousFsdRequest + (IRP_MJ_READ, + DeviceObject, + Buffer, + Length, + FileOffset, + ReadStatus); + + if (!Irp) { - MmProbeAndLockPages(Mdl, KernelMode, IoWriteAccess); - } - _SEH_HANDLE - { - /* Allocating failed, clean up */ - Status = _SEH_GetExceptionCode(); - } - _SEH_END; - - if (!NT_SUCCESS(Status)) - { - IoFreeMdl(Mdl); - return Status; + return STATUS_NO_MEMORY; } - Status = IoPageRead(FileObject, Mdl, FileOffset, &ReadWait, ReadStatus); + Irp->Flags |= IRP_PAGING_IO | IRP_SYNCHRONOUS_PAGING_IO | IRP_NOCACHE; + + ObReferenceObject(FileObject); + + Irp->UserEvent = &ReadWait; + Irp->Tail.Overlay.OriginalFileObject = FileObject; + Irp->Tail.Overlay.Thread = PsGetCurrentThread(); + IrpSp = IoGetNextIrpStackLocation(Irp); + IrpSp->FileObject = FileObject; + IrpSp->CompletionRoutine = MiSimpleReadComplete; + + Status = IoCallDriver(DeviceObject, Irp); if (Status == STATUS_PENDING) { if (!NT_SUCCESS @@ -186,22 +206,15 @@ NULL))) { DPRINT1("Warning: Failed to wait for synchronous IRP\n"); - MmUnlockPages(Mdl); - IoFreeMdl(Mdl); + ASSERT(FALSE); + ObDereferenceObject(FileObject); return Status; } } - - DPRINT("MmUnlockPages(%p)\n", Mdl); - MmUnlockPages(Mdl); - IoFreeMdl(Mdl); - - DPRINT("Paging IO Done: %08x [%02x %02x %02x %02x ...]\n", ReadStatus->Status, - ((PCHAR)Buffer)[0] & 0xff, - ((PCHAR)Buffer)[1] & 0xff, - ((PCHAR)Buffer)[2] & 0xff, - ((PCHAR)Buffer)[3] & 0xff); - + + ObDereferenceObject(FileObject); + + DPRINT("Paging IO Done: %08x\n", ReadStatus->Status); return ReadStatus->Status; }
16 years, 3 months
1
0
0
0
[cwittich] 35997: fix formatting
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Sep 6 12:24:02 2008 New Revision: 35997 URL:
http://svn.reactos.org/svn/reactos?rev=35997&view=rev
Log: fix formatting Modified: trunk/reactos/base/applications/msconfig/toolspage.c Modified: trunk/reactos/base/applications/msconfig/toolspage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
============================================================================== --- trunk/reactos/base/applications/msconfig/toolspage.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/msconfig/toolspage.c [iso-8859-1] Sat Sep 6 12:24:02 2008 @@ -93,7 +93,7 @@ FillListView(); return TRUE; } - case WM_COMMAND: + case WM_COMMAND: { switch (LOWORD(wParam)) { @@ -178,7 +178,7 @@ break; } } - } + } } break; }
16 years, 3 months
1
0
0
0
[janderwald] 35996: - Implement INetCfg, INetCfgLock, INetCfgComponent, IEnumNetCfgComponent interface - Replace def by spec file - Replace netcfgx.h by precomp.h to avoid conflicts with netcfgx.h which resides in the psdk
by janderwald@svn.reactos.org
Author: janderwald Date: Sat Sep 6 12:22:32 2008 New Revision: 35996 URL:
http://svn.reactos.org/svn/reactos?rev=35996&view=rev
Log: - Implement INetCfg, INetCfgLock, INetCfgComponent, IEnumNetCfgComponent interface - Replace def by spec file - Replace netcfgx.h by precomp.h to avoid conflicts with netcfgx.h which resides in the psdk Added: trunk/reactos/dll/win32/netcfgx/inetcfgcomp_iface.c (with props) trunk/reactos/dll/win32/netcfgx/netcfg_iface.c (with props) trunk/reactos/dll/win32/netcfgx/netcfgx.spec (with props) trunk/reactos/dll/win32/netcfgx/precomp.h (with props) Removed: trunk/reactos/dll/win32/netcfgx/netcfgx.def trunk/reactos/dll/win32/netcfgx/netcfgx.h Modified: trunk/reactos/dll/win32/netcfgx/classfactory.c trunk/reactos/dll/win32/netcfgx/netcfgx.c trunk/reactos/dll/win32/netcfgx/netcfgx.rbuild Modified: trunk/reactos/dll/win32/netcfgx/classfactory.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/classfac…
============================================================================== --- trunk/reactos/dll/win32/netcfgx/classfactory.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netcfgx/classfactory.c [iso-8859-1] Sat Sep 6 12:22:32 2008 @@ -1,4 +1,4 @@ -#include <precomp.h> +#include "precomp.h" typedef struct { Added: trunk/reactos/dll/win32/netcfgx/inetcfgcomp_iface.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/inetcfgc…
============================================================================== --- trunk/reactos/dll/win32/netcfgx/inetcfgcomp_iface.c (added) +++ trunk/reactos/dll/win32/netcfgx/inetcfgcomp_iface.c [iso-8859-1] Sat Sep 6 12:22:32 2008 @@ -1,0 +1,516 @@ +#include "precomp.h" +#include <devguid.h> + +typedef struct +{ + const INetCfgComponent * lpVtbl; + LONG ref; + NetCfgComponentItem * pItem; +}INetCfgComponentImpl; + +typedef struct +{ + const IEnumNetCfgComponent * lpVtbl; + LONG ref; + NetCfgComponentItem * pCurrent; + NetCfgComponentItem * pHead; +}IEnumNetCfgComponentImpl; + + + +HRESULT +STDCALL +INetCfgComponent_fnQueryInterface( + INetCfgComponent * iface, + REFIID iid, + LPVOID * ppvObj) +{ + INetCfgComponentImpl * This = (INetCfgComponentImpl*)iface; + *ppvObj = NULL; + + if (IsEqualIID (iid, &IID_IUnknown) || + IsEqualIID (iid, &IID_INetCfgComponent)) + { + *ppvObj = This; + INetCfg_AddRef(iface); + return S_OK; + } + + return E_NOINTERFACE; +} + + +ULONG +STDCALL +INetCfgComponent_fnAddRef( + INetCfgComponent * iface) +{ + INetCfgComponentImpl * This = (INetCfgComponentImpl*)iface; + ULONG refCount = InterlockedIncrement(&This->ref); + + return refCount; +} + +ULONG +STDCALL +INetCfgComponent_fnRelease( + INetCfgComponent * iface) +{ + INetCfgComponentImpl * This = (INetCfgComponentImpl*)iface; + ULONG refCount = InterlockedDecrement(&This->ref); + + return refCount; +} + +HRESULT +STDCALL +INetCfgComponent_fnGetDisplayName( + INetCfgComponent * iface, + LPWSTR * ppszwDisplayName) +{ + LPWSTR szName; + INetCfgComponentImpl * This = (INetCfgComponentImpl*)iface; + + if (This == NULL || ppszwDisplayName == NULL) + return E_POINTER; + + szName = CoTaskMemAlloc((wcslen(This->pItem->szDisplayName)+1) * sizeof(WCHAR)); + if (!szName) + return E_OUTOFMEMORY; + + wcscpy(szName, This->pItem->szDisplayName); + *ppszwDisplayName = szName; + + return S_OK; +} + +HRESULT +STDCALL +INetCfgComponent_fnSetDisplayName( + INetCfgComponent * iface, + LPCWSTR ppszwDisplayName) +{ + LPWSTR szName; + INetCfgComponentImpl * This = (INetCfgComponentImpl*)iface; + + if (This == NULL || ppszwDisplayName == NULL) + return E_POINTER; + + /* setting name is only supported for network cards */ + if (!IsEqualGUID(&This->pItem->ClassGUID, &GUID_DEVCLASS_NET)) + return E_NOTIMPL; + + /// FIXME + /// check for invalid characters + /// check for write lock + + szName = CoTaskMemAlloc((wcslen(ppszwDisplayName)+1) * sizeof(WCHAR)); + if (!szName) + return E_OUTOFMEMORY; + + wcscpy(szName, ppszwDisplayName); + CoTaskMemFree(This->pItem->szDisplayName); + This->pItem->szDisplayName = szName; + This->pItem->bChanged = TRUE; + + return S_OK; +} + +HRESULT +STDCALL +INetCfgComponent_fnGetHelpText( + INetCfgComponent * iface, + LPWSTR * ppszwHelpText) +{ + LPWSTR szHelp; + INetCfgComponentImpl * This = (INetCfgComponentImpl*)iface; + + if (This == NULL || ppszwHelpText == NULL) + return E_POINTER; + + szHelp = CoTaskMemAlloc((wcslen(This->pItem->szHelpText)+1) * sizeof(WCHAR)); + if (!szHelp) + return E_OUTOFMEMORY; + + wcscpy(szHelp, This->pItem->szHelpText); + *ppszwHelpText = szHelp; + + return S_OK; +} + +HRESULT +STDCALL +INetCfgComponent_fnGetId( + INetCfgComponent * iface, + LPWSTR * ppszwId) +{ + LPWSTR szId; + INetCfgComponentImpl * This = (INetCfgComponentImpl*)iface; + + if (This == NULL || ppszwId == NULL) + return E_POINTER; + + szId = CoTaskMemAlloc((wcslen(This->pItem->szId)+1) * sizeof(WCHAR)); + if (!szId) + return E_OUTOFMEMORY; + + wcscpy(szId, This->pItem->szId); + *ppszwId = szId; + + return S_OK; +} + +HRESULT +STDCALL +INetCfgComponent_fnGetCharacteristics( + INetCfgComponent * iface, + DWORD * pdwCharacteristics) +{ + INetCfgComponentImpl * This = (INetCfgComponentImpl*)iface; + + if (This == NULL || pdwCharacteristics == NULL) + return E_POINTER; + + *pdwCharacteristics = This->pItem->dwCharacteristics; + + return S_OK; +} + +HRESULT +STDCALL +INetCfgComponent_fnGetInstanceGuid( + INetCfgComponent * iface, + GUID * pGuid) +{ + INetCfgComponentImpl * This = (INetCfgComponentImpl*)iface; + + if (This == NULL || pGuid == NULL) + return E_POINTER; + + CopyMemory(pGuid, &This->pItem->InstanceId, sizeof(GUID)); + return S_OK; +} + +HRESULT +STDCALL +INetCfgComponent_fnGetPnpDevNodeId( + INetCfgComponent * iface, + LPWSTR * ppszwDevNodeId) +{ + LPWSTR szNode; + INetCfgComponentImpl * This = (INetCfgComponentImpl*)iface; + + if (This == NULL || ppszwDevNodeId == NULL) + return E_POINTER; + + if (!IsEqualGUID(&GUID_DEVCLASS_NET, &This->pItem->ClassGUID)) + return E_NOTIMPL; + + szNode = CoTaskMemAlloc((wcslen(This->pItem->szNodeId)+1) * sizeof(WCHAR)); + if (!szNode) + return E_OUTOFMEMORY; + + wcscpy(szNode, This->pItem->szNodeId); + *ppszwDevNodeId = szNode; + return S_OK; +} + +HRESULT +STDCALL +INetCfgComponent_fnGetClassGuid( + INetCfgComponent * iface, + GUID * pGuid) +{ + INetCfgComponentImpl * This = (INetCfgComponentImpl*)iface; + + if (This == NULL || pGuid == NULL) + return E_POINTER; + + CopyMemory(pGuid, &This->pItem->ClassGUID, sizeof(GUID)); + return S_OK; +} + +HRESULT +STDCALL +INetCfgComponent_fnGetBindName( + INetCfgComponent * iface, + LPWSTR * ppszwBindName) +{ + LPWSTR szBind; + INetCfgComponentImpl * This = (INetCfgComponentImpl*)iface; + + if (This == NULL || ppszwBindName == NULL) + return E_POINTER; + + szBind = CoTaskMemAlloc((wcslen(This->pItem->szBindName)+1) * sizeof(WCHAR)); + if (!szBind) + return E_OUTOFMEMORY; + + wcscpy(szBind, This->pItem->szBindName); + *ppszwBindName = szBind; + + return S_OK; +} + +HRESULT +STDCALL +INetCfgComponent_fnGetDeviceStatus( + INetCfgComponent * iface, + ULONG * pStatus) +{ + INetCfgComponentImpl * This = (INetCfgComponentImpl*)iface; + + if (This == NULL || pStatus == NULL) + return E_POINTER; + + if (!IsEqualGUID(&GUID_DEVCLASS_NET, &This->pItem->ClassGUID)) + return E_UNEXPECTED; + + *pStatus = This->pItem->Status; + + return S_OK; +} + +HRESULT +STDCALL +INetCfgComponent_fnOpenParamKey( + INetCfgComponent * iface, + HKEY * phkey) +{ + WCHAR szBuffer[200] = L"SYSTEM\\CurrentControlSet\\Services\\"; + INetCfgComponentImpl * This = (INetCfgComponentImpl*)iface; + + if (This == NULL || phkey == NULL) + return E_POINTER; + + wcscat(szBuffer, This->pItem->szBindName); + wcscat(szBuffer, L"\\Parameters"); + + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szBuffer, 0, KEY_READ | KEY_WRITE, phkey) == ERROR_SUCCESS) + return S_OK; + else + return E_FAIL; +} + +HRESULT +STDCALL +INetCfgComponent_fnRaisePropertyUi( + INetCfgComponent * iface, + IN HWND hwndParent, + IN DWORD dwFlags, + IN IUnknown *pUnk) +{ + + return E_NOTIMPL; +} +static const INetCfgComponentVtbl vt_NetCfgComponent = +{ + INetCfgComponent_fnQueryInterface, + INetCfgComponent_fnAddRef, + INetCfgComponent_fnRelease, + INetCfgComponent_fnGetDisplayName, + INetCfgComponent_fnSetDisplayName, + INetCfgComponent_fnGetHelpText, + INetCfgComponent_fnGetId, + INetCfgComponent_fnGetCharacteristics, + INetCfgComponent_fnGetInstanceGuid, + INetCfgComponent_fnGetPnpDevNodeId, + INetCfgComponent_fnGetClassGuid, + INetCfgComponent_fnGetBindName, + INetCfgComponent_fnGetDeviceStatus, + INetCfgComponent_fnOpenParamKey, + INetCfgComponent_fnRaisePropertyUi +}; + +HRESULT +STDCALL +INetCfgComponent_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv, NetCfgComponentItem * pItem) +{ + INetCfgComponentImpl *This; + + if (!ppv) + return E_POINTER; + + This = (INetCfgComponentImpl *) CoTaskMemAlloc(sizeof (INetCfgComponentImpl)); + if (!This) + return E_OUTOFMEMORY; + + This->ref = 1; + This->lpVtbl = (const INetCfgComponent*)&vt_NetCfgComponent; + This->pItem = pItem; + + if (!SUCCEEDED (INetCfgComponent_QueryInterface ((INetCfgComponent*)This, riid, ppv))) + { + INetCfgComponent_Release((INetCfg*)This); + return E_NOINTERFACE; + } + + INetCfgComponent_Release((INetCfgComponent*)This); + return S_OK; + + + return S_OK; +} + + +/*************************************************************** + * IEnumNetCfgComponent + */ + +HRESULT +STDCALL +IEnumNetCfgComponent_fnQueryInterface( + IEnumNetCfgComponent * iface, + REFIID iid, + LPVOID * ppvObj) +{ + IEnumNetCfgComponentImpl * This = (IEnumNetCfgComponentImpl*)iface; + *ppvObj = NULL; + + if (IsEqualIID (iid, &IID_IUnknown) || + IsEqualIID (iid, &IID_IEnumNetCfgComponent)) + { + *ppvObj = This; + INetCfg_AddRef(iface); + return S_OK; + } + + return E_NOINTERFACE; +} + + +ULONG +STDCALL +IEnumNetCfgComponent_fnAddRef( + IEnumNetCfgComponent * iface) +{ + IEnumNetCfgComponentImpl * This = (IEnumNetCfgComponentImpl*)iface; + ULONG refCount = InterlockedIncrement(&This->ref); + + return refCount; +} + +ULONG +STDCALL +IEnumNetCfgComponent_fnRelease( + IEnumNetCfgComponent * iface) +{ + IEnumNetCfgComponentImpl * This = (IEnumNetCfgComponentImpl*)iface; + ULONG refCount = InterlockedDecrement(&This->ref); + + return refCount; +} + +HRESULT +STDCALL +IEnumNetCfgComponent_fnNext( + IEnumNetCfgComponent * iface, + ULONG celt, + INetCfgComponent **rgelt, + ULONG *pceltFetched) +{ + HRESULT hr; + IEnumNetCfgComponentImpl * This = (IEnumNetCfgComponentImpl*)iface; + + if (!iface || !rgelt) + return E_POINTER; + + if (celt != 1) + return E_INVALIDARG; + + if (!This->pCurrent) + return S_FALSE; + + hr = INetCfgComponent_Constructor (NULL, &IID_INetCfgComponent, (LPVOID*)rgelt, This->pCurrent); + if (SUCCEEDED(hr)) + { + This->pCurrent = This->pCurrent->pNext; + if (pceltFetched) + *pceltFetched = 1; + } + return hr; +} + +HRESULT +STDCALL +IEnumNetCfgComponent_fnSkip( + IEnumNetCfgComponent * iface, + ULONG celt) +{ + IEnumNetCfgComponentImpl * This = (IEnumNetCfgComponentImpl*)iface; + + if (!This->pCurrent) + return S_FALSE; + + while(celt-- > 0 && This->pCurrent) + This->pCurrent = This->pCurrent->pNext; + + if (!celt) + return S_OK; + else + return S_FALSE; +} + +HRESULT +STDCALL +IEnumNetCfgComponent_fnReset( + IEnumNetCfgComponent * iface) +{ + IEnumNetCfgComponentImpl * This = (IEnumNetCfgComponentImpl*)iface; + + This->pCurrent = This->pHead; + return S_OK; +} + +HRESULT +STDCALL +IEnumNetCfgComponent_fnClone( + IEnumNetCfgComponent * iface, + IEnumNetCfgComponent **ppenum) +{ + return E_NOTIMPL; +} + +static const IEnumNetCfgComponentVtbl vt_EnumNetCfgComponent = +{ + IEnumNetCfgComponent_fnQueryInterface, + IEnumNetCfgComponent_fnAddRef, + IEnumNetCfgComponent_fnRelease, + IEnumNetCfgComponent_fnNext, + IEnumNetCfgComponent_fnSkip, + IEnumNetCfgComponent_fnReset, + IEnumNetCfgComponent_fnClone +}; + +HRESULT +STDCALL +IEnumNetCfgComponent_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv, NetCfgComponentItem * pItem) +{ + IEnumNetCfgComponentImpl *This; + + if (!ppv) + return E_POINTER; + + This = (IEnumNetCfgComponentImpl *) CoTaskMemAlloc(sizeof (IEnumNetCfgComponentImpl)); + if (!This) + return E_OUTOFMEMORY; + + This->ref = 1; + This->lpVtbl = (const IEnumNetCfgComponent*)&vt_EnumNetCfgComponent; + This->pCurrent = pItem; + This->pHead = pItem; + + if (!SUCCEEDED (IEnumNetCfgComponent_QueryInterface ((INetCfgComponent*)This, riid, ppv))) + { + IEnumNetCfgComponent_Release((INetCfg*)This); + return E_NOINTERFACE; + } + + IEnumNetCfgComponent_Release((IEnumNetCfgComponent*)This); + return S_OK; + + + return S_OK; +} + + Propchange: trunk/reactos/dll/win32/netcfgx/inetcfgcomp_iface.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/netcfgx/netcfg_iface.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/netcfg_i…
============================================================================== --- trunk/reactos/dll/win32/netcfgx/netcfg_iface.c (added) +++ trunk/reactos/dll/win32/netcfgx/netcfg_iface.c [iso-8859-1] Sat Sep 6 12:22:32 2008 @@ -1,0 +1,694 @@ +#include "precomp.h" +#include <devguid.h> + +typedef struct +{ + const INetCfg * lpVtbl; + const INetCfgLock * lpVtblLock; + LONG ref; + BOOL bInitialized; + HANDLE hMutex; + NetCfgComponentItem *pNet; + NetCfgComponentItem * pService; + NetCfgComponentItem * pClient; + NetCfgComponentItem * pProtocol; +} INetCfgImpl, *LPINetCfgImpl; + +static LPINetCfgImpl __inline impl_from_INetCfgLock(INetCfgLock *iface) +{ + return (INetCfgImpl*)((char *)iface - FIELD_OFFSET(INetCfgImpl, lpVtblLock)); +} + + + +HRESULT +STDCALL +INetCfgLock_fnQueryInterface( + INetCfgLock * iface, + REFIID iid, + LPVOID * ppvObj) +{ + INetCfgImpl * This = impl_from_INetCfgLock(iface); + return INetCfg_QueryInterface((INetCfg*)This, iid, ppvObj); +} + + +ULONG +STDCALL +INetCfgLock_fnAddRef( + INetCfgLock * iface) +{ + INetCfgImpl * This = impl_from_INetCfgLock(iface); + + return INetCfg_AddRef((INetCfg*)This); +} + +ULONG +STDCALL +INetCfgLock_fnRelease( + INetCfgLock * iface) +{ + INetCfgImpl * This = impl_from_INetCfgLock(iface); + return INetCfg_Release((INetCfg*)This); +} + +HRESULT +STDCALL +INetCfgLock_fnAcquireWriteLock( + INetCfgLock * iface, + DWORD cmsTimeout, + LPCWSTR pszwClientDescription, + LPWSTR *ppszwClientDescription) +{ + DWORD dwResult; + HKEY hKey; + WCHAR szValue[100]; + INetCfgImpl * This = impl_from_INetCfgLock(iface); + + if (This->bInitialized) + return NETCFG_E_ALREADY_INITIALIZED; + + dwResult = WaitForSingleObject(This->hMutex, cmsTimeout); + if (dwResult == WAIT_TIMEOUT) + { + if (ppszwClientDescription) + { + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Network\\NetCfgLockHolder", 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + dwResult = sizeof(szValue); + if (RegQueryValueExW(hKey, NULL, NULL, NULL, (LPBYTE)szValue, &dwResult) == ERROR_SUCCESS) + { + szValue[(sizeof(szValue)/sizeof(WCHAR))-1] = L'\0'; + *ppszwClientDescription = CoTaskMemAlloc((wcslen(szValue)+1) * sizeof(WCHAR)); + if (*ppszwClientDescription) + wcscpy(*ppszwClientDescription, szValue); + } + RegCloseKey(hKey); + } + } + return S_FALSE; + } + else if (dwResult == WAIT_OBJECT_0) + { + if (RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Network\\NetCfgLockHolder", 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL) == ERROR_SUCCESS) + { + RegSetValueExW(hKey, NULL, 0, REG_SZ, (LPBYTE)pszwClientDescription, (wcslen(pszwClientDescription)+1) * sizeof(WCHAR)); + RegCloseKey(hKey); + } + return S_OK; + } + + return E_FAIL; +} + +HRESULT +STDCALL +INetCfgLock_fnReleaseWriteLock( + INetCfgLock * iface) +{ + INetCfgImpl * This = impl_from_INetCfgLock(iface); + + if (This->bInitialized) + return NETCFG_E_ALREADY_INITIALIZED; + + + if (ReleaseMutex(This->hMutex)) + return S_OK; + else + return S_FALSE; +} + +HRESULT +STDCALL +INetCfgLock_fnIsWriteLocked( + INetCfgLock * iface, + LPWSTR *ppszwClientDescription) +{ + HKEY hKey; + WCHAR szValue[100]; + DWORD dwSize, dwType; + HRESULT hr; + + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Network\\NetCfgLockHolder", 0, KEY_READ, &hKey) != ERROR_SUCCESS) + return S_FALSE; + + dwSize = sizeof(szValue); + if (RegQueryValueExW(hKey, NULL, NULL, &dwType, (LPBYTE)szValue, &dwSize) == ERROR_SUCCESS && dwType == REG_SZ) + { + hr = S_OK; + szValue[(sizeof(szValue)/sizeof(WCHAR))-1] = L'\0'; + *ppszwClientDescription = CoTaskMemAlloc((wcslen(szValue)+1) * sizeof(WCHAR)); + if (*ppszwClientDescription) + wcscpy(*ppszwClientDescription, szValue); + else + hr = E_OUTOFMEMORY; + } + else + { + hr = E_FAIL; + } + RegCloseKey(hKey); + return hr; +} + +static const INetCfgLockVtbl vt_NetCfgLock = +{ + INetCfgLock_fnQueryInterface, + INetCfgLock_fnAddRef, + INetCfgLock_fnRelease, + INetCfgLock_fnAcquireWriteLock, + INetCfgLock_fnReleaseWriteLock, + INetCfgLock_fnIsWriteLocked +}; + +/*************************************************************** + * INetCfg + */ + +HRESULT +EnumClientServiceProtocol(HKEY hKey, const GUID * pGuid, NetCfgComponentItem ** pHead) +{ + DWORD dwIndex = 0; + DWORD dwSize; + DWORD dwType; + DWORD dwCharacteristics; + WCHAR szName[100]; + WCHAR szText[100]; + HKEY hSubKey, hNDIKey; + NetCfgComponentItem * pLast = NULL, *pCurrent; + + *pHead = NULL; + + do + { + dwCharacteristics = 0; + szText[0] = L'\0'; + + dwSize = sizeof(szName)/sizeof(WCHAR); + if (RegEnumKeyExW(hKey, dwIndex++, szName, &dwSize, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) + { + pCurrent = CoTaskMemAlloc(sizeof(NetCfgComponentItem)); + if (!pCurrent) + return E_OUTOFMEMORY; + + pCurrent->bChanged = FALSE; + pCurrent->pNext = NULL; + pCurrent->Status = 0; /* unused */ + pCurrent->szNodeId = 0; /* unused */ + CopyMemory(&pCurrent->ClassGUID, pGuid, sizeof(GUID)); + + if (FAILED(CLSIDFromString(szName, &pCurrent->InstanceId))) + { + CoTaskMemFree(pCurrent); + return E_FAIL; + } + + if (RegOpenKeyExW(hKey, szName, 0, KEY_READ, &hSubKey) == ERROR_SUCCESS) + { + /* retrieve Characteristics */ + dwSize = sizeof(DWORD); + pCurrent->dwCharacteristics = 0; + RegQueryValueExW(hSubKey, L"Characteristics", NULL, &dwType, (LPBYTE)&pCurrent->dwCharacteristics, &dwSize); + if (dwType != REG_DWORD) + pCurrent->dwCharacteristics = 0; + + /* retrieve ComponentId */ + pCurrent->szId = NULL; + dwSize = sizeof(szText); + if (RegQueryValueExW(hSubKey, L"ComponentId", NULL, &dwType, (LPBYTE)szText, &dwSize) == ERROR_SUCCESS) + { + if (dwType == REG_SZ) + { + szText[(sizeof(szText)/sizeof(WCHAR))-1] = L'\0'; + pCurrent->szId = CoTaskMemAlloc((wcslen(szText)+1)* sizeof(WCHAR)); + if (pCurrent->szId) + wcscpy(pCurrent->szId, szText); + } + } + + /* retrieve Description */ + pCurrent->szDisplayName = NULL; + dwSize = sizeof(szText); + if (RegQueryValueExW(hSubKey, L"Description", NULL, &dwType, (LPBYTE)szText, &dwSize) == ERROR_SUCCESS) + { + if (dwType == REG_SZ) + { + szText[(sizeof(szText)/sizeof(WCHAR))-1] = L'\0'; + pCurrent->szDisplayName = CoTaskMemAlloc((wcslen(szText)+1)* sizeof(WCHAR)); + if (pCurrent->szDisplayName) + wcscpy(pCurrent->szDisplayName, szText); + } + } + + if (RegOpenKeyExW(hKey, L"NDI", 0, KEY_READ, &hNDIKey) == ERROR_SUCCESS) + { + /* retrieve HelpText */ + pCurrent->szHelpText = NULL; + dwSize = sizeof(szText); + if (RegQueryValueExW(hNDIKey, L"HelpText", NULL, &dwType, (LPBYTE)szText, &dwSize) == ERROR_SUCCESS) + { + if (dwType == REG_SZ) + { + szText[(sizeof(szText)/sizeof(WCHAR))-1] = L'\0'; + pCurrent->szHelpText = CoTaskMemAlloc((wcslen(szText)+1)* sizeof(WCHAR)); + if (pCurrent->szHelpText) + wcscpy(pCurrent->szHelpText, szText); + } + } + + /* retrieve HelpText */ + pCurrent->szBindName = NULL; + dwSize = sizeof(szText); + if (RegQueryValueExW(hNDIKey, L"Service", NULL, &dwType, (LPBYTE)szText, &dwSize) == ERROR_SUCCESS) + { + if (dwType == REG_SZ) + { + szText[(sizeof(szText)/sizeof(WCHAR))-1] = L'\0'; + pCurrent->szBindName = CoTaskMemAlloc((wcslen(szText)+1)* sizeof(WCHAR)); + if (pCurrent->szBindName) + wcscpy(pCurrent->szBindName, szText); + } + } + RegCloseKey(hNDIKey); + } + RegCloseKey(hSubKey); + + if (!pLast) + *pHead = pCurrent; + else + pLast->pNext = pCurrent; + + pLast = pCurrent; + } + } + else + break; + + }while(TRUE); + return S_OK; +} + + + +HRESULT +EnumerateNetworkComponent( + const GUID *pGuid, NetCfgComponentItem ** pHead) +{ + HKEY hKey; + LPOLESTR pszGuid; + HRESULT hr; + WCHAR szName[150]; + + hr = StringFromCLSID(pGuid, &pszGuid); + if (SUCCEEDED(hr)) + { + swprintf(szName, L"SYSTEM\\CurrentControlSet\\Control\\Network\\%s", pszGuid); + if (RegOpenKeyExW(hKey, szName, 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + hr = EnumClientServiceProtocol(hKey, pGuid, pHead); + RegCloseKey(hKey); + } + CoTaskMemFree(pszGuid); + } + return hr; +} + +HRESULT +EnumerateNetworkAdapter(NetCfgComponentItem ** pHead) +{ + DWORD dwSize, dwIndex; + HDEVINFO hInfo; + SP_DEVINFO_DATA DevInfo; + HKEY hKey; + WCHAR szNetCfg[50]; + WCHAR szAdapterNetCfg[50]; + WCHAR szDetail[200] = L"SYSTEM\\CurrentControlSet\\Control\\Class\\"; + WCHAR szName[130] = L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\"; + NetCfgComponentItem * pLast = NULL, *pCurrent; + + hInfo = SetupDiGetClassDevs(&GUID_DEVCLASS_NET, NULL, NULL, DIGCF_PRESENT ); + if (!hInfo) + { + return E_FAIL; + } + + dwIndex = 0; + do + { + ZeroMemory(&DevInfo, sizeof(SP_DEVINFO_DATA)); + DevInfo.cbSize = sizeof(DevInfo); + + /* get device info */ + if (!SetupDiEnumDeviceInfo(hInfo, dwIndex++, &DevInfo)) + break; + + /* get device software registry path */ + if (!SetupDiGetDeviceRegistryPropertyW(hInfo, &DevInfo, SPDRP_DRIVER, NULL, (LPBYTE)&szDetail[39], sizeof(szDetail)/sizeof(WCHAR) - 40, &dwSize)) + break; + + /* open device registry key */ + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szDetail, 0, KEY_READ, &hKey) != ERROR_SUCCESS) + break; + + /* query NetCfgInstanceId for current device */ + dwSize = sizeof(szNetCfg); + if (RegQueryValueExW(hKey, L"NetCfgInstanceId", NULL, NULL, (LPBYTE)szNetCfg, &dwSize) != ERROR_SUCCESS) + { + RegCloseKey(hKey); + break; + } + + /* allocate new INetConnectionItem */ + pCurrent = CoTaskMemAlloc(sizeof(NetCfgComponentItem)); + if (!pCurrent) + break; + + ZeroMemory(pCurrent, sizeof(NetCfgComponentItem)); + CopyMemory(&pCurrent->ClassGUID, &GUID_DEVCLASS_NET, sizeof(GUID)); + CLSIDFromString(szNetCfg, &pCurrent->InstanceId); //FIXME + + /* set bind name */ + pCurrent->szBindName = CoTaskMemAlloc((wcslen(szNetCfg)+1) *sizeof(WCHAR)); + if (pCurrent->szBindName) + wcscpy(pCurrent->szBindName, szNetCfg); + + /* retrieve ComponentId */ + dwSize = sizeof(szAdapterNetCfg); + if (RegQueryValueExW(hKey, L"ComponentId", NULL, NULL, (LPBYTE)szAdapterNetCfg, &dwSize) == ERROR_SUCCESS) + { + pCurrent->szId = CoTaskMemAlloc((wcslen(szAdapterNetCfg)+1) * sizeof(WCHAR)); + if (pCurrent->szId) + wcscpy(pCurrent->szId, szAdapterNetCfg); + } + /* set INetCfgComponent::GetDisplayName */ + dwSize = sizeof(szAdapterNetCfg); + if (RegQueryValueExW(hKey, L"DriverDesc", NULL, NULL, (LPBYTE)szAdapterNetCfg, &dwSize) == ERROR_SUCCESS) + { + pCurrent->szDisplayName = CoTaskMemAlloc((wcslen(szAdapterNetCfg)+1) * sizeof(WCHAR)); + if (pCurrent->szDisplayName) + wcscpy(pCurrent->szDisplayName, szAdapterNetCfg); + } + + RegCloseKey(hKey); + /* open network connections details */ + wcscpy(&szName[80], szNetCfg); + wcscpy(&szName[118], L"\\Connection"); + + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szName, 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + /* retrieve pnp instance id */ + dwSize = sizeof(szAdapterNetCfg); + if (RegQueryValueExW(hKey, L"PnpInstanceID", NULL, NULL, (LPBYTE)szAdapterNetCfg, &dwSize) == ERROR_SUCCESS) + { + pCurrent->szNodeId = CoTaskMemAlloc((wcslen(szAdapterNetCfg)+1) * sizeof(WCHAR)); + if (pCurrent->szNodeId) + wcscpy(pCurrent->szNodeId, szAdapterNetCfg); + } + RegCloseKey(hKey); + } + + if (SetupDiGetDeviceRegistryPropertyW(hInfo, &DevInfo, SPDRP_DEVICEDESC, NULL, (PBYTE)szNetCfg, sizeof(szNetCfg)/sizeof(WCHAR), &dwSize)) + { + szNetCfg[(sizeof(szNetCfg)/sizeof(WCHAR))-1] = L'\0'; + pCurrent->szDisplayName = CoTaskMemAlloc((wcslen(szNetCfg)+1) * sizeof(WCHAR)); + if (pCurrent->szDisplayName) + wcscpy(pCurrent->szDisplayName, szNetCfg); + } + + if (pLast) + pLast->pNext = pCurrent; + else + *pHead = pCurrent; + + pLast = pCurrent; + + }while(TRUE); + + SetupDiDestroyDeviceInfoList(hInfo); + return NOERROR; +} + + +HRESULT +FindNetworkComponent( + NetCfgComponentItem * pHead, + LPCWSTR pszwComponentId, + INetCfgComponent **pComponent) +{ + while(pHead) + { + if (!wcsicmp(pHead->szId, pszwComponentId)) + { + return INetCfgComponent_Constructor(NULL, &IID_INetCfgComponent, (LPVOID*)pComponent, pHead); + } + pHead = pHead->pNext; + } + return S_FALSE; +} + + + +HRESULT +WINAPI +INetCfg_fnQueryInterface( + INetCfg * iface, + REFIID iid, + LPVOID * ppvObj) +{ + INetCfgImpl * This = (INetCfgImpl*)iface; + *ppvObj = NULL; + + if (IsEqualIID (iid, &IID_IUnknown) || + IsEqualIID (iid, &IID_INetCfg)) + { + *ppvObj = This; + INetCfg_AddRef(iface); + return S_OK; + } + else if (IsEqualIID (iid, &IID_INetCfgLock)) + { + if (This->bInitialized) + return NETCFG_E_ALREADY_INITIALIZED; + + *ppvObj = (LPVOID)&This->lpVtblLock; + This->hMutex = CreateMutexW(NULL, FALSE, L"NetCfgLock"); + + INetCfgLock_AddRef(iface); + return S_OK; + } + + return E_NOINTERFACE; +} + +ULONG +WINAPI +INetCfg_fnAddRef( + INetCfg * iface) +{ + INetCfgImpl * This = (INetCfgImpl*)iface; + ULONG refCount = InterlockedIncrement(&This->ref); + + return refCount; +} + +ULONG +WINAPI +INetCfg_fnRelease( + INetCfg * iface) +{ + INetCfgImpl * This = (INetCfgImpl*)iface; + ULONG refCount = InterlockedDecrement(&This->ref); + + if (!refCount) + { + CoTaskMemFree (This); + } + return refCount; +} + +HRESULT +STDCALL +INetCfg_fnInitialize( + INetCfg * iface, + PVOID pReserved) +{ + HRESULT hr; + INetCfgImpl *This = (INetCfgImpl *)iface; + + if (This->bInitialized) + return NETCFG_E_ALREADY_INITIALIZED; + + hr = EnumerateNetworkAdapter(&This->pNet); + if (FAILED(hr)) + return hr; + + + hr = EnumerateNetworkComponent(&GUID_DEVCLASS_NETCLIENT, &This->pClient); + if (FAILED(hr)) + return hr; + + hr = EnumerateNetworkComponent(&GUID_DEVCLASS_NETSERVICE, &This->pService); + if (FAILED(hr)) + return hr; + + + hr = EnumerateNetworkComponent(&GUID_DEVCLASS_NETTRANS, &This->pProtocol); + if (FAILED(hr)) + return hr; + + This->bInitialized = TRUE; + return S_OK; +} + +HRESULT +STDCALL +INetCfg_fnUninitialize( + INetCfg * iface) +{ + INetCfgImpl *This = (INetCfgImpl *)iface; + + if (!This->bInitialized) + return NETCFG_E_NOT_INITIALIZED; + + return E_FAIL; +} + + +HRESULT +STDCALL +INetCfg_fnApply( + INetCfg * iface) +{ + INetCfgImpl *This = (INetCfgImpl *)iface; + + if (!This->bInitialized) + return NETCFG_E_NOT_INITIALIZED; + + + return E_NOTIMPL; +} + +HRESULT +STDCALL +INetCfg_fnCancel( + INetCfg * iface) +{ + INetCfgImpl *This = (INetCfgImpl *)iface; + + if (!This->bInitialized) + return NETCFG_E_NOT_INITIALIZED; + + return E_NOTIMPL; +} + +HRESULT +STDCALL +INetCfg_fnEnumComponents( + INetCfg * iface, + const GUID *pguidClass, + IEnumNetCfgComponent **ppenumComponent) +{ + INetCfgImpl *This = (INetCfgImpl *)iface; + + if (!This->bInitialized) + return NETCFG_E_NOT_INITIALIZED; + + if (IsEqualGUID(&GUID_DEVCLASS_NET, pguidClass)) + return IEnumNetCfgComponent_Constructor (NULL, &IID_IEnumNetCfgComponent, (LPVOID*)ppenumComponent, This->pNet); + else if (IsEqualGUID(&GUID_DEVCLASS_NETCLIENT, pguidClass)) + return IEnumNetCfgComponent_Constructor (NULL, &IID_IEnumNetCfgComponent, (LPVOID*)ppenumComponent, This->pClient); + else if (IsEqualGUID(&GUID_DEVCLASS_NETSERVICE, pguidClass)) + return IEnumNetCfgComponent_Constructor (NULL, &IID_IEnumNetCfgComponent, (LPVOID*)ppenumComponent, This->pService); + else if (IsEqualGUID(&GUID_DEVCLASS_NETTRANS, pguidClass)) + return IEnumNetCfgComponent_Constructor (NULL, &IID_IEnumNetCfgComponent, (LPVOID*)ppenumComponent, This->pProtocol); + else + return E_NOINTERFACE; +} + + +HRESULT +STDCALL +INetCfg_fnFindComponent( + INetCfg * iface, + LPCWSTR pszwComponentId, + INetCfgComponent **pComponent) +{ + HRESULT hr; + INetCfgImpl *This = (INetCfgImpl *)iface; + + if (!This->bInitialized) + return NETCFG_E_NOT_INITIALIZED; + + hr = FindNetworkComponent(This->pClient, pszwComponentId, pComponent); + if (hr == S_OK) + return hr; + + hr = FindNetworkComponent(This->pService, pszwComponentId, pComponent); + if (hr == S_OK) + return hr; + + hr = FindNetworkComponent(This->pProtocol, pszwComponentId, pComponent); + if (hr == S_OK) + return hr; + + return S_FALSE; +} + +HRESULT +STDCALL +INetCfg_fnQueryNetCfgClass( + INetCfg * iface, + const GUID *pguidClass, + REFIID riid, + void **ppvObject) +{ + return E_FAIL; +} + +static const INetCfgVtbl vt_NetCfg = +{ + INetCfg_fnQueryInterface, + INetCfg_fnAddRef, + INetCfg_fnRelease, + INetCfg_fnInitialize, + INetCfg_fnUninitialize, + INetCfg_fnApply, + INetCfg_fnCancel, + INetCfg_fnEnumComponents, + INetCfg_fnFindComponent, + INetCfg_fnQueryNetCfgClass, +}; + +HRESULT WINAPI INetCfg_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) +{ + INetCfgImpl *This; + + if (!ppv) + return E_POINTER; + + This = (INetCfgImpl *) CoTaskMemAlloc(sizeof (INetCfgImpl)); + if (!This) + return E_OUTOFMEMORY; + + This->ref = 1; + This->lpVtbl = (const INetCfg*)&vt_NetCfg; + This->lpVtblLock = (const INetCfgLock*)&vt_NetCfgLock; + This->hMutex = NULL; + This->bInitialized = FALSE; + This->pNet = NULL; + This->pClient = NULL; + This->pService = NULL; + This->pProtocol = NULL; + + if (!SUCCEEDED (INetCfg_QueryInterface ((INetCfg*)This, riid, ppv))) + { + INetCfg_Release((INetCfg*)This); + return E_NOINTERFACE; + } + + INetCfg_Release((INetCfg*)This); + return S_OK; + + + return S_OK; +} Propchange: trunk/reactos/dll/win32/netcfgx/netcfg_iface.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/netcfgx/netcfgx.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/netcfgx.…
============================================================================== --- trunk/reactos/dll/win32/netcfgx/netcfgx.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netcfgx/netcfgx.c [iso-8859-1] Sat Sep 6 12:22:32 2008 @@ -7,11 +7,105 @@ * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org) */ -#define INITGUID -#include "netcfgx.h" - + +#include "precomp.h" +#include <initguid.h> +#include <devguid.h> #define NDEBUG #include <debug.h> + +HINSTANCE netcfgx_hInstance; + +static INTERFACE_TABLE InterfaceTable[] = +{ + { + &CLSID_CNetCfg, + INetCfg_Constructor + }, + { + NULL, + NULL + } +}; + +BOOL +WINAPI +DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) +{ + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + netcfgx_hInstance = hinstDLL; + DisableThreadLibraryCalls(netcfgx_hInstance); + break; + default: + break; + } + + return TRUE; +} + +HRESULT +WINAPI +DllCanUnloadNow(void) +{ + return S_FALSE; +} + +STDAPI +DllRegisterServer(void) +{ + //FIXME + // implement registering services + // + return S_OK; +} + +STDAPI +DllUnregisterServer(void) +{ + //FIXME + // implement unregistering services + // + return S_OK; +} + +STDAPI +DllGetClassObject( + REFCLSID rclsid, + REFIID riid, + LPVOID* ppv +) +{ + UINT i; + HRESULT hres = E_OUTOFMEMORY; + IClassFactory * pcf = NULL; + + if (!ppv) + return E_INVALIDARG; + + *ppv = NULL; + + for (i = 0; InterfaceTable[i].riid; i++) + { + if (IsEqualIID(InterfaceTable[i].riid, rclsid)) + { + pcf = IClassFactory_fnConstructor(InterfaceTable[i].lpfnCI, NULL, NULL); + break; + } + } + + if (!pcf) + { + return CLASS_E_CLASSNOTAVAILABLE; + } + + hres = IClassFactory_QueryInterface(pcf, riid, ppv); + IClassFactory_Release(pcf); + + return hres; +} + /* Append a REG_SZ to an existing REG_MULTI_SZ string in the registry. * If the value doesn't exist, create it. Removed: trunk/reactos/dll/win32/netcfgx/netcfgx.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/netcfgx.…
============================================================================== --- trunk/reactos/dll/win32/netcfgx/netcfgx.def [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netcfgx/netcfgx.def (removed) @@ -1,6 +1,0 @@ -LIBRARY netcfgx.dll - -EXPORTS -NetClassInstaller@12 - -;EOF Removed: trunk/reactos/dll/win32/netcfgx/netcfgx.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/netcfgx.…
============================================================================== --- trunk/reactos/dll/win32/netcfgx/netcfgx.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netcfgx/netcfgx.h (removed) @@ -1,8 +1,0 @@ -#ifndef _NETCFGX_H_ -#define _NETCFGX_H_ - -#include <windows.h> -#include <setupapi.h> -#include <devguid.h> - -#endif /* _NETCFGX_H_ */ Modified: trunk/reactos/dll/win32/netcfgx/netcfgx.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/netcfgx.…
============================================================================== --- trunk/reactos/dll/win32/netcfgx/netcfgx.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netcfgx/netcfgx.rbuild [iso-8859-1] Sat Sep 6 12:22:32 2008 @@ -1,9 +1,21 @@ -<module name="netcfgx" type="win32dll" baseaddress="${BASEADDRESS_NETCFGX}" entrypoint="0" installbase="system32" installname="netcfgx.dll"> - <importlibrary definition="netcfgx.def" /> - <file>netcfgx.c</file> +<module name="netcfgx" type="win32dll" baseaddress="${BASEADDRESS_NETCFGX}" installbase="system32" installname="netcfgx.dll"> + <importlibrary definition="netcfgx.spec.def" /> <library>ntdll</library> <library>rpcrt4</library> <library>setupapi</library> <library>kernel32</library> <library>advapi32</library> + <library>uuid</library> + <library>iphlpapi</library> + <library>iphlpapi</library> + <library>kernel32</library> + <library>wine</library> + <library>ole32</library> + <library>user32</library> + <library>comctl32</library> + <file>netcfgx.c</file> + <file>netcfgx.spec</file> + <file>classfactory.c</file> + <file>netcfg_iface.c</file> + <file>inetcfgcomp_iface.c</file> </module> Added: trunk/reactos/dll/win32/netcfgx/netcfgx.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/netcfgx.…
============================================================================== --- trunk/reactos/dll/win32/netcfgx/netcfgx.spec (added) +++ trunk/reactos/dll/win32/netcfgx/netcfgx.spec [iso-8859-1] Sat Sep 6 12:22:32 2008 @@ -1,0 +1,16 @@ +2 stdcall DllCanUnloadNow() +3 stdcall DllGetClassObject(ptr ptr ptr) +4 stdcall DllRegisterServer() +5 stdcall DllUnregisterServer() +6 stub HrDiAddComponentToINetCfg +7 stub LanaCfgFromCommandArgs +8 stub ModemClassCoInstaller +9 stub NetCfgDiagFromCommandArgs +10 stub NetCfgDiagRepairRegistryBindings +11 stdcall NetClassInstaller (long ptr ptr) +12 stub NetPropPageProvider +13 stub RasAddBindings +14 stub RasCountBindings +15 stub RasRemoveBindings +16 stub SvchostChangeSvchostGroup +17 stub UpdateLanaConfigUsingAnswerfile Propchange: trunk/reactos/dll/win32/netcfgx/netcfgx.spec ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/netcfgx/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/precomp.…
============================================================================== --- trunk/reactos/dll/win32/netcfgx/precomp.h (added) +++ trunk/reactos/dll/win32/netcfgx/precomp.h [iso-8859-1] Sat Sep 6 12:22:32 2008 @@ -1,0 +1,48 @@ +#ifndef _PRECOMP_H__ +#define _PRECOMP_H__ + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include <windows.h> +#include <netcfgx.h> +#include <setupapi.h> +#include <stdio.h> +#include <iphlpapi.h> + +typedef HRESULT (CALLBACK *LPFNCREATEINSTANCE)(IUnknown* pUnkOuter, REFIID riid, LPVOID* ppvObject); +typedef struct { + REFIID riid; + LPFNCREATEINSTANCE lpfnCI; +} INTERFACE_TABLE; + +typedef struct tagNetCfgComponentItem +{ + LPWSTR szDisplayName; //Y + LPWSTR szHelpText; //Y + LPWSTR szId; //Y + LPWSTR szBindName; //Y + LPWSTR szNodeId; //Y + CLSID InstanceId; //Y + CLSID ClassGUID; //Y + DWORD dwCharacteristics; //Y + ULONG Status; //Y + BOOL bChanged; //Y + struct tagNetCfgComponentItem * pNext; +}NetCfgComponentItem; + +/* netcfg_iface.c */ +HRESULT WINAPI INetCfg_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); + +/* classfactory.c */ +IClassFactory * IClassFactory_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, REFIID riidInst); + +/* globals */ +extern HINSTANCE netcfgx_hInstance; + +/* inetcfgcomp_iface.c */ +HRESULT STDCALL INetCfgComponent_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv, NetCfgComponentItem * pItem); +HRESULT STDCALL IEnumNetCfgComponent_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv, NetCfgComponentItem * pItem); + +#endif Propchange: trunk/reactos/dll/win32/netcfgx/precomp.h ------------------------------------------------------------------------------ svn:eol-style = native
16 years, 3 months
1
0
0
0
[cwittich] 35995: fix formatting
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Sep 6 12:19:33 2008 New Revision: 35995 URL:
http://svn.reactos.org/svn/reactos?rev=35995&view=rev
Log: fix formatting Modified: trunk/reactos/base/applications/msconfig/startuppage.c Modified: trunk/reactos/base/applications/msconfig/startuppage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
============================================================================== --- trunk/reactos/base/applications/msconfig/startuppage.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/msconfig/startuppage.c [iso-8859-1] Sat Sep 6 12:19:33 2008 @@ -124,7 +124,7 @@ else if (!_tcscmp(szSubValueName, _T("item"))) item.iSubItem = 0; if (item.iSubItem != -1) - { + { GetLongPathName(Data, Data, (DWORD) _tcsclen(Data)); item.pszText = Data; SendMessage(hStartupListCtrl, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item);
16 years, 3 months
1
0
0
0
← Newer
1
...
57
58
59
60
61
62
63
...
75
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Results per page:
10
25
50
100
200