Author: gedmurphy
Date: Tue Jan 5 19:16:43 2010
New Revision: 44953
URL: http://svn.reactos.org/svn/reactos?rev=44953&view=rev
Log:
Forgot the comments in this file
Modified:
trunk/reactos/base/applications/mscutils/servman/progress.c
Modified: trunk/reactos/base/applications/mscutils/servman/progress.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/progress.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/mscutils/servman/progress.c [iso-8859-1] Tue Jan 5 19:16:43 2010
@@ -3,7 +3,7 @@
* LICENSE: GPL - See COPYING in the top level directory
* FILE: base/applications/mscutils/servman/progress.c
* PURPOSE: Progress dialog box message handler
- * COPYRIGHT: Copyright 2006-2007 Ged Murphy <gedmurphy(a)reactos.org>
+ * COPYRIGHT: Copyright 2006-2010 Ged Murphy <gedmurphy(a)reactos.org>
*
*/
@@ -15,26 +15,31 @@
CompleteProgressBar(HWND hProgDlg)
{
HWND hProgBar;
+ UINT Pos = 0;
+ /* Get a handle to the progress bar */
hProgBar = GetDlgItem(hProgDlg,
IDC_SERVCON_PROGRESS);
if (hProgBar)
{
- INT pos = 0;
-
- pos = SendMessageW(hProgBar,
+ /* Get the current position */
+ Pos = SendMessageW(hProgBar,
PBM_GETPOS,
0,
0);
- while (pos <= PROGRESSRANGE)
+ /* Loop until we hit the max */
+ while (Pos <= PROGRESSRANGE)
{
+ /* Increment the progress bar */
SendMessageW(hProgBar,
PBM_DELTAPOS,
- pos,
+ Pos,
0);
+
+ /* Wait for 15ms, it gives it a smooth feel */
Sleep(15);
- pos++;
+ Pos++;
}
}
}
@@ -45,12 +50,15 @@
{
HWND hProgBar;
+ /* Get a handle to the progress bar */
hProgBar = GetDlgItem(hProgDlg,
IDC_SERVCON_PROGRESS);
if (hProgBar)
{
+ /* Do we want to increment the default amount? */
if (NewPos == DEFAULT_STEP)
{
+ /* Yes, use the step value we set on create */
SendMessageW(hProgBar,
PBM_STEPIT,
0,
@@ -58,6 +66,7 @@
}
else
{
+ /* No, use the value passed */
SendMessageW(hProgBar,
PBM_SETPOS,
NewPos,
@@ -169,7 +178,7 @@
/* Complete the progress bar */
CompleteProgressBar(hwnd);
- /* Wait for asthetics */
+ /* Wait, for asthetics */
Sleep(500);
}
Author: fireball
Date: Tue Jan 5 17:37:32 2010
New Revision: 44948
URL: http://svn.reactos.org/svn/reactos?rev=44948&view=rev
Log:
Daniel Zimmermann <netzimme(a)aim.com>
- Implement RtlDnsHostNameToComputerName.
See issue #5092 for more details.
Modified:
trunk/reactos/dll/ntdll/def/ntdll.pspec
trunk/reactos/lib/rtl/unicode.c
Modified: trunk/reactos/dll/ntdll/def/ntdll.pspec
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/def/ntdll.pspec?…
==============================================================================
--- trunk/reactos/dll/ntdll/def/ntdll.pspec [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/def/ntdll.pspec [iso-8859-1] Tue Jan 5 17:37:32 2010
@@ -562,7 +562,7 @@
@ stdcall RtlDestroyQueryDebugBuffer(ptr)
@ stdcall RtlDetermineDosPathNameType_U(wstr)
@ stdcall RtlDllShutdownInProgress()
-//@ stdcall RtlDnsHostNameToComputerName
+@ stdcall RtlDnsHostNameToComputerName(ptr ptr long)
@ stdcall RtlDoesFileExists_U(wstr)
//@ stdcall RtlDosApplyFileIsolationRedirection_Ustr
@ stdcall RtlDosPathNameToNtPathName_U(wstr ptr ptr ptr)
Modified: trunk/reactos/lib/rtl/unicode.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/unicode.c?rev=4494…
==============================================================================
--- trunk/reactos/lib/rtl/unicode.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/unicode.c [iso-8859-1] Tue Jan 5 17:37:32 2010
@@ -2436,3 +2436,74 @@
return STATUS_NOT_FOUND;
}
+
+/*
+ * @implemented
+ *
+ * NOTES
+ * Get the maximum of MAX_COMPUTERNAME_LENGTH characters from the dns.host name until the dot is found.
+ * Convert is to an uppercase oem string and check for unmapped characters.
+ * Then convert the oem string back to an unicode string.
+ */
+NTSTATUS
+NTAPI
+RtlDnsHostNameToComputerName(PUNICODE_STRING ComputerName,PUNICODE_STRING DnsHostName,BOOLEAN AllocateComputerNameString)
+{
+ NTSTATUS Status;
+ ULONG Length;
+ ULONG ComputerNameLength;
+ ULONG ComputerNameOemNLength;
+ OEM_STRING ComputerNameOem;
+ CHAR ComputerNameOemN[MAX_COMPUTERNAME_LENGTH + 1];
+
+ Status = STATUS_INVALID_COMPUTER_NAME;
+ ComputerNameLength = DnsHostName->Length;
+
+ /* find the first dot in the dns host name */
+ for (Length = 0;Length < DnsHostName->Length/sizeof(WCHAR);Length++)
+ {
+ if (DnsHostName->Buffer[Length] == L'.')
+ {
+ /* dot found, so set the length for the oem translation */
+ ComputerNameLength = Length*sizeof(WCHAR);
+ break;
+ }
+ }
+
+ /* the computername must have one character */
+ if (ComputerNameLength > 0)
+ {
+ ComputerNameOemNLength = 0;
+ /* convert to oem string and use uppercase letters */
+ Status = RtlUpcaseUnicodeToOemN(ComputerNameOemN,
+ MAX_COMPUTERNAME_LENGTH,
+ &ComputerNameOemNLength,
+ DnsHostName->Buffer,
+ ComputerNameLength);
+ /* status STATUS_BUFFER_OVERFLOW is not a problem since the computername shoud only
+ have MAX_COMPUTERNAME_LENGTH characters */
+ if ((Status == STATUS_SUCCESS) ||
+ (Status == STATUS_BUFFER_OVERFLOW))
+ {
+ /* set the termination for the oem string */
+ ComputerNameOemN[MAX_COMPUTERNAME_LENGTH] = 0;
+ /* set status for the case the next function failed */
+ Status = STATUS_INVALID_COMPUTER_NAME;
+ /* fillup the oem string structure with the converted computername
+ and check it for unmapped characters */
+ ComputerNameOem.Buffer = ComputerNameOemN;
+ ComputerNameOem.Length = (USHORT)ComputerNameOemNLength;
+ ComputerNameOem.MaximumLength = (USHORT)(MAX_COMPUTERNAME_LENGTH + 1);
+ if (RtlpDidUnicodeToOemWork(DnsHostName, &ComputerNameOem) == TRUE)
+ {
+ /* no unmapped character so convert it back to an unicode string */
+ Status = RtlOemStringToUnicodeString(ComputerName,
+ &ComputerNameOem,
+ AllocateComputerNameString);
+ }
+ }
+ }
+
+ return Status;
+}
+
Author: fireball
Date: Tue Jan 5 17:18:35 2010
New Revision: 44946
URL: http://svn.reactos.org/svn/reactos?rev=44946&view=rev
Log:
Marcus Boillat <ka6602-280(a)online.de>
- ipconfig should also parse parameters starting with "-" (undocumented feature, tested on Windows XP, Vista and Windows 7).
See issue #5067 for more details.
Modified:
trunk/reactos/base/applications/network/ipconfig/ipconfig.c
Modified: trunk/reactos/base/applications/network/ipconfig/ipconfig.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/ipconfig/ipconfig.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/ipconfig/ipconfig.c [iso-8859-1] Tue Jan 5 17:18:35 2010
@@ -693,7 +693,7 @@
ProcessHeap = GetProcessHeap();
/* Parse command line for options we have been given. */
- if ( (argc > 1)&&(argv[1][0]=='/') )
+ if ( (argc > 1)&&(argv[1][0]=='/' || argv[1][0]=='-') )
{
if( !_tcsicmp( &argv[1][1], _T("?") ))
{