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
May 2013
----- 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
16 participants
234 discussions
Start a n
N
ew thread
[tfaber] 59120: [PSEH2] - Emulate a return from _SEH2EnterHandleTrylevel/_SEH2EnterFrameAndHandleTrylevel rather than directly jumping to the handler in case of an exception. This prevents us from ...
by tfaber@svn.reactos.org
Author: tfaber Date: Thu May 30 21:53:06 2013 New Revision: 59120 URL:
http://svn.reactos.org/svn/reactos?rev=59120&view=rev
Log: [PSEH2] - Emulate a return from _SEH2EnterHandleTrylevel/_SEH2EnterFrameAndHandleTrylevel rather than directly jumping to the handler in case of an exception. This prevents us from invalidating compiler assumptions. Thanks to Timo. Should fix GCC 4.7 bug with PSEH2 (CORE-7240). Modified: trunk/reactos/lib/pseh/i386/framebased-gcchack-asm.S Modified: trunk/reactos/lib/pseh/i386/framebased-gcchack-asm.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/pseh/i386/framebased-g…
============================================================================== --- trunk/reactos/lib/pseh/i386/framebased-gcchack-asm.S [iso-8859-1] (original) +++ trunk/reactos/lib/pseh/i386/framebased-gcchack-asm.S [iso-8859-1] Thu May 30 21:53:06 2013 @@ -25,7 +25,7 @@ .globl __SEH2EnterHandleTrylevel __SEH2EnterHandleTrylevel: mov eax, [esp+8] - mov ecx, [esp+12] + mov ecx, [esp] mov [eax+8], ecx mov [eax+16], ebp mov [eax+20], ebx @@ -43,7 +43,7 @@ .globl __SEH2EnterFrameAndHandleTrylevel __SEH2EnterFrameAndHandleTrylevel: mov eax, [esp+8] - mov ecx, [esp+12] + mov ecx, [esp] mov [eax+8], ecx mov [eax+16], ebp mov [eax+20], ebx
11 years, 6 months
1
0
0
0
[janderwald] 59119: [PORTCLS] - Silence traces
by janderwald@svn.reactos.org
Author: janderwald Date: Thu May 30 18:40:19 2013 New Revision: 59119 URL:
http://svn.reactos.org/svn/reactos?rev=59119&view=rev
Log: [PORTCLS] - Silence traces Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp [iso-8859-1] Thu May 30 18:40:19 2013 @@ -258,7 +258,7 @@ { // found match PropertyRequest->PropertyItem = PropertyItem; - DPRINT1("Using property item %p\n", PropertyItem); + DPRINT("Using property item %p\n", PropertyItem); // done break; } @@ -276,12 +276,12 @@ // now call the handler UNICODE_STRING GuidBuffer; RtlStringFromGUID(Property->Set, &GuidBuffer); - DPRINT1("Calling Node %lu MajorTarget %p MinorTarget %p PropertySet %S PropertyId %lu PropertyFlags %lx InstanceSize %lu ValueSize %lu Handler %p PropertyRequest %p PropertyItemFlags %lx PropertyItemId %lu\n", + DPRINT("Calling Node %lu MajorTarget %p MinorTarget %p PropertySet %S PropertyId %lu PropertyFlags %lx InstanceSize %lu ValueSize %lu Handler %p PropertyRequest %p PropertyItemFlags %lx PropertyItemId %lu\n", PropertyRequest->Node, PropertyRequest->MajorTarget, PropertyRequest->MinorTarget, GuidBuffer.Buffer, Property->Id, Property->Flags, PropertyRequest->InstanceSize, PropertyRequest->ValueSize, PropertyRequest->PropertyItem->Handler, PropertyRequest, PropertyRequest->PropertyItem->Flags, PropertyRequest->PropertyItem->Id); RtlFreeUnicodeString(&GuidBuffer); Status = PropertyRequest->PropertyItem->Handler(PropertyRequest); - DPRINT1("Status %lx ValueSize %lu Information %lu\n", Status, PropertyRequest->ValueSize, Irp->IoStatus.Information); + DPRINT("Status %lx ValueSize %lu Information %lu\n", Status, PropertyRequest->ValueSize, Irp->IoStatus.Information); Irp->IoStatus.Information = PropertyRequest->ValueSize; if (Status != STATUS_PENDING)
11 years, 6 months
1
0
0
0
[ekohl] 59118: [USRMGR] Enable the call to NetLocalGroupAdd.
by ekohl@svn.reactos.org
Author: ekohl Date: Thu May 30 16:00:37 2013 New Revision: 59118 URL:
http://svn.reactos.org/svn/reactos?rev=59118&view=rev
Log: [USRMGR] Enable the call to NetLocalGroupAdd. Modified: trunk/reactos/dll/cpl/usrmgr/groups.c Modified: trunk/reactos/dll/cpl/usrmgr/groups.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/usrmgr/groups.c?re…
============================================================================== --- trunk/reactos/dll/cpl/usrmgr/groups.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/usrmgr/groups.c [iso-8859-1] Thu May 30 16:00:37 2013 @@ -203,14 +203,10 @@ NewGroupDlgProc, (LPARAM)&group) == IDOK) { -#if 0 status = NetLocalGroupAdd(NULL, 1, (LPBYTE)&group, NULL); -#else - status = NERR_Success; -#endif if (status != NERR_Success) { TCHAR szText[256];
11 years, 6 months
1
0
0
0
[ekohl] 59117: [NETAPI32] NetLocalGroupEnum: Enumerate aliases (aka local groups) in the builtin and account domains.
by ekohl@svn.reactos.org
Author: ekohl Date: Thu May 30 15:37:25 2013 New Revision: 59117 URL:
http://svn.reactos.org/svn/reactos?rev=59117&view=rev
Log: [NETAPI32] NetLocalGroupEnum: Enumerate aliases (aka local groups) in the builtin and account domains. 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] Thu May 30 15:37:25 2013 @@ -23,9 +23,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(netapi32); +typedef enum _ENUM_PHASE +{ + BuiltinPhase, + AccountPhase, + DonePhase +} ENUM_PHASE; + typedef struct _ENUM_CONTEXT { SAM_HANDLE ServerHandle; + SAM_HANDLE DomainHandle; SAM_HANDLE BuiltinDomainHandle; SAM_HANDLE AccountDomainHandle; @@ -33,7 +41,7 @@ PSAM_RID_ENUMERATION Buffer; ULONG Returned; ULONG Index; - BOOLEAN BuiltinDone; + ENUM_PHASE Phase; } ENUM_CONTEXT, *PENUM_CONTEXT; @@ -462,7 +470,6 @@ EnumContext->Buffer = NULL; EnumContext->Returned = 0; EnumContext->Index = 0; - EnumContext->BuiltinDone = FALSE; Status = SamConnect((servername != NULL) ? &ServerName : NULL, &EnumContext->ServerHandle, @@ -495,6 +502,9 @@ ApiStatus = NetpNtStatusToApiStatus(Status); goto done; } + + EnumContext->Phase = BuiltinPhase; + EnumContext->DomainHandle = EnumContext->BuiltinDomainHandle; } @@ -505,15 +515,9 @@ if (EnumContext->Index >= EnumContext->Returned) { -// if (EnumContext->BuiltinDone == TRUE) -// { -// ApiStatus = NERR_Success; -// goto done; -// } - TRACE("Calling SamEnumerateAliasesInDomain\n"); - Status = SamEnumerateAliasesInDomain(EnumContext->BuiltinDomainHandle, + Status = SamEnumerateAliasesInDomain(EnumContext->DomainHandle, &EnumContext->EnumerationContext, (PVOID *)&EnumContext->Buffer, prefmaxlen, @@ -532,10 +536,6 @@ ApiStatus = NERR_BufTooSmall; goto done; } - else - { - EnumContext->BuiltinDone = TRUE; - } } TRACE("EnumContext: %lu\n", EnumContext); @@ -547,7 +547,7 @@ TRACE("RID: %lu\n", CurrentAlias->RelativeId); - Status = SamOpenAlias(EnumContext->BuiltinDomainHandle, + Status = SamOpenAlias(EnumContext->DomainHandle, ALIAS_READ_INFORMATION, CurrentAlias->RelativeId, &AliasHandle); @@ -590,10 +590,39 @@ (*entriesread)++; + if (EnumContext->Index == EnumContext->Returned) + { + switch (EnumContext->Phase) + { + case BuiltinPhase: + EnumContext->Phase = AccountPhase; + EnumContext->DomainHandle = EnumContext->AccountDomainHandle; + EnumContext->EnumerationContext = 0; + EnumContext->Index = 0; + EnumContext->Returned = 0; + + if (EnumContext->Buffer != NULL) + { + for (i = 0; i < EnumContext->Returned; i++) + { + SamFreeMemory(EnumContext->Buffer[i].Name.Buffer); + } + + SamFreeMemory(EnumContext->Buffer); + EnumContext->Buffer = NULL; + } + break; + + case AccountPhase: + case DonePhase: + EnumContext->Phase = DonePhase; + break; + } + } // } done: - if (ApiStatus == NERR_Success && EnumContext->Index < EnumContext->Returned) + if (ApiStatus == NERR_Success && EnumContext->Phase != DonePhase) ApiStatus = ERROR_MORE_DATA; if (EnumContext != NULL)
11 years, 6 months
1
0
0
0
[janderwald] 59116: [NETSHELL] - Fix column width of listview
by janderwald@svn.reactos.org
Author: janderwald Date: Thu May 30 11:41:12 2013 New Revision: 59116 URL:
http://svn.reactos.org/svn/reactos?rev=59116&view=rev
Log: [NETSHELL] - Fix column width of listview Modified: trunk/reactos/dll/win32/netshell/lanstatusui.cpp Modified: trunk/reactos/dll/win32/netshell/lanstatusui.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lanstat…
============================================================================== --- trunk/reactos/dll/win32/netshell/lanstatusui.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netshell/lanstatusui.cpp [iso-8859-1] Thu May 30 11:41:12 2013 @@ -421,6 +421,7 @@ PIP_PER_ADAPTER_INFO pPerAdapter; DWORD dwSize; HWND hDlgCtrl; + RECT rect; switch(uMsg) { @@ -428,8 +429,15 @@ pContext = (LANSTATUSUI_CONTEXT*)lParam; hDlgCtrl = GetDlgItem(hwndDlg, IDC_DETAILS); - InsertColumnToListView(hDlgCtrl, IDS_PROPERTY, 0, 80); - InsertColumnToListView(hDlgCtrl, IDS_VALUE, 1, 80); + + /* get client rect */ + GetClientRect(hDlgCtrl, &rect); + + /* calculate column width */ + dwSize = rect.right / 2; + + InsertColumnToListView(hDlgCtrl, IDS_PROPERTY, 0, dwSize); + InsertColumnToListView(hDlgCtrl, IDS_VALUE, 1, dwSize); dwSize = 0; pCurAdapter = NULL;
11 years, 6 months
1
0
0
0
[ekohl] 59115: [SAMSRV] - Create the None (aka Users) group upon setup. - Add all users as members of the Users group. - Add the Guest user as a member of the Guests alias.
by ekohl@svn.reactos.org
Author: ekohl Date: Thu May 30 10:50:52 2013 New Revision: 59115 URL:
http://svn.reactos.org/svn/reactos?rev=59115&view=rev
Log: [SAMSRV] - Create the None (aka Users) group upon setup. - Add all users as members of the Users group. - Add the Guest user as a member of the Guests alias. Modified: trunk/reactos/dll/win32/samsrv/lang/de-DE.rc trunk/reactos/dll/win32/samsrv/lang/en-US.rc trunk/reactos/dll/win32/samsrv/lang/pl-PL.rc trunk/reactos/dll/win32/samsrv/resources.h trunk/reactos/dll/win32/samsrv/setup.c Modified: trunk/reactos/dll/win32/samsrv/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/lang/de-D…
============================================================================== --- trunk/reactos/dll/win32/samsrv/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/samsrv/lang/de-DE.rc [iso-8859-1] Thu May 30 10:50:52 2013 @@ -3,6 +3,9 @@ STRINGTABLE BEGIN IDS_DOMAIN_BUILTIN_NAME "Builtin" + + IDS_GROUP_NONE_NAME "Kein" + IDS_GROUP_NONE_COMMENT "Gewöhnliche Benutzer" IDS_ALIAS_ADMINISTRATORS_NAME "Administratoren" IDS_ALIAS_ADMINISTRATORS_COMMENT "Administratoren haben unbeschränkten Zugriff auf den Computer oder die Domäne." Modified: trunk/reactos/dll/win32/samsrv/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/lang/en-U…
============================================================================== --- trunk/reactos/dll/win32/samsrv/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/samsrv/lang/en-US.rc [iso-8859-1] Thu May 30 10:50:52 2013 @@ -3,6 +3,9 @@ STRINGTABLE BEGIN IDS_DOMAIN_BUILTIN_NAME "Builtin" + + IDS_GROUP_NONE_NAME "None" + IDS_GROUP_NONE_COMMENT "Ordinary Users" IDS_ALIAS_ADMINISTRATORS_NAME "Administrators" IDS_ALIAS_ADMINISTRATORS_COMMENT "Administrators have unrestricted access to the computer or domain." Modified: trunk/reactos/dll/win32/samsrv/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/lang/pl-P…
============================================================================== --- trunk/reactos/dll/win32/samsrv/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/samsrv/lang/pl-PL.rc [iso-8859-1] Thu May 30 10:50:52 2013 @@ -3,6 +3,9 @@ STRINGTABLE BEGIN IDS_DOMAIN_BUILTIN_NAME "Wbudowane" + + IDS_GROUP_NONE_NAME "None" + IDS_GROUP_NONE_COMMENT "Ordinary Users" IDS_ALIAS_ADMINISTRATORS_NAME "Administratorzy" IDS_ALIAS_ADMINISTRATORS_COMMENT "Administratorzy majÄ nieograniczony dostÄp w obrÄbie komputera lub domeny." Modified: trunk/reactos/dll/win32/samsrv/resources.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/resources…
============================================================================== --- trunk/reactos/dll/win32/samsrv/resources.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/samsrv/resources.h [iso-8859-1] Thu May 30 10:50:52 2013 @@ -10,18 +10,21 @@ #define IDS_DOMAIN_BUILTIN_NAME 100 -#define IDS_ALIAS_ADMINISTRATORS_NAME 110 -#define IDS_ALIAS_ADMINISTRATORS_COMMENT 111 -#define IDS_ALIAS_GUESTS_NAME 112 -#define IDS_ALIAS_GUESTS_COMMENT 113 -#define IDS_ALIAS_POWER_USERS_NAME 114 -#define IDS_ALIAS_POWER_USERS_COMMENT 115 -#define IDS_ALIAS_USERS_NAME 116 -#define IDS_ALIAS_USERS_COMMENT 117 +#define IDS_GROUP_NONE_NAME 110 +#define IDS_GROUP_NONE_COMMENT 111 -#define IDS_USER_ADMINISTRATOR_NAME 120 -#define IDS_USER_ADMINISTRATOR_COMMENT 121 -#define IDS_USER_GUEST_NAME 122 -#define IDS_USER_GUEST_COMMENT 123 +#define IDS_ALIAS_ADMINISTRATORS_NAME 120 +#define IDS_ALIAS_ADMINISTRATORS_COMMENT 121 +#define IDS_ALIAS_GUESTS_NAME 122 +#define IDS_ALIAS_GUESTS_COMMENT 123 +#define IDS_ALIAS_POWER_USERS_NAME 124 +#define IDS_ALIAS_POWER_USERS_COMMENT 125 +#define IDS_ALIAS_USERS_NAME 126 +#define IDS_ALIAS_USERS_COMMENT 127 + +#define IDS_USER_ADMINISTRATOR_NAME 140 +#define IDS_USER_ADMINISTRATOR_COMMENT 141 +#define IDS_USER_GUEST_NAME 142 +#define IDS_USER_GUEST_COMMENT 143 /* EOF */ Modified: trunk/reactos/dll/win32/samsrv/setup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/setup.c?r…
============================================================================== --- trunk/reactos/dll/win32/samsrv/setup.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/samsrv/setup.c [iso-8859-1] Thu May 30 10:50:52 2013 @@ -148,16 +148,166 @@ } -#if 0 -static BOOL -SampSetupCreateGroupAccount(HKEY hDomainKey, +static +NTSTATUS +SampSetupAddMemberToGroup(IN HANDLE hDomainKey, + IN ULONG GroupId, + IN ULONG MemberId) +{ + WCHAR szKeyName[256]; + HANDLE hGroupKey = NULL; + PULONG MembersBuffer = NULL; + ULONG MembersCount = 0; + ULONG Length = 0; + ULONG i; + NTSTATUS Status; + + swprintf(szKeyName, L"Groups\\%08lX", GroupId); + + Status = SampRegOpenKey(hDomainKey, + szKeyName, + KEY_ALL_ACCESS, + &hGroupKey); + if (!NT_SUCCESS(Status)) + return Status; + + Status = SampRegQueryValue(hGroupKey, + L"Members", + NULL, + NULL, + &Length); + if (!NT_SUCCESS(Status) && Status != STATUS_OBJECT_NAME_NOT_FOUND) + goto done; + + MembersBuffer = midl_user_allocate(Length + sizeof(ULONG)); + if (MembersBuffer == NULL) + { + Status = STATUS_INSUFFICIENT_RESOURCES; + goto done; + } + + if (Status != STATUS_OBJECT_NAME_NOT_FOUND) + { + Status = SampRegQueryValue(hGroupKey, + L"Members", + NULL, + MembersBuffer, + &Length); + if (!NT_SUCCESS(Status)) + goto done; + + MembersCount = Length / sizeof(ULONG); + } + + for (i = 0; i < MembersCount; i++) + { + if (MembersBuffer[i] == MemberId) + { + Status = STATUS_MEMBER_IN_GROUP; + goto done; + } + } + + MembersBuffer[MembersCount] = MemberId; + Length += sizeof(ULONG); + + Status = SampRegSetValue(hGroupKey, + L"Members", + REG_BINARY, + MembersBuffer, + Length); + +done: + if (MembersBuffer != NULL) + midl_user_free(MembersBuffer); + + if (hGroupKey != NULL) + SampRegCloseKey(hGroupKey); + + return Status; +} + + +static +NTSTATUS +SampSetupCreateGroupAccount(HANDLE hDomainKey, LPCWSTR lpAccountName, + LPCWSTR lpComment, ULONG ulRelativeId) { - - return FALSE; + SAM_GROUP_FIXED_DATA FixedGroupData; + WCHAR szAccountKeyName[32]; + HANDLE hAccountKey = NULL; + HANDLE hNamesKey = NULL; + NTSTATUS Status; + + /* Initialize fixed group data */ + FixedGroupData.Version = 1; + FixedGroupData.Reserved = 0; + FixedGroupData.GroupId = ulRelativeId; + FixedGroupData.Attributes = 0; + + swprintf(szAccountKeyName, L"Groups\\%08lX", ulRelativeId); + + Status = SampRegCreateKey(hDomainKey, + szAccountKeyName, + KEY_ALL_ACCESS, + &hAccountKey); + if (!NT_SUCCESS(Status)) + return Status; + + Status = SampRegSetValue(hAccountKey, + L"F", + REG_BINARY, + (LPVOID)&FixedGroupData, + sizeof(SAM_GROUP_FIXED_DATA)); + if (!NT_SUCCESS(Status)) + goto done; + + Status = SampRegSetValue(hAccountKey, + L"Name", + REG_SZ, + (LPVOID)lpAccountName, + (wcslen(lpAccountName) + 1) * sizeof(WCHAR)); + if (!NT_SUCCESS(Status)) + goto done; + + Status = SampRegSetValue(hAccountKey, + L"AdminComment", + REG_SZ, + (LPVOID)lpComment, + (wcslen(lpComment) + 1) * sizeof(WCHAR)); + if (!NT_SUCCESS(Status)) + goto done; + + Status = SampRegOpenKey(hDomainKey, + L"Groups\\Names", + KEY_ALL_ACCESS, + &hNamesKey); + if (!NT_SUCCESS(Status)) + goto done; + + Status = SampRegSetValue(hNamesKey, + lpAccountName, + REG_DWORD, + (LPVOID)&ulRelativeId, + sizeof(ULONG)); + +done: + if (hNamesKey != NULL) + SampRegCloseKey(hNamesKey); + + if (hAccountKey != NULL) + { + SampRegCloseKey(hAccountKey); + + if (!NT_SUCCESS(Status)) + SampRegDeleteKey(hDomainKey, + szAccountKeyName); + } + + return Status; } -#endif static BOOL @@ -684,7 +834,7 @@ szComment, DOMAIN_ALIAS_RID_POWER_USERS); - + /* Add the Administrator user to the Administrators alias */ pSid = AppendRidToSid(AccountDomainInfo->DomainSid, DOMAIN_USER_RID_ADMIN); if (pSid != NULL) @@ -696,6 +846,17 @@ RtlFreeHeap(RtlGetProcessHeap(), 0, pSid); } + /* Add the Guest user to the Guests alias */ + pSid = AppendRidToSid(AccountDomainInfo->DomainSid, + DOMAIN_USER_RID_GUEST); + if (pSid != NULL) + { + SampSetupAddMemberToAlias(hDomainKey, + DOMAIN_ALIAS_RID_GUESTS, + pSid); + + RtlFreeHeap(RtlGetProcessHeap(), 0, pSid); + } RegCloseKey(hDomainKey); } @@ -707,6 +868,14 @@ AccountDomainInfo->DomainSid, &hDomainKey)) { + SampLoadString(hInstance, IDS_GROUP_NONE_NAME, szName, 80); + SampLoadString(hInstance, IDS_GROUP_NONE_COMMENT, szComment, 256); + + SampSetupCreateGroupAccount(hDomainKey, + szName, + szComment, + DOMAIN_GROUP_RID_USERS); + SampLoadString(hInstance, IDS_USER_ADMINISTRATOR_NAME, szName, 80); SampLoadString(hInstance, IDS_USER_ADMINISTRATOR_COMMENT, szComment, 256); @@ -716,6 +885,10 @@ DOMAIN_USER_RID_ADMIN, USER_DONT_EXPIRE_PASSWORD | USER_NORMAL_ACCOUNT); + SampSetupAddMemberToGroup(hDomainKey, + DOMAIN_GROUP_RID_USERS, + DOMAIN_USER_RID_ADMIN); + SampLoadString(hInstance, IDS_USER_GUEST_NAME, szName, 80); SampLoadString(hInstance, IDS_USER_GUEST_COMMENT, szComment, 256); @@ -725,6 +898,10 @@ DOMAIN_USER_RID_GUEST, USER_ACCOUNT_DISABLED | USER_DONT_EXPIRE_PASSWORD | USER_NORMAL_ACCOUNT); + SampSetupAddMemberToGroup(hDomainKey, + DOMAIN_GROUP_RID_USERS, + DOMAIN_USER_RID_GUEST); + RegCloseKey(hDomainKey); }
11 years, 6 months
1
0
0
0
[ekohl] 59114: [SAMSRV] Get rid of SampOpenSamKey. Use SampRegOpenKey instead.
by ekohl@svn.reactos.org
Author: ekohl Date: Thu May 30 08:51:32 2013 New Revision: 59114 URL:
http://svn.reactos.org/svn/reactos?rev=59114&view=rev
Log: [SAMSRV] Get rid of SampOpenSamKey. Use SampRegOpenKey instead. Modified: trunk/reactos/dll/win32/samsrv/database.c Modified: trunk/reactos/dll/win32/samsrv/database.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/database.…
============================================================================== --- trunk/reactos/dll/win32/samsrv/database.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/samsrv/database.c [iso-8859-1] Thu May 30 08:51:32 2013 @@ -20,39 +20,17 @@ /* FUNCTIONS ***************************************************************/ -static NTSTATUS -SampOpenSamKey(VOID) -{ - OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING KeyName; +NTSTATUS +SampInitDatabase(VOID) +{ NTSTATUS Status; - RtlInitUnicodeString(&KeyName, - L"\\Registry\\Machine\\SAM"); - - InitializeObjectAttributes(&ObjectAttributes, - &KeyName, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - - Status = RtlpNtOpenKey(&SamKeyHandle, - KEY_READ | KEY_CREATE_SUB_KEY | KEY_ENUMERATE_SUB_KEYS, - &ObjectAttributes, - 0); - - return Status; -} - - -NTSTATUS -SampInitDatabase(VOID) -{ - NTSTATUS Status; - TRACE("SampInitDatabase()\n"); - Status = SampOpenSamKey(); + Status = SampRegOpenKey(NULL, + L"\\Registry\\Machine\\SAM", + KEY_READ | KEY_CREATE_SUB_KEY | KEY_ENUMERATE_SUB_KEYS, + &SamKeyHandle); if (!NT_SUCCESS(Status)) { ERR("Failed to open the SAM key (Status: 0x%08lx)\n", Status);
11 years, 6 months
1
0
0
0
[janderwald] 59113: [DXDIAG] - Disable call to Direct3DCreate9 [HACK] - Use the correct parent window handle when creating the system dialogs. - Fix the next page button - TODO: ReactOS needs to ch...
by janderwald@svn.reactos.org
Author: janderwald Date: Thu May 30 08:12:13 2013 New Revision: 59113 URL:
http://svn.reactos.org/svn/reactos?rev=59113&view=rev
Log: [DXDIAG] - Disable call to Direct3DCreate9 [HACK] - Use the correct parent window handle when creating the system dialogs. - Fix the next page button - TODO: ReactOS needs to check whether a correct parent window handle was provided - Fixes dxdiag tab problem Modified: trunk/reactos/base/applications/dxdiag/display.c trunk/reactos/base/applications/dxdiag/dxdiag.c trunk/reactos/base/applications/dxdiag/sound.c Modified: trunk/reactos/base/applications/dxdiag/display.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/d…
============================================================================== --- trunk/reactos/base/applications/dxdiag/display.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/display.c [iso-8859-1] Thu May 30 08:12:13 2013 @@ -214,12 +214,14 @@ HWND hDlgCtrls[5]; DWORD dwMemory; DEVMODEW DevMode; - IDirect3D9 * ppObj; + IDirect3D9 * ppObj = NULL; D3DADAPTER_IDENTIFIER9 Identifier; HRESULT hResult; szText[0] = L'\0'; - ppObj = Direct3DCreate9(D3D_SDK_VERSION); + + /* fix wine */ + //ppObj = Direct3DCreate9(D3D_SDK_VERSION); if (ppObj) { hResult = IDirect3D9_GetAdapterIdentifier(ppObj, D3DADAPTER_DEFAULT , 2/*D3DENUM_WHQL_LEVEL*/, &Identifier); Modified: trunk/reactos/base/applications/dxdiag/dxdiag.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/d…
============================================================================== --- trunk/reactos/base/applications/dxdiag/dxdiag.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/dxdiag.c [iso-8859-1] Thu May 30 08:12:13 2013 @@ -119,11 +119,11 @@ pContext->hTabCtrl = hTabCtrlWnd; /* create the dialogs */ - pContext->hDialogs[0] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_SYSTEM_DIALOG), hTabCtrlWnd, SystemPageWndProc, (LPARAM)pContext); - pContext->hDialogs[1] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_MUSIC_DIALOG), hTabCtrlWnd, MusicPageWndProc, (LPARAM)pContext); - pContext->hDialogs[2] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_INPUT_DIALOG), hTabCtrlWnd, InputPageWndProc, (LPARAM)pContext); - pContext->hDialogs[3] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_NETWORK_DIALOG), hTabCtrlWnd, NetworkPageWndProc, (LPARAM)pContext); - pContext->hDialogs[4] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_HELP_DIALOG), hTabCtrlWnd, HelpPageWndProc, (LPARAM)pContext); + pContext->hDialogs[0] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_SYSTEM_DIALOG), pContext->hMainDialog, SystemPageWndProc, (LPARAM)pContext); + pContext->hDialogs[1] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_MUSIC_DIALOG), pContext->hMainDialog, MusicPageWndProc, (LPARAM)pContext); + pContext->hDialogs[2] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_INPUT_DIALOG), pContext->hMainDialog, InputPageWndProc, (LPARAM)pContext); + pContext->hDialogs[3] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_NETWORK_DIALOG), pContext->hMainDialog, NetworkPageWndProc, (LPARAM)pContext); + pContext->hDialogs[4] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_HELP_DIALOG), pContext->hMainDialog, HelpPageWndProc, (LPARAM)pContext); /* insert tab ctrl items */ InsertTabCtrlItem(hTabCtrlWnd, 0, MAKEINTRESOURCEW(IDS_SYSTEM_DIALOG)); @@ -197,9 +197,11 @@ EnableWindow(GetDlgItem(hwndDlg, IDC_BUTTON_NEXT), (CurSel != TabCtrl_GetItemCount(hTabCtrlWnd) - 1)); - /* switch to next page */ + /* switch to next tab */ SendMessageW(hTabCtrlWnd, TCM_SETCURSEL, CurSel, 0L); - + + /* show next page */ + TabCtrl_OnSelChange(pContext); return TRUE; } Modified: trunk/reactos/base/applications/dxdiag/sound.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/s…
============================================================================== --- trunk/reactos/base/applications/dxdiag/sound.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/sound.c [iso-8859-1] Thu May 30 08:12:13 2013 @@ -243,8 +243,6 @@ /* set further device details */ SetDeviceDetails(hwndDlg, &GUID_DEVCLASS_MEDIA, lpcstrDescription); - - /* load sound resource string */ szSound[0] = L'\0';
11 years, 6 months
1
0
0
0
[hbelusca] 59112: [KERNEL32-CONSRV] - Implement ConsoleMenuControl; see http://undoc.airesoft.co.uk/kernel32.dll/ConsoleMenuControl.php for more information. - Implement SetConsoleMenuClose; see ht...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu May 30 00:50:03 2013 New Revision: 59112 URL:
http://svn.reactos.org/svn/reactos?rev=59112&view=rev
Log: [KERNEL32-CONSRV] - Implement ConsoleMenuControl; see
http://undoc.airesoft.co.uk/kernel32.dll/ConsoleMenuControl.php
for more information. - Implement SetConsoleMenuClose; see
http://www.mail-archive.com/harbour@harbour-project.org/msg27509.html
(or
http://harbour-devel.1590103.n2.nabble.com/Question-about-hb-gt-win-CtrlHan…
) for more information. [CONSRV] Remove two unneeded DPRINTs. Modified: trunk/reactos/dll/win32/kernel32/client/console/console.c trunk/reactos/include/psdk/wincon.h trunk/reactos/include/reactos/subsys/win/conmsg.h trunk/reactos/win32ss/user/consrv/api.h trunk/reactos/win32ss/user/consrv/conio.h trunk/reactos/win32ss/user/consrv/console.c trunk/reactos/win32ss/user/consrv/frontends/gui/guisettings.h trunk/reactos/win32ss/user/consrv/frontends/gui/guiterm.c trunk/reactos/win32ss/user/consrv/frontends/tui/tuiterm.c trunk/reactos/win32ss/user/consrv/include/conio.h trunk/reactos/win32ss/user/consrv/init.c Modified: trunk/reactos/dll/win32/kernel32/client/console/console.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/client/console/console.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/console/console.c [iso-8859-1] Thu May 30 00:50:03 2013 @@ -240,17 +240,29 @@ /* - * @unimplemented (Undocumented) - */ -BOOL -WINAPI -ConsoleMenuControl(HANDLE hConsole, - DWORD Unknown1, - DWORD Unknown2) -{ - DPRINT1("ConsoleMenuControl(0x%x, 0x%x, 0x%x) UNIMPLEMENTED!\n", hConsole, Unknown1, Unknown2); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; + * @implemented (Undocumented) + * @note See
http://undoc.airesoft.co.uk/kernel32.dll/ConsoleMenuControl.php
+ */ +HMENU +WINAPI +ConsoleMenuControl(HANDLE hConsoleOutput, + DWORD dwCmdIdLow, + DWORD dwCmdIdHigh) +{ + CONSOLE_API_MESSAGE ApiMessage; + PCONSOLE_MENUCONTROL MenuControlRequest = &ApiMessage.Data.MenuControlRequest; + + MenuControlRequest->OutputHandle = hConsoleOutput; + MenuControlRequest->dwCmdIdLow = dwCmdIdLow; + MenuControlRequest->dwCmdIdHigh = dwCmdIdHigh; + MenuControlRequest->hMenu = NULL; + + CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, + NULL, + CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepMenuControl), + sizeof(CONSOLE_MENUCONTROL)); + + return MenuControlRequest->hMenu; } @@ -654,15 +666,29 @@ /* - * @unimplemented (Undocumented) - */ -BOOL -WINAPI -SetConsoleMenuClose(DWORD Unknown0) -{ - DPRINT1("SetConsoleMenuClose(0x%x) UNIMPLEMENTED!\n", Unknown0); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; + * @implemented (Undocumented) + */ +BOOL +WINAPI +SetConsoleMenuClose(BOOL bEnable) +{ + NTSTATUS Status; + CONSOLE_API_MESSAGE ApiMessage; + PCONSOLE_SETMENUCLOSE SetMenuCloseRequest = &ApiMessage.Data.SetMenuCloseRequest; + + SetMenuCloseRequest->Enable = bEnable; + + Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, + NULL, + CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepSetMenuClose), + sizeof(CONSOLE_SETMENUCLOSE)); + if (!NT_SUCCESS(Status)) + { + BaseSetLastNTError(Status); + return FALSE; + } + + return TRUE; } Modified: trunk/reactos/include/psdk/wincon.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wincon.h?rev=…
============================================================================== --- trunk/reactos/include/psdk/wincon.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/wincon.h [iso-8859-1] Thu May 30 00:50:03 2013 @@ -451,6 +451,12 @@ BOOL WINAPI SetConsoleTitleA(_In_ LPCSTR); BOOL WINAPI SetConsoleTitleW(_In_ LPCWSTR); BOOL WINAPI SetConsoleWindowInfo(_In_ HANDLE, _In_ BOOL, _In_ const SMALL_RECT*); + +/* Undocumented, see
http://undoc.airesoft.co.uk/kernel32.dll/ConsoleMenuControl.php
*/ +HMENU WINAPI ConsoleMenuControl(_In_ HANDLE, _In_ DWORD, _In_ DWORD); +/* Undocumented */ +BOOL WINAPI SetConsoleMenuClose(_In_ BOOL); + BOOL WINAPI WriteConsoleA(HANDLE,CONST VOID*,DWORD,LPDWORD,LPVOID); BOOL WINAPI WriteConsoleW(HANDLE,CONST VOID*,DWORD,LPDWORD,LPVOID); Modified: trunk/reactos/include/reactos/subsys/win/conmsg.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/subsys/win…
============================================================================== --- trunk/reactos/include/reactos/subsys/win/conmsg.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/subsys/win/conmsg.h [iso-8859-1] Thu May 30 00:50:03 2013 @@ -64,7 +64,7 @@ // ConsolepVDMOperation, // ConsolepSetCursor, // ConsolepShowCursor, - // ConsolepMenuControl, + ConsolepMenuControl, // ConsolepSetPalette, ConsolepSetDisplayMode, // ConsolepRegisterVDM, @@ -85,7 +85,7 @@ ConsolepGetCP, ConsolepSetCP, // ConsolepSetKeyShortcuts, - // ConsolepSetMenuClose, + ConsolepSetMenuClose, // ConsolepNotifyLastClose, ConsolepGenerateCtrlEvent, // ConsolepGetKeyboardLayoutName, @@ -472,6 +472,19 @@ typedef struct { HANDLE OutputHandle; + DWORD dwCmdIdLow; + DWORD dwCmdIdHigh; + HMENU hMenu; +} CONSOLE_MENUCONTROL, *PCONSOLE_MENUCONTROL; + +typedef struct +{ + BOOL Enable; +} CONSOLE_SETMENUCLOSE, *PCONSOLE_SETMENUCLOSE; + +typedef struct +{ + HANDLE OutputHandle; BOOL Absolute; SMALL_RECT WindowRect; // New console window position in the screen-buffer frame (Absolute == TRUE) // or in the old window position frame (Absolute == FALSE). @@ -479,12 +492,12 @@ typedef struct { - HWND WindowHandle; + HWND WindowHandle; } CONSOLE_GETWINDOW, *PCONSOLE_GETWINDOW; typedef struct { - HICON WindowIcon; + HICON WindowIcon; } CONSOLE_SETICON, *PCONSOLE_SETICON; @@ -637,6 +650,8 @@ CONSOLE_INVALIDATEDIBITS InvalidateDIBitsRequest; CONSOLE_GETSETCONSOLETITLE TitleRequest; CONSOLE_GETLARGESTWINDOWSIZE GetLargestWindowSizeRequest; + CONSOLE_MENUCONTROL MenuControlRequest; + CONSOLE_SETMENUCLOSE SetMenuCloseRequest; CONSOLE_SETWINDOWINFO SetWindowInfoRequest; CONSOLE_GETWINDOW GetWindowRequest; CONSOLE_SETICON SetIconRequest; Modified: trunk/reactos/win32ss/user/consrv/api.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/consrv/api.h?…
============================================================================== --- trunk/reactos/win32ss/user/consrv/api.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/consrv/api.h [iso-8859-1] Thu May 30 00:50:03 2013 @@ -54,6 +54,8 @@ CSR_API(SrvGetConsoleDisplayMode); CSR_API(SrvSetConsoleDisplayMode); CSR_API(SrvGetLargestConsoleWindowSize); +CSR_API(SrvConsoleMenuControl); +CSR_API(SrvSetConsoleMenuClose); CSR_API(SrvSetConsoleWindowInfo); CSR_API(SrvGetConsoleWindow); CSR_API(SrvSetConsoleIcon); Modified: trunk/reactos/win32ss/user/consrv/conio.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/consrv/conio.…
============================================================================== --- trunk/reactos/win32ss/user/consrv/conio.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/consrv/conio.h [iso-8859-1] Thu May 30 00:50:03 2013 @@ -40,5 +40,9 @@ (Console)->TermIFace.Vtbl->GetDisplayMode(Console) #define ConioSetDisplayMode(Console, NewMode) \ (Console)->TermIFace.Vtbl->SetDisplayMode((Console), (NewMode)) +#define ConioMenuControl(Console, CmdIdLow, CmdIdHigh) \ + (Console)->TermIFace.Vtbl->MenuControl((Console), (CmdIdLow), (CmdIdHigh)) +#define ConioSetMenuClose(Console, Enable) \ + (Console)->TermIFace.Vtbl->SetMenuClose((Console), (Enable)) /* EOF */ Modified: trunk/reactos/win32ss/user/consrv/console.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/consrv/consol…
============================================================================== --- trunk/reactos/win32ss/user/consrv/console.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/consrv/console.c [iso-8859-1] Thu May 30 00:50:03 2013 @@ -1339,11 +1339,7 @@ Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console, TRUE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to get console handle in SrvGetConsoleDisplayMode\n"); - return Status; - } + if (!NT_SUCCESS(Status)) return Status; GetDisplayModeRequest->DisplayMode = ConioGetDisplayMode(Console); @@ -1363,11 +1359,7 @@ &Buff, GENERIC_WRITE, TRUE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to get console handle in SrvSetConsoleDisplayMode\n"); - return Status; - } + if (!NT_SUCCESS(Status)) return Status; Console = Buff->Header.Console; @@ -1404,6 +1396,47 @@ ConSrvReleaseScreenBuffer(Buff, TRUE); return STATUS_SUCCESS; +} + +CSR_API(SrvConsoleMenuControl) +{ + NTSTATUS Status; + PCONSOLE_MENUCONTROL MenuControlRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.MenuControlRequest; + PCONSOLE Console; + PCONSOLE_SCREEN_BUFFER Buff; + + Status = ConSrvGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + MenuControlRequest->OutputHandle, + &Buff, + GENERIC_WRITE, + TRUE); + if (!NT_SUCCESS(Status)) return Status; + + Console = Buff->Header.Console; + + MenuControlRequest->hMenu = ConioMenuControl(Console, + MenuControlRequest->dwCmdIdLow, + MenuControlRequest->dwCmdIdHigh); + + ConSrvReleaseScreenBuffer(Buff, TRUE); + return STATUS_SUCCESS; +} + +CSR_API(SrvSetConsoleMenuClose) +{ + NTSTATUS Status; + BOOL Success; + PCONSOLE_SETMENUCLOSE SetMenuCloseRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.SetMenuCloseRequest; + PCONSOLE Console; + + Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + &Console, TRUE); + if (!NT_SUCCESS(Status)) return Status; + + Success = ConioSetMenuClose(Console, SetMenuCloseRequest->Enable); + + ConSrvReleaseConsole(Console, TRUE); + return (Success ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL); } CSR_API(SrvSetConsoleWindowInfo) Modified: trunk/reactos/win32ss/user/consrv/frontends/gui/guisettings.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/consrv/fronte…
============================================================================== --- trunk/reactos/win32ss/user/consrv/frontends/gui/guisettings.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/consrv/frontends/gui/guisettings.h [iso-8859-1] Thu May 30 00:50:03 2013 @@ -48,6 +48,11 @@ HICON hIcon; /* Handle to the console's icon (big) */ HICON hIconSm; /* Handle to the console's icon (small) */ BOOL IgnoreNextMouseSignal; /* Used in cases where we don't want to treat a mouse signal */ + + BOOL IsCloseButtonEnabled; /* TRUE if the Close button and the corresponding system menu item are enabled, FALSE otherwise */ + UINT cmdIdLow ; /* Lowest menu id of the user-reserved menu id range */ + UINT cmdIdHigh; /* Highest menu id of the user-reserved menu id range */ + // COLORREF Colors[16]; // PVOID ScreenBuffer; /* Hardware screen buffer */ Modified: trunk/reactos/win32ss/user/consrv/frontends/gui/guiterm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/consrv/fronte…
============================================================================== --- trunk/reactos/win32ss/user/consrv/frontends/gui/guiterm.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/consrv/frontends/gui/guiterm.c [iso-8859-1] Thu May 30 00:50:03 2013 @@ -83,21 +83,21 @@ static const GUICONSOLE_MENUITEM GuiConsoleEditMenuItems[] = { - { IDS_MARK, NULL, ID_SYSTEM_EDIT_MARK }, - { IDS_COPY, NULL, ID_SYSTEM_EDIT_COPY }, - { IDS_PASTE, NULL, ID_SYSTEM_EDIT_PASTE }, - { IDS_SELECTALL, NULL, ID_SYSTEM_EDIT_SELECTALL }, - { IDS_SCROLL, NULL, ID_SYSTEM_EDIT_SCROLL }, - { IDS_FIND, NULL, ID_SYSTEM_EDIT_FIND }, + { IDS_MARK, NULL, ID_SYSTEM_EDIT_MARK }, + { IDS_COPY, NULL, ID_SYSTEM_EDIT_COPY }, + { IDS_PASTE, NULL, ID_SYSTEM_EDIT_PASTE }, + { IDS_SELECTALL, NULL, ID_SYSTEM_EDIT_SELECTALL }, + { IDS_SCROLL, NULL, ID_SYSTEM_EDIT_SCROLL }, + { IDS_FIND, NULL, ID_SYSTEM_EDIT_FIND }, { 0, NULL, 0 } /* End of list */ }; static const GUICONSOLE_MENUITEM GuiConsoleMainMenuItems[] = { - { IDS_EDIT, GuiConsoleEditMenuItems, 0 }, - { IDS_DEFAULTS, NULL, ID_SYSTEM_DEFAULTS }, - { IDS_PROPERTIES, NULL, ID_SYSTEM_PROPERTIES }, + { IDS_EDIT, GuiConsoleEditMenuItems, 0 }, + { IDS_DEFAULTS, NULL, ID_SYSTEM_DEFAULTS }, + { IDS_PROPERTIES, NULL, ID_SYSTEM_PROPERTIES }, { 0, NULL, 0 } /* End of list */ }; @@ -186,8 +186,7 @@ static VOID GuiConsoleCreateSysMenu(HWND hWnd) { - HMENU hMenu; - hMenu = GetSystemMenu(hWnd, FALSE); + HMENU hMenu = GetSystemMenu(hWnd, FALSE); if (hMenu != NULL) { GuiConsoleAppendMenuItems(hMenu, GuiConsoleMainMenuItems); @@ -195,6 +194,16 @@ } } +static VOID +GuiSendMenuEvent(PCONSOLE Console, UINT CmdId) +{ + INPUT_RECORD er; + + er.EventType = MENU_EVENT; + er.Event.MenuEvent.dwCommandId = CmdId; + + ConioProcessInputEvent(Console, &er); +} static VOID GuiConsoleCopy(PGUI_CONSOLE_DATA GuiData); @@ -222,6 +231,18 @@ } ActiveBuffer = Console->ActiveBuffer; + /* + * In case the selected menu item belongs to the user-reserved menu id range, + * send to him a menu event and return directly. The user must handle those + * reserved menu commands... + */ + if (GuiData->cmdIdLow <= (UINT)wParam && (UINT)wParam <= GuiData->cmdIdHigh) + { + GuiSendMenuEvent(Console, (UINT)wParam); + goto Unlock_Quit; + } + + /* ... otherwise, perform actions. */ switch (wParam) { case ID_SYSTEM_EDIT_MARK: @@ -284,8 +305,8 @@ break; } +Unlock_Quit: LeaveCriticalSection(&Console->Lock); - Quit: if (!Ret) Ret = DefWindowProcW(GuiData->hWindow, WM_SYSCOMMAND, wParam, lParam); @@ -1570,9 +1591,11 @@ if (GuiData == NULL) return 0; /* - * Each helper function which needs the console - * has to validate and lock it. + * Just retrieve a pointer to the console in case somebody needs it. + * It is not NULL because it was checked in GuiGetGuiData. + * Each helper function which needs the console has to validate and lock it. */ + Console = GuiData->Console; /* We have a console, start message dispatching */ switch (msg) @@ -1683,6 +1706,36 @@ } } + case WM_INITMENU: + { + HMENU hMenu = (HMENU)wParam; + if (hMenu != NULL) + { + /* Enables or disables the Close menu item */ + EnableMenuItem(hMenu, SC_CLOSE, MF_BYCOMMAND | (GuiData->IsCloseButtonEnabled ? MF_ENABLED : MF_GRAYED)); + } + + if (ConSrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) + { + GuiSendMenuEvent(Console, WM_INITMENU); + LeaveCriticalSection(&Console->Lock); + } + break; + } + + case WM_MENUSELECT: + { + if (HIWORD(wParam) == 0xFFFF) // Allow all the menu flags + { + if (ConSrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) + { + GuiSendMenuEvent(Console, WM_MENUSELECT); + LeaveCriticalSection(&Console->Lock); + } + } + break; + } + case WM_COMMAND: case WM_SYSCOMMAND: { @@ -1693,7 +1746,6 @@ case WM_SETFOCUS: case WM_KILLFOCUS: { - Console = GuiData->Console; // Not NULL because checked in GuiGetGuiData. if (ConSrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) { INPUT_RECORD er; @@ -1730,7 +1782,6 @@ case PM_APPLY_CONSOLE_INFO: { - Console = GuiData->Console; // Not NULL because checked in GuiGetGuiData. if (ConSrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) { GuiApplyUserSettings(GuiData, (HANDLE)wParam, (BOOL)lParam); @@ -2322,6 +2373,37 @@ return TRUE; } +static HMENU WINAPI +GuiMenuControl(PCONSOLE Console, UINT cmdIdLow, UINT cmdIdHigh) +{ + PGUI_CONSOLE_DATA GuiData = Console->TermIFace.Data; + + GuiData->cmdIdLow = cmdIdLow ; + GuiData->cmdIdHigh = cmdIdHigh; + + return GetSystemMenu(GuiData->hWindow, FALSE); +} + +static BOOL WINAPI +GuiSetMenuClose(PCONSOLE Console, BOOL Enable) +{ + /* + * NOTE: See
http://www.mail-archive.com/harbour@harbour-project.org/msg27509.html
+ * or
http://harbour-devel.1590103.n2.nabble.com/Question-about-hb-gt-win-CtrlHan…
+ * for more information. + */ + + PGUI_CONSOLE_DATA GuiData = Console->TermIFace.Data; + HMENU hSysMenu = GetSystemMenu(GuiData->hWindow, FALSE); + + if (hSysMenu == NULL) return FALSE; + + GuiData->IsCloseButtonEnabled = Enable; + EnableMenuItem(hSysMenu, SC_CLOSE, MF_BYCOMMAND | (Enable ? MF_ENABLED : MF_GRAYED)); + + return TRUE; +} + static FRONTEND_VTBL GuiVtbl = { GuiCleanupConsole, @@ -2338,6 +2420,8 @@ GuiGetLargestConsoleWindowSize, GuiGetDisplayMode, GuiSetDisplayMode, + GuiMenuControl, + GuiSetMenuClose, }; NTSTATUS FASTCALL @@ -2460,6 +2544,12 @@ } } + /* Close button and the corresponding system menu item are enabled by default */ + GuiData->IsCloseButtonEnabled = TRUE; + + /* There is no user-reserved menu id range by default */ + GuiData->cmdIdLow = GuiData->cmdIdHigh = 0; + /* * We need to wait until the GUI has been fully initialized * to retrieve custom settings i.e. WindowSize etc... Modified: trunk/reactos/win32ss/user/consrv/frontends/tui/tuiterm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/consrv/fronte…
============================================================================== --- trunk/reactos/win32ss/user/consrv/frontends/tui/tuiterm.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/consrv/frontends/tui/tuiterm.c [iso-8859-1] Thu May 30 00:50:03 2013 @@ -643,6 +643,18 @@ return TRUE; } +static HMENU WINAPI +TuiMenuControl(PCONSOLE Console, UINT cmdIdLow, UINT cmdIdHigh) +{ + return NULL; +} + +static BOOL WINAPI +TuiSetMenuClose(PCONSOLE Console, BOOL Enable) +{ + return FALSE; +} + static FRONTEND_VTBL TuiVtbl = { TuiCleanupConsole, @@ -659,6 +671,8 @@ TuiGetLargestConsoleWindowSize, TuiGetDisplayMode, TuiSetDisplayMode, + TuiMenuControl, + TuiSetMenuClose, }; NTSTATUS FASTCALL Modified: trunk/reactos/win32ss/user/consrv/include/conio.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/consrv/includ…
============================================================================== --- trunk/reactos/win32ss/user/consrv/include/conio.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/consrv/include/conio.h [iso-8859-1] Thu May 30 00:50:03 2013 @@ -218,6 +218,11 @@ ULONG (WINAPI *GetDisplayMode)(struct _CONSOLE* Console); BOOL (WINAPI *SetDisplayMode)(struct _CONSOLE* Console, ULONG NewMode); + HMENU (WINAPI *MenuControl)(struct _CONSOLE* Console, + UINT cmdIdLow, + UINT cmdIdHigh); + BOOL (WINAPI *SetMenuClose)(struct _CONSOLE* Console, + BOOL Enable); #if 0 // Possible future front-end interface BOOL (WINAPI *GetFrontEndProperty)(struct _CONSOLE* Console, Modified: trunk/reactos/win32ss/user/consrv/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/consrv/init.c…
============================================================================== --- trunk/reactos/win32ss/user/consrv/init.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/consrv/init.c [iso-8859-1] Thu May 30 00:50:03 2013 @@ -74,7 +74,7 @@ // SrvVDMConsoleOperation, // SrvSetConsoleCursor, // SrvShowConsoleCursor, - // SrvConsoleMenuControl, + SrvConsoleMenuControl, // SrvSetConsolePalette, SrvSetConsoleDisplayMode, // SrvRegisterConsoleVDM, @@ -95,7 +95,7 @@ SrvGetConsoleCP, SrvSetConsoleCP, // SrvSetConsoleKeyShortcuts, - // SrvSetConsoleMenuClose, + SrvSetConsoleMenuClose, // SrvConsoleNotifyLastClose, SrvGenerateConsoleCtrlEvent, // SrvGetConsoleKeyboardLayoutName, @@ -165,7 +165,7 @@ // FALSE, // SrvVDMConsoleOperation, // FALSE, // SrvSetConsoleCursor, // FALSE, // SrvShowConsoleCursor, - // FALSE, // SrvConsoleMenuControl, + FALSE, // SrvConsoleMenuControl, // FALSE, // SrvSetConsolePalette, FALSE, // SrvSetConsoleDisplayMode, // FALSE, // SrvRegisterConsoleVDM, @@ -186,7 +186,7 @@ FALSE, // SrvGetConsoleCP, FALSE, // SrvSetConsoleCP, // FALSE, // SrvSetConsoleKeyShortcuts, - // FALSE, // SrvSetConsoleMenuClose, + FALSE, // SrvSetConsoleMenuClose, // FALSE, // SrvConsoleNotifyLastClose, FALSE, // SrvGenerateConsoleCtrlEvent, // FALSE, // SrvGetConsoleKeyboardLayoutName, @@ -256,7 +256,7 @@ // "VDMConsoleOperation", // "SetConsoleCursor", // "ShowConsoleCursor", - // "ConsoleMenuControl", + "ConsoleMenuControl", // "SetConsolePalette", "SetConsoleDisplayMode", // "RegisterConsoleVDM", @@ -277,7 +277,7 @@ "GetConsoleCP", "SetConsoleCP", // "SetConsoleKeyShortcuts", - // "SetConsoleMenuClose", + "SetConsoleMenuClose", // "ConsoleNotifyLastClose", "GenerateConsoleCtrlEvent", // "GetConsoleKeyboardLayoutName",
11 years, 6 months
1
0
0
0
[cwittich] 59111: [dxdiag] use unicode structures when using unicode functions
by cwittich@svn.reactos.org
Author: cwittich Date: Wed May 29 20:36:22 2013 New Revision: 59111 URL:
http://svn.reactos.org/svn/reactos?rev=59111&view=rev
Log: [dxdiag] use unicode structures when using unicode functions Modified: trunk/reactos/base/applications/dxdiag/display.c trunk/reactos/base/applications/dxdiag/dxdiag.c Modified: trunk/reactos/base/applications/dxdiag/display.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/d…
============================================================================== --- trunk/reactos/base/applications/dxdiag/display.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/display.c [iso-8859-1] Wed May 29 20:36:22 2013 @@ -213,7 +213,7 @@ HKEY hKey; HWND hDlgCtrls[5]; DWORD dwMemory; - DEVMODE DevMode; + DEVMODEW DevMode; IDirect3D9 * ppObj; D3DADAPTER_IDENTIFIER9 Identifier; HRESULT hResult; @@ -276,7 +276,7 @@ } /* retrieve current display mode */ - DevMode.dmSize = sizeof(DEVMODE); + DevMode.dmSize = sizeof(DEVMODEW); if (EnumDisplaySettingsW(pDispDevice->DeviceName, ENUM_CURRENT_SETTINGS, &DevMode)) { szFormat[0] = L'\0'; Modified: trunk/reactos/base/applications/dxdiag/dxdiag.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/d…
============================================================================== --- trunk/reactos/base/applications/dxdiag/dxdiag.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/dxdiag.c [iso-8859-1] Wed May 29 20:36:22 2013 @@ -50,7 +50,7 @@ TCITEMW item; /* setup item info */ - memset(&item, 0, sizeof(TCITEM)); + memset(&item, 0, sizeof(TCITEMW)); item.mask = TCIF_TEXT; /* load item name */
11 years, 6 months
1
0
0
0
← Newer
1
2
3
4
5
...
24
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
Results per page:
10
25
50
100
200