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
November 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
11 participants
124 discussions
Start a n
N
ew thread
[hbelusca] 57685: [CONSRV] Add a new header containing per-process console-specific structure CSRSS_CON_PROCESS_DATA (it is stored inside one of the element of the ServerData array inside the CSR_P...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Nov 7 21:04:47 2012 New Revision: 57685 URL:
http://svn.reactos.org/svn/reactos?rev=57685&view=rev
Log: [CONSRV] Add a new header containing per-process console-specific structure CSRSS_CON_PROCESS_DATA (it is stored inside one of the element of the ServerData array inside the CSR_PROCESS structure). It was deleted from csrsrv.h in revision r57673 and reappears here. Also add a macro in order to facilitate its access inside consrv. Added: branches/ros-csrss/include/reactos/subsys/win/console.h (with props) Added: branches/ros-csrss/include/reactos/subsys/win/console.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/include/reactos/subsy…
============================================================================== --- branches/ros-csrss/include/reactos/subsys/win/console.h (added) +++ branches/ros-csrss/include/reactos/subsys/win/console.h [iso-8859-1] Wed Nov 7 21:04:47 2012 @@ -1,0 +1,34 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Client/Server Runtime SubSystem + * FILE: include/reactos/subsys/win/console.h + * PURPOSE: Public definitions for Console API Clients + * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca(a)sfr.fr) + */ + +#ifndef _CONSOLE_H +#define _CONSOLE_H + +#pragma once + +#define ConsoleGetPerProcessData(pcsrprocess) \ + ((PCONSOLE_PROCESS_DATA)((pcsrprocess)->ServerData[CONSRV_SERVERDLL_INDEX])) + + +typedef struct _CONSOLE_PROCESS_DATA +{ + LIST_ENTRY ConsoleLink; + PCSR_PROCESS Process; // Parent process. + HANDLE ConsoleEvent; + /* PCSRSS_CONSOLE */ struct tagCSRSS_CONSOLE* Console; + /* PCSRSS_CONSOLE */ struct tagCSRSS_CONSOLE* ParentConsole; + BOOL bInheritHandles; + RTL_CRITICAL_SECTION HandleTableLock; + ULONG HandleTableSize; + /* PCSRSS_HANDLE */ struct _CSRSS_HANDLE* HandleTable; // Is it a length-varying table or length-fixed ?? + LPTHREAD_START_ROUTINE CtrlDispatcher; +} CONSOLE_PROCESS_DATA, *PCONSOLE_PROCESS_DATA; + +#endif // _CONSOLE_H + +/* EOF */ Propchange: branches/ros-csrss/include/reactos/subsys/win/console.h ------------------------------------------------------------------------------ svn:eol-style = native
12 years, 1 month
1
0
0
0
[ekohl] 57684: [NETAPI32] NetLocalGroupEnum: Make sure that built-in aliases are retrieved once and only one alias is enumerated upon each consecutive call. Retrieve name and comment for each alias.
by ekohl@svn.reactos.org
Author: ekohl Date: Wed Nov 7 18:51:38 2012 New Revision: 57684 URL:
http://svn.reactos.org/svn/reactos?rev=57684&view=rev
Log: [NETAPI32] NetLocalGroupEnum: Make sure that built-in aliases are retrieved once and only one alias is enumerated upon each consecutive call. Retrieve name and comment for each alias. Modified: trunk/reactos/dll/win32/netapi32/local_group.c Modified: trunk/reactos/dll/win32/netapi32/local_group.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/local_g…
============================================================================== --- trunk/reactos/dll/win32/netapi32/local_group.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/local_group.c [iso-8859-1] Wed Nov 7 18:51:38 2012 @@ -49,8 +49,10 @@ SAM_HANDLE AccountDomainHandle; SAM_ENUMERATE_HANDLE EnumerationContext; - PSAM_RID_ENUMERATION EnumBuffer; - ULONG EnumReturned; + PSAM_RID_ENUMERATION Buffer; + ULONG Returned; + ULONG Index; + BOOLEAN BuiltinDone; } ENUM_CONTEXT, *PENUM_CONTEXT; @@ -241,9 +243,12 @@ LPDWORD totalentries, PDWORD_PTR resumehandle) { + PSAM_RID_ENUMERATION CurrentAlias; PENUM_CONTEXT EnumContext = NULL; PSID DomainSid = NULL; ULONG i; + SAM_HANDLE AliasHandle = NULL; + PALIAS_GENERAL_INFORMATION AliasInfo = NULL; NET_API_STATUS ApiStatus = NERR_Success; NTSTATUS Status = STATUS_SUCCESS; @@ -267,8 +272,10 @@ goto done; EnumContext->EnumerationContext = 0; - EnumContext->EnumBuffer = NULL; - EnumContext->EnumReturned = 0; + EnumContext->Buffer = NULL; + EnumContext->Returned = 0; + EnumContext->Index = 0; + EnumContext->BuiltinDone = FALSE; Status = SamConnect(NULL, &EnumContext->ServerHandle, @@ -290,7 +297,7 @@ } Status = SamOpenDomain(EnumContext->ServerHandle, - DOMAIN_LIST_ACCOUNTS, + DOMAIN_LIST_ACCOUNTS | DOMAIN_LOOKUP, DomainSid, &EnumContext->AccountDomainHandle); @@ -312,7 +319,7 @@ } Status = SamOpenDomain(EnumContext->ServerHandle, - DOMAIN_LIST_ACCOUNTS, + DOMAIN_LIST_ACCOUNTS | DOMAIN_LOOKUP, DomainSid, &EnumContext->BuiltinDomainHandle); @@ -326,40 +333,96 @@ } } + while (TRUE) { - Status = SamEnumerateAliasesInDomain(EnumContext->BuiltinDomainHandle, - &EnumContext->EnumerationContext, - (PVOID *)&EnumContext->EnumBuffer, - prefmaxlen, - &EnumContext->EnumReturned); - - TRACE("SamEnumerateAliasesInDomain returned (Status %08lx)\n", Status); - - if (!NT_SUCCESS(Status)) - { - ERR("SamEnumerateAliasesInDomain failed (Status %08lx)\n", Status); - ApiStatus = NetpNtStatusToApiStatus(Status); - goto done; + + if (EnumContext->Index >= EnumContext->Returned) + { + if (EnumContext->BuiltinDone == TRUE) + { + ApiStatus = NERR_Success; + goto done; + } + + TRACE("Calling SamEnumerateAliasesInDomain\n"); + + Status = SamEnumerateAliasesInDomain(EnumContext->BuiltinDomainHandle, + &EnumContext->EnumerationContext, + (PVOID *)&EnumContext->Buffer, + prefmaxlen, + &EnumContext->Returned); + + TRACE("SamEnumerateAliasesInDomain returned (Status %08lx)\n", Status); + if (!NT_SUCCESS(Status)) + { + ERR("SamEnumerateAliasesInDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + if (Status == STATUS_MORE_ENTRIES) + { + ApiStatus = NERR_BufTooSmall; + goto done; + } + else + { + EnumContext->BuiltinDone = TRUE; + } } TRACE("EnumContext: %lu\n", EnumContext); - TRACE("EnumReturned: %lu\n", EnumContext->EnumReturned); - TRACE("EnumBuffer: %p\n", EnumContext->EnumBuffer); - - for (i = 0; i < EnumContext->EnumReturned; i++) - { - TRACE("RID: %lu\n", EnumContext->EnumBuffer[i].RelativeId); - TRACE("Name: %p\n", EnumContext->EnumBuffer[i].Name.Buffer); - TRACE("Name: %S\n", EnumContext->EnumBuffer[i].Name.Buffer); - if (EnumContext->EnumBuffer[i].Name.Buffer != NULL) - { - TRACE("Name: %hx\n", EnumContext->EnumBuffer[i].Name.Buffer[0]); - } - } - - if (Status != STATUS_MORE_ENTRIES) - break; + TRACE("EnumContext->Returned: %lu\n", EnumContext->Returned); + TRACE("EnumContext->Buffer: %p\n", EnumContext->Buffer); + + /* Get a pointer to the current alias */ + CurrentAlias = &EnumContext->Buffer[EnumContext->Index]; + + TRACE("RID: %lu\n", CurrentAlias->RelativeId); + + Status = SamOpenAlias(EnumContext->BuiltinDomainHandle, + ALIAS_READ_INFORMATION, + CurrentAlias->RelativeId, + &AliasHandle); + if (!NT_SUCCESS(Status)) + { + ERR("SamOpenAlias failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + Status = SamQueryInformationAlias(AliasHandle, + AliasGeneralInformation, + (PVOID *)&AliasInfo); + if (!NT_SUCCESS(Status)) + { + ERR("SamQueryInformationAlias failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + SamCloseHandle(AliasHandle); + AliasHandle = NULL; + + TRACE("Name: %S\n", AliasInfo->Name.Buffer); + TRACE("Comment: %S\n", AliasInfo->AdminComment.Buffer); + + + if (AliasInfo != NULL) + { + if (AliasInfo->Name.Buffer != NULL) + SamFreeMemory(AliasInfo->Name.Buffer); + + if (AliasInfo->AdminComment.Buffer != NULL) + SamFreeMemory(AliasInfo->AdminComment.Buffer); + + SamFreeMemory(AliasInfo); + AliasInfo = NULL; + } + + + EnumContext->Index++; } @@ -377,14 +440,14 @@ if (EnumContext->ServerHandle != NULL) SamCloseHandle(EnumContext->ServerHandle); - if (EnumContext->EnumBuffer != NULL) + if (EnumContext->Buffer != NULL) { - for (i = 0; i < EnumContext->EnumReturned; i++) + for (i = 0; i < EnumContext->Returned; i++) { - SamFreeMemory(EnumContext->EnumBuffer[i].Name.Buffer); + SamFreeMemory(EnumContext->Buffer[i].Name.Buffer); } - SamFreeMemory(EnumContext->EnumBuffer); + SamFreeMemory(EnumContext->Buffer); } NetApiBufferFree(EnumContext); @@ -392,6 +455,19 @@ } } + if (AliasHandle != NULL) + SamCloseHandle(AliasHandle); + + if (AliasInfo != NULL) + { + if (AliasInfo->Name.Buffer != NULL) + SamFreeMemory(AliasInfo->Name.Buffer); + + if (AliasInfo->AdminComment.Buffer != NULL) + SamFreeMemory(AliasInfo->AdminComment.Buffer); + + SamFreeMemory(AliasInfo); + } if (resumehandle != NULL) *resumehandle = (DWORD_PTR)EnumContext;
12 years, 1 month
1
0
0
0
[ekohl] 57683: [SAMSRV] Fix build.
by ekohl@svn.reactos.org
Author: ekohl Date: Tue Nov 6 23:47:43 2012 New Revision: 57683 URL:
http://svn.reactos.org/svn/reactos?rev=57683&view=rev
Log: [SAMSRV] Fix build. Modified: trunk/reactos/dll/win32/samsrv/samrpc.c Modified: trunk/reactos/dll/win32/samsrv/samrpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/samrpc.c?…
============================================================================== --- trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] Tue Nov 6 23:47:43 2012 @@ -3827,8 +3827,6 @@ return Status; } - AliasObject->Special.Alias.RelativeId = AliasId; - *AliasHandle = (SAMPR_HANDLE)AliasObject; return STATUS_SUCCESS;
12 years, 1 month
1
0
0
0
[ekohl] 57682: [SAMSRV] SamrQueryInformationAlias: When retrieving general information, return a member count of zero if the members sub key does not exist.
by ekohl@svn.reactos.org
Author: ekohl Date: Tue Nov 6 23:39:59 2012 New Revision: 57682 URL:
http://svn.reactos.org/svn/reactos?rev=57682&view=rev
Log: [SAMSRV] SamrQueryInformationAlias: When retrieving general information, return a member count of zero if the members sub key does not exist. Modified: trunk/reactos/dll/win32/samsrv/samrpc.c Modified: trunk/reactos/dll/win32/samsrv/samrpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/samrpc.c?…
============================================================================== --- trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] Tue Nov 6 23:39:59 2012 @@ -154,6 +154,7 @@ UNIMPLEMENTED; return STATUS_NOT_IMPLEMENTED; } + /* Function 5 */ NTSTATUS @@ -263,6 +264,7 @@ return Status; } + /* Function 6 */ NTSTATUS @@ -3825,6 +3827,8 @@ return Status; } + AliasObject->Special.Alias.RelativeId = AliasId; + *AliasHandle = (SAMPR_HANDLE)AliasObject; return STATUS_SUCCESS; @@ -3868,17 +3872,24 @@ L"Members", KEY_READ, &MembersKeyHandle); - if (!NT_SUCCESS(Status)) - { - TRACE("Status 0x%08lx\n", Status); - goto done; - } - - /* Retrieve the number of members of the alias */ - Status = SampRegQueryKeyInfo(MembersKeyHandle, - NULL, - &InfoBuffer->General.MemberCount); - if (!NT_SUCCESS(Status)) + if (NT_SUCCESS(Status)) + { + /* Retrieve the number of members of the alias */ + Status = SampRegQueryKeyInfo(MembersKeyHandle, + NULL, + &InfoBuffer->General.MemberCount); + if (!NT_SUCCESS(Status)) + { + TRACE("Status 0x%08lx\n", Status); + goto done; + } + } + else if (Status == STATUS_OBJECT_NAME_NOT_FOUND) + { + InfoBuffer->General.MemberCount = 0; + Status = STATUS_SUCCESS; + } + else { TRACE("Status 0x%08lx\n", Status); goto done;
12 years, 1 month
1
0
0
0
[jgardou] 57681: [USER32_APITEST] - Test behaviour with icons handle from foreign process
by jgardou@svn.reactos.org
Author: jgardou Date: Tue Nov 6 14:27:03 2012 New Revision: 57681 URL:
http://svn.reactos.org/svn/reactos?rev=57681&view=rev
Log: [USER32_APITEST] - Test behaviour with icons handle from foreign process Modified: trunk/rostests/apitests/user32/LoadImage.c Modified: trunk/rostests/apitests/user32/LoadImage.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/LoadImage…
============================================================================== --- trunk/rostests/apitests/user32/LoadImage.c [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/LoadImage.c [iso-8859-1] Tue Nov 6 14:27:03 2012 @@ -21,10 +21,48 @@ if (argc >= 3) { HANDLE arg; + HICON hCopy; + HBITMAP hbmp; + HDC hdc, hdcScreen; + ICONINFO ii; sscanf (test_argv[2], "%lu", (ULONG_PTR*) &arg); ok(handle != arg, "Got same handles\n"); + + /* Try copying it */ + hCopy = CopyIcon(arg); + ok(hCopy != NULL, "\n"); + ok(DestroyIcon(hCopy), "\n"); + + hCopy = CopyImage(arg, IMAGE_CURSOR, 0, 0, 0); + ok(hCopy != NULL, "\n"); + ok(DestroyIcon(hCopy), "\n"); + + hCopy = CopyImage(arg, IMAGE_CURSOR, 0, 0, LR_COPYFROMRESOURCE); + ok(hCopy != NULL, "\n"); + ok(DestroyIcon(hCopy), "\n"); + + /* Try various usual functions */ + hdcScreen = CreateDCW(L"DISPLAY", NULL, NULL, NULL); + ok(hdcScreen != NULL, "\n"); + hdc = CreateCompatibleDC(hdcScreen); + ok(hdc != NULL, "\n"); + hbmp = CreateCompatibleBitmap(hdcScreen, 64, 64); + ok(hbmp != NULL, "\n"); + hbmp = SelectObject(hdc, hbmp); + ok(hbmp != NULL, "\n"); + + ok(DrawIcon(hdc, 0, 0, arg), "\n"); + hbmp = SelectObject(hdc, hbmp); + DeleteObject(hbmp); + DeleteDC(hdc); + DeleteDC(hdcScreen); + + ok(GetIconInfo(arg, &ii), "\n"); + ok(ii.hbmMask != NULL, "\n"); + DeleteObject(ii.hbmMask); + if(ii.hbmColor) DeleteObject(ii.hbmColor); return; } @@ -35,4 +73,4 @@ si.cb = sizeof(si); CreateProcessA( NULL, path, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi ); WaitForSingleObject (pi.hProcess, INFINITE); -} +}
12 years, 1 month
1
0
0
0
[jgardou] 57680: [USER32] - Link to msvcrtex in MSC builds
by jgardou@svn.reactos.org
Author: jgardou Date: Mon Nov 5 23:29:52 2012 New Revision: 57680 URL:
http://svn.reactos.org/svn/reactos?rev=57680&view=rev
Log: [USER32] - Link to msvcrtex in MSC builds Modified: trunk/reactos/win32ss/user/user32/CMakeLists.txt Modified: trunk/reactos/win32ss/user/user32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/CMakeL…
============================================================================== --- trunk/reactos/win32ss/user/user32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/CMakeLists.txt [iso-8859-1] Mon Nov 5 23:29:52 2012 @@ -82,6 +82,11 @@ win32ksys ${PSEH_LIB}) +if(MSVC) + # for __ftol2_sse, float to int cast helper + target_link_libraries(user32 msvcrtex) +endif() + add_delay_importlibs(user32 imm32 usp10) add_importlibs(user32 gdi32 advapi32 kernel32 ntdll) add_pch(user32 include/user32.h)
12 years, 1 month
1
0
0
0
[jgardou] 57679: [USER32] - Avoid more rounding issues and hopefully fix MSC build
by jgardou@svn.reactos.org
Author: jgardou Date: Mon Nov 5 22:51:32 2012 New Revision: 57679 URL:
http://svn.reactos.org/svn/reactos?rev=57679&view=rev
Log: [USER32] - Avoid more rounding issues and hopefully fix MSC build Modified: trunk/reactos/win32ss/user/user32/controls/edit.c Modified: trunk/reactos/win32ss/user/user32/controls/edit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/contro…
============================================================================== --- trunk/reactos/win32ss/user/user32/controls/edit.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/controls/edit.c [iso-8859-1] Mon Nov 5 22:51:32 2012 @@ -400,7 +400,7 @@ tabdef.pTabStops = es->tabs; tabdef.iTabOrigin = 0; - ScriptStringAnalyse(udc, &es->text[index], line_def->net_length, (1.5*line_def->net_length+16), -1, SSA_LINK|SSA_FALLBACK|SSA_GLYPHS|SSA_TAB, -1, NULL, NULL, NULL, &tabdef, NULL, &line_def->ssa); + ScriptStringAnalyse(udc, &es->text[index], line_def->net_length, (3*line_def->net_length/2+16), -1, SSA_LINK|SSA_FALLBACK|SSA_GLYPHS|SSA_TAB, -1, NULL, NULL, NULL, &tabdef, NULL, &line_def->ssa); if (es->font) SelectObject(udc, old_font);
12 years, 1 month
1
0
0
0
[ekohl] 57678: [NETAPI32] Start the implementation of NetpNtStatusToApiStatus and NetLocalGroupEnum.
by ekohl@svn.reactos.org
Author: ekohl Date: Mon Nov 5 22:51:08 2012 New Revision: 57678 URL:
http://svn.reactos.org/svn/reactos?rev=57678&view=rev
Log: [NETAPI32] Start the implementation of NetpNtStatusToApiStatus and NetLocalGroupEnum. Added: trunk/reactos/dll/win32/netapi32/netapi32.h (with props) Modified: trunk/reactos/dll/win32/netapi32/CMakeLists.txt trunk/reactos/dll/win32/netapi32/local_group.c trunk/reactos/dll/win32/netapi32/netapi32.c trunk/reactos/dll/win32/netapi32/netapi32.spec Modified: trunk/reactos/dll/win32/netapi32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/netapi32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/CMakeLists.txt [iso-8859-1] Mon Nov 5 22:51:08 2012 @@ -28,5 +28,7 @@ add_importlibs(netapi32 iphlpapi ws2_32 advapi32 msvcrt kernel32 ntdll) +add_delay_importlibs(netapi32 samlib) + add_cd_file(TARGET netapi32 DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/win32/netapi32/local_group.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/local_g…
============================================================================== --- trunk/reactos/dll/win32/netapi32/local_group.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/local_group.c [iso-8859-1] Mon Nov 5 22:51:08 2012 @@ -34,7 +34,119 @@ #include "wine/debug.h" #include "wine/unicode.h" +#define NTOS_MODE_USER +#include <ndk/rtlfuncs.h> +#include "ntsam.h" +#include "netapi32.h" + WINE_DEFAULT_DEBUG_CHANNEL(netapi32); + + +typedef struct _ENUM_CONTEXT +{ + SAM_HANDLE ServerHandle; + SAM_HANDLE BuiltinDomainHandle; + SAM_HANDLE AccountDomainHandle; + + SAM_ENUMERATE_HANDLE EnumerationContext; + PSAM_RID_ENUMERATION EnumBuffer; + ULONG EnumReturned; + +} ENUM_CONTEXT, *PENUM_CONTEXT; + +static SID_IDENTIFIER_AUTHORITY NtAuthority = {SECURITY_NT_AUTHORITY}; + + +static +NTSTATUS +GetAccountDomainSid(PSID *AccountDomainSid) +{ + PPOLICY_ACCOUNT_DOMAIN_INFO AccountDomainInfo = NULL; + LSA_OBJECT_ATTRIBUTES ObjectAttributes; + LSA_HANDLE PolicyHandle = NULL; + ULONG Length = 0; + NTSTATUS Status; + + memset(&ObjectAttributes, 0, sizeof(LSA_OBJECT_ATTRIBUTES)); + + Status = LsaOpenPolicy(NULL, + &ObjectAttributes, + POLICY_VIEW_LOCAL_INFORMATION, + &PolicyHandle); + if (!NT_SUCCESS(Status)) + { + ERR("LsaOpenPolicy failed (Status %08lx)\n", Status); + return Status; + } + + Status = LsaQueryInformationPolicy(PolicyHandle, + PolicyAccountDomainInformation, + (PVOID *)&AccountDomainInfo); + if (!NT_SUCCESS(Status)) + { + ERR("LsaQueryInformationPolicy failed (Status %08lx)\n", Status); + goto done; + } + + Length = RtlLengthSid(AccountDomainInfo->DomainSid); + + *AccountDomainSid = RtlAllocateHeap(RtlGetProcessHeap(), 0, Length); + if (*AccountDomainSid == NULL) + { + ERR("Failed to allocate SID\n"); + Status = STATUS_INSUFFICIENT_RESOURCES; + goto done; + } + + memcpy(*AccountDomainSid, AccountDomainInfo->DomainSid, Length); + +done: + if (AccountDomainInfo != NULL) + LsaFreeMemory(AccountDomainInfo); + + LsaClose(PolicyHandle); + + return Status; +} + + +static +NTSTATUS +GetBuiltinDomainSid(PSID *BuiltinDomainSid) +{ + PSID Sid = NULL; + PULONG Ptr; + NTSTATUS Status = STATUS_SUCCESS; + + *BuiltinDomainSid = NULL; + + Sid = RtlAllocateHeap(RtlGetProcessHeap(), + 0, + RtlLengthRequiredSid(1)); + if (Sid == NULL) + return STATUS_INSUFFICIENT_RESOURCES; + + Status = RtlInitializeSid(Sid, + &NtAuthority, + 1); + if (!NT_SUCCESS(Status)) + goto done; + + Ptr = RtlSubAuthoritySid(Sid, 0); + *Ptr = SECURITY_BUILTIN_DOMAIN_RID; + + *BuiltinDomainSid = Sid; + +done: + if (!NT_SUCCESS(Status)) + { + if (Sid != NULL) + RtlFreeHeap(RtlGetProcessHeap(), 0, Sid); + } + + return Status; +} + /************************************************************ * NetLocalGroupAdd (NETAPI32.@) @@ -129,11 +241,162 @@ LPDWORD totalentries, PDWORD_PTR resumehandle) { + PENUM_CONTEXT EnumContext = NULL; + PSID DomainSid = NULL; + ULONG i; + + NET_API_STATUS ApiStatus = NERR_Success; + NTSTATUS Status = STATUS_SUCCESS; + + FIXME("(%s %d %p %d %p %p %p) stub!\n", debugstr_w(servername), level, bufptr, prefmaxlen, entriesread, totalentries, resumehandle); + *entriesread = 0; *totalentries = 0; - return NERR_Success; + *bufptr = NULL; + + if (resumehandle != NULL && *resumehandle != 0) + { + EnumContext = (PENUM_CONTEXT)resumehandle; + } + else + { + ApiStatus = NetApiBufferAllocate(sizeof(ENUM_CONTEXT), (PVOID*)&EnumContext); + if (ApiStatus != NERR_Success) + goto done; + + EnumContext->EnumerationContext = 0; + EnumContext->EnumBuffer = NULL; + EnumContext->EnumReturned = 0; + + Status = SamConnect(NULL, + &EnumContext->ServerHandle, + SAM_SERVER_CONNECT | SAM_SERVER_LOOKUP_DOMAIN, + NULL); + if (!NT_SUCCESS(Status)) + { + ERR("SamConnect failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + Status = GetAccountDomainSid(&DomainSid); + if (!NT_SUCCESS(Status)) + { + ERR("GetAccountDomainSid failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + Status = SamOpenDomain(EnumContext->ServerHandle, + DOMAIN_LIST_ACCOUNTS, + DomainSid, + &EnumContext->AccountDomainHandle); + + RtlFreeHeap(RtlGetProcessHeap(), 0, DomainSid); + + if (!NT_SUCCESS(Status)) + { + ERR("SamOpenDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + Status = GetBuiltinDomainSid(&DomainSid); + if (!NT_SUCCESS(Status)) + { + ERR("GetAccountDomainSid failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + Status = SamOpenDomain(EnumContext->ServerHandle, + DOMAIN_LIST_ACCOUNTS, + DomainSid, + &EnumContext->BuiltinDomainHandle); + + RtlFreeHeap(RtlGetProcessHeap(), 0, DomainSid); + + if (!NT_SUCCESS(Status)) + { + ERR("SamOpenDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + } + + while (TRUE) + { + Status = SamEnumerateAliasesInDomain(EnumContext->BuiltinDomainHandle, + &EnumContext->EnumerationContext, + (PVOID *)&EnumContext->EnumBuffer, + prefmaxlen, + &EnumContext->EnumReturned); + + TRACE("SamEnumerateAliasesInDomain returned (Status %08lx)\n", Status); + + if (!NT_SUCCESS(Status)) + { + ERR("SamEnumerateAliasesInDomain failed (Status %08lx)\n", Status); + ApiStatus = NetpNtStatusToApiStatus(Status); + goto done; + } + + TRACE("EnumContext: %lu\n", EnumContext); + TRACE("EnumReturned: %lu\n", EnumContext->EnumReturned); + TRACE("EnumBuffer: %p\n", EnumContext->EnumBuffer); + + for (i = 0; i < EnumContext->EnumReturned; i++) + { + TRACE("RID: %lu\n", EnumContext->EnumBuffer[i].RelativeId); + TRACE("Name: %p\n", EnumContext->EnumBuffer[i].Name.Buffer); + TRACE("Name: %S\n", EnumContext->EnumBuffer[i].Name.Buffer); + if (EnumContext->EnumBuffer[i].Name.Buffer != NULL) + { + TRACE("Name: %hx\n", EnumContext->EnumBuffer[i].Name.Buffer[0]); + } + } + + if (Status != STATUS_MORE_ENTRIES) + break; + } + + +done: + if (resumehandle == NULL || ApiStatus != ERROR_MORE_DATA) + { + if (EnumContext != NULL) + { + if (EnumContext->BuiltinDomainHandle != NULL) + SamCloseHandle(EnumContext->BuiltinDomainHandle); + + if (EnumContext->AccountDomainHandle != NULL) + SamCloseHandle(EnumContext->AccountDomainHandle); + + if (EnumContext->ServerHandle != NULL) + SamCloseHandle(EnumContext->ServerHandle); + + if (EnumContext->EnumBuffer != NULL) + { + for (i = 0; i < EnumContext->EnumReturned; i++) + { + SamFreeMemory(EnumContext->EnumBuffer[i].Name.Buffer); + } + + SamFreeMemory(EnumContext->EnumBuffer); + } + + NetApiBufferFree(EnumContext); + EnumContext = NULL; + } + } + + + if (resumehandle != NULL) + *resumehandle = (DWORD_PTR)EnumContext; + + return ApiStatus; } /************************************************************ Modified: trunk/reactos/dll/win32/netapi32/netapi32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netapi3…
============================================================================== --- trunk/reactos/dll/win32/netapi32/netapi32.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/netapi32.c [iso-8859-1] Mon Nov 5 22:51:08 2012 @@ -16,11 +16,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#define WIN32_NO_STATUS #include "config.h" #include "wine/debug.h" #include "lm.h" #include "netbios.h" + +#define NTOS_MODE_USER +#include <ndk/rtlfuncs.h> +#include "netapi32.h" WINE_DEFAULT_DEBUG_CHANNEL(netbios); @@ -211,6 +216,13 @@ return ret; } +NET_API_STATUS +WINAPI +NetpNtStatusToApiStatus(NTSTATUS Status) +{ + return RtlNtStatusToDosError(Status); +} + NET_API_STATUS WINAPI NetUseEnum(LMSTR server, DWORD level, LPBYTE* bufptr, DWORD prefmaxsize, LPDWORD entriesread, LPDWORD totalentries, LPDWORD resumehandle) { Added: trunk/reactos/dll/win32/netapi32/netapi32.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netapi3…
============================================================================== --- trunk/reactos/dll/win32/netapi32/netapi32.h (added) +++ trunk/reactos/dll/win32/netapi32/netapi32.h [iso-8859-1] Mon Nov 5 22:51:08 2012 @@ -1,0 +1,10 @@ + +#ifndef __WINE_NETAPI32_H__ +#define __WINE_NETAPI32_H__ + +NET_API_STATUS +WINAPI +NetpNtStatusToApiStatus(NTSTATUS Status); + + +#endif Propchange: trunk/reactos/dll/win32/netapi32/netapi32.h ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/dll/win32/netapi32/netapi32.h ------------------------------------------------------------------------------ svn:keywords = author date id revision Modified: trunk/reactos/dll/win32/netapi32/netapi32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netapi3…
============================================================================== --- trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] Mon Nov 5 22:51:08 2012 @@ -261,7 +261,7 @@ @ stub NetpNetBiosReset @ stub NetpNetBiosSend @ stdcall NetpNetBiosStatusToApiStatus(long) -@ stub NetpNtStatusToApiStatus +@ stdcall NetpNtStatusToApiStatus(long) @ stub NetpOpenConfigData @ stub NetpPackString @ stub NetpReleasePrivilege
12 years, 1 month
1
0
0
0
[jgardou] 57677: [USER32] - Avoid casting double to int. Should fix MSC build
by jgardou@svn.reactos.org
Author: jgardou Date: Mon Nov 5 22:33:02 2012 New Revision: 57677 URL:
http://svn.reactos.org/svn/reactos?rev=57677&view=rev
Log: [USER32] - Avoid casting double to int. Should fix MSC build Modified: trunk/reactos/win32ss/user/user32/controls/edit.c trunk/reactos/win32ss/user/user32/windows/mdi.c Modified: trunk/reactos/win32ss/user/user32/controls/edit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/contro…
============================================================================== --- trunk/reactos/win32ss/user/user32/controls/edit.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/controls/edit.c [iso-8859-1] Mon Nov 5 22:33:02 2012 @@ -435,9 +435,9 @@ old_font = SelectObject(udc, es->font); if (es->style & ES_PASSWORD) - ScriptStringAnalyse(udc, &es->password_char, length, (1.5*length+16), -1, SSA_LINK|SSA_FALLBACK|SSA_GLYPHS|SSA_PASSWORD, -1, NULL, NULL, NULL, NULL, NULL, &es->ssa); + ScriptStringAnalyse(udc, &es->password_char, length, (3*length/2+16), -1, SSA_LINK|SSA_FALLBACK|SSA_GLYPHS|SSA_PASSWORD, -1, NULL, NULL, NULL, NULL, NULL, &es->ssa); else - ScriptStringAnalyse(udc, es->text, length, (1.5*length+16), -1, SSA_LINK|SSA_FALLBACK|SSA_GLYPHS, -1, NULL, NULL, NULL, NULL, NULL, &es->ssa); + ScriptStringAnalyse(udc, es->text, length, (3*length/2+16), -1, SSA_LINK|SSA_FALLBACK|SSA_GLYPHS, -1, NULL, NULL, NULL, NULL, NULL, &es->ssa); if (es->font) SelectObject(udc, old_font); Modified: trunk/reactos/win32ss/user/user32/windows/mdi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/mdi.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/mdi.c [iso-8859-1] Mon Nov 5 22:33:02 2012 @@ -792,7 +792,7 @@ static void MDITile( HWND client, MDICLIENTINFO *ci, WPARAM wParam ) { HWND *win_array; - int i, total; + int i, total, rows, columns; BOOL has_icons = FALSE; if (ci->hwndChildMaximized) @@ -803,7 +803,7 @@ if (!(win_array = WIN_ListChildren( client ))) return; /* remove all the windows we don't want */ - for (i = total = 0; win_array[i]; i++) + for (i = total = rows = 0; win_array[i]; i++) { if (!IsWindowVisible( win_array[i] )) continue; if (GetWindow( win_array[i], GW_OWNER )) continue; /* skip owned windows (icon titles) */ @@ -813,6 +813,7 @@ continue; } if ((wParam & MDITILE_SKIPDISABLED) && !IsWindowEnabled( win_array[i] )) continue; + if(total == (rows * (rows + 2))) rows++; /* total+1 == (rows+1)*(rows+1) */ win_array[total++] = win_array[i]; } win_array[total] = 0; @@ -824,11 +825,11 @@ HWND *pWnd = win_array; RECT rect; int x, y, xsize, ysize; - int rows, columns, r, c, i; + int r, c, i; GetClientRect(client,&rect); - rows = (int) sqrt((double)total); - columns = total / rows; + columns = total/rows; + //while(total < rows*columns) rows++; if( wParam & MDITILE_HORIZONTAL ) /* version >= 3.1 */ {
12 years, 1 month
1
0
0
0
[jgardou] 57676: [WIN32SS/USER] - Bake a parameter for NtUserFindExistingCursorIcon to differentiate between icons and cursors
by jgardou@svn.reactos.org
Author: jgardou Date: Mon Nov 5 20:23:01 2012 New Revision: 57676 URL:
http://svn.reactos.org/svn/reactos?rev=57676&view=rev
Log: [WIN32SS/USER] - Bake a parameter for NtUserFindExistingCursorIcon to differentiate between icons and cursors Modified: trunk/reactos/win32ss/user/ntuser/cursoricon_new.c trunk/reactos/win32ss/user/user32/windows/cursoricon_new.c Modified: trunk/reactos/win32ss/user/ntuser/cursoricon_new.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/cursor…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/cursoricon_new.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/cursoricon_new.c [iso-8859-1] Mon Nov 5 20:23:01 2012 @@ -175,13 +175,15 @@ IntFindExistingCurIconObject( PUNICODE_STRING pustrModule, PUNICODE_STRING pustrRsrc, - LONG cxDesired, - LONG cyDesired) + FINDEXISTINGCURICONPARAM* param) { PCURICON_OBJECT CurIcon; LIST_FOR_EACH(CurIcon, &gCurIconList, CURICON_OBJECT, ListEntry) { + /* See if we are looking for an icon or a cursor */ + if(CurIcon->bIcon != param->bIcon) + continue; /* See if module names match */ if(RtlCompareUnicodeString(pustrModule, &CurIcon->ustrModule, TRUE) == 0) { @@ -196,7 +198,7 @@ else if(RtlCompareUnicodeString(pustrRsrc, &CurIcon->ustrRsrc, TRUE) != 0) continue; - if ((cxDesired == CurIcon->Size.cx) &&(cyDesired == CurIcon->Size.cy)) + if ((param->cx == CurIcon->Size.cx) &&(param->cy == CurIcon->Size.cy)) { if (! ReferenceCurIconByProcess(CurIcon)) { @@ -765,12 +767,12 @@ NtUserFindExistingCursorIcon( _In_ PUNICODE_STRING pustrModule, _In_ PUNICODE_STRING pustrRsrc, - _In_ LONG cxDesired, - _In_ LONG cyDesired) + _In_ FINDEXISTINGCURICONPARAM* param) { PCURICON_OBJECT CurIcon; HICON Ret = NULL; UNICODE_STRING ustrModuleSafe, ustrRsrcSafe; + FINDEXISTINGCURICONPARAM paramSafe; NTSTATUS Status; TRACE("Enter NtUserFindExistingCursorIcon\n"); @@ -782,9 +784,20 @@ Status = ProbeAndCaptureUnicodeString(&ustrModuleSafe, UserMode, pustrModule); if(!NT_SUCCESS(Status)) goto done; + + _SEH2_TRY + { + ProbeForRead(param, sizeof(*param), 1); + paramSafe = *param; + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END UserEnterExclusive(); - CurIcon = IntFindExistingCurIconObject(&ustrModuleSafe, &ustrRsrcSafe, cxDesired, cyDesired); + CurIcon = IntFindExistingCurIconObject(&ustrModuleSafe, &ustrRsrcSafe, ¶mSafe); if (CurIcon) Ret = CurIcon->Self; UserLeave(); Modified: trunk/reactos/win32ss/user/user32/windows/cursoricon_new.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/cursoricon_new.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/cursoricon_new.c [iso-8859-1] Mon Nov 5 20:23:01 2012 @@ -757,6 +757,7 @@ if(fuLoad & LR_SHARED) { DWORD size = MAX_PATH; + FINDEXISTINGCURICONPARAM param; TRACE("Checking for an LR_SHARED cursor/icon.\n"); /* Prepare the resource name string */ @@ -791,7 +792,10 @@ } while(TRUE); /* Ask win32k */ - hCurIcon = NtUserFindExistingCursorIcon(&ustrModule, &ustrRsrc, cxDesired, cyDesired); + param.bIcon = bIcon; + param.cx = cxDesired; + param.cy = cyDesired; + hCurIcon = NtUserFindExistingCursorIcon(&ustrModule, &ustrRsrc, ¶m); if(hCurIcon) { /* Woohoo, got it! */ @@ -1185,7 +1189,7 @@ } /* Call the relevant function */ - ret = CURSORICON_LoadImageW(hModule, ustrRsrc.Buffer, cxDesired, cyDesired, bIcon, fuFlags & LR_DEFAULTSIZE); + ret = CURSORICON_LoadImageW(hModule, ustrRsrc.Buffer, cxDesired, cyDesired, fuFlags & LR_DEFAULTSIZE, bIcon); FreeLibrary(hModule);
12 years, 1 month
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
Results per page:
10
25
50
100
200