Author: hbelusca
Date: Sat Apr 13 21:09:49 2013
New Revision: 58743
URL:
http://svn.reactos.org/svn/reactos?rev=58743&view=rev
Log:
[CONSRV]
Fix the TUI window procedure.
[SAMSRV]
Add Eric's revision r58742 in the meantime.
Modified:
branches/ros-csrss/ (props changed)
branches/ros-csrss/dll/win32/samsrv/samsrv.c
branches/ros-csrss/dll/win32/samsrv/samsrv.spec
branches/ros-csrss/win32ss/user/consrv/frontends/tui/tuiterm.c
Propchange: branches/ros-csrss/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Apr 13 21:09:49 2013
@@ -13,4 +13,4 @@
/branches/usb-bringup:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859
/branches/usb-bringup-trunk:55019-55543,55548-55554,55556-55567
/branches/wlan-bringup:54809-54998
-/trunk/reactos:57561-58740
+/trunk/reactos:57561-58742
Modified: branches/ros-csrss/dll/win32/samsrv/samsrv.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/samsrv/sams…
==============================================================================
--- branches/ros-csrss/dll/win32/samsrv/samsrv.c [iso-8859-1] (original)
+++ branches/ros-csrss/dll/win32/samsrv/samsrv.c [iso-8859-1] Sat Apr 13 21:09:49 2013
@@ -131,7 +131,7 @@
{
if (Ptr != NULL)
{
- if (Ptr->Sids !=0)
+ if (Ptr->Sids != NULL)
{
MIDL_user_free(Ptr->Sids);
}
@@ -176,7 +176,222 @@
Ptr->Count = 0;
}
}
-
+}
+
+
+VOID
+NTAPI
+SamIFree_SAMPR_USER_INFO_BUFFER(PSAMPR_USER_INFO_BUFFER Ptr,
+ USER_INFORMATION_CLASS InformationClass)
+{
+ if (Ptr == NULL)
+ return;
+
+ switch (InformationClass)
+ {
+ case UserGeneralInformation:
+ if (Ptr->General.UserName.Buffer != NULL)
+ MIDL_user_free(Ptr->General.UserName.Buffer);
+
+ if (Ptr->General.FullName.Buffer != NULL)
+ MIDL_user_free(Ptr->General.FullName.Buffer);
+
+ if (Ptr->General.AdminComment.Buffer != NULL)
+ MIDL_user_free(Ptr->General.AdminComment.Buffer);
+
+ if (Ptr->General.UserComment.Buffer != NULL)
+ MIDL_user_free(Ptr->General.UserComment.Buffer);
+ break;
+
+ case UserPreferencesInformation:
+ if (Ptr->Preferences.UserComment.Buffer != NULL)
+ MIDL_user_free(Ptr->Preferences.UserComment.Buffer);
+
+ if (Ptr->Preferences.Reserved1.Buffer != NULL)
+ MIDL_user_free(Ptr->Preferences.Reserved1.Buffer);
+ break;
+
+ case UserLogonInformation:
+ if (Ptr->Logon.UserName.Buffer != NULL)
+ MIDL_user_free(Ptr->Logon.UserName.Buffer);
+
+ if (Ptr->Logon.FullName.Buffer != NULL)
+ MIDL_user_free(Ptr->Logon.FullName.Buffer);
+
+ if (Ptr->Logon.HomeDirectory.Buffer != NULL)
+ MIDL_user_free(Ptr->Logon.HomeDirectory.Buffer);
+
+ if (Ptr->Logon.HomeDirectoryDrive.Buffer != NULL)
+ MIDL_user_free(Ptr->Logon.HomeDirectoryDrive.Buffer);
+
+ if (Ptr->Logon.ScriptPath.Buffer != NULL)
+ MIDL_user_free(Ptr->Logon.ScriptPath.Buffer);
+
+ if (Ptr->Logon.ProfilePath.Buffer != NULL)
+ MIDL_user_free(Ptr->Logon.ProfilePath.Buffer);
+
+ if (Ptr->Logon.WorkStations.Buffer != NULL)
+ MIDL_user_free(Ptr->Logon.WorkStations.Buffer);
+
+ if (Ptr->Logon.LogonHours.LogonHours != NULL)
+ MIDL_user_free(Ptr->Logon.LogonHours.LogonHours);
+ break;
+
+ case UserLogonHoursInformation:
+ if (Ptr->LogonHours.LogonHours.LogonHours != NULL)
+ MIDL_user_free(Ptr->LogonHours.LogonHours.LogonHours);
+ break;
+
+ case UserAccountInformation:
+ if (Ptr->Account.UserName.Buffer != NULL)
+ MIDL_user_free(Ptr->Account.UserName.Buffer);
+
+ if (Ptr->Account.FullName.Buffer != NULL)
+ MIDL_user_free(Ptr->Account.FullName.Buffer);
+
+ if (Ptr->Account.HomeDirectory.Buffer != NULL)
+ MIDL_user_free(Ptr->Account.HomeDirectory.Buffer);
+
+ if (Ptr->Account.HomeDirectoryDrive.Buffer != NULL)
+ MIDL_user_free(Ptr->Account.HomeDirectoryDrive.Buffer);
+
+ if (Ptr->Account.ScriptPath.Buffer != NULL)
+ MIDL_user_free(Ptr->Account.ScriptPath.Buffer);
+
+ if (Ptr->Account.ProfilePath.Buffer != NULL)
+ MIDL_user_free(Ptr->Account.ProfilePath.Buffer);
+
+ if (Ptr->Account.AdminComment.Buffer != NULL)
+ MIDL_user_free(Ptr->Account.AdminComment.Buffer);
+
+ if (Ptr->Account.WorkStations.Buffer != NULL)
+ MIDL_user_free(Ptr->Account.WorkStations.Buffer);
+
+ if (Ptr->Account.LogonHours.LogonHours != NULL)
+ MIDL_user_free(Ptr->Account.LogonHours.LogonHours);
+ break;
+
+ case UserNameInformation:
+ if (Ptr->Name.UserName.Buffer != NULL)
+ MIDL_user_free(Ptr->Name.UserName.Buffer);
+
+ if (Ptr->Name.FullName.Buffer != NULL)
+ MIDL_user_free(Ptr->Name.FullName.Buffer);
+ break;
+
+ case UserAccountNameInformation:
+ if (Ptr->AccountName.UserName.Buffer != NULL)
+ MIDL_user_free(Ptr->AccountName.UserName.Buffer);
+ break;
+
+ case UserFullNameInformation:
+ if (Ptr->FullName.FullName.Buffer != NULL)
+ MIDL_user_free(Ptr->FullName.FullName.Buffer);
+ break;
+
+ case UserPrimaryGroupInformation:
+ break;
+
+ case UserHomeInformation:
+ if (Ptr->Home.HomeDirectory.Buffer != NULL)
+ MIDL_user_free(Ptr->Home.HomeDirectory.Buffer);
+
+ if (Ptr->Home.HomeDirectoryDrive.Buffer != NULL)
+ MIDL_user_free(Ptr->Home.HomeDirectoryDrive.Buffer);
+ break;
+
+ case UserScriptInformation:
+ if (Ptr->Script.ScriptPath.Buffer != NULL)
+ MIDL_user_free(Ptr->Script.ScriptPath.Buffer);
+
+ case UserProfileInformation:
+ if (Ptr->Profile.ProfilePath.Buffer != NULL)
+ MIDL_user_free(Ptr->Profile.ProfilePath.Buffer);
+
+ case UserAdminCommentInformation:
+ if (Ptr->AdminComment.AdminComment.Buffer != NULL)
+ MIDL_user_free(Ptr->AdminComment.AdminComment.Buffer);
+ break;
+
+ case UserWorkStationsInformation:
+ if (Ptr->WorkStations.WorkStations.Buffer != NULL)
+ MIDL_user_free(Ptr->WorkStations.WorkStations.Buffer);
+ break;
+
+ case UserSetPasswordInformation:
+ ERR("Information class UserSetPasswordInformation cannot be
queried!\n");
+ break;
+
+ case UserControlInformation:
+ break;
+
+ case UserExpiresInformation:
+ break;
+
+ case UserInternal1Information:
+ break;
+
+ case UserInternal2Information:
+ break;
+
+ case UserParametersInformation:
+ if (Ptr->Parameters.Parameters.Buffer != NULL)
+ MIDL_user_free(Ptr->Parameters.Parameters.Buffer);
+ break;
+
+ case UserAllInformation:
+ if (Ptr->All.UserName.Buffer != NULL)
+ MIDL_user_free(Ptr->All.UserName.Buffer);
+
+ if (Ptr->All.FullName.Buffer != NULL)
+ MIDL_user_free(Ptr->All.FullName.Buffer);
+
+ if (Ptr->All.HomeDirectory.Buffer != NULL)
+ MIDL_user_free(Ptr->All.HomeDirectory.Buffer);
+
+ if (Ptr->All.HomeDirectoryDrive.Buffer != NULL)
+ MIDL_user_free(Ptr->All.HomeDirectoryDrive.Buffer);
+
+ if (Ptr->All.ScriptPath.Buffer != NULL)
+ MIDL_user_free(Ptr->All.ScriptPath.Buffer);
+
+ if (Ptr->All.ProfilePath.Buffer != NULL)
+ MIDL_user_free(Ptr->All.ProfilePath.Buffer);
+
+ if (Ptr->All.AdminComment.Buffer != NULL)
+ MIDL_user_free(Ptr->All.AdminComment.Buffer);
+
+ if (Ptr->All.WorkStations.Buffer != NULL)
+ MIDL_user_free(Ptr->All.WorkStations.Buffer);
+
+ if (Ptr->All.UserComment.Buffer != NULL)
+ MIDL_user_free(Ptr->All.UserComment.Buffer);
+
+ if (Ptr->All.Parameters.Buffer != NULL)
+ MIDL_user_free(Ptr->All.Parameters.Buffer);
+
+ if (Ptr->All.LmOwfPassword.Buffer != NULL)
+ MIDL_user_free(Ptr->All.LmOwfPassword.Buffer);
+
+ if (Ptr->All.NtOwfPassword.Buffer != NULL)
+ MIDL_user_free(Ptr->All.NtOwfPassword.Buffer);
+
+ if (Ptr->All.PrivateData.Buffer != NULL)
+ MIDL_user_free(Ptr->All.PrivateData.Buffer);
+
+ if (Ptr->All.SecurityDescriptor.SecurityDescriptor != NULL)
+ MIDL_user_free(Ptr->All.SecurityDescriptor.SecurityDescriptor);
+
+ if (Ptr->All.LogonHours.LogonHours != NULL)
+ MIDL_user_free(Ptr->All.LogonHours.LogonHours);
+ break;
+
+ default:
+ FIXME("Unsupported information class: %lu\n", InformationClass);
+ break;
+ }
+
+ MIDL_user_free(Ptr);
}
/* EOF */
Modified: branches/ros-csrss/dll/win32/samsrv/samsrv.spec
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/samsrv/sams…
==============================================================================
--- branches/ros-csrss/dll/win32/samsrv/samsrv.spec [iso-8859-1] (original)
+++ branches/ros-csrss/dll/win32/samsrv/samsrv.spec [iso-8859-1] Sat Apr 13 21:09:49 2013
@@ -28,7 +28,7 @@
@ stdcall SamIFree_SAMPR_RETURNED_USTRING_ARRAY(ptr)
@ stub SamIFree_SAMPR_SR_SECURITY_DESCRIPTOR
@ stdcall SamIFree_SAMPR_ULONG_ARRAY(ptr)
-@ stub SamIFree_SAMPR_USER_INFO_BUFFER
+@ stdcall SamIFree_SAMPR_USER_INFO_BUFFER(ptr long)
@ stub SamIFree_UserInternal6Information
@ stub SamIGCLookupNames
@ stub SamIGCLookupSids
Modified: branches/ros-csrss/win32ss/user/consrv/frontends/tui/tuiterm.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/f…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/frontends/tui/tuiterm.c [iso-8859-1]
(original)
+++ branches/ros-csrss/win32ss/user/consrv/frontends/tui/tuiterm.c [iso-8859-1] Sat Apr 13
21:09:49 2013
@@ -11,7 +11,7 @@
#include "consrv.h"
#include "include/conio.h"
-// #include "include/console.h"
+#include "include/console.h"
#include "include/settings.h"
#include "tuiterm.h"
#include <drivers/blue/ntddblue.h>
@@ -258,14 +258,55 @@
static LRESULT CALLBACK
TuiConsoleWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- if (msg == WM_ACTIVATE)
- {
- if (LOWORD(wParam) != WA_INACTIVE)
+/*
+ PTUI_CONSOLE_DATA TuiData = NULL;
+ PCONSOLE Console = NULL;
+
+ TuiData = TuiGetGuiData(hWnd);
+ if (TuiData == NULL) return 0;
+*/
+
+ switch (msg)
+ {
+ case WM_CHAR:
+ case WM_SYSCHAR:
+ case WM_KEYDOWN:
+ case WM_SYSKEYDOWN:
+ case WM_KEYUP:
+ case WM_SYSKEYUP:
{
- SetFocus(hWnd);
- ConioDrawConsole(ActiveConsole->Console);
+ if (ConSrvValidateConsoleUnsafe(ActiveConsole->Console, CONSOLE_RUNNING,
TRUE))
+ {
+ MSG Message;
+ Message.hwnd = hWnd;
+ Message.message = msg;
+ Message.wParam = wParam;
+ Message.lParam = lParam;
+
+ ConioProcessKey(ActiveConsole->Console, &Message);
+ LeaveCriticalSection(&ActiveConsole->Console->Lock);
+ }
+ break;
}
- }
+
+ case WM_ACTIVATE:
+ {
+ if (ConSrvValidateConsoleUnsafe(ActiveConsole->Console, CONSOLE_RUNNING,
TRUE))
+ {
+ if (LOWORD(wParam) != WA_INACTIVE)
+ {
+ SetFocus(hWnd);
+ ConioDrawConsole(ActiveConsole->Console);
+ }
+ LeaveCriticalSection(&ActiveConsole->Console->Lock);
+ }
+ break;
+ }
+
+ default:
+ break;
+ }
+
return DefWindowProcW(hWnd, msg, wParam, lParam);
}
@@ -298,13 +339,6 @@
{
TranslateMessage(&msg);
DispatchMessageW(&msg);
-
- if (msg.message == WM_CHAR || msg.message == WM_SYSCHAR ||
- msg.message == WM_KEYDOWN || msg.message == WM_SYSKEYDOWN ||
- msg.message == WM_KEYUP || msg.message == WM_SYSKEYUP)
- {
- ConioProcessKey(Console, &msg);
- }
}
return 0;