Author: hbelusca
Date: Sun Apr 14 16:04:46 2013
New Revision: 58758
URL:
http://svn.reactos.org/svn/reactos?rev=58758&view=rev
Log:
[CONSRV]
Fix some MSVC warnings (type conversions).
Ready for merging (TM) :)
Modified:
branches/ros-csrss/subsystems/win/basesrv/init.c
branches/ros-csrss/win32ss/user/consrv/coninput.c
branches/ros-csrss/win32ss/user/consrv/conoutput.c
branches/ros-csrss/win32ss/user/consrv/console.c
branches/ros-csrss/win32ss/user/consrv/frontends/gui/guiterm.c
branches/ros-csrss/win32ss/user/consrv/frontends/tui/tuiterm.c
branches/ros-csrss/win32ss/user/consrv/include/conio.h
branches/ros-csrss/win32ss/user/consrv/lineinput.c
branches/ros-csrss/win32ss/user/consrv/settings.c
Modified: branches/ros-csrss/subsystems/win/basesrv/init.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/subsystems/win/basesr…
==============================================================================
--- branches/ros-csrss/subsystems/win/basesrv/init.c [iso-8859-1] (original)
+++ branches/ros-csrss/subsystems/win/basesrv/init.c [iso-8859-1] Sun Apr 14 16:04:46
2013
@@ -456,7 +456,7 @@
sizeof(LuidEnabled),
NULL);
ASSERT(NT_SUCCESS(Status));
- BaseStaticServerData->LUIDDeviceMapsEnabled = LuidEnabled;
+ BaseStaticServerData->LUIDDeviceMapsEnabled = (BOOLEAN)LuidEnabled;
if (!BaseStaticServerData->LUIDDeviceMapsEnabled)
{
/* Make Global point back to BNO */
Modified: branches/ros-csrss/win32ss/user/consrv/coninput.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/coninput.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/coninput.c [iso-8859-1] Sun Apr 14 16:04:46
2013
@@ -568,7 +568,7 @@
if (Console->LineBuffer == NULL)
{
/* Starting a new line */
- Console->LineMaxSize = max(256, nNumberOfCharsToRead);
+ Console->LineMaxSize = (WORD)max(256, nNumberOfCharsToRead);
Console->LineBuffer = RtlAllocateHeap(ConSrvHeap, 0,
Console->LineMaxSize * sizeof(WCHAR));
if (Console->LineBuffer == NULL)
{
Modified: branches/ros-csrss/win32ss/user/consrv/conoutput.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/conoutput.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/conoutput.c [iso-8859-1] Sun Apr 14 16:04:46
2013
@@ -60,13 +60,13 @@
ClearLineBuffer(PCONSOLE_SCREEN_BUFFER Buff)
{
PBYTE Ptr = ConioCoordToPointer(Buff, 0, Buff->CursorPosition.Y);
- UINT Pos;
+ SHORT Pos;
for (Pos = 0; Pos < Buff->ScreenBufferSize.X; Pos++)
{
/* Fill the cell */
*Ptr++ = ' ';
- *Ptr++ = Buff->ScreenDefaultAttrib;
+ *Ptr++ = (BYTE)Buff->ScreenDefaultAttrib;
}
}
@@ -155,7 +155,7 @@
UINT i;
PBYTE Ptr;
SMALL_RECT UpdateRect;
- LONG CursorStartX, CursorStartY;
+ SHORT CursorStartX, CursorStartY;
UINT ScrolledLines;
CursorStartX = Buff->CursorPosition.X;
@@ -178,8 +178,8 @@
if (Buffer[i] == '\r')
{
Buff->CursorPosition.X = 0;
- UpdateRect.Left = min(UpdateRect.Left, (LONG)Buff->CursorPosition.X);
- UpdateRect.Right = max(UpdateRect.Right,
(LONG)Buff->CursorPosition.X);
+ UpdateRect.Left = min(UpdateRect.Left, Buff->CursorPosition.X);
+ UpdateRect.Right = max(UpdateRect.Right, Buff->CursorPosition.X);
continue;
}
/* --- LF --- */
@@ -200,7 +200,7 @@
/* slide virtual position up */
Buff->CursorPosition.X = Buff->ScreenBufferSize.X - 1;
Buff->CursorPosition.Y--;
- UpdateRect.Top = min(UpdateRect.Top,
(LONG)Buff->CursorPosition.Y);
+ UpdateRect.Top = min(UpdateRect.Top, Buff->CursorPosition.Y);
}
else
{
@@ -208,9 +208,9 @@
}
Ptr = ConioCoordToPointer(Buff, Buff->CursorPosition.X,
Buff->CursorPosition.Y);
Ptr[0] = ' ';
- Ptr[1] = Buff->ScreenDefaultAttrib;
- UpdateRect.Left = min(UpdateRect.Left,
(LONG)Buff->CursorPosition.X);
- UpdateRect.Right = max(UpdateRect.Right,
(LONG)Buff->CursorPosition.X);
+ Ptr[1] = (BYTE)Buff->ScreenDefaultAttrib;
+ UpdateRect.Left = min(UpdateRect.Left, Buff->CursorPosition.X);
+ UpdateRect.Right = max(UpdateRect.Right, Buff->CursorPosition.X);
}
continue;
}
@@ -219,17 +219,17 @@
{
UINT EndX;
- UpdateRect.Left = min(UpdateRect.Left, (LONG)Buff->CursorPosition.X);
+ UpdateRect.Left = min(UpdateRect.Left, Buff->CursorPosition.X);
EndX = (Buff->CursorPosition.X + TAB_WIDTH) & ~(TAB_WIDTH - 1);
- EndX = min(EndX, Buff->ScreenBufferSize.X);
+ EndX = min(EndX, (UINT)Buff->ScreenBufferSize.X);
Ptr = ConioCoordToPointer(Buff, Buff->CursorPosition.X,
Buff->CursorPosition.Y);
while (Buff->CursorPosition.X < EndX)
{
*Ptr++ = ' ';
- *Ptr++ = Buff->ScreenDefaultAttrib;
+ *Ptr++ = (BYTE)Buff->ScreenDefaultAttrib;
Buff->CursorPosition.X++;
}
- UpdateRect.Right = max(UpdateRect.Right, (LONG)Buff->CursorPosition.X
- 1);
+ UpdateRect.Right = max(UpdateRect.Right, Buff->CursorPosition.X - 1);
if (Buff->CursorPosition.X == Buff->ScreenBufferSize.X)
{
if (Buff->Mode & ENABLE_WRAP_AT_EOL_OUTPUT)
@@ -253,13 +253,13 @@
// continue;
// }
}
- UpdateRect.Left = min(UpdateRect.Left, (LONG)Buff->CursorPosition.X);
- UpdateRect.Right = max(UpdateRect.Right, (LONG)Buff->CursorPosition.X);
+ UpdateRect.Left = min(UpdateRect.Left, Buff->CursorPosition.X);
+ UpdateRect.Right = max(UpdateRect.Right, Buff->CursorPosition.X);
Ptr = ConioCoordToPointer(Buff, Buff->CursorPosition.X,
Buff->CursorPosition.Y);
Ptr[0] = Buffer[i];
if (Attrib)
{
- Ptr[1] = Buff->ScreenDefaultAttrib;
+ Ptr[1] = (BYTE)Buff->ScreenDefaultAttrib;
}
Buff->CursorPosition.X++;
if (Buff->CursorPosition.X == Buff->ScreenBufferSize.X)
@@ -278,8 +278,8 @@
if (!ConioIsRectEmpty(&UpdateRect) && Buff == Console->ActiveBuffer)
{
- ConioWriteStream(Console, &UpdateRect, CursorStartX, CursorStartY,
ScrolledLines,
- Buffer, Length);
+ ConioWriteStream(Console, &UpdateRect, CursorStartX, CursorStartY,
+ ScrolledLines, Buffer, Length);
}
return STATUS_SUCCESS;
@@ -466,7 +466,7 @@
for (i = 0; i < diff; i++)
{
Buffer[Offset++] = ' ';
- Buffer[Offset++] = ScreenBuffer->ScreenDefaultAttrib;
+ Buffer[Offset++] = (BYTE)ScreenBuffer->ScreenDefaultAttrib;
}
#endif
}
@@ -481,7 +481,7 @@
for (i = 0; i < diff; i++)
{
Buffer[Offset++] = ' ';
- Buffer[Offset++] = ScreenBuffer->ScreenDefaultAttrib;
+ Buffer[Offset++] = (BYTE)ScreenBuffer->ScreenDefaultAttrib;
}
#endif
}
@@ -730,7 +730,7 @@
PCHAR_INFO CharInfo;
PCHAR_INFO CurCharInfo;
PCONSOLE_SCREEN_BUFFER Buff;
- DWORD SizeX, SizeY;
+ SHORT SizeX, SizeY;
NTSTATUS Status;
COORD BufferSize;
COORD BufferCoord;
@@ -905,7 +905,7 @@
AsciiChar = CurCharInfo->Char.AsciiChar;
}
*Ptr++ = AsciiChar;
- *Ptr++ = CurCharInfo->Attributes;
+ *Ptr++ = (BYTE)CurCharInfo->Attributes;
CurCharInfo++;
}
}
@@ -929,7 +929,7 @@
PCONSOLE Console;
PCONSOLE_SCREEN_BUFFER Buff;
USHORT CodeType;
- DWORD Xpos, Ypos;
+ SHORT Xpos, Ypos;
PVOID ReadBuffer;
DWORD i;
ULONG CodeSize;
@@ -1324,8 +1324,8 @@
PCONSOLE_SETCURSORPOSITION SetCursorPositionRequest =
&((PCONSOLE_API_MESSAGE)ApiMessage)->Data.SetCursorPositionRequest;
PCONSOLE Console;
PCONSOLE_SCREEN_BUFFER Buff;
- LONG OldCursorX, OldCursorY;
- LONG NewCursorX, NewCursorY;
+ SHORT OldCursorX, OldCursorY;
+ SHORT NewCursorX, NewCursorY;
DPRINT("SrvSetConsoleCursorPosition\n");
Modified: branches/ros-csrss/win32ss/user/consrv/console.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/c…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/console.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/console.c [iso-8859-1] Sun Apr 14 16:04:46
2013
@@ -523,7 +523,7 @@
*/
if (ConsoleStartInfo->dwStartupFlags & STARTF_USEFILLATTRIBUTE)
{
- ConsoleInfo.ScreenAttrib = ConsoleStartInfo->FillAttribute;
+ ConsoleInfo.ScreenAttrib = (USHORT)ConsoleStartInfo->FillAttribute;
}
if (ConsoleStartInfo->dwStartupFlags & STARTF_USECOUNTCHARS)
{
Modified: branches/ros-csrss/win32ss/user/consrv/frontends/gui/guiterm.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/f…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/frontends/gui/guiterm.c [iso-8859-1]
(original)
+++ branches/ros-csrss/win32ss/user/consrv/frontends/gui/guiterm.c [iso-8859-1] Sun Apr 14
16:04:46 2013
@@ -595,11 +595,7 @@
}
MultiByteToWideChar(Console->OutputCodePage,
- 0,
- (PCHAR)From,
- 1,
- To,
- 1);
+ 0, (PCHAR)From, 1, To, 1);
To++;
From += 2;
}
@@ -611,13 +607,14 @@
RightChar - Start + 1);
}
- if (Buff->CursorInfo.bVisible && Buff->CursorBlinkOn &&
- !Buff->ForceCursorOff)
+ if (Buff->CursorInfo.bVisible &&
+ Buff->CursorBlinkOn &&
+ !Buff->ForceCursorOff)
{
CursorX = Buff->CursorPosition.X;
CursorY = Buff->CursorPosition.Y;
if (LeftChar <= CursorX && CursorX <= RightChar &&
- TopLine <= CursorY && CursorY <= BottomLine)
+ TopLine <= CursorY && CursorY <= BottomLine)
{
CursorHeight = ConioEffectiveCursorSize(Console, GuiData->CharHeight);
From = ConioCoordToPointer(Buff, Buff->CursorPosition.X,
Buff->CursorPosition.Y) + 1;
@@ -836,7 +833,7 @@
}
static VOID
-GuiInvalidateCell(PCONSOLE Console, UINT x, UINT y)
+GuiInvalidateCell(PCONSOLE Console, SHORT x, SHORT y)
{
SMALL_RECT CellRect = { x, y, x, y };
GuiDrawRegion(Console, &CellRect);
@@ -971,8 +968,8 @@
PCONSOLE_SCREEN_BUFFER Buffer = Console->ActiveBuffer;
COORD Coord;
- Coord.X = Buffer->ShowX + ((short)LOWORD(lParam) / (int)GuiData->CharWidth);
- Coord.Y = Buffer->ShowY + ((short)HIWORD(lParam) / (int)GuiData->CharHeight);
+ Coord.X = Buffer->ShowX + ((SHORT)LOWORD(lParam) / (int)GuiData->CharWidth);
+ Coord.Y = Buffer->ShowY + ((SHORT)HIWORD(lParam) / (int)GuiData->CharHeight);
/* Clip coordinate to ensure it's inside buffer */
if (Coord.X < 0)
@@ -2029,12 +2026,12 @@
}
static VOID WINAPI
-GuiWriteStream(PCONSOLE Console, SMALL_RECT* Region, LONG CursorStartX, LONG
CursorStartY,
+GuiWriteStream(PCONSOLE Console, SMALL_RECT* Region, SHORT CursorStartX, SHORT
CursorStartY,
UINT ScrolledLines, CHAR *Buffer, UINT Length)
{
PGUI_CONSOLE_DATA GuiData = Console->TermIFace.Data;
PCONSOLE_SCREEN_BUFFER Buff = Console->ActiveBuffer;
- LONG CursorEndX, CursorEndY;
+ SHORT CursorEndX, CursorEndY;
RECT ScrollRect;
if (NULL == GuiData || NULL == GuiData->hWindow)
@@ -2104,7 +2101,7 @@
}
static BOOL WINAPI
-GuiSetScreenInfo(PCONSOLE Console, PCONSOLE_SCREEN_BUFFER Buff, UINT OldCursorX, UINT
OldCursorY)
+GuiSetScreenInfo(PCONSOLE Console, PCONSOLE_SCREEN_BUFFER Buff, SHORT OldCursorX, SHORT
OldCursorY)
{
if (Console->ActiveBuffer == Buff)
{
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] Sun Apr 14
16:04:46 2013
@@ -480,7 +480,7 @@
}
static VOID WINAPI
-TuiWriteStream(PCONSOLE Console, SMALL_RECT* Region, LONG CursorStartX, LONG
CursorStartY,
+TuiWriteStream(PCONSOLE Console, SMALL_RECT* Region, SHORT CursorStartX, SHORT
CursorStartY,
UINT ScrolledLines, CHAR *Buffer, UINT Length)
{
DWORD BytesWritten;
@@ -554,7 +554,7 @@
}
static BOOL WINAPI
-TuiSetScreenInfo(PCONSOLE Console, PCONSOLE_SCREEN_BUFFER Buff, UINT OldCursorX, UINT
OldCursorY)
+TuiSetScreenInfo(PCONSOLE Console, PCONSOLE_SCREEN_BUFFER Buff, SHORT OldCursorX, SHORT
OldCursorY)
{
CONSOLE_SCREEN_BUFFER_INFO Info;
DWORD BytesReturned;
Modified: branches/ros-csrss/win32ss/user/consrv/include/conio.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/i…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/include/conio.h [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/include/conio.h [iso-8859-1] Sun Apr 14
16:04:46 2013
@@ -93,8 +93,8 @@
VOID (WINAPI *CleanupConsole)(struct _CONSOLE* Console);
VOID (WINAPI *WriteStream)(struct _CONSOLE* Console,
SMALL_RECT* Block,
- LONG CursorStartX,
- LONG CursorStartY,
+ SHORT CursorStartX,
+ SHORT CursorStartY,
UINT ScrolledLines,
CHAR *Buffer,
UINT Length);
@@ -104,8 +104,8 @@
PCONSOLE_SCREEN_BUFFER ScreenBuffer);
BOOL (WINAPI *SetScreenInfo)(struct _CONSOLE* Console,
PCONSOLE_SCREEN_BUFFER ScreenBuffer,
- UINT OldCursorX,
- UINT OldCursorY);
+ SHORT OldCursorX,
+ SHORT OldCursorY);
BOOL (WINAPI *UpdateScreenInfo)(struct _CONSOLE* Console,
PCONSOLE_SCREEN_BUFFER ScreenBuffer);
BOOL (WINAPI *IsBufferResizeSupported)(struct _CONSOLE* Console);
Modified: branches/ros-csrss/win32ss/user/consrv/lineinput.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/l…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/lineinput.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/lineinput.c [iso-8859-1] Sun Apr 14 16:04:46
2013
@@ -67,14 +67,13 @@
HistoryAddEntry(PCONSOLE Console)
{
UNICODE_STRING NewEntry;
- PHISTORY_BUFFER Hist;
+ PHISTORY_BUFFER Hist = HistoryCurrentBuffer(Console);
INT i;
+
+ if (!Hist) return;
NewEntry.Length = NewEntry.MaximumLength = Console->LineSize * sizeof(WCHAR);
NewEntry.Buffer = Console->LineBuffer;
-
- if (!(Hist = HistoryCurrentBuffer(Console)))
- return;
/* Don't add blank or duplicate entries */
if (NewEntry.Length == 0 || Hist->MaxEntries == 0 ||
@@ -118,8 +117,9 @@
static VOID
HistoryGetCurrentEntry(PCONSOLE Console, PUNICODE_STRING Entry)
{
- PHISTORY_BUFFER Hist;
- if (!(Hist = HistoryCurrentBuffer(Console)) || Hist->NumEntries == 0)
+ PHISTORY_BUFFER Hist = HistoryCurrentBuffer(Console);
+
+ if (!Hist || Hist->NumEntries == 0)
Entry->Length = 0;
else
*Entry = Hist->Entries[Hist->Position];
@@ -173,8 +173,8 @@
if (Pos != Console->LinePos && Console->InputBuffer.Mode &
ENABLE_ECHO_INPUT)
{
PCONSOLE_SCREEN_BUFFER Buffer = Console->ActiveBuffer;
- UINT OldCursorX = Buffer->CursorPosition.X;
- UINT OldCursorY = Buffer->CursorPosition.Y;
+ SHORT OldCursorX = Buffer->CursorPosition.X;
+ SHORT OldCursorY = Buffer->CursorPosition.Y;
INT XY = OldCursorY * Buffer->ScreenBufferSize.X + OldCursorX;
XY += (Pos - Console->LinePos);
@@ -196,7 +196,7 @@
{
UINT Pos = Console->LinePos;
UINT NewSize = Console->LineSize - NumToDelete + NumToInsert;
- INT i;
+ UINT i;
/* Make sure there's always enough room for ending \r\n */
if (NewSize + 2 > Console->LineMaxSize)
@@ -231,20 +231,19 @@
static VOID
LineInputRecallHistory(PCONSOLE Console, INT Offset)
{
- PHISTORY_BUFFER Hist;
-
- if (!(Hist = HistoryCurrentBuffer(Console)) || Hist->NumEntries == 0)
- return;
-
- Offset += Hist->Position;
- Offset = max(Offset, 0);
- Offset = min(Offset, Hist->NumEntries - 1);
- Hist->Position = Offset;
+ PHISTORY_BUFFER Hist = HistoryCurrentBuffer(Console);
+ UINT Position = 0;
+
+ if (!Hist || Hist->NumEntries == 0) return;
+
+ Position = Hist->Position + Offset;
+ Position = min(max(Position, 0), Hist->NumEntries - 1);
+ Hist->Position = Position;
LineInputSetPos(Console, 0);
LineInputEdit(Console, Console->LineSize,
- Hist->Entries[Offset].Length / sizeof(WCHAR),
- Hist->Entries[Offset].Buffer);
+ Hist->Entries[Hist->Position].Length / sizeof(WCHAR),
+ Hist->Entries[Hist->Position].Buffer);
}
VOID FASTCALL
@@ -357,8 +356,8 @@
return;
case VK_F8:
/* Search for history entries starting with input. */
- if (!(Hist = HistoryCurrentBuffer(Console)) || Hist->NumEntries == 0)
- return;
+ Hist = HistoryCurrentBuffer(Console);
+ if (!Hist || Hist->NumEntries == 0) return;
/* Like Up/F5, on first time start from current (usually last) entry,
* but on subsequent times start at previous entry. */
@@ -455,7 +454,7 @@
PHISTORY_BUFFER Hist;
PBYTE Buffer = (PBYTE)GetCommandHistoryRequest->History;
ULONG BufferSize = GetCommandHistoryRequest->Length;
- INT i;
+ UINT i;
if ( !CsrValidateMessageBuffer(ApiMessage,
(PVOID*)&GetCommandHistoryRequest->History,
@@ -502,7 +501,7 @@
NTSTATUS Status;
PHISTORY_BUFFER Hist;
ULONG Length = 0;
- INT i;
+ UINT i;
if (!CsrValidateMessageBuffer(ApiMessage,
(PVOID*)&GetCommandHistoryLengthRequest->ExeName.Buffer,
Modified: branches/ros-csrss/win32ss/user/consrv/settings.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/consrv/s…
==============================================================================
--- branches/ros-csrss/win32ss/user/consrv/settings.c [iso-8859-1] (original)
+++ branches/ros-csrss/win32ss/user/consrv/settings.c [iso-8859-1] Sun Apr 14 16:04:46
2013
@@ -268,7 +268,7 @@
}
else if (!wcscmp(szValueName, L"HistoryNoDup"))
{
- ConsoleInfo->HistoryNoDup = Value;
+ ConsoleInfo->HistoryNoDup = (BOOLEAN)Value;
RetVal = TRUE;
}
else if (!wcscmp(szValueName, L"FullScreen"))
@@ -278,12 +278,12 @@
}
else if (!wcscmp(szValueName, L"QuickEdit"))
{
- ConsoleInfo->QuickEdit = Value;
+ ConsoleInfo->QuickEdit = (BOOLEAN)Value;
RetVal = TRUE;
}
else if (!wcscmp(szValueName, L"InsertMode"))
{
- ConsoleInfo->InsertMode = Value;
+ ConsoleInfo->InsertMode = (BOOLEAN)Value;
RetVal = TRUE;
}
else if (!wcscmp(szValueName, L"ScreenBufferSize"))
@@ -305,12 +305,12 @@
}
else if (!wcscmp(szValueName, L"ScreenColors"))
{
- ConsoleInfo->ScreenAttrib = Value;
+ ConsoleInfo->ScreenAttrib = (USHORT)Value;
RetVal = TRUE;
}
else if (!wcscmp(szValueName, L"PopupColors"))
{
- ConsoleInfo->PopupAttrib = Value;
+ ConsoleInfo->PopupAttrib = (USHORT)Value;
RetVal = TRUE;
}
}