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
[akhaldi] 55247: [NTOSKRNL] * Laa-a-a-a-dies and gentlemen..... It was a deferred success. Move along mes chers, you make the place look crowded.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Jan 27 15:24:58 2012 New Revision: 55247 URL:
http://svn.reactos.org/svn/reactos?rev=55247&view=rev
Log: [NTOSKRNL] * Laa-a-a-a-dies and gentlemen..... It was a deferred success. Move along mes chers, you make the place look crowded. Modified: trunk/reactos/ntoskrnl/include/internal/mm.h trunk/reactos/ntoskrnl/ke/i386/thrdini.c trunk/reactos/ntoskrnl/ke/procobj.c trunk/reactos/ntoskrnl/ke/thrdobj.c trunk/reactos/ntoskrnl/ke/thrdschd.c trunk/reactos/ntoskrnl/mm/i386/page.c trunk/reactos/ntoskrnl/mm/mmfault.c Modified: trunk/reactos/ntoskrnl/include/internal/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Fri Jan 27 15:24:58 2012 @@ -5,20 +5,6 @@ /* TYPES *********************************************************************/ struct _EPROCESS; - -/* ReactOS Mm Hacks */ -VOID -FASTCALL -MiSyncForProcessAttach( - IN PKTHREAD NextThread, - IN PEPROCESS Process -); - -VOID -FASTCALL -MiSyncForContextSwitch( - IN PKTHREAD Thread -); extern PMMSUPPORT MmKernelAddressSpace; extern PFN_COUNT MiFreeSwapPages; Modified: trunk/reactos/ntoskrnl/ke/i386/thrdini.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/thrdini.c…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/thrdini.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/thrdini.c [iso-8859-1] Fri Jan 27 15:24:58 2012 @@ -433,9 +433,6 @@ /* Get thread pointers */ OldThread = (PKTHREAD)(OldThreadAndApcFlag & ~3); NewThread = Pcr->PrcbData.CurrentThread; - - /* ReactOS Mm Hack */ - MiSyncForContextSwitch(NewThread); /* Get the old thread and set its kernel stack */ OldThread->KernelStack = SwitchFrame; Modified: trunk/reactos/ntoskrnl/ke/procobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/procobj.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/procobj.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/procobj.c [iso-8859-1] Fri Jan 27 15:24:58 2012 @@ -97,9 +97,6 @@ /* Release lock */ KiReleaseApcLockFromDpcLevel(ApcLock); - /* Make sure that we are in the right page directory (ReactOS Mm Hack) */ - MiSyncForProcessAttach(Thread, (PEPROCESS)Process); - /* Swap Processes */ KiSwapProcess(Process, SavedApcState->Process); @@ -618,9 +615,6 @@ /* Release lock */ KiReleaseApcLockFromDpcLevel(&ApcLock); - /* Make sure that we are in the right page directory (ReactOS Mm Hack) */ - MiSyncForProcessAttach(Thread, (PEPROCESS)Process); - /* Swap Processes */ KiSwapProcess(Thread->ApcState.Process, Process); @@ -788,9 +782,6 @@ /* Release lock */ KiReleaseApcLockFromDpcLevel(&ApcLock); - /* Make sure that we are in the right page directory (ReactOS Mm Hack) */ - MiSyncForProcessAttach(Thread, (PEPROCESS)Process); - /* Swap Processes */ KiSwapProcess(Thread->ApcState.Process, Process); Modified: trunk/reactos/ntoskrnl/ke/thrdobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/thrdobj.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/thrdobj.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/thrdobj.c [iso-8859-1] Fri Jan 27 15:24:58 2012 @@ -856,9 +856,6 @@ Thread->StackBase = KernelStack; Thread->StackLimit = (ULONG_PTR)KernelStack - KERNEL_STACK_SIZE; Thread->KernelStackResident = TRUE; - - /* Make sure that we are in the right page directory (ReactOS Mm Hack) */ - MiSyncForProcessAttach(Thread, (PEPROCESS)Process); /* Enter SEH to avoid crashes due to user mode */ Status = STATUS_SUCCESS; Modified: trunk/reactos/ntoskrnl/ke/thrdschd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/thrdschd.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ke/thrdschd.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/thrdschd.c [iso-8859-1] Fri Jan 27 15:24:58 2012 @@ -394,9 +394,6 @@ /* Save the wait IRQL */ WaitIrql = CurrentThread->WaitIrql; - /* REACTOS Mm Hack of Doom */ - MiSyncForContextSwitch(NextThread); - /* Swap contexts */ ApcState = KiSwapContext(WaitIrql, CurrentThread); @@ -793,9 +790,6 @@ /* Sanity check */ ASSERT(OldIrql <= DISPATCH_LEVEL); - /* REACTOS Mm Hack of Doom */ - MiSyncForContextSwitch(NextThread); - /* Swap to new thread */ KiSwapContext(APC_LEVEL, Thread); Status = STATUS_SUCCESS; Modified: trunk/reactos/ntoskrnl/mm/i386/page.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/i386/page.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] Fri Jan 27 15:24:58 2012 @@ -1029,54 +1029,6 @@ } VOID -NTAPI -MmUpdatePageDir(PEPROCESS Process, PVOID Address, ULONG Size) -{ - ULONG StartOffset, EndOffset, Offset; - PULONG Pde; - - // - // Check if the process isn't there anymore - // This is probably a bad sign, since it means the caller is setting cr3 to - // 0 or something... - // - if ((PTE_TO_PFN(Process->Pcb.DirectoryTableBase[0]) == 0) && (Process != PsGetCurrentProcess())) - { - DPRINT1("Process: %16s is dead: %p\n", Process->ImageFileName, Process->Pcb.DirectoryTableBase[0]); - ASSERT(FALSE); - return; - } - - if (Address < MmSystemRangeStart) - { - KeBugCheck(MEMORY_MANAGEMENT); - } - - StartOffset = ADDR_TO_PDE_OFFSET(Address); - EndOffset = ADDR_TO_PDE_OFFSET((PVOID)((ULONG_PTR)Address + Size)); - - if (Process != NULL && Process != PsGetCurrentProcess()) - { - Pde = MmCreateHyperspaceMapping(PTE_TO_PFN(Process->Pcb.DirectoryTableBase[0])); - } - else - { - Pde = (PULONG)PAGEDIRECTORY_MAP; - } - for (Offset = StartOffset; Offset <= EndOffset; Offset++) - { - if (Offset != ADDR_TO_PDE_OFFSET(PAGETABLE_MAP)) - { - InterlockedCompareExchangePte(&Pde[Offset], MmGlobalKernelPageDirectory[Offset], 0); - } - } - if (Pde != (PULONG)PAGEDIRECTORY_MAP) - { - MmDeleteHyperspaceMapping(Pde); - } -} - -VOID INIT_FUNCTION NTAPI MmInitGlobalKernelPageDirectory(VOID) Modified: trunk/reactos/ntoskrnl/mm/mmfault.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mmfault.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mmfault.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/mmfault.c [iso-8859-1] Fri Jan 27 15:24:58 2012 @@ -19,41 +19,6 @@ #include "ARM3/miarm.h" /* PRIVATE FUNCTIONS **********************************************************/ - -VOID -FASTCALL -MiSyncForProcessAttach(IN PKTHREAD Thread, - IN PEPROCESS Process) -{ - PETHREAD Ethread = CONTAINING_RECORD(Thread, ETHREAD, Tcb); - //DPRINT1("Hack sync for process: %p and thread: %p\n", Process, Thread); - //DPRINT1("Thread stack hack: %p %d\n", Thread->StackLimit, Thread->LargeStack); - - /* Hack Sync because Mm is broken */ - MmUpdatePageDir(Process, Ethread, sizeof(ETHREAD)); - MmUpdatePageDir(Process, Ethread->ThreadsProcess, sizeof(EPROCESS)); - MmUpdatePageDir(Process, - (PVOID)Thread->StackLimit, - Thread->LargeStack ? - KERNEL_LARGE_STACK_SIZE : KERNEL_STACK_SIZE); -} - -VOID -FASTCALL -MiSyncForContextSwitch(IN PKTHREAD Thread) -{ - PVOID Process = PsGetCurrentProcess(); - PETHREAD Ethread = CONTAINING_RECORD(Thread, ETHREAD, Tcb); - //DPRINT1("Hack sync for thread: %p and process: %p\n", Thread, Process); - //DPRINT1("Thread stack hack: %p %d\n", Thread->StackLimit, Thread->LargeStack); - - /* Hack Sync because Mm is broken */ - MmUpdatePageDir(Process, Ethread->ThreadsProcess, sizeof(EPROCESS)); - MmUpdatePageDir(Process, - (PVOID)Thread->StackLimit, - Thread->LargeStack ? - KERNEL_LARGE_STACK_SIZE : KERNEL_STACK_SIZE); -} NTSTATUS NTAPI
12 years, 11 months
1
0
0
0
[akhaldi] 55246: [INETCOMM_WINETEST] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Jan 27 14:39:30 2012 New Revision: 55246 URL:
http://svn.reactos.org/svn/reactos?rev=55246&view=rev
Log: [INETCOMM_WINETEST] * Sync to Wine 1.3.37. Modified: trunk/rostests/winetests/inetcomm/mimeintl.c trunk/rostests/winetests/inetcomm/mimeole.c Modified: trunk/rostests/winetests/inetcomm/mimeintl.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/inetcomm/mimein…
============================================================================== --- trunk/rostests/winetests/inetcomm/mimeintl.c [iso-8859-1] (original) +++ trunk/rostests/winetests/inetcomm/mimeintl.c [iso-8859-1] Fri Jan 27 14:39:30 2012 @@ -31,7 +31,6 @@ #include "mlang.h" #include <stdio.h> -#include <assert.h> #include "wine/test.h" Modified: trunk/rostests/winetests/inetcomm/mimeole.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/inetcomm/mimeol…
============================================================================== --- trunk/rostests/winetests/inetcomm/mimeole.c [iso-8859-1] (original) +++ trunk/rostests/winetests/inetcomm/mimeole.c [iso-8859-1] Fri Jan 27 14:39:30 2012 @@ -29,7 +29,6 @@ #include "mimeole.h" #include <stdio.h> -#include <assert.h> #include "wine/test.h" @@ -257,6 +256,7 @@ IMimeBody_Release(body); hr = IMimeMessage_GetBody(msg, IBL_ROOT, NULL, &hbody); + ok(hr == S_OK, "ret %08x\n", hr); PropVariantInit(&prop); hr = IMimeMessage_GetBodyProp(msg, hbody, att_pritype, 0, &prop);
12 years, 11 months
1
0
0
0
[akhaldi] 55245: [INETCOMM] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Jan 27 14:39:25 2012 New Revision: 55245 URL:
http://svn.reactos.org/svn/reactos?rev=55245&view=rev
Log: [INETCOMM] * Sync to Wine 1.3.37. Added: trunk/reactos/dll/win32/inetcomm/inetcomm.idl (with props) trunk/reactos/dll/win32/inetcomm/inetcomm.rc (with props) trunk/reactos/dll/win32/inetcomm/inetcomm.rgs (with props) Removed: trunk/reactos/dll/win32/inetcomm/regsvr.c Modified: trunk/reactos/dll/win32/inetcomm/CMakeLists.txt trunk/reactos/dll/win32/inetcomm/inetcomm.rbuild trunk/reactos/dll/win32/inetcomm/inetcomm_main.c trunk/reactos/dll/win32/inetcomm/inetcomm_private.h trunk/reactos/dll/win32/inetcomm/mimeintl.c trunk/reactos/dll/win32/inetcomm/mimeole.c trunk/reactos/dll/win32/inetcomm/pop3transport.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/inetcomm/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/inetcomm/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/inetcomm/CMakeLists.txt [iso-8859-1] Fri Jan 27 14:39:25 2012 @@ -6,6 +6,7 @@ include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) +set_rc_compiler() spec2def(inetcomm.dll inetcomm.spec) list(APPEND SOURCE @@ -15,8 +16,8 @@ mimeintl.c mimeole.c pop3transport.c - regsvr.c smtptransport.c + inetcomm.rc ${CMAKE_CURRENT_BINARY_DIR}/inetcomm_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/inetcomm.def) Added: trunk/reactos/dll/win32/inetcomm/inetcomm.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/inetcom…
============================================================================== --- trunk/reactos/dll/win32/inetcomm/inetcomm.idl (added) +++ trunk/reactos/dll/win32/inetcomm/inetcomm.idl [iso-8859-1] Fri Jan 27 14:39:25 2012 @@ -1,0 +1,124 @@ +/* + * COM Classes for inetcomm + * + * Copyright 2010 Alexandre Julliard + * + * 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 + */ + +[ + helpstring("CLSID_IMimeBody"), + threading(both), + uuid(fd853cdb-7f86-11d0-8252-00c04fd85ab4) +] +coclass IMimeBody { interface IMimeBody; } + +[ + helpstring("CLSID_IMimeAllocator"), + threading(both), + uuid(fd853cdd-7f86-11d0-8252-00c04fd85ab4) +] +coclass IMimeAllocator { interface IMimeAllocator; } + +[ + helpstring("CLSID_IMimeSecurity"), + threading(both), + uuid(fd853cde-7f86-11d0-8252-00c04fd85ab4) +] +coclass IMimeSecurity { interface IMimeSecurity; } + +[ + helpstring("CLSID_IVirtualStream"), + threading(both), + uuid(fd853cdf-7f86-11d0-8252-00c04fd85ab4) +] +coclass IVirtualStream { interface IVirtualStream; } + +[ + helpstring("CLSID_IMimeMessage"), + threading(both), + uuid(fd853ce3-7f86-11d0-8252-00c04fd85ab4) +] +coclass IMimeMessage { interface IMimeMessage; } + +[ + helpstring("CLSID_ISMTPTransport"), + threading(both), + uuid(fd853ce6-7f86-11d0-8252-00c04fd85ab4) +] +coclass ISMTPTransport { interface ISMTPTransport; } + +[ + helpstring("CLSID_IPOP3Transport"), + threading(both), + uuid(fd853ce7-7f86-11d0-8252-00c04fd85ab4) +] +coclass IPOP3Transport { interface IPOP3Transport; } + +[ + helpstring("CLSID_INNTPTransport"), + threading(both), + uuid(fd853ce8-7f86-11d0-8252-00c04fd85ab4) +] +coclass INNTPTransport { interface INNTPTransport; } + +[ + helpstring("CLSID_IRASTransport"), + threading(both), + uuid(fd853ce9-7f86-11d0-8252-00c04fd85ab4) +] +coclass IRASTransport { interface IRASTransport; } + +[ + helpstring("CLSID_IRangeList"), + threading(both), + uuid(fd853cea-7f86-11d0-8252-00c04fd85ab4) +] +coclass IRangeList { interface IRangeList; } + +[ + helpstring("CLSID_IIMAPTransport"), + threading(both), + uuid(fd853ceb-7f86-11d0-8252-00c04fd85ab4) +] +coclass IIMAPTransport { interface IIMAPTransport; } + +[ + helpstring("CLSID_IHTTPMailTransport"), + threading(both), + uuid(5a580c11-e5eb-11d1-a86e-0000f8084f96) +] +coclass IHTTPMailTransport { interface IHTTPMailTransport; } + +[ + helpstring("CLSID_ISMTPTransport2"), + threading(both), + uuid(0df2c7ec-3435-11d0-81d0-00c04fd85ab4) +] +coclass ISMTPTransport2 { interface ISMTPTransport2; } + +[ + helpstring("CLSID_IPropFindRequest"), + threading(both), + uuid(bb847b8a-054a-11d2-a894-0000f8084f96) +] +coclass IPropFindRequest { interface IPropFindRequest; } + +[ + helpstring("CLSID_IPropPatchRequest"), + threading(both), + uuid(ea678830-235d-11d2-a8b6-0000f8084f96) +] +coclass IPropPatchRequest { interface IPropPatchRequest; } Propchange: trunk/reactos/dll/win32/inetcomm/inetcomm.idl ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/inetcomm/inetcomm.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/inetcom…
============================================================================== --- trunk/reactos/dll/win32/inetcomm/inetcomm.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/inetcomm/inetcomm.rbuild [iso-8859-1] Fri Jan 27 14:39:25 2012 @@ -14,8 +14,8 @@ <file>mimeintl.c</file> <file>mimeole.c</file> <file>pop3transport.c</file> - <file>regsvr.c</file> <file>smtptransport.c</file> + <file>inetcomm.rc</file> <library>wine</library> <library>uuid</library> <library>ole32</library> Added: trunk/reactos/dll/win32/inetcomm/inetcomm.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/inetcom…
============================================================================== --- trunk/reactos/dll/win32/inetcomm/inetcomm.rc (added) +++ trunk/reactos/dll/win32/inetcomm/inetcomm.rc [iso-8859-1] Fri Jan 27 14:39:25 2012 @@ -1,0 +1,1 @@ +1 WINE_REGISTRY inetcomm.rgs Propchange: trunk/reactos/dll/win32/inetcomm/inetcomm.rc ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/inetcomm/inetcomm.rgs URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/inetcom…
============================================================================== --- trunk/reactos/dll/win32/inetcomm/inetcomm.rgs (added) +++ trunk/reactos/dll/win32/inetcomm/inetcomm.rgs [iso-8859-1] Fri Jan 27 14:39:25 2012 @@ -1,0 +1,69 @@ +HKCR +{ + NoRemove Interface + { + } + NoRemove CLSID + { + '{FD853CDB-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IMimeBody' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{FD853CDD-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IMimeAllocator' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{FD853CDE-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IMimeSecurity' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{FD853CDF-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IVirtualStream' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{FD853CE3-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IMimeMessage' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{FD853CE6-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_ISMTPTransport' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{FD853CE7-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IPOP3Transport' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{FD853CE8-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_INNTPTransport' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{FD853CE9-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IRASTransport' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{FD853CEA-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IRangeList' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{FD853CEB-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IIMAPTransport' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{5A580C11-E5EB-11D1-A86E-0000F8084F96}' = s 'CLSID_IHTTPMailTransport' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{0DF2C7EC-3435-11D0-81D0-00C04FD85AB4}' = s 'CLSID_ISMTPTransport2' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{BB847B8A-054A-11D2-A894-0000F8084F96}' = s 'CLSID_IPropFindRequest' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{EA678830-235D-11D2-A8B6-0000F8084F96}' = s 'CLSID_IPropPatchRequest' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + } +} Propchange: trunk/reactos/dll/win32/inetcomm/inetcomm.rgs ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/inetcomm/inetcomm_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/inetcom…
============================================================================== --- trunk/reactos/dll/win32/inetcomm/inetcomm_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/inetcomm/inetcomm_main.c [iso-8859-1] Fri Jan 27 14:39:25 2012 @@ -27,6 +27,9 @@ #include "winnt.h" #include "winuser.h" #include "ole2.h" +#include "ocidl.h" +#include "rpcproxy.h" +#include "initguid.h" #include "mimeole.h" #include "inetcomm_private.h" @@ -34,6 +37,8 @@ #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(inetcomm); + +static HINSTANCE instance; BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { @@ -47,6 +52,7 @@ return FALSE; case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hinstDLL); + instance = hinstDLL; if (!InternetTransport_RegisterClass(hinstDLL)) return FALSE; MimeInternational_Construct(&international); @@ -66,13 +72,13 @@ */ typedef struct { - const struct IClassFactoryVtbl *lpVtbl; + IClassFactory IClassFactory_iface; HRESULT (*create_object)(IUnknown *, void **); } cf; static inline cf *impl_from_IClassFactory( IClassFactory *iface ) { - return (cf *)((char*)iface - FIELD_OFFSET(cf, lpVtbl)); + return CONTAINING_RECORD(iface, cf, IClassFactory_iface); } static HRESULT WINAPI cf_QueryInterface( IClassFactory *iface, REFIID riid, LPVOID *ppobj ) @@ -135,11 +141,11 @@ cf_LockServer }; -static cf mime_body_cf = { &cf_vtbl, MimeBody_create }; -static cf mime_allocator_cf = { &cf_vtbl, MimeAllocator_create }; -static cf mime_message_cf = { &cf_vtbl, MimeMessage_create }; -static cf mime_security_cf = { &cf_vtbl, MimeSecurity_create }; -static cf virtual_stream_cf = { &cf_vtbl, VirtualStream_create }; +static cf mime_body_cf = { { &cf_vtbl }, MimeBody_create }; +static cf mime_allocator_cf = { { &cf_vtbl }, MimeAllocator_create }; +static cf mime_message_cf = { { &cf_vtbl }, MimeMessage_create }; +static cf mime_security_cf = { { &cf_vtbl }, MimeSecurity_create }; +static cf virtual_stream_cf = { { &cf_vtbl }, VirtualStream_create }; /*********************************************************************** * DllGetClassObject (INETCOMM.@) @@ -164,23 +170,23 @@ if ( IsEqualCLSID( rclsid, &CLSID_IMimeSecurity )) { - cf = (IClassFactory*) &mime_security_cf.lpVtbl; + cf = &mime_security_cf.IClassFactory_iface; } else if( IsEqualCLSID( rclsid, &CLSID_IMimeMessage )) { - cf = (IClassFactory*) &mime_message_cf.lpVtbl; + cf = &mime_message_cf.IClassFactory_iface; } else if( IsEqualCLSID( rclsid, &CLSID_IMimeBody )) { - cf = (IClassFactory*) &mime_body_cf.lpVtbl; + cf = &mime_body_cf.IClassFactory_iface; } else if( IsEqualCLSID( rclsid, &CLSID_IMimeAllocator )) { - cf = (IClassFactory*) &mime_allocator_cf.lpVtbl; + cf = &mime_allocator_cf.IClassFactory_iface; } else if( IsEqualCLSID( rclsid, &CLSID_IVirtualStream )) { - cf = (IClassFactory*) &virtual_stream_cf.lpVtbl; + cf = &virtual_stream_cf.IClassFactory_iface; } if ( !cf ) @@ -199,3 +205,19 @@ { return S_FALSE; } + +/*********************************************************************** + * DllRegisterServer (INETCOMM.@) + */ +HRESULT WINAPI DllRegisterServer(void) +{ + return __wine_register_resources( instance ); +} + +/*********************************************************************** + * DllUnregisterServer (INETCOMM.@) + */ +HRESULT WINAPI DllUnregisterServer(void) +{ + return __wine_unregister_resources( instance ); +} Modified: trunk/reactos/dll/win32/inetcomm/inetcomm_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/inetcom…
============================================================================== --- trunk/reactos/dll/win32/inetcomm/inetcomm_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/inetcomm/inetcomm_private.h [iso-8859-1] Fri Jan 27 14:39:25 2012 @@ -50,35 +50,35 @@ HWND hwnd; }; -HRESULT InternetTransport_Init(InternetTransport *This); -HRESULT InternetTransport_GetServerInfo(InternetTransport *This, LPINETSERVER pInetServer); +HRESULT InternetTransport_Init(InternetTransport *This) DECLSPEC_HIDDEN; +HRESULT InternetTransport_GetServerInfo(InternetTransport *This, LPINETSERVER pInetServer) DECLSPEC_HIDDEN; HRESULT InternetTransport_InetServerFromAccount(InternetTransport *This, - IImnAccount *pAccount, LPINETSERVER pInetServer); + IImnAccount *pAccount, LPINETSERVER pInetServer) DECLSPEC_HIDDEN; HRESULT InternetTransport_Connect(InternetTransport *This, - LPINETSERVER pInetServer, boolean fAuthenticate, boolean fCommandLogging); -HRESULT InternetTransport_HandsOffCallback(InternetTransport *This); -HRESULT InternetTransport_DropConnection(InternetTransport *This); + LPINETSERVER pInetServer, boolean fAuthenticate, boolean fCommandLogging) DECLSPEC_HIDDEN; +HRESULT InternetTransport_HandsOffCallback(InternetTransport *This) DECLSPEC_HIDDEN; +HRESULT InternetTransport_DropConnection(InternetTransport *This) DECLSPEC_HIDDEN; HRESULT InternetTransport_GetStatus(InternetTransport *This, - IXPSTATUS *pCurrentStatus); -HRESULT InternetTransport_ChangeStatus(InternetTransport *This, IXPSTATUS Status); + IXPSTATUS *pCurrentStatus) DECLSPEC_HIDDEN; +HRESULT InternetTransport_ChangeStatus(InternetTransport *This, IXPSTATUS Status) DECLSPEC_HIDDEN; HRESULT InternetTransport_ReadLine(InternetTransport *This, - INETXPORT_COMPLETION_FUNCTION fnCompletion); + INETXPORT_COMPLETION_FUNCTION fnCompletion) DECLSPEC_HIDDEN; HRESULT InternetTransport_Write(InternetTransport *This, const char *pvData, - int cbSize, INETXPORT_COMPLETION_FUNCTION fnCompletion); + int cbSize, INETXPORT_COMPLETION_FUNCTION fnCompletion) DECLSPEC_HIDDEN; HRESULT InternetTransport_DoCommand(InternetTransport *This, - LPCSTR pszCommand, INETXPORT_COMPLETION_FUNCTION fnCompletion); + LPCSTR pszCommand, INETXPORT_COMPLETION_FUNCTION fnCompletion) DECLSPEC_HIDDEN; -BOOL InternetTransport_RegisterClass(HINSTANCE hInstance); -void InternetTransport_UnregisterClass(HINSTANCE hInstance); +BOOL InternetTransport_RegisterClass(HINSTANCE hInstance) DECLSPEC_HIDDEN; +void InternetTransport_UnregisterClass(HINSTANCE hInstance) DECLSPEC_HIDDEN; -HRESULT MimeBody_create(IUnknown *outer, void **obj); -HRESULT MimeAllocator_create(IUnknown *outer, void **obj); -HRESULT MimeMessage_create(IUnknown *outer, void **obj); -HRESULT MimeSecurity_create(IUnknown *outer, void **obj); -HRESULT VirtualStream_create(IUnknown *outer, void **obj); +HRESULT MimeBody_create(IUnknown *outer, void **obj) DECLSPEC_HIDDEN; +HRESULT MimeAllocator_create(IUnknown *outer, void **obj) DECLSPEC_HIDDEN; +HRESULT MimeMessage_create(IUnknown *outer, void **obj) DECLSPEC_HIDDEN; +HRESULT MimeSecurity_create(IUnknown *outer, void **obj) DECLSPEC_HIDDEN; +HRESULT VirtualStream_create(IUnknown *outer, void **obj) DECLSPEC_HIDDEN; -HRESULT MimeInternational_Construct(IMimeInternational **internat); +HRESULT MimeInternational_Construct(IMimeInternational **internat) DECLSPEC_HIDDEN; -HRESULT SMTPTransportCF_Create(REFIID riid, LPVOID *ppv); -HRESULT IMAPTransportCF_Create(REFIID riid, LPVOID *ppv); -HRESULT POP3TransportCF_Create(REFIID riid, LPVOID *ppv); +HRESULT SMTPTransportCF_Create(REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN; +HRESULT IMAPTransportCF_Create(REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN; +HRESULT POP3TransportCF_Create(REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN; Modified: trunk/reactos/dll/win32/inetcomm/mimeintl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/mimeint…
============================================================================== --- trunk/reactos/dll/win32/inetcomm/mimeintl.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/inetcomm/mimeintl.c [iso-8859-1] Fri Jan 27 14:39:25 2012 @@ -49,18 +49,18 @@ typedef struct { - const IMimeInternationalVtbl *lpVtbl; + IMimeInternational IMimeInternational_iface; LONG refs; CRITICAL_SECTION cs; struct list charsets; LONG next_charset_handle; HCHARSET default_charset; -} internat; - -static inline internat *impl_from_IMimeInternational( IMimeInternational *iface ) -{ - return (internat *)((char*)iface - FIELD_OFFSET(internat, lpVtbl)); +} internat_impl; + +static inline internat_impl *impl_from_IMimeInternational(IMimeInternational *iface) +{ + return CONTAINING_RECORD(iface, internat_impl, IMimeInternational_iface); } static inline HRESULT get_mlang(IMultiLanguage **ml) @@ -85,13 +85,13 @@ static ULONG WINAPI MimeInternat_AddRef( IMimeInternational *iface ) { - internat *This = impl_from_IMimeInternational( iface ); + internat_impl *This = impl_from_IMimeInternational( iface ); return InterlockedIncrement(&This->refs); } static ULONG WINAPI MimeInternat_Release( IMimeInternational *iface ) { - internat *This = impl_from_IMimeInternational( iface ); + internat_impl *This = impl_from_IMimeInternational( iface ); ULONG refs; refs = InterlockedDecrement(&This->refs); @@ -104,6 +104,8 @@ list_remove(&charset->entry); HeapFree(GetProcessHeap(), 0, charset); } + This->cs.DebugInfo->Spare[0] = 0; + DeleteCriticalSection(&This->cs); HeapFree(GetProcessHeap(), 0, This); } @@ -112,7 +114,7 @@ static HRESULT WINAPI MimeInternat_SetDefaultCharset(IMimeInternational *iface, HCHARSET hCharset) { - internat *This = impl_from_IMimeInternational( iface ); + internat_impl *This = impl_from_IMimeInternational( iface ); TRACE("(%p)->(%p)\n", iface, hCharset); @@ -126,7 +128,7 @@ static HRESULT WINAPI MimeInternat_GetDefaultCharset(IMimeInternational *iface, LPHCHARSET phCharset) { - internat *This = impl_from_IMimeInternational( iface ); + internat_impl *This = impl_from_IMimeInternational( iface ); HRESULT hr = S_OK; TRACE("(%p)->(%p)\n", iface, phCharset); @@ -238,7 +240,7 @@ static HRESULT WINAPI MimeInternat_FindCharset(IMimeInternational *iface, LPCSTR pszCharset, LPHCHARSET phCharset) { - internat *This = impl_from_IMimeInternational( iface ); + internat_impl *This = impl_from_IMimeInternational( iface ); HRESULT hr = MIME_E_NOT_FOUND; charset_entry *charset; @@ -278,7 +280,7 @@ static HRESULT WINAPI MimeInternat_GetCharsetInfo(IMimeInternational *iface, HCHARSET hCharset, LPINETCSETINFO pCsetInfo) { - internat *This = impl_from_IMimeInternational( iface ); + internat_impl *This = impl_from_IMimeInternational( iface ); HRESULT hr = MIME_E_INVALID_HANDLE; charset_entry *charset; @@ -519,20 +521,21 @@ MimeInternat_Rfc1522Encode }; -static internat *global_internat; +static internat_impl *global_internat; HRESULT MimeInternational_Construct(IMimeInternational **internat) { global_internat = HeapAlloc(GetProcessHeap(), 0, sizeof(*global_internat)); - global_internat->lpVtbl = &mime_internat_vtbl; + global_internat->IMimeInternational_iface.lpVtbl = &mime_internat_vtbl; global_internat->refs = 0; InitializeCriticalSection(&global_internat->cs); + global_internat->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": global_internat.cs"); list_init(&global_internat->charsets); global_internat->next_charset_handle = 0; global_internat->default_charset = NULL; - *internat = (IMimeInternational*)&global_internat->lpVtbl; + *internat = &global_internat->IMimeInternational_iface; IMimeInternational_AddRef(*internat); return S_OK; @@ -542,7 +545,7 @@ { TRACE("(%p)\n", internat); - *internat = (IMimeInternational *)&global_internat->lpVtbl; + *internat = &global_internat->IMimeInternational_iface; IMimeInternational_AddRef(*internat); return S_OK; } Modified: trunk/reactos/dll/win32/inetcomm/mimeole.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/mimeole…
============================================================================== --- trunk/reactos/dll/win32/inetcomm/mimeole.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/inetcomm/mimeole.c [iso-8859-1] Fri Jan 27 14:39:25 2012 @@ -2134,7 +2134,8 @@ { HRESULT hr; IMimeBody *mime_body; - TRACE("(%p)->(%p, %s, %s)\n", iface, hBody, pszPriType, pszSubType); + TRACE("(%p)->(%p, %s, %s)\n", iface, hBody, debugstr_a(pszPriType), + debugstr_a(pszSubType)); hr = IMimeMessage_BindToObject(iface, hBody, &IID_IMimeBody, (void**)&mime_body); if(FAILED(hr)) return hr; Modified: trunk/reactos/dll/win32/inetcomm/pop3transport.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/pop3tra…
============================================================================== --- trunk/reactos/dll/win32/inetcomm/pop3transport.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/inetcomm/pop3transport.c [iso-8859-1] Fri Jan 27 14:39:25 2012 @@ -63,7 +63,6 @@ switch (This->state) { case STATE_NONE: - { if (strlen(This->response) < 3) { WARN("parse error\n"); @@ -78,7 +77,7 @@ } This->state = STATE_DONE; return S_FALSE; - } + default: return S_OK; } } @@ -92,7 +91,6 @@ switch (This->state) { case STATE_OK: - { if (This->type == POP3CMD_GET_POPID) { if ((p = strchr(This->ptr, ' '))) @@ -111,9 +109,8 @@ } This->state = STATE_MULTILINE; return S_OK; - } + case STATE_MULTILINE: - { if (This->response[0] == '.' && !This->response[1]) { This->valid_info = FALSE; @@ -128,14 +125,12 @@ This->valid_info = TRUE; return S_OK; } - } + default: - { WARN("parse error\n"); This->state = STATE_DONE; return S_FALSE; } - } } static HRESULT parse_stat_response(POP3Transport *This, POP3STAT *stat) @@ -147,7 +142,6 @@ switch (This->state) { case STATE_OK: - { if ((p = strchr(This->ptr, ' '))) { while (*p == ' ') p++; @@ -156,14 +150,12 @@ This->state = STATE_DONE; return S_OK; } - } + default: - { WARN("parse error\n"); This->state = STATE_DONE; return S_FALSE; } - } } static HRESULT parse_list_response(POP3Transport *This, POP3LIST *list) @@ -175,7 +167,6 @@ switch (This->state) { case STATE_OK: - { if (This->type == POP3CMD_GET_POPID) { if ((p = strchr(This->ptr, ' '))) @@ -189,9 +180,8 @@ } This->state = STATE_MULTILINE; return S_OK; - } + case STATE_MULTILINE: - { if (This->response[0] == '.' && !This->response[1]) { This->valid_info = FALSE; @@ -206,14 +196,12 @@ This->valid_info = TRUE; return S_OK; } - } + default: - { WARN("parse error\n"); This->state = STATE_DONE; return S_FALSE; } - } } static HRESULT parse_dele_response(POP3Transport *This, DWORD *dwPopId) @@ -221,18 +209,15 @@ switch (This->state) { case STATE_OK: - { *dwPopId = 0; /* FIXME */ This->state = STATE_DONE; return S_OK; - } + default: - { WARN("parse error\n"); This->state = STATE_DONE; return S_FALSE; } - } } static HRESULT parse_retr_response(POP3Transport *This, POP3RETR *retr) @@ -240,7 +225,6 @@ switch (This->state) { case STATE_OK: - { retr->fHeader = FALSE; retr->fBody = FALSE; retr->dwPopId = This->msgid; @@ -251,7 +235,7 @@ This->state = STATE_MULTILINE; This->valid_info = FALSE; return S_OK; - } + case STATE_MULTILINE: { int len; @@ -273,13 +257,12 @@ This->valid_info = TRUE; return S_OK; } + default: - { WARN("parse error\n"); This->state = STATE_DONE; return S_FALSE; } - } } static HRESULT parse_top_response(POP3Transport *This, POP3TOP *top) @@ -287,7 +270,6 @@ switch (This->state) { case STATE_OK: - { top->fHeader = FALSE; top->fBody = FALSE; top->dwPopId = This->msgid; @@ -299,7 +281,7 @@ This->state = STATE_MULTILINE; This->valid_info = FALSE; return S_OK; - } + case STATE_MULTILINE: { int len; @@ -321,12 +303,11 @@ This->valid_info = TRUE; return S_OK; } + default: - { WARN("parse error\n"); This->state = STATE_DONE; return S_FALSE; - } } } Removed: trunk/reactos/dll/win32/inetcomm/regsvr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/regsvr.…
============================================================================== --- trunk/reactos/dll/win32/inetcomm/regsvr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/inetcomm/regsvr.c (removed) @@ -1,512 +1,0 @@ -/* - * self-registerable dll functions for inetcomm.dll - * - * Copyright (C) 2003 John K. Hohm - * - * 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 <stdarg.h> -#include <string.h> - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winreg.h" -#include "winerror.h" -#include "objbase.h" -#include "ocidl.h" - -#include "initguid.h" -#include "mimeole.h" -#include "inetcomm_private.h" - -#include "wine/debug.h" -#include "wine/unicode.h" - -WINE_DEFAULT_DEBUG_CHANNEL(inetcomm); - -/* - * Near the bottom of this file are the exported DllRegisterServer and - * DllUnregisterServer, which make all this worthwhile. - */ - -/*********************************************************************** - * interface for self-registering - */ -struct regsvr_interface -{ - IID const *iid; /* NULL for end of list */ - LPCSTR name; /* can be NULL to omit */ - IID const *base_iid; /* can be NULL to omit */ - int num_methods; /* can be <0 to omit */ - CLSID const *ps_clsid; /* can be NULL to omit */ - CLSID const *ps_clsid32; /* can be NULL to omit */ -}; - -static HRESULT register_interfaces(struct regsvr_interface const *list); -static HRESULT unregister_interfaces(struct regsvr_interface const *list); - -struct regsvr_coclass -{ - CLSID const *clsid; /* NULL for end of list */ - LPCSTR name; /* can be NULL to omit */ - LPCSTR ips; /* can be NULL to omit */ - LPCSTR ips32; /* can be NULL to omit */ - LPCSTR ips32_tmodel; /* can be NULL to omit */ - LPCSTR clsid_str; /* can be NULL to omit */ - LPCSTR progid; /* can be NULL to omit */ -}; - -static HRESULT register_coclasses(struct regsvr_coclass const *list); -static HRESULT unregister_coclasses(struct regsvr_coclass const *list); - -/*********************************************************************** - * static string constants - */ -static WCHAR const interface_keyname[10] = { - 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 }; -static WCHAR const base_ifa_keyname[14] = { - 'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', - 'e', 0 }; -static WCHAR const num_methods_keyname[11] = { - 'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 }; -static WCHAR const ps_clsid_keyname[15] = { - 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', - 'i', 'd', 0 }; -static WCHAR const ps_clsid32_keyname[17] = { - 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', - 'i', 'd', '3', '2', 0 }; -static WCHAR const clsid_keyname[6] = { - 'C', 'L', 'S', 'I', 'D', 0 }; -static WCHAR const ips_keyname[13] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - 0 }; -static WCHAR const ips32_keyname[15] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - '3', '2', 0 }; -static WCHAR const progid_keyname[7] = { - 'P', 'r', 'o', 'g', 'I', 'D', 0 }; -static char const tmodel_valuename[] = "ThreadingModel"; - -/*********************************************************************** - * static helper functions - */ -static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid); -static LONG register_key_defvalueW(HKEY base, WCHAR const *name, - WCHAR const *value); -static LONG register_key_defvalueA(HKEY base, WCHAR const *name, - char const *value); - -/*********************************************************************** - * register_interfaces - */ -static HRESULT register_interfaces(struct regsvr_interface const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY interface_key; - - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &interface_key, NULL); - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->iid; ++list) { - WCHAR buf[39]; - HKEY iid_key; - - StringFromGUID2(list->iid, buf, 39); - res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &iid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_interface_key; - - if (list->name) { - res = RegSetValueExA(iid_key, NULL, 0, REG_SZ, - (CONST BYTE*)(list->name), - strlen(list->name) + 1); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->base_iid) { - res = register_key_guid(iid_key, base_ifa_keyname, list->base_iid); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (0 <= list->num_methods) { - static WCHAR const fmt[3] = { '%', 'd', 0 }; - HKEY key; - - res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - - sprintfW(buf, fmt, list->num_methods); - res = RegSetValueExW(key, NULL, 0, REG_SZ, - (CONST BYTE*)buf, - (lstrlenW(buf) + 1) * sizeof(WCHAR)); - RegCloseKey(key); - - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->ps_clsid) { - res = register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->ps_clsid32) { - res = register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - error_close_iid_key: - RegCloseKey(iid_key); - } - -error_close_interface_key: - RegCloseKey(interface_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * unregister_interfaces - */ -static HRESULT unregister_interfaces(struct regsvr_interface const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY interface_key; - - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, - KEY_READ | KEY_WRITE, &interface_key); - if (res == ERROR_FILE_NOT_FOUND) return S_OK; - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->iid; ++list) { - WCHAR buf[39]; - - StringFromGUID2(list->iid, buf, 39); - res = RegDeleteTreeW(interface_key, buf); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - } - - RegCloseKey(interface_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * register_coclasses - */ -static HRESULT register_coclasses(struct regsvr_coclass const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL); - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - HKEY clsid_key; - - StringFromGUID2(list->clsid, buf, 39); - res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->name) { - res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ, - (CONST BYTE*)(list->name), - strlen(list->name) + 1); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips) { - res = register_key_defvalueA(clsid_key, ips_keyname, list->ips); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips32) { - HKEY ips32_key; - - res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, - &ips32_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ, - (CONST BYTE*)list->ips32, - lstrlenA(list->ips32) + 1); - if (res == ERROR_SUCCESS && list->ips32_tmodel) - res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ, - (CONST BYTE*)list->ips32_tmodel, - strlen(list->ips32_tmodel) + 1); - RegCloseKey(ips32_key); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->clsid_str) { - res = register_key_defvalueA(clsid_key, clsid_keyname, - list->clsid_str); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->progid) { - HKEY progid_key; - - res = register_key_defvalueA(clsid_key, progid_keyname, - list->progid); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = RegCreateKeyExA(HKEY_CLASSES_ROOT, list->progid, 0, - NULL, 0, KEY_READ | KEY_WRITE, NULL, - &progid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = register_key_defvalueW(progid_key, clsid_keyname, buf); - RegCloseKey(progid_key); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - error_close_clsid_key: - RegCloseKey(clsid_key); - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * unregister_coclasses - */ -static HRESULT unregister_coclasses(struct regsvr_coclass const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, - KEY_READ | KEY_WRITE, &coclass_key); - if (res == ERROR_FILE_NOT_FOUND) return S_OK; - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - - StringFromGUID2(list->clsid, buf, 39); - res = RegDeleteTreeW(coclass_key, buf); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->progid) { - res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - } - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * regsvr_key_guid - */ -static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) -{ - WCHAR buf[39]; - - StringFromGUID2(guid, buf, 39); - return register_key_defvalueW(base, name, buf); -} - -/*********************************************************************** - * regsvr_key_defvalueW - */ -static LONG register_key_defvalueW( - HKEY base, - WCHAR const *name, - WCHAR const *value) -{ - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - (lstrlenW(value) + 1) * sizeof(WCHAR)); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * regsvr_key_defvalueA - */ -static LONG register_key_defvalueA( - HKEY base, - WCHAR const *name, - char const *value) -{ - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - lstrlenA(value) + 1); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * coclass list - */ -static struct regsvr_coclass const coclass_list[] = { - { &CLSID_IHTTPMailTransport, - "CLSID_IHTTPMailTransport", - NULL, - "inetcomm.dll", - "Both" - }, - { &CLSID_IPropFindRequest, - "CLSID_IPropFindRequest", - NULL, - "inetcomm.dll", - "Both" - }, - { &CLSID_IPropPatchRequest, - "CLSID_IPropPatchRequest", - NULL, - "inetcomm.dll", - "Both" - }, - { &CLSID_ISMTPTransport, - "CLSID_ISMTPTransport", - NULL, - "inetcomm.dll", - "Both" - }, - { &CLSID_ISMTPTransport2, - "CLSID_ISMTPTransport2", - NULL, - "inetcomm.dll", - "Both" - }, - { &CLSID_IPOP3Transport, - "CLSID_IPOP3Transport", - NULL, - "inetcomm.dll", - "Both" - }, - { &CLSID_INNTPTransport, - "CLSID_INNTPTransport", - NULL, - "inetcomm.dll", - "Both" - }, - { &CLSID_IRASTransport, - "CLSID_IRASTransport", - NULL, - "inetcomm.dll", - "Both" - }, - { &CLSID_IRangeList, - "CLSID_IRangeList", - NULL, - "inetcomm.dll", - "Both" - }, - { &CLSID_IIMAPTransport, - "CLSID_IIMAPTransport", - NULL, - "inetcomm.dll", - "Both" - }, - { &CLSID_IMimeBody, - "CLSID_IMimeBody", - NULL, - "inetcomm.dll", - "Both" - }, - { &CLSID_IMimeAllocator, - "CLSID_IMimeAllocator", - NULL, - "inetcomm.dll", - "Both" - }, - { &CLSID_IMimeMessage, - "CLSID_IMimeMessage", - NULL, - "inetcomm.dll", - "Both" - }, - { &CLSID_IMimeSecurity, - "CLSID_IMimeSecurity", - NULL, - "inetcomm.dll", - "Both" - }, - { &CLSID_IVirtualStream, - "CLSID_IVirtualStream", - NULL, - "inetcomm.dll", - "Both" - }, - { NULL } /* list terminator */ -}; - -/*********************************************************************** - * interface list - */ -static struct regsvr_interface const interface_list[] = { - { NULL } /* list terminator */ -}; - -/*********************************************************************** - * DllRegisterServer (INETCOMM.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - HRESULT hr; - - TRACE("\n"); - - hr = register_coclasses(coclass_list); - if (SUCCEEDED(hr)) - hr = register_interfaces(interface_list); - return hr; -} - -/*********************************************************************** - * DllUnregisterServer (INETCOMM.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - HRESULT hr; - - TRACE("\n"); - - hr = unregister_coclasses(coclass_list); - if (SUCCEEDED(hr)) - hr = unregister_interfaces(interface_list); - return hr; -} Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Jan 27 14:39:25 2012 @@ -71,7 +71,7 @@ reactos/dll/win32/imaadp32.acm # Synced to Wine-1.3.37 reactos/dll/win32/imagehlp # Autosync reactos/dll/win32/imm32 # Autosync -reactos/dll/win32/inetcomm # Autosync +reactos/dll/win32/inetcomm # Synced to Wine-1.3.37 reactos/dll/win32/inetmib1 # Autosync reactos/dll/win32/initpki # Autosync reactos/dll/win32/inseng # Synced to Wine-1.3.37
12 years, 11 months
1
0
0
0
[janderwald] 55244: [HIDCLASS] - IOCTL are only supported for PDOs
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Jan 27 14:08:40 2012 New Revision: 55244 URL:
http://svn.reactos.org/svn/reactos?rev=55244&view=rev
Log: [HIDCLASS] - IOCTL are only supported for PDOs Modified: branches/usb-bringup-trunk/drivers/hid/hidclass/hidclass.c Modified: branches/usb-bringup-trunk/drivers/hid/hidclass/hidclass.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/hid/h…
============================================================================== --- branches/usb-bringup-trunk/drivers/hid/hidclass/hidclass.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/hid/hidclass/hidclass.c [iso-8859-1] Fri Jan 27 14:08:40 2012 @@ -723,6 +723,21 @@ // get device extension // CommonDeviceExtension = (PHIDCLASS_COMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + + // + // only PDO are supported + // + if (CommonDeviceExtension->IsFDO) + { + // + // invalid request + // + DPRINT1("[HIDCLASS] DeviceControl Irp for FDO arrived\n"); + Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_INVALID_PARAMETER_1; + } + ASSERT(CommonDeviceExtension->IsFDO == FALSE); //
12 years, 11 months
1
0
0
0
[akhaldi] 55243: [PSDK] * Update wtsapi32.h from Wine.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Jan 27 14:00:42 2012 New Revision: 55243 URL:
http://svn.reactos.org/svn/reactos?rev=55243&view=rev
Log: [PSDK] * Update wtsapi32.h from Wine. Modified: trunk/reactos/include/psdk/wtsapi32.h Modified: trunk/reactos/include/psdk/wtsapi32.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wtsapi32.h?re…
============================================================================== --- trunk/reactos/include/psdk/wtsapi32.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/wtsapi32.h [iso-8859-1] Fri Jan 27 14:00:42 2012 @@ -23,12 +23,12 @@ extern "C" { #endif -/* -* Current server information -*/ -#define WTS_CURRENT_SERVER ((HANDLE)NULL) -#define WTS_CURRENT_SERVER_HANDLE ((HANDLE)NULL) -#define WTS_CURRENT_SERVER_NAME (NULL) + +typedef enum _WTS_VIRTUAL_CLASS +{ + WTSVirtualClientData, + WTSVirtualFileHandle +} WTS_VIRTUAL_CLASS; typedef enum tagWTS_INFO_CLASS { @@ -136,6 +136,9 @@ DECL_WINELIB_TYPE_AW(PWTS_SERVER_INFO) void WINAPI WTSCloseServer(HANDLE); +BOOL WINAPI WTSConnectSessionA(ULONG, ULONG, PSTR, BOOL); +BOOL WINAPI WTSConnectSessionW(ULONG, ULONG, PWSTR, BOOL); +#define WTSConnectSession WINELIB_NAME_AW(WTSConnectSession) BOOL WINAPI WTSDisconnectSession(HANDLE, DWORD, BOOL); BOOL WINAPI WTSEnumerateProcessesA(HANDLE, DWORD, DWORD, PWTS_PROCESS_INFOA *, DWORD *); BOOL WINAPI WTSEnumerateProcessesW(HANDLE, DWORD, DWORD, PWTS_PROCESS_INFOW *, DWORD *); @@ -158,8 +161,14 @@ #define WTSQueryUserConfig WINELIB_NAME_AW(WTSQueryUserConfig) BOOL WINAPI WTSQueryUserToken(ULONG, PHANDLE); BOOL WINAPI WTSRegisterSessionNotification(HWND, DWORD); +BOOL WINAPI WTSRegisterSessionNotificationEx(HANDLE, HWND, DWORD); +BOOL WINAPI WTSStartRemoteControlSessionA(LPSTR, ULONG, BYTE, USHORT); +BOOL WINAPI WTSStartRemoteControlSessionW(LPWSTR, ULONG, BYTE, USHORT); +#define WTSStartRemoteControlSession WINELIB_NAME_AW(WTSStartRemoteControlSession) +BOOL WINAPI WTSStopRemoteControlSession(ULONG); BOOL WINAPI WTSTerminateProcess(HANDLE, DWORD, DWORD); BOOL WINAPI WTSUnRegisterSessionNotification(HWND); +BOOL WINAPI WTSUnRegisterSessionNotificationEx(HANDLE, HWND); BOOL WINAPI WTSWaitSystemEvent(HANDLE, DWORD, DWORD*); #ifdef __cplusplus
12 years, 11 months
1
0
0
0
[akhaldi] 55242: [DDK] * Update drmk.h annotations.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Jan 27 13:52:36 2012 New Revision: 55242 URL:
http://svn.reactos.org/svn/reactos?rev=55242&view=rev
Log: [DDK] * Update drmk.h annotations. Modified: trunk/reactos/include/ddk/drmk.h Modified: trunk/reactos/include/ddk/drmk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/drmk.h?rev=552…
============================================================================== --- trunk/reactos/include/ddk/drmk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/drmk.h [iso-8859-1] Fri Jan 27 13:52:36 2012 @@ -32,50 +32,56 @@ extern "C" { #endif +_IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS NTAPI DrmAddContentHandlers( - IN ULONG ContentId, - IN PVOID *paHandlers, - IN ULONG NumHandlers); + _In_ ULONG ContentId, + _In_reads_(NumHandlers) PVOID *paHandlers, + _In_ ULONG NumHandlers); +_IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS NTAPI DrmCreateContentMixed( - IN PULONG paContentId, - IN ULONG cContentId, - OUT PULONG pMixedContentId); + _In_ PULONG paContentId, + _In_ ULONG cContentId, + _Out_ PULONG pMixedContentId); +_IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS NTAPI DrmDestroyContent( - IN ULONG ContentId); + _In_ ULONG ContentId); NTSTATUS NTAPI DrmForwardContentToDeviceObject( - IN ULONG ContentId, - IN PVOID Reserved, - IN PCDRMFORWARD DrmForward); + _In_ ULONG ContentId, + _In_opt_ PVOID Reserved, + _In_ PCDRMFORWARD DrmForward); +_IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS NTAPI DrmForwardContentToFileObject( - IN ULONG ContentId, - IN PFILE_OBJECT FileObject); + _In_ ULONG ContentId, + _In_ PFILE_OBJECT FileObject); +_IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS NTAPI DrmForwardContentToInterface( - IN ULONG ContentId, - IN PUNKNOWN pUnknown, - IN ULONG NumMethods); + _In_ ULONG ContentId, + _In_ PUNKNOWN pUnknown, + _In_ ULONG NumMethods); +_IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS NTAPI DrmGetContentRights( - IN ULONG ContentId, - OUT PDRMRIGHTS DrmRights); + _In_ ULONG ContentId, + _Out_ PDRMRIGHTS DrmRights); #ifdef __cplusplus } @@ -89,14 +95,14 @@ DECLARE_INTERFACE_(IDrmAudioStream, IUnknown) { STDMETHOD_(NTSTATUS, QueryInterface)(THIS_ - REFIID InterfaceId, - PVOID* Interface + _In_ REFIID InterfaceId, + _Out_ PVOID* Interface ) PURE; STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE; STDMETHOD_(NTSTATUS,SetContentId)(THIS_ - IN ULONG ContentId, - IN PCDRMRIGHTS DrmRights + _In_ ULONG ContentId, + _In_ PCDRMRIGHTS DrmRights ) PURE; }; @@ -104,7 +110,7 @@ #define IMP_IDrmAudioStream \ STDMETHODIMP_(NTSTATUS) SetContentId( \ - IN ULONG ContentId, \ - IN PCDRMRIGHTS DrmRights); + _In_ ULONG ContentId, \ + _In_ PCDRMRIGHTS DrmRights); #endif /* DRMK_H */
12 years, 11 months
1
0
0
0
[akhaldi] 55241: [MSG711.ACM] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Jan 27 13:50:29 2012 New Revision: 55241 URL:
http://svn.reactos.org/svn/reactos?rev=55241&view=rev
Log: [MSG711.ACM] * Sync to Wine 1.3.37. Modified: trunk/reactos/dll/win32/msg711.acm/msg711.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/msg711.acm/msg711.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msg711.acm/msg71…
============================================================================== --- trunk/reactos/dll/win32/msg711.acm/msg711.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msg711.acm/msg711.c [iso-8859-1] Fri Jan 27 13:50:29 2012 @@ -131,7 +131,7 @@ /*********************************************************************** * R16 * - * Read a 16 bit sample (correctly handles endianess) + * Read a 16 bit sample (correctly handles endianness) */ static inline short R16(const unsigned char* src) { @@ -141,7 +141,7 @@ /*********************************************************************** * W16 * - * Write a 16 bit sample (correctly handles endianess) + * Write a 16 bit sample (correctly handles endianness) */ static inline void W16(unsigned char* dst, short s) { Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Jan 27 13:50:29 2012 @@ -98,7 +98,7 @@ reactos/dll/win32/mscoree # Autosync reactos/dll/win32/msctf # Autosync reactos/dll/win32/msftedit # Synced to Wine-1.3.37 -reactos/dll/win32/msg711.acm # Autosync +reactos/dll/win32/msg711.acm # Synced to Wine-1.3.37 reactos/dll/win32/msgsm32.acm # Autosync reactos/dll/win32/mshtml # Autosync reactos/dll/win32/msimg32 # Autosync
12 years, 11 months
1
0
0
0
[akhaldi] 55240: [INSENG] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Jan 27 13:43:48 2012 New Revision: 55240 URL:
http://svn.reactos.org/svn/reactos?rev=55240&view=rev
Log: [INSENG] * Sync to Wine 1.3.37. Added: trunk/reactos/dll/win32/inseng/inseng.idl (with props) trunk/reactos/dll/win32/inseng/inseng.rc (with props) trunk/reactos/dll/win32/inseng/inseng.rgs (with props) Removed: trunk/reactos/dll/win32/inseng/regsvr.c Modified: trunk/reactos/dll/win32/inseng/CMakeLists.txt trunk/reactos/dll/win32/inseng/inseng.rbuild trunk/reactos/dll/win32/inseng/inseng_main.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/inseng/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inseng/CMakeList…
============================================================================== --- trunk/reactos/dll/win32/inseng/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/inseng/CMakeLists.txt [iso-8859-1] Fri Jan 27 13:43:48 2012 @@ -6,11 +6,12 @@ include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) +set_rc_compiler() spec2def(inseng.dll inseng.spec) list(APPEND SOURCE inseng_main.c - regsvr.c + inseng.rc ${CMAKE_CURRENT_BINARY_DIR}/inseng_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/inseng.def) Added: trunk/reactos/dll/win32/inseng/inseng.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inseng/inseng.id…
============================================================================== --- trunk/reactos/dll/win32/inseng/inseng.idl (added) +++ trunk/reactos/dll/win32/inseng/inseng.idl [iso-8859-1] Fri Jan 27 13:43:48 2012 @@ -1,0 +1,33 @@ +/* + * COM Classes for inseng + * + * Copyright 2010 Alexandre Julliard + * + * 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 + */ + +[ + helpstring("Microsoft Active Setup Engine"), + threading(apartment), + uuid(6e449686-c509-11cf-aafa-00aa00b6015c) +] +coclass ActiveSetupEng { } + +[ + helpstring("Download Site Manager"), + threading(apartment), + uuid(bfc880f1-7484-11d0-8309-00aa00b6015c) +] +coclass DLManager { } Propchange: trunk/reactos/dll/win32/inseng/inseng.idl ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/inseng/inseng.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inseng/inseng.rb…
============================================================================== --- trunk/reactos/dll/win32/inseng/inseng.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/inseng/inseng.rbuild [iso-8859-1] Fri Jan 27 13:43:48 2012 @@ -6,7 +6,7 @@ <define name="__WINESRC__" /> <redefine name="_WIN32_WINNT">0x600</redefine> <file>inseng_main.c</file> - <file>regsvr.c</file> + <file>inseng.rc</file> <library>wine</library> <library>uuid</library> <library>ole32</library> Added: trunk/reactos/dll/win32/inseng/inseng.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inseng/inseng.rc…
============================================================================== --- trunk/reactos/dll/win32/inseng/inseng.rc (added) +++ trunk/reactos/dll/win32/inseng/inseng.rc [iso-8859-1] Fri Jan 27 13:43:48 2012 @@ -1,0 +1,1 @@ +1 WINE_REGISTRY inseng.rgs Propchange: trunk/reactos/dll/win32/inseng/inseng.rc ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/inseng/inseng.rgs URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inseng/inseng.rg…
============================================================================== --- trunk/reactos/dll/win32/inseng/inseng.rgs (added) +++ trunk/reactos/dll/win32/inseng/inseng.rgs [iso-8859-1] Fri Jan 27 13:43:48 2012 @@ -1,0 +1,17 @@ +HKCR +{ + NoRemove Interface + { + } + NoRemove CLSID + { + '{6E449686-C509-11CF-AAFA-00AA00B6015C}' = s 'Microsoft Active Setup Engine' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' } + } + '{BFC880F1-7484-11D0-8309-00AA00B6015C}' = s 'Download Site Manager' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' } + } + } +} Propchange: trunk/reactos/dll/win32/inseng/inseng.rgs ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/inseng/inseng_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inseng/inseng_ma…
============================================================================== --- trunk/reactos/dll/win32/inseng/inseng_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/inseng/inseng_main.c [iso-8859-1] Fri Jan 27 13:43:48 2012 @@ -28,11 +28,14 @@ #include "winbase.h" #include "winuser.h" #include "ole2.h" +#include "rpcproxy.h" #include "initguid.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(inseng); + +static HINSTANCE instance; BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) { @@ -41,6 +44,7 @@ case DLL_WINE_PREATTACH: return FALSE; /* prefer native version */ case DLL_PROCESS_ATTACH: + instance = hInstDLL; DisableThreadLibraryCalls(hInstDLL); break; case DLL_PROCESS_DETACH: @@ -59,9 +63,28 @@ return CLASS_E_CLASSNOTAVAILABLE; } +/*********************************************************************** + * DllCanUnloadNow (INSENG.@) + */ HRESULT WINAPI DllCanUnloadNow(void) { return S_FALSE; +} + +/*********************************************************************** + * DllRegisterServer (INSENG.@) + */ +HRESULT WINAPI DllRegisterServer(void) +{ + return __wine_register_resources( instance ); +} + +/*********************************************************************** + * DllUnregisterServer (INSENG.@) + */ +HRESULT WINAPI DllUnregisterServer(void) +{ + return __wine_unregister_resources( instance ); } BOOL WINAPI CheckTrustEx( LPVOID a, LPVOID b, LPVOID c, LPVOID d, LPVOID e ) Removed: trunk/reactos/dll/win32/inseng/regsvr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inseng/regsvr.c?…
============================================================================== --- trunk/reactos/dll/win32/inseng/regsvr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/inseng/regsvr.c (removed) @@ -1,501 +1,0 @@ -/* - * self-registerable dll functions for inseng.dll - * - * Copyright (C) 2003 John K. Hohm - * Copyright (C) 2004 Steven Edwards for ReactOS - * - * 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 <stdarg.h> -#include <string.h> - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "wingdi.h" -#include "winreg.h" -#include "winerror.h" - -#include "objbase.h" -#include "initguid.h" - -#include "wine/debug.h" -#include "wine/unicode.h" - -WINE_DEFAULT_DEBUG_CHANNEL(inseng); - -DEFINE_GUID(CLSID_ActiveSetupEng, 0x6e449686,0xc509,0x11cf,0xaa,0xfa,0x00,0xaa,0x00,0xb6,0x01,0x5c ); -DEFINE_GUID(CLSID_DLManager, 0xBFC880F1,0x7484,0x11D0,0x83,0x09,0x00,0xAA,0x00,0xB6,0x01,0x5C); - -/* - * Near the bottom of this file are the exported DllRegisterServer and - * DllUnregisterServer, which make all this worthwhile. - */ - -/*********************************************************************** - * interface for self-registering - */ -struct regsvr_interface -{ - IID const *iid; /* NULL for end of list */ - LPCSTR name; /* can be NULL to omit */ - IID const *base_iid; /* can be NULL to omit */ - int num_methods; /* can be <0 to omit */ - CLSID const *ps_clsid; /* can be NULL to omit */ - CLSID const *ps_clsid32; /* can be NULL to omit */ -}; - -static HRESULT register_interfaces(struct regsvr_interface const *list); -static HRESULT unregister_interfaces(struct regsvr_interface const *list); - -struct regsvr_coclass -{ - CLSID const *clsid; /* NULL for end of list */ - LPCSTR name; /* can be NULL to omit */ - LPCSTR ips; /* can be NULL to omit */ - LPCSTR ips32; /* can be NULL to omit */ - LPCSTR ips32_tmodel; /* can be NULL to omit */ - LPCSTR progid; /* can be NULL to omit */ - LPCSTR viprogid; /* can be NULL to omit */ - LPCSTR progid_extra; /* can be NULL to omit */ -}; - -static HRESULT register_coclasses(struct regsvr_coclass const *list); -static HRESULT unregister_coclasses(struct regsvr_coclass const *list); - -/*********************************************************************** - * static string constants - */ -static WCHAR const interface_keyname[10] = { - 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 }; -static WCHAR const base_ifa_keyname[14] = { - 'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', - 'e', 0 }; -static WCHAR const num_methods_keyname[11] = { - 'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 }; -static WCHAR const ps_clsid_keyname[15] = { - 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', - 'i', 'd', 0 }; -static WCHAR const ps_clsid32_keyname[17] = { - 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', - 'i', 'd', '3', '2', 0 }; -static WCHAR const clsid_keyname[6] = { - 'C', 'L', 'S', 'I', 'D', 0 }; -static WCHAR const curver_keyname[7] = { - 'C', 'u', 'r', 'V', 'e', 'r', 0 }; -static WCHAR const ips_keyname[13] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - 0 }; -static WCHAR const ips32_keyname[15] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - '3', '2', 0 }; -static WCHAR const progid_keyname[7] = { - 'P', 'r', 'o', 'g', 'I', 'D', 0 }; -static WCHAR const viprogid_keyname[25] = { - 'V', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'd', 'e', 'p', - 'e', 'n', 'd', 'e', 'n', 't', 'P', 'r', 'o', 'g', 'I', 'D', - 0 }; -static char const tmodel_valuename[] = "ThreadingModel"; - -/*********************************************************************** - * static helper functions - */ -static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid); -static LONG register_key_defvalueW(HKEY base, WCHAR const *name, - WCHAR const *value); -static LONG register_key_defvalueA(HKEY base, WCHAR const *name, - char const *value); -static LONG register_progid(WCHAR const *clsid, - char const *progid, char const *curver_progid, - char const *name, char const *extra); - -/*********************************************************************** - * register_interfaces - */ -static HRESULT register_interfaces(struct regsvr_interface const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY interface_key; - - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &interface_key, NULL); - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->iid; ++list) { - WCHAR buf[39]; - HKEY iid_key; - - StringFromGUID2(list->iid, buf, 39); - res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &iid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_interface_key; - - if (list->name) { - res = RegSetValueExA(iid_key, NULL, 0, REG_SZ, - (CONST BYTE*)(list->name), - strlen(list->name) + 1); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->base_iid) { - res = register_key_guid(iid_key, base_ifa_keyname, list->base_iid); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (0 <= list->num_methods) { - static WCHAR const fmt[3] = { '%', 'd', 0 }; - HKEY key; - - res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - - sprintfW(buf, fmt, list->num_methods); - res = RegSetValueExW(key, NULL, 0, REG_SZ, - (CONST BYTE*)buf, - (lstrlenW(buf) + 1) * sizeof(WCHAR)); - RegCloseKey(key); - - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->ps_clsid) { - res = register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->ps_clsid32) { - res = register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - error_close_iid_key: - RegCloseKey(iid_key); - } - -error_close_interface_key: - RegCloseKey(interface_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * unregister_interfaces - */ -static HRESULT unregister_interfaces(struct regsvr_interface const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY interface_key; - - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, - KEY_READ | KEY_WRITE, &interface_key); - if (res == ERROR_FILE_NOT_FOUND) return S_OK; - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->iid; ++list) { - WCHAR buf[39]; - - StringFromGUID2(list->iid, buf, 39); - res = RegDeleteTreeW(interface_key, buf); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - } - - RegCloseKey(interface_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * register_coclasses - */ -static HRESULT register_coclasses(struct regsvr_coclass const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL); - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - HKEY clsid_key; - - StringFromGUID2(list->clsid, buf, 39); - res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->name) { - res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ, - (CONST BYTE*)(list->name), - strlen(list->name) + 1); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips) { - res = register_key_defvalueA(clsid_key, ips_keyname, list->ips); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips32) { - HKEY ips32_key; - - res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, - &ips32_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ, - (CONST BYTE*)list->ips32, - lstrlenA(list->ips32) + 1); - if (res == ERROR_SUCCESS && list->ips32_tmodel) - res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ, - (CONST BYTE*)list->ips32_tmodel, - strlen(list->ips32_tmodel) + 1); - RegCloseKey(ips32_key); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->progid) { - res = register_key_defvalueA(clsid_key, progid_keyname, - list->progid); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = register_progid(buf, list->progid, NULL, - list->name, list->progid_extra); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->viprogid) { - res = register_key_defvalueA(clsid_key, viprogid_keyname, - list->viprogid); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = register_progid(buf, list->viprogid, list->progid, - list->name, list->progid_extra); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - error_close_clsid_key: - RegCloseKey(clsid_key); - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * unregister_coclasses - */ -static HRESULT unregister_coclasses(struct regsvr_coclass const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, - KEY_READ | KEY_WRITE, &coclass_key); - if (res == ERROR_FILE_NOT_FOUND) return S_OK; - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - - StringFromGUID2(list->clsid, buf, 39); - res = RegDeleteTreeW(coclass_key, buf); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->progid) { - res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - } - - if (list->viprogid) { - res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->viprogid); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - } - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * regsvr_key_guid - */ -static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) -{ - WCHAR buf[39]; - - StringFromGUID2(guid, buf, 39); - return register_key_defvalueW(base, name, buf); -} - -/*********************************************************************** - * regsvr_key_defvalueW - */ -static LONG register_key_defvalueW( - HKEY base, - WCHAR const *name, - WCHAR const *value) -{ - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - (lstrlenW(value) + 1) * sizeof(WCHAR)); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * regsvr_key_defvalueA - */ -static LONG register_key_defvalueA( - HKEY base, - WCHAR const *name, - char const *value) -{ - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - lstrlenA(value) + 1); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * regsvr_progid - */ -static LONG register_progid( - WCHAR const *clsid, - char const *progid, - char const *curver_progid, - char const *name, - char const *extra) -{ - LONG res; - HKEY progid_key; - - res = RegCreateKeyExA(HKEY_CLASSES_ROOT, progid, 0, - NULL, 0, KEY_READ | KEY_WRITE, NULL, - &progid_key, NULL); - if (res != ERROR_SUCCESS) return res; - - if (name) { - res = RegSetValueExA(progid_key, NULL, 0, REG_SZ, - (CONST BYTE*)name, strlen(name) + 1); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (clsid) { - res = register_key_defvalueW(progid_key, clsid_keyname, clsid); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (curver_progid) { - res = register_key_defvalueA(progid_key, curver_keyname, - curver_progid); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (extra) { - HKEY extra_key; - - res = RegCreateKeyExA(progid_key, extra, 0, - NULL, 0, KEY_READ | KEY_WRITE, NULL, - &extra_key, NULL); - if (res == ERROR_SUCCESS) - RegCloseKey(extra_key); - } - -error_close_progid_key: - RegCloseKey(progid_key); - return res; -} - -/*********************************************************************** - * coclass list - */ -static struct regsvr_coclass const coclass_list[] = { - { - &CLSID_ActiveSetupEng, - "Microsoft Active Setup Engine", - NULL, - "inseng.dll", - "Apartment" - }, - { - &CLSID_DLManager, - "Download Site Manager", - NULL, - "inseng.dll", - "Apartment" - }, - { NULL } /* list terminator */ -}; - -/*********************************************************************** - * interface list - */ - -static struct regsvr_interface const interface_list[] = { - { NULL } /* list terminator */ -}; - -/*********************************************************************** - * DllRegisterServer (INSENG.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - HRESULT hr; - - TRACE("\n"); - - hr = register_coclasses(coclass_list); - if (SUCCEEDED(hr)) - hr = register_interfaces(interface_list); - return hr; -} - -/*********************************************************************** - * DllUnregisterServer (INSENG.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - HRESULT hr; - - TRACE("\n"); - - hr = unregister_coclasses(coclass_list); - if (SUCCEEDED(hr)) - hr = unregister_interfaces(interface_list); - return hr; -} Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Jan 27 13:43:48 2012 @@ -74,7 +74,7 @@ reactos/dll/win32/inetcomm # Autosync reactos/dll/win32/inetmib1 # Autosync reactos/dll/win32/initpki # Autosync -reactos/dll/win32/inseng # Autosync +reactos/dll/win32/inseng # Synced to Wine-1.3.37 reactos/dll/win32/iphlpapi # Out of sync reactos/dll/win32/itircl # Autosync reactos/dll/win32/itss # Autosync
12 years, 11 months
1
0
0
0
[akhaldi] 55239: [HNETCFG] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Jan 27 13:09:03 2012 New Revision: 55239 URL:
http://svn.reactos.org/svn/reactos?rev=55239&view=rev
Log: [HNETCFG] * Sync to Wine 1.3.37. Added: trunk/reactos/dll/win32/hnetcfg/hnetcfg.idl (with props) trunk/reactos/dll/win32/hnetcfg/hnetcfg.rc (with props) trunk/reactos/dll/win32/hnetcfg/hnetcfg.rgs (with props) Removed: trunk/reactos/dll/win32/hnetcfg/regsvr.c Modified: trunk/reactos/dll/win32/hnetcfg/CMakeLists.txt trunk/reactos/dll/win32/hnetcfg/apps.c trunk/reactos/dll/win32/hnetcfg/hnetcfg.c trunk/reactos/dll/win32/hnetcfg/hnetcfg.rbuild trunk/reactos/dll/win32/hnetcfg/hnetcfg_private.h trunk/reactos/dll/win32/hnetcfg/manager.c trunk/reactos/dll/win32/hnetcfg/policy.c trunk/reactos/dll/win32/hnetcfg/port.c trunk/reactos/dll/win32/hnetcfg/profile.c trunk/reactos/dll/win32/hnetcfg/service.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/hnetcfg/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hnetcfg/CMakeLis…
============================================================================== --- trunk/reactos/dll/win32/hnetcfg/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hnetcfg/CMakeLists.txt [iso-8859-1] Fri Jan 27 13:09:03 2012 @@ -6,6 +6,7 @@ include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) +set_rc_compiler() spec2def(hnetcfg.dll hnetcfg.spec) list(APPEND SOURCE @@ -15,8 +16,8 @@ policy.c port.c profile.c - regsvr.c service.c + hnetcfg.rc ${CMAKE_CURRENT_BINARY_DIR}/hnetcfg.def) add_library(hnetcfg SHARED ${SOURCE}) Modified: trunk/reactos/dll/win32/hnetcfg/apps.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hnetcfg/apps.c?r…
============================================================================== --- trunk/reactos/dll/win32/hnetcfg/apps.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hnetcfg/apps.c [iso-8859-1] Fri Jan 27 13:09:03 2012 @@ -36,13 +36,13 @@ typedef struct fw_app { - const INetFwAuthorizedApplicationVtbl *vtbl; + INetFwAuthorizedApplication INetFwAuthorizedApplication_iface; LONG refs; } fw_app; static inline fw_app *impl_from_INetFwAuthorizedApplication( INetFwAuthorizedApplication *iface ) { - return (fw_app *)((char *)iface - FIELD_OFFSET( fw_app, vtbl )); + return CONTAINING_RECORD(iface, fw_app, INetFwAuthorizedApplication_iface); } static ULONG WINAPI fw_app_AddRef( @@ -262,7 +262,7 @@ fw_app *This = impl_from_INetFwAuthorizedApplication( iface ); FIXME("%p, %d\n", This, enabled); - return E_NOTIMPL; + return S_OK; } static const struct INetFwAuthorizedApplicationVtbl fw_app_vtbl = @@ -297,23 +297,23 @@ fa = HeapAlloc( GetProcessHeap(), 0, sizeof(*fa) ); if (!fa) return E_OUTOFMEMORY; - fa->vtbl = &fw_app_vtbl; + fa->INetFwAuthorizedApplication_iface.lpVtbl = &fw_app_vtbl; fa->refs = 1; - *ppObj = &fa->vtbl; + *ppObj = &fa->INetFwAuthorizedApplication_iface; TRACE("returning iface %p\n", *ppObj); return S_OK; } typedef struct fw_apps { - const INetFwAuthorizedApplicationsVtbl *vtbl; + INetFwAuthorizedApplications INetFwAuthorizedApplications_iface; LONG refs; } fw_apps; static inline fw_apps *impl_from_INetFwAuthorizedApplications( INetFwAuthorizedApplications *iface ) { - return (fw_apps *)((char *)iface - FIELD_OFFSET( fw_apps, vtbl )); + return CONTAINING_RECORD(iface, fw_apps, INetFwAuthorizedApplications_iface); } static ULONG WINAPI fw_apps_AddRef( @@ -490,10 +490,10 @@ fa = HeapAlloc( GetProcessHeap(), 0, sizeof(*fa) ); if (!fa) return E_OUTOFMEMORY; - fa->vtbl = &fw_apps_vtbl; + fa->INetFwAuthorizedApplications_iface.lpVtbl = &fw_apps_vtbl; fa->refs = 1; - *ppObj = &fa->vtbl; + *ppObj = &fa->INetFwAuthorizedApplications_iface; TRACE("returning iface %p\n", *ppObj); return S_OK; Modified: trunk/reactos/dll/win32/hnetcfg/hnetcfg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hnetcfg/hnetcfg.…
============================================================================== --- trunk/reactos/dll/win32/hnetcfg/hnetcfg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hnetcfg/hnetcfg.c [iso-8859-1] Fri Jan 27 13:09:03 2012 @@ -23,6 +23,7 @@ #include "windef.h" #include "winbase.h" #include "objbase.h" +#include "rpcproxy.h" #include "netfw.h" #include "wine/debug.h" @@ -30,17 +31,19 @@ WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg); +static HINSTANCE instance; + typedef HRESULT (*fnCreateInstance)( IUnknown *pUnkOuter, LPVOID *ppObj ); typedef struct { - const struct IClassFactoryVtbl *vtbl; + IClassFactory IClassFactory_iface; fnCreateInstance pfnCreateInstance; } hnetcfg_cf; static inline hnetcfg_cf *impl_from_IClassFactory( IClassFactory *iface ) { - return (hnetcfg_cf *)((char *)iface - FIELD_OFFSET( hnetcfg_cf, vtbl )); + return CONTAINING_RECORD(iface, hnetcfg_cf, IClassFactory_iface); } static HRESULT WINAPI hnetcfg_cf_QueryInterface( IClassFactory *iface, REFIID riid, LPVOID *ppobj ) @@ -107,8 +110,8 @@ hnetcfg_cf_LockServer }; -static hnetcfg_cf fw_manager_cf = { &hnetcfg_cf_vtbl, NetFwMgr_create }; -static hnetcfg_cf fw_app_cf = { &hnetcfg_cf_vtbl, NetFwAuthorizedApplication_create }; +static hnetcfg_cf fw_manager_cf = { { &hnetcfg_cf_vtbl }, NetFwMgr_create }; +static hnetcfg_cf fw_app_cf = { { &hnetcfg_cf_vtbl }, NetFwAuthorizedApplication_create }; BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) { @@ -118,6 +121,7 @@ case DLL_WINE_PREATTACH: return FALSE; case DLL_PROCESS_ATTACH: + instance = hInstDLL; DisableThreadLibraryCalls(hInstDLL); break; case DLL_PROCESS_DETACH: @@ -134,11 +138,11 @@ if (IsEqualGUID( rclsid, &CLSID_NetFwMgr )) { - cf = (IClassFactory *)&fw_manager_cf.vtbl; + cf = &fw_manager_cf.IClassFactory_iface; } else if (IsEqualGUID( rclsid, &CLSID_NetFwAuthorizedApplication )) { - cf = (IClassFactory *)&fw_app_cf.vtbl; + cf = &fw_app_cf.IClassFactory_iface; } if (!cf) return CLASS_E_CLASSNOTAVAILABLE; @@ -149,3 +153,19 @@ { return S_FALSE; } + +/*********************************************************************** + * DllRegisterServer (HNETCFG.@) + */ +HRESULT WINAPI DllRegisterServer(void) +{ + return __wine_register_resources( instance ); +} + +/*********************************************************************** + * DllUnregisterServer (HNETCFG.@) + */ +HRESULT WINAPI DllUnregisterServer(void) +{ + return __wine_unregister_resources( instance ); +} Added: trunk/reactos/dll/win32/hnetcfg/hnetcfg.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hnetcfg/hnetcfg.…
============================================================================== --- trunk/reactos/dll/win32/hnetcfg/hnetcfg.idl (added) +++ trunk/reactos/dll/win32/hnetcfg/hnetcfg.idl [iso-8859-1] Fri Jan 27 13:09:03 2012 @@ -1,0 +1,35 @@ +/* + * COM Classes for hnetcfg + * + * Copyright 2010 Alexandre Julliard + * + * 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 + */ + +[ + helpstring("HNetCfg.FwMgr"), + progid("HNetCfg.FwMgr"), + threading(both), + uuid(304ce942-6e39-40d8-943a-b913c40c9cd4) +] +coclass NetFwMgr { interface INetFwMgr; } + +[ + helpstring("HNetCfg.FwAuthorizedApplication"), + progid("HNetCfg.FwAuthorizedApplication"), + threading(both), + uuid(ec9846b3-2762-4a6b-a214-6acb603462d2) +] +coclass NetFwAuthorizedApplication { interface INetFwAuthorizedApplications; } Propchange: trunk/reactos/dll/win32/hnetcfg/hnetcfg.idl ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/hnetcfg/hnetcfg.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hnetcfg/hnetcfg.…
============================================================================== --- trunk/reactos/dll/win32/hnetcfg/hnetcfg.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hnetcfg/hnetcfg.rbuild [iso-8859-1] Fri Jan 27 13:09:03 2012 @@ -14,6 +14,6 @@ <file>policy.c</file> <file>port.c</file> <file>profile.c</file> - <file>regsvr.c</file> <file>service.c</file> + <file>hnetcfg.rc</file> </module> Added: trunk/reactos/dll/win32/hnetcfg/hnetcfg.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hnetcfg/hnetcfg.…
============================================================================== --- trunk/reactos/dll/win32/hnetcfg/hnetcfg.rc (added) +++ trunk/reactos/dll/win32/hnetcfg/hnetcfg.rc [iso-8859-1] Fri Jan 27 13:09:03 2012 @@ -1,0 +1,1 @@ +1 WINE_REGISTRY hnetcfg.rgs Propchange: trunk/reactos/dll/win32/hnetcfg/hnetcfg.rc ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/hnetcfg/hnetcfg.rgs URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hnetcfg/hnetcfg.…
============================================================================== --- trunk/reactos/dll/win32/hnetcfg/hnetcfg.rgs (added) +++ trunk/reactos/dll/win32/hnetcfg/hnetcfg.rgs [iso-8859-1] Fri Jan 27 13:09:03 2012 @@ -1,0 +1,27 @@ +HKCR +{ + NoRemove Interface + { + } + NoRemove CLSID + { + '{304CE942-6E39-40D8-943A-B913C40C9CD4}' = s 'HNetCfg.FwMgr' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + ProgId = s 'HNetCfg.FwMgr' + } + '{EC9846B3-2762-4A6B-A214-6ACB603462D2}' = s 'HNetCfg.FwAuthorizedApplication' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + ProgId = s 'HNetCfg.FwAuthorizedApplication' + } + } + 'HNetCfg.FwMgr' = s 'HNetCfg.FwMgr' + { + CLSID = s '{304CE942-6E39-40D8-943A-B913C40C9CD4}' + } + 'HNetCfg.FwAuthorizedApplication' = s 'HNetCfg.FwAuthorizedApplication' + { + CLSID = s '{EC9846B3-2762-4A6B-A214-6ACB603462D2}' + } +} Propchange: trunk/reactos/dll/win32/hnetcfg/hnetcfg.rgs ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/hnetcfg/hnetcfg_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hnetcfg/hnetcfg_…
============================================================================== --- trunk/reactos/dll/win32/hnetcfg/hnetcfg_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hnetcfg/hnetcfg_private.h [iso-8859-1] Fri Jan 27 13:09:03 2012 @@ -16,10 +16,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -HRESULT NetFwMgr_create(IUnknown *, LPVOID *); -HRESULT NetFwPolicy_create(IUnknown *, LPVOID *); -HRESULT NetFwProfile_create(IUnknown *, LPVOID *); -HRESULT NetFwAuthorizedApplication_create(IUnknown *, LPVOID *); -HRESULT NetFwAuthorizedApplications_create(IUnknown *, LPVOID *); -HRESULT NetFwOpenPorts_create(IUnknown *, LPVOID *); -HRESULT NetFwServices_create(IUnknown *, LPVOID *); +HRESULT NetFwMgr_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; +HRESULT NetFwPolicy_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; +HRESULT NetFwProfile_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; +HRESULT NetFwAuthorizedApplication_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; +HRESULT NetFwAuthorizedApplications_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; +HRESULT NetFwOpenPorts_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; +HRESULT NetFwServices_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; Modified: trunk/reactos/dll/win32/hnetcfg/manager.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hnetcfg/manager.…
============================================================================== --- trunk/reactos/dll/win32/hnetcfg/manager.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hnetcfg/manager.c [iso-8859-1] Fri Jan 27 13:09:03 2012 @@ -37,13 +37,13 @@ typedef struct fw_manager { - const INetFwMgrVtbl *vtbl; + INetFwMgr INetFwMgr_iface; LONG refs; } fw_manager; static inline fw_manager *impl_from_INetFwMgr( INetFwMgr *iface ) { - return (fw_manager *)((char *)iface - FIELD_OFFSET( fw_manager, vtbl )); + return CONTAINING_RECORD(iface, fw_manager, INetFwMgr_iface); } static ULONG WINAPI fw_manager_AddRef( @@ -230,10 +230,10 @@ fm = HeapAlloc( GetProcessHeap(), 0, sizeof(*fm) ); if (!fm) return E_OUTOFMEMORY; - fm->vtbl = &fw_manager_vtbl; + fm->INetFwMgr_iface.lpVtbl = &fw_manager_vtbl; fm->refs = 1; - *ppObj = &fm->vtbl; + *ppObj = &fm->INetFwMgr_iface; TRACE("returning iface %p\n", *ppObj); return S_OK; Modified: trunk/reactos/dll/win32/hnetcfg/policy.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hnetcfg/policy.c…
============================================================================== --- trunk/reactos/dll/win32/hnetcfg/policy.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hnetcfg/policy.c [iso-8859-1] Fri Jan 27 13:09:03 2012 @@ -36,13 +36,13 @@ typedef struct fw_policy { - const INetFwPolicyVtbl *vtbl; + INetFwPolicy INetFwPolicy_iface; LONG refs; } fw_policy; static inline fw_policy *impl_from_INetFwPolicy( INetFwPolicy *iface ) { - return (fw_policy *)((char *)iface - FIELD_OFFSET( fw_policy, vtbl )); + return CONTAINING_RECORD(iface, fw_policy, INetFwPolicy_iface); } static ULONG WINAPI fw_policy_AddRef( @@ -186,10 +186,10 @@ fp = HeapAlloc( GetProcessHeap(), 0, sizeof(*fp) ); if (!fp) return E_OUTOFMEMORY; - fp->vtbl = &fw_policy_vtbl; + fp->INetFwPolicy_iface.lpVtbl = &fw_policy_vtbl; fp->refs = 1; - *ppObj = &fp->vtbl; + *ppObj = &fp->INetFwPolicy_iface; TRACE("returning iface %p\n", *ppObj); return S_OK; Modified: trunk/reactos/dll/win32/hnetcfg/port.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hnetcfg/port.c?r…
============================================================================== --- trunk/reactos/dll/win32/hnetcfg/port.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hnetcfg/port.c [iso-8859-1] Fri Jan 27 13:09:03 2012 @@ -36,13 +36,13 @@ typedef struct fw_port { - const INetFwOpenPortVtbl *vtbl; + INetFwOpenPort INetFwOpenPort_iface; LONG refs; } fw_port; static inline fw_port *impl_from_INetFwOpenPort( INetFwOpenPort *iface ) { - return (fw_port *)((char *)iface - FIELD_OFFSET( fw_port, vtbl )); + return CONTAINING_RECORD(iface, fw_port, INetFwOpenPort_iface); } static ULONG WINAPI fw_port_AddRef( @@ -330,10 +330,10 @@ fp = HeapAlloc( GetProcessHeap(), 0, sizeof(*fp) ); if (!fp) return E_OUTOFMEMORY; - fp->vtbl = &fw_port_vtbl; + fp->INetFwOpenPort_iface.lpVtbl = &fw_port_vtbl; fp->refs = 1; - *ppObj = &fp->vtbl; + *ppObj = &fp->INetFwOpenPort_iface; TRACE("returning iface %p\n", *ppObj); return S_OK; @@ -341,13 +341,13 @@ typedef struct fw_ports { - const INetFwOpenPortsVtbl *vtbl; + INetFwOpenPorts INetFwOpenPorts_iface; LONG refs; } fw_ports; static inline fw_ports *impl_from_INetFwOpenPorts( INetFwOpenPorts *iface ) { - return (fw_ports *)((char *)iface - FIELD_OFFSET( fw_ports, vtbl )); + return CONTAINING_RECORD(iface, fw_ports, INetFwOpenPorts_iface); } static ULONG WINAPI fw_ports_AddRef( @@ -536,10 +536,10 @@ fp = HeapAlloc( GetProcessHeap(), 0, sizeof(*fp) ); if (!fp) return E_OUTOFMEMORY; - fp->vtbl = &fw_ports_vtbl; + fp->INetFwOpenPorts_iface.lpVtbl = &fw_ports_vtbl; fp->refs = 1; - *ppObj = &fp->vtbl; + *ppObj = &fp->INetFwOpenPorts_iface; TRACE("returning iface %p\n", *ppObj); return S_OK; Modified: trunk/reactos/dll/win32/hnetcfg/profile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hnetcfg/profile.…
============================================================================== --- trunk/reactos/dll/win32/hnetcfg/profile.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hnetcfg/profile.c [iso-8859-1] Fri Jan 27 13:09:03 2012 @@ -36,13 +36,13 @@ typedef struct fw_profile { - const INetFwProfileVtbl *vtbl; + INetFwProfile INetFwProfile_iface; LONG refs; } fw_profile; static inline fw_profile *impl_from_INetFwProfile( INetFwProfile *iface ) { - return (fw_profile *)((char *)iface - FIELD_OFFSET( fw_profile, vtbl )); + return CONTAINING_RECORD(iface, fw_profile, INetFwProfile_iface); } static ULONG WINAPI fw_profile_AddRef( @@ -319,10 +319,10 @@ fp = HeapAlloc( GetProcessHeap(), 0, sizeof(*fp) ); if (!fp) return E_OUTOFMEMORY; - fp->vtbl = &fw_profile_vtbl; + fp->INetFwProfile_iface.lpVtbl = &fw_profile_vtbl; fp->refs = 1; - *ppObj = &fp->vtbl; + *ppObj = &fp->INetFwProfile_iface; TRACE("returning iface %p\n", *ppObj); return S_OK; Removed: trunk/reactos/dll/win32/hnetcfg/regsvr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hnetcfg/regsvr.c…
============================================================================== --- trunk/reactos/dll/win32/hnetcfg/regsvr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hnetcfg/regsvr.c (removed) @@ -1,430 +1,0 @@ -/* - * self-registerable dll functions for hnetcfg.dll - * - * Copyright (C) 2003 John K. Hohm - * - * 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 <stdarg.h> -#include <string.h> - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winreg.h" -#include "winerror.h" -#include "objbase.h" -#include "netfw.h" - -#include "wine/debug.h" -#include "wine/unicode.h" - -WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg); - -/* - * Near the bottom of this file are the exported DllRegisterServer and - * DllUnregisterServer, which make all this worthwhile. - */ - -/*********************************************************************** - * interface for self-registering - */ -struct regsvr_interface -{ - IID const *iid; /* NULL for end of list */ - LPCSTR name; /* can be NULL to omit */ - IID const *base_iid; /* can be NULL to omit */ - int num_methods; /* can be <0 to omit */ - CLSID const *ps_clsid; /* can be NULL to omit */ - CLSID const *ps_clsid32; /* can be NULL to omit */ -}; - -static HRESULT register_interfaces(struct regsvr_interface const *list); -static HRESULT unregister_interfaces(struct regsvr_interface const *list); - -struct regsvr_coclass -{ - CLSID const *clsid; /* NULL for end of list */ - LPCSTR name; /* can be NULL to omit */ - LPCSTR ips; /* can be NULL to omit */ - LPCSTR ips32; /* can be NULL to omit */ - LPCSTR ips32_tmodel; /* can be NULL to omit */ - LPCSTR clsid_str; /* can be NULL to omit */ - LPCSTR progid; /* can be NULL to omit */ -}; - -static HRESULT register_coclasses(struct regsvr_coclass const *list); -static HRESULT unregister_coclasses(struct regsvr_coclass const *list); - -/*********************************************************************** - * static string constants - */ -static WCHAR const interface_keyname[10] = { - 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 }; -static WCHAR const base_ifa_keyname[14] = { - 'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', - 'e', 0 }; -static WCHAR const num_methods_keyname[11] = { - 'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 }; -static WCHAR const ps_clsid_keyname[15] = { - 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', - 'i', 'd', 0 }; -static WCHAR const ps_clsid32_keyname[17] = { - 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', - 'i', 'd', '3', '2', 0 }; -static WCHAR const clsid_keyname[6] = { - 'C', 'L', 'S', 'I', 'D', 0 }; -static WCHAR const ips_keyname[13] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - 0 }; -static WCHAR const ips32_keyname[15] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - '3', '2', 0 }; -static WCHAR const progid_keyname[7] = { - 'P', 'r', 'o', 'g', 'I', 'D', 0 }; -static char const tmodel_valuename[] = "ThreadingModel"; - -/*********************************************************************** - * static helper functions - */ -static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid); -static LONG register_key_defvalueW(HKEY base, WCHAR const *name, - WCHAR const *value); -static LONG register_key_defvalueA(HKEY base, WCHAR const *name, - char const *value); - -/*********************************************************************** - * register_interfaces - */ -static HRESULT register_interfaces(struct regsvr_interface const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY interface_key; - - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &interface_key, NULL); - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->iid; ++list) { - WCHAR buf[39]; - HKEY iid_key; - - StringFromGUID2(list->iid, buf, 39); - res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &iid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_interface_key; - - if (list->name) { - res = RegSetValueExA(iid_key, NULL, 0, REG_SZ, - (CONST BYTE*)(list->name), - strlen(list->name) + 1); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->base_iid) { - res = register_key_guid(iid_key, base_ifa_keyname, list->base_iid); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (0 <= list->num_methods) { - static WCHAR const fmt[3] = { '%', 'd', 0 }; - HKEY key; - - res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - - sprintfW(buf, fmt, list->num_methods); - res = RegSetValueExW(key, NULL, 0, REG_SZ, - (CONST BYTE*)buf, - (lstrlenW(buf) + 1) * sizeof(WCHAR)); - RegCloseKey(key); - - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->ps_clsid) { - res = register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->ps_clsid32) { - res = register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - error_close_iid_key: - RegCloseKey(iid_key); - } - -error_close_interface_key: - RegCloseKey(interface_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * unregister_interfaces - */ -static HRESULT unregister_interfaces(struct regsvr_interface const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY interface_key; - - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, - KEY_READ | KEY_WRITE, &interface_key); - if (res == ERROR_FILE_NOT_FOUND) return S_OK; - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->iid; ++list) { - WCHAR buf[39]; - - StringFromGUID2(list->iid, buf, 39); - res = RegDeleteTreeW(interface_key, buf); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - } - - RegCloseKey(interface_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * register_coclasses - */ -static HRESULT register_coclasses(struct regsvr_coclass const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL); - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - HKEY clsid_key; - - StringFromGUID2(list->clsid, buf, 39); - res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->name) { - res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ, - (CONST BYTE*)(list->name), - strlen(list->name) + 1); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips) { - res = register_key_defvalueA(clsid_key, ips_keyname, list->ips); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips32) { - HKEY ips32_key; - - res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, - &ips32_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ, - (CONST BYTE*)list->ips32, - lstrlenA(list->ips32) + 1); - if (res == ERROR_SUCCESS && list->ips32_tmodel) - res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ, - (CONST BYTE*)list->ips32_tmodel, - strlen(list->ips32_tmodel) + 1); - RegCloseKey(ips32_key); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->clsid_str) { - res = register_key_defvalueA(clsid_key, clsid_keyname, - list->clsid_str); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->progid) { - HKEY progid_key; - - res = register_key_defvalueA(clsid_key, progid_keyname, - list->progid); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = RegCreateKeyExA(HKEY_CLASSES_ROOT, list->progid, 0, - NULL, 0, KEY_READ | KEY_WRITE, NULL, - &progid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = register_key_defvalueW(progid_key, clsid_keyname, buf); - RegCloseKey(progid_key); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - error_close_clsid_key: - RegCloseKey(clsid_key); - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * unregister_coclasses - */ -static HRESULT unregister_coclasses(struct regsvr_coclass const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, - KEY_READ | KEY_WRITE, &coclass_key); - if (res == ERROR_FILE_NOT_FOUND) return S_OK; - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - - StringFromGUID2(list->clsid, buf, 39); - res = RegDeleteTreeW(coclass_key, buf); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->progid) { - res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - } - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * regsvr_key_guid - */ -static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) -{ - WCHAR buf[39]; - - StringFromGUID2(guid, buf, 39); - return register_key_defvalueW(base, name, buf); -} - -/*********************************************************************** - * regsvr_key_defvalueW - */ -static LONG register_key_defvalueW( - HKEY base, - WCHAR const *name, - WCHAR const *value) -{ - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - (lstrlenW(value) + 1) * sizeof(WCHAR)); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * regsvr_key_defvalueA - */ -static LONG register_key_defvalueA( - HKEY base, - WCHAR const *name, - char const *value) -{ - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - lstrlenA(value) + 1); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * coclass list - */ -static struct regsvr_coclass const coclass_list[] = { - { &CLSID_NetFwMgr, - "NetFwMgr", - NULL, - "hnetcfg.dll", - "Both" - }, - { &CLSID_NetFwAuthorizedApplication, - "NetFwAuthorizedApplication", - NULL, - "hnetcfg.dll", - "Both" - }, - { NULL } /* list terminator */ -}; - -/*********************************************************************** - * interface list - */ -static struct regsvr_interface const interface_list[] = { - { NULL } /* list terminator */ -}; - -/*********************************************************************** - * DllRegisterServer (HNETCFG.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - HRESULT hr; - - TRACE("\n"); - - hr = register_coclasses(coclass_list); - if (SUCCEEDED(hr)) - hr = register_interfaces(interface_list); - return hr; -} - -/*********************************************************************** - * DllUnregisterServer (HNETCFG.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - HRESULT hr; - - TRACE("\n"); - - hr = unregister_coclasses(coclass_list); - if (SUCCEEDED(hr)) - hr = unregister_interfaces(interface_list); - return hr; -} Modified: trunk/reactos/dll/win32/hnetcfg/service.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hnetcfg/service.…
============================================================================== --- trunk/reactos/dll/win32/hnetcfg/service.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hnetcfg/service.c [iso-8859-1] Fri Jan 27 13:09:03 2012 @@ -36,13 +36,13 @@ typedef struct fw_service { - const INetFwServiceVtbl *vtbl; + INetFwService INetFwService_iface; LONG refs; } fw_service; static inline fw_service *impl_from_INetFwService( INetFwService *iface ) { - return (fw_service *)((char *)iface - FIELD_OFFSET( fw_service, vtbl )); + return CONTAINING_RECORD(iface, fw_service, INetFwService_iface); } static ULONG WINAPI fw_service_AddRef( @@ -295,10 +295,10 @@ fp = HeapAlloc( GetProcessHeap(), 0, sizeof(*fp) ); if (!fp) return E_OUTOFMEMORY; - fp->vtbl = &fw_service_vtbl; + fp->INetFwService_iface.lpVtbl = &fw_service_vtbl; fp->refs = 1; - *ppObj = &fp->vtbl; + *ppObj = &fp->INetFwService_iface; TRACE("returning iface %p\n", *ppObj); return S_OK; @@ -306,13 +306,13 @@ typedef struct fw_services { - const INetFwServicesVtbl *vtbl; + INetFwServices INetFwServices_iface; LONG refs; } fw_services; static inline fw_services *impl_from_INetFwServices( INetFwServices *iface ) { - return (fw_services *)((char *)iface - FIELD_OFFSET( fw_services, vtbl )); + return CONTAINING_RECORD(iface, fw_services, INetFwServices_iface); } static ULONG WINAPI fw_services_AddRef( @@ -469,10 +469,10 @@ fp = HeapAlloc( GetProcessHeap(), 0, sizeof(*fp) ); if (!fp) return E_OUTOFMEMORY; - fp->vtbl = &fw_services_vtbl; + fp->INetFwServices_iface.lpVtbl = &fw_services_vtbl; fp->refs = 1; - *ppObj = &fp->vtbl; + *ppObj = &fp->INetFwServices_iface; TRACE("returning iface %p\n", *ppObj); return S_OK; Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Jan 27 13:09:03 2012 @@ -64,7 +64,7 @@ reactos/dll/win32/gdiplus # Autosync reactos/dll/win32/hhctrl.ocx # Autosync reactos/dll/win32/hlink # Synced to Wine-1.3.37 -reactos/dll/win32/hnetcfg # Autosync +reactos/dll/win32/hnetcfg # Synced to Wine-1.3.37 reactos/dll/win32/httpapi # Synced to Wine-1.3.37 reactos/dll/win32/iccvid # Autosync reactos/dll/win32/icmp # Synced to Wine-0_9_10
12 years, 11 months
1
0
0
0
[janderwald] 55238: [USBHUB_NEW] - Rewrite GetDeviceIds function - Don't rely on hardcoded constants when building the device id strings - Don't corrupt the device id string when building the insta...
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Jan 27 12:29:18 2012 New Revision: 55238 URL:
http://svn.reactos.org/svn/reactos?rev=55238&view=rev
Log: [USBHUB_NEW] - Rewrite GetDeviceIds function - Don't rely on hardcoded constants when building the device id strings - Don't corrupt the device id string when building the instance id string - Fix bug in GetUsbStringDescriptor which read beyond the allocated string when copying the result. Modified: branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c branches/usb-bringup-trunk/drivers/usb/usbhub_new/pdo.c Modified: branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c [iso-8859-1] Fri Jan 27 12:29:18 2012 @@ -700,6 +700,7 @@ NTSTATUS Status; PUSB_STRING_DESCRIPTOR StringDesc = NULL; ULONG SizeNeeded; + LPWSTR Buffer; StringDesc = ExAllocatePoolWithTag(NonPagedPool, sizeof(USB_STRING_DESCRIPTOR), @@ -777,23 +778,29 @@ // // Allocate Buffer to return // - *TransferBuffer = ExAllocatePoolWithTag(NonPagedPool, - SizeNeeded, - USB_HUB_TAG); - if (!*TransferBuffer) + Buffer = ExAllocatePoolWithTag(NonPagedPool, + SizeNeeded, + USB_HUB_TAG); + if (!Buffer) { DPRINT1("Failed to allocate buffer for string!\n"); ExFreePool(StringDesc); return STATUS_INSUFFICIENT_RESOURCES; } - - RtlZeroMemory(*TransferBuffer, SizeNeeded); + DPRINT1("Buffer %p\n", Buffer); + RtlZeroMemory(Buffer, SizeNeeded); + + DPRINT1("Buffer %p\n", Buffer); + DPRINT1("SizeNeeded %lu\n", SizeNeeded); + DPRINT1("Offset %lu\n", FIELD_OFFSET(USB_STRING_DESCRIPTOR, bLength)); + DPRINT1("Length %lu\n", SizeNeeded - FIELD_OFFSET(USB_STRING_DESCRIPTOR, bLength)); // // Copy the string to destination // - RtlCopyMemory(*TransferBuffer, StringDesc->bString, SizeNeeded - FIELD_OFFSET(USB_STRING_DESCRIPTOR, bLength)); + RtlCopyMemory(Buffer, StringDesc->bString, SizeNeeded - FIELD_OFFSET(USB_STRING_DESCRIPTOR, bString)); *Size = SizeNeeded; + *TransferBuffer = Buffer; ExFreePool(StringDesc); @@ -852,9 +859,9 @@ PDEVICE_OBJECT UsbChildDeviceObject) { NTSTATUS Status = STATUS_SUCCESS; - ULONG Index; - PWCHAR BufferPtr; - WCHAR Buffer[100]; + ULONG Index = 0; + LPWSTR DeviceString; + WCHAR Buffer[200]; PHUB_CHILDDEVICE_EXTENSION UsbChildExtension; PUSB_DEVICE_DESCRIPTOR DeviceDescriptor; PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor; @@ -866,27 +873,6 @@ UsbChildExtension = (PHUB_CHILDDEVICE_EXTENSION)UsbChildDeviceObject->DeviceExtension; // - // Initialize the CompatibleIds String - // - UsbChildExtension->usCompatibleIds.Length = 188; //FIXME - UsbChildExtension->usCompatibleIds.MaximumLength = UsbChildExtension->usCompatibleIds.Length; - - // - // allocate mem for compatible id string - // - BufferPtr = ExAllocatePoolWithTag(NonPagedPool, - UsbChildExtension->usCompatibleIds.Length, - USB_HUB_TAG); - if (!BufferPtr) - { - DPRINT1("Failed to allocate memory\n"); - return STATUS_INSUFFICIENT_RESOURCES; - } - - RtlZeroMemory(BufferPtr, UsbChildExtension->usCompatibleIds.Length); - Index = 0; - - // // get device descriptor // DeviceDescriptor = &UsbChildExtension->DeviceDesc; @@ -897,9 +883,10 @@ ConfigurationDescriptor = UsbChildExtension->FullConfigDesc; // - // get interface descriptor - // - InterfaceDescriptor = (PUSB_INTERFACE_DESCRIPTOR)(ConfigurationDescriptor + 1); + // use first interface descriptor available + // + InterfaceDescriptor = USBD_ParseConfigurationDescriptorEx(ConfigurationDescriptor, ConfigurationDescriptor, 0, -1, -1, -1, -1); + ASSERT(InterfaceDescriptor); // // Construct the CompatibleIds @@ -911,17 +898,16 @@ // ASSERT(DeviceDescriptor->bNumConfigurations == 1); ASSERT(ConfigurationDescriptor->bNumInterfaces > 1); - - Index += swprintf(&BufferPtr[Index], + Index += swprintf(&Buffer[Index], L"USB\\DevClass_%02x&SubClass_%02x&Prot_%02x", DeviceDescriptor->bDeviceClass, DeviceDescriptor->bDeviceSubClass, DeviceDescriptor->bDeviceProtocol) + 1; - Index += swprintf(&BufferPtr[Index], + Index += swprintf(&Buffer[Index], L"USB\\DevClass_%02x&SubClass_%02x", DeviceDescriptor->bDeviceClass, DeviceDescriptor->bDeviceSubClass) + 1; - Index += swprintf(&BufferPtr[Index], + Index += swprintf(&Buffer[Index], L"USB\\DevClass_%02x", DeviceDescriptor->bDeviceClass) + 1; - Index += swprintf(&BufferPtr[Index], + Index += swprintf(&Buffer[Index], L"USB\\COMPOSITE") + 1; } else @@ -938,85 +924,109 @@ if (DeviceDescriptor->bDeviceClass == 0) { - Index += swprintf(&BufferPtr[Index], + Index += swprintf(&Buffer[Index], L"USB\\Class_%02x&SubClass_%02x&Prot_%02x", InterfaceDescriptor->bInterfaceClass, InterfaceDescriptor->bInterfaceSubClass, InterfaceDescriptor->bInterfaceProtocol) + 1; - Index += swprintf(&BufferPtr[Index], + Index += swprintf(&Buffer[Index], L"USB\\Class_%02x&SubClass_%02x", InterfaceDescriptor->bInterfaceClass, InterfaceDescriptor->bInterfaceSubClass) + 1; - Index += swprintf(&BufferPtr[Index], + Index += swprintf(&Buffer[Index], L"USB\\Class_%02x", InterfaceDescriptor->bInterfaceClass) + 1; } else { - Index += swprintf(&BufferPtr[Index], + Index += swprintf(&Buffer[Index], L"USB\\Class_%02x&SubClass_%02x&Prot_%02x", DeviceDescriptor->bDeviceClass, DeviceDescriptor->bDeviceSubClass, DeviceDescriptor->bDeviceProtocol) + 1; - Index += swprintf(&BufferPtr[Index], + Index += swprintf(&Buffer[Index], L"USB\\Class_%02x&SubClass_%02x", DeviceDescriptor->bDeviceClass, DeviceDescriptor->bDeviceSubClass) + 1; - Index += swprintf(&BufferPtr[Index], + Index += swprintf(&Buffer[Index], L"USB\\Class_%02x", DeviceDescriptor->bDeviceClass) + 1; - - - } - } - - BufferPtr[Index] = UNICODE_NULL; - UsbChildExtension->usCompatibleIds.Buffer = BufferPtr; + } + } + + // + // now allocate the buffer + // + DeviceString = ExAllocatePool(NonPagedPool, (Index + 1) * sizeof(WCHAR)); + if (!DeviceString) + { + // + // no memory + // + return STATUS_INSUFFICIENT_RESOURCES; + } + + // + // copy buffer + // + RtlCopyMemory(DeviceString, Buffer, Index * sizeof(WCHAR)); + DeviceString[Index] = UNICODE_NULL; + UsbChildExtension->usCompatibleIds.Buffer = DeviceString; + UsbChildExtension->usCompatibleIds.Length = Index * sizeof(WCHAR); + UsbChildExtension->usCompatibleIds.MaximumLength = (Index + 1) * sizeof(WCHAR); DPRINT1("usCompatibleIds %wZ\n", &UsbChildExtension->usCompatibleIds); // - // Initialize the DeviceId String - // - UsbChildExtension->usDeviceId.Length = 44; - UsbChildExtension->usDeviceId.MaximumLength = UsbChildExtension->usDeviceId.Length; - BufferPtr = ExAllocatePoolWithTag(NonPagedPool, - UsbChildExtension->usDeviceId.Length, - USB_HUB_TAG); - if (!BufferPtr) - { - DPRINT1("Failed to allocate memory\n"); - Status = STATUS_INSUFFICIENT_RESOURCES; - goto Cleanup; - } - - // - // Construct DeviceId - // - swprintf(BufferPtr, L"USB\\Vid_%04x&Pid_%04x\0", UsbChildExtension->DeviceDesc.idVendor, UsbChildExtension->DeviceDesc.idProduct); - UsbChildExtension->usDeviceId.Buffer = BufferPtr; + // Construct DeviceId string + // + Index = swprintf(Buffer, L"USB\\Vid_%04x&Pid_%04x", UsbChildExtension->DeviceDesc.idVendor, UsbChildExtension->DeviceDesc.idProduct) + 1; + + // + // now allocate the buffer + // + DeviceString = ExAllocatePool(NonPagedPool, Index * sizeof(WCHAR)); + if (!DeviceString) + { + // + // no memory + // + return STATUS_INSUFFICIENT_RESOURCES; + } + + // + // copy buffer + // + RtlCopyMemory(DeviceString, Buffer, Index * sizeof(WCHAR)); + UsbChildExtension->usDeviceId.Buffer = DeviceString; + UsbChildExtension->usDeviceId.Length = (Index-1) * sizeof(WCHAR); + UsbChildExtension->usDeviceId.MaximumLength = Index * sizeof(WCHAR); DPRINT1("usDeviceId %wZ\n", &UsbChildExtension->usDeviceId); // - // Initialize the HardwareId String - // - UsbChildExtension->usHardwareIds.Length = 110; - UsbChildExtension->usHardwareIds.MaximumLength = UsbChildExtension->usHardwareIds.Length; - BufferPtr = ExAllocatePoolWithTag(NonPagedPool, UsbChildExtension->usHardwareIds.Length, USB_HUB_TAG); - if (!BufferPtr) - { - DPRINT1("Failed to allocate memory\n"); - Status = STATUS_INSUFFICIENT_RESOURCES; - goto Cleanup; - } - - RtlZeroMemory(BufferPtr, UsbChildExtension->usHardwareIds.Length); - - // - // Consturct HardwareIds + // Construct HardwareIds // Index = 0; - Index += swprintf(&BufferPtr[Index], + Index += swprintf(&Buffer[Index], L"USB\\Vid_%04x&Pid_%04x&Rev_%04x", UsbChildExtension->DeviceDesc.idVendor, UsbChildExtension->DeviceDesc.idProduct, UsbChildExtension->DeviceDesc.bcdDevice) + 1; - Index += swprintf(&BufferPtr[Index], + Index += swprintf(&Buffer[Index], L"USB\\Vid_%04x&Pid_%04x", UsbChildExtension->DeviceDesc.idVendor, UsbChildExtension->DeviceDesc.idProduct) + 1; - BufferPtr[Index] = UNICODE_NULL; - UsbChildExtension->usHardwareIds.Buffer = BufferPtr; + + // + // now allocate the buffer + // + DeviceString = ExAllocatePool(NonPagedPool, (Index + 1) * sizeof(WCHAR)); + if (!DeviceString) + { + // + // no memory + // + return STATUS_INSUFFICIENT_RESOURCES; + } + + // + // copy buffer + // + RtlCopyMemory(DeviceString, Buffer, Index * sizeof(WCHAR)); + DeviceString[Index] = UNICODE_NULL; + UsbChildExtension->usHardwareIds.Buffer = DeviceString; + UsbChildExtension->usHardwareIds.Length = (Index + 1) * sizeof(WCHAR); + UsbChildExtension->usHardwareIds.MaximumLength = (Index + 1) * sizeof(WCHAR); DPRINT1("usHardWareIds %wZ\n", &UsbChildExtension->usHardwareIds); // @@ -1036,7 +1046,7 @@ if (!NT_SUCCESS(Status)) { DPRINT1("USBHUB: GetUsbStringDescriptor failed with status %x\n", Status); - goto Cleanup; + return Status; } UsbChildExtension->usTextDescription.MaximumLength = UsbChildExtension->usTextDescription.Length; @@ -1056,7 +1066,7 @@ if (!NT_SUCCESS(Status)) { DPRINT1("USBHUB: GetUsbStringDescriptor failed with status %x\n", Status); - goto Cleanup; + return Status; } UsbChildExtension->usInstanceId.MaximumLength = UsbChildExtension->usInstanceId.Length; @@ -1073,35 +1083,17 @@ { DPRINT1("Error: failed to allocate %lu bytes\n", Index * sizeof(WCHAR)); Status = STATUS_INSUFFICIENT_RESOURCES; - goto Cleanup; + return Status; } // // copy instance id // RtlCopyMemory(UsbChildExtension->usInstanceId.Buffer, Buffer, Index * sizeof(WCHAR)); - UsbChildExtension->usInstanceId.Length = UsbChildExtension->usDeviceId.MaximumLength = Index * sizeof(WCHAR); + UsbChildExtension->usInstanceId.Length = UsbChildExtension->usInstanceId.MaximumLength = Index * sizeof(WCHAR); DPRINT1("usDeviceId %wZ\n", &UsbChildExtension->usInstanceId); } - - - return Status; - -Cleanup: - // - // Free Memory - // - if (UsbChildExtension->usCompatibleIds.Buffer) - ExFreePool(UsbChildExtension->usCompatibleIds.Buffer); - if (UsbChildExtension->usDeviceId.Buffer) - ExFreePool(UsbChildExtension->usDeviceId.Buffer); - if (UsbChildExtension->usHardwareIds.Buffer) - ExFreePool(UsbChildExtension->usHardwareIds.Buffer); - if (UsbChildExtension->usTextDescription.Buffer) - ExFreePool(UsbChildExtension->usTextDescription.Buffer); - if (UsbChildExtension->usInstanceId.Buffer) - ExFreePool(UsbChildExtension->usInstanceId.Buffer); return Status; } Modified: branches/usb-bringup-trunk/drivers/usb/usbhub_new/pdo.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbhub_new/pdo.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbhub_new/pdo.c [iso-8859-1] Fri Jan 27 12:29:18 2012 @@ -393,9 +393,22 @@ if (SourceString) { - ReturnString = ExAllocatePool(PagedPool, SourceString->Length); - RtlCopyMemory(ReturnString, SourceString->Buffer, SourceString->Length); - DPRINT1("%S\n", ReturnString); + // + // allocate buffer + // + ReturnString = ExAllocatePool(PagedPool, SourceString->MaximumLength); + if (!ReturnString) + { + // + // no memory + // + return STATUS_INSUFFICIENT_RESOURCES; + } + + // + // copy buffer + // + RtlCopyMemory(ReturnString, SourceString->Buffer, SourceString->MaximumLength); } *Information = (ULONG_PTR)ReturnString;
12 years, 11 months
1
0
0
0
← Newer
1
...
9
10
11
12
13
14
15
...
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