diff --git a/trunk/ProcessHacker/Components/TaskbarLib/TaskbarClass.cs b/trunk/ProcessHacker/Components/TaskbarLib/TaskbarClass.cs
index ec714f40d..57f9c8ed3 100644
--- a/trunk/ProcessHacker/Components/TaskbarLib/TaskbarClass.cs
+++ b/trunk/ProcessHacker/Components/TaskbarLib/TaskbarClass.cs
@@ -56,37 +56,37 @@ namespace TaskbarLib
}
}
- public static void ActivateTab(IntPtr hwnd)
+ public static void ActivateTab(IntPtr hWnd)
{
- HResult result = Taskbar.ActivateTab(hwnd);
+ HResult result = Taskbar.ActivateTab(hWnd);
result.ThrowIf();
}
- public static void AddTab(IntPtr hwnd)
+ public static void AddTab(IntPtr hWnd)
{
- HResult result = Taskbar.AddTab(hwnd);
+ HResult result = Taskbar.AddTab(hWnd);
result.ThrowIf();
}
- public static void DeleteTab(IntPtr hwnd)
+ public static void DeleteTab(IntPtr hWnd)
{
- HResult result = Taskbar.DeleteTab(hwnd);
+ HResult result = Taskbar.DeleteTab(hWnd);
result.ThrowIf();
}
- public static void SetActivateAlt(IntPtr hwnd)
+ public static void SetActivateAlt(IntPtr hWnd)
{
- HResult result = Taskbar.SetActiveAlt(hwnd);
+ HResult result = Taskbar.SetActiveAlt(hWnd);
result.ThrowIf();
}
- public static void MarkFullscreenWindow(IntPtr hwnd, bool fullscreen)
+ public static void MarkFullscreenWindow(IntPtr hWnd, bool fullscreen)
{
- HResult result = Taskbar.MarkFullscreenWindow(hwnd, fullscreen);
+ HResult result = Taskbar.MarkFullscreenWindow(hWnd, fullscreen);
result.ThrowIf();
}
@@ -101,7 +101,7 @@ namespace TaskbarLib
}
}
- public static void SetProgressState(TaskbarNative.TBPFlag flags)
+ public static void SetProgressState(TaskbarNative.TaskbarProgressFlags flags)
{
if (OSVersion.HasExtendedTaskbar)
{
@@ -111,101 +111,105 @@ namespace TaskbarLib
}
}
- public static void RegisterTab(IntPtr hwndTab, IntPtr hwndMDI)
+ public static void RegisterTab(IntPtr hWndTab, IntPtr hWndMdi)
{
if (OSVersion.HasExtendedTaskbar)
{
- HResult result = Taskbar.RegisterTab(hwndTab, hwndMDI);
+ HResult result = Taskbar.RegisterTab(hWndTab, hWndMdi);
result.ThrowIf();
}
}
- public static void UnregisterTab(IntPtr hwndTab)
+ public static void UnregisterTab(IntPtr hWndTab)
{
if (OSVersion.HasExtendedTaskbar)
{
- HResult result = Taskbar.UnregisterTab(hwndTab);
+ HResult result = Taskbar.UnregisterTab(hWndTab);
result.ThrowIf();
}
}
- public static void SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore)
+ public static void SetTabOrder(IntPtr hWndTab, IntPtr hWndInsertBefore)
{
if (OSVersion.HasExtendedTaskbar)
{
- HResult result = Taskbar.SetTabOrder(hwndTab, hwndInsertBefore);
+ HResult result = Taskbar.SetTabOrder(hWndTab, hWndInsertBefore);
result.ThrowIf();
}
}
- public static void SetTabActive(IntPtr hwndTab, IntPtr hwndInsertBefore, TaskbarNative.TBATFlag tbatFlags)
+ public static void SetTabActive(IntPtr hWndTab, IntPtr hWndInsertBefore, TaskbarNative.TabActiveFlags tbatFlags)
{
if (OSVersion.HasExtendedTaskbar)
{
- HResult result = Taskbar.SetTabActive(hwndTab, hwndInsertBefore, tbatFlags);
+ HResult result = Taskbar.SetTabActive(hWndTab, hWndInsertBefore, tbatFlags);
result.ThrowIf();
}
}
- public static void ThumbBarAddButtons(IntPtr hwnd, uint cButtons, TaskbarNative.THUMBBUTTON[] pButton)
+ public static void ThumbBarAddButtons(IntPtr hWnd, int count, TaskbarNative.ThumbButton[] buttons)
{
if (OSVersion.HasExtendedTaskbar)
{
- HResult result = Taskbar.ThumbBarAddButtons(hwnd, cButtons, pButton);
+ HResult result = Taskbar.ThumbBarAddButtons(hWnd, count, buttons);
result.ThrowIf();
}
}
- public static void ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, TaskbarNative.THUMBBUTTON[] pButton)
+ public static void ThumbBarUpdateButtons(IntPtr hWnd, int count, TaskbarNative.ThumbButton[] buttons)
{
if (OSVersion.HasExtendedTaskbar)
{
- HResult result = Taskbar.ThumbBarUpdateButtons(hwnd, cButtons, pButton);
+ HResult result = Taskbar.ThumbBarUpdateButtons(hWnd, count, buttons);
result.ThrowIf();
}
}
- public static void ThumbBarSetImageList(IntPtr hwnd, IntPtr himl)
+ public static void ThumbBarSetImageList(IntPtr hWnd, IntPtr imageListHandle)
{
if (OSVersion.HasExtendedTaskbar)
{
- HResult result = Taskbar.ThumbBarSetImageList(hwnd, himl);
+ HResult result = Taskbar.ThumbBarSetImageList(hWnd, imageListHandle);
result.ThrowIf();
}
}
- public static void SetOverlayIcon(Icon icon, string pszDescription)
+ public static void SetOverlayIcon(Icon icon, string description)
{
if (OSVersion.HasExtendedTaskbar)
{
- HResult result = Taskbar.SetOverlayIcon(Program.HackerWindowHandle, icon != null ? icon.Handle : IntPtr.Zero, pszDescription);
+ HResult result = Taskbar.SetOverlayIcon(
+ Program.HackerWindowHandle,
+ icon != null ? icon.Handle : IntPtr.Zero,
+ description
+ );
result.ThrowIf();
}
}
- public static void SetThumbnailTooltip(IntPtr hwnd, string pszTip)
+ public static void SetThumbnailTooltip(IntPtr hWnd, string tooltipText)
{
if (OSVersion.HasExtendedTaskbar)
{
- HResult result = Taskbar.SetThumbnailTooltip(hwnd, pszTip);
+ HResult result = Taskbar.SetThumbnailTooltip(hWnd, tooltipText);
result.ThrowIf();
}
}
- public static void SetThumbnailClip(IntPtr hwnd, ref Rect prcClip)
+ public static void SetThumbnailClip(IntPtr hWnd, ref Rect clipRectangle)
{
if (OSVersion.HasExtendedTaskbar)
{
- HResult result = Taskbar.SetThumbnailClip(hwnd, ref prcClip);
+ HResult result = Taskbar.SetThumbnailClip(hWnd, ref clipRectangle);
result.ThrowIf();
}
diff --git a/trunk/ProcessHacker/Components/TaskbarLib/TaskbarNative.cs b/trunk/ProcessHacker/Components/TaskbarLib/TaskbarNative.cs
index d02f8b3e3..6a79c0e8d 100644
--- a/trunk/ProcessHacker/Components/TaskbarLib/TaskbarNative.cs
+++ b/trunk/ProcessHacker/Components/TaskbarLib/TaskbarNative.cs
@@ -114,7 +114,7 @@ namespace TaskbarLib
/// Flags that control the current state of the progress button.
/// Returns S_OK if successful, or an error value otherwise.
[PreserveSig]
- HResult SetProgressState(IntPtr hwnd, TBPFlag tbpFlags);
+ HResult SetProgressState(IntPtr hwnd, TaskbarProgressFlags tbpFlags);
///
/// Informs the taskbar that a new tab or document thumbnail has been provided for display in an application's taskbar group flyout.
@@ -152,7 +152,7 @@ namespace TaskbarLib
/// Reserved
/// Returns S_OK if successful, or an error value otherwise.
[PreserveSig]
- HResult SetTabActive(IntPtr hwndTab, IntPtr hwndInsertBefore, TBATFlag dwReserved);
+ HResult SetTabActive(IntPtr hwndTab, IntPtr hwndInsertBefore, TabActiveFlags dwReserved);
///
/// Adds a thumbnail toolbar with a specified set of buttons to the thumbnail image of a window in a taskbar button flyout.
@@ -163,7 +163,7 @@ namespace TaskbarLib
/// Returns S_OK if successful, or an error value otherwise, including the following:
/// E_INVALIDARG - The hwnd parameter does not specify a handle that belongs to the process or does not specify a window that is associated with a taskbar button. This value is also returned if pButton is less than 1 or greater than 7.
[PreserveSig]
- HResult ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray)] THUMBBUTTON[] pButtons);
+ HResult ThumbBarAddButtons(IntPtr hwnd, int cButtons, [MarshalAs(UnmanagedType.LPArray)] ThumbButton[] pButtons);
///
/// Shows, enables, disables, or hides buttons in a thumbnail toolbar as required by the window's current state. A thumbnail toolbar is a toolbar embedded in a thumbnail image of a window in a taskbar button flyout.
@@ -181,7 +181,7 @@ namespace TaskbarLib
/// A pointer to an array of THUMBBUTTON structures. Each THUMBBUTTON defines an individual button. If the button already exists (the iId value is already defined), then that existing button is updated with the information provided in the structure.
/// Returns S_OK if successful, or an error value otherwise.
[PreserveSig]
- HResult ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray)] THUMBBUTTON[] pButtons);
+ HResult ThumbBarUpdateButtons(IntPtr hwnd, int cButtons, [MarshalAs(UnmanagedType.LPArray)] ThumbButton[] pButtons);
///
/// Specifies an image list that contains button images for a toolbar embedded in a thumbnail image of a window in a taskbar button flyout.
@@ -234,69 +234,72 @@ namespace TaskbarLib
/// The handle of the tab window that is to have properties set. This handle must already be registered through ITaskbarList3::RegisterTab.
/// One or more members of the STPFLAG enumeration that specify the displayed thumbnail and peek image source of the tab thumbnail.
/// Returns S_OK if successful, or an error value otherwise.
- HResult SetTabProperties(IntPtr hwndTab, STPFlag stpFlags);
+ HResult SetTabProperties(IntPtr hwndTab, TabFlags stpFlags);
#endregion
}
- [Flags()]
- public enum TBATFlag
+ [Flags]
+ public enum TabActiveFlags
{
- USEMDITHUMBNAIL = 1,
- USEMDILIVEPREVIEW = 2
- }
- [Flags()]
- public enum TBPFlag
- {
- NOPROGRESS = 0,
- INDETERMINATE = 1,
- NORMAL = 2,
- ERROR = 4,
- PAUSED = 8
- }
- [Flags()]
- public enum STPFlag
- {
- NONE = 0,
- USEAPPTHUMBNAILALWAYS = 1,
- USEAPPTHUMBNAILWHENACTIVE = 2,
- USEAPPPEEKALWAYS = 4,
- USEAPPPEEKWHENACTIVE = 8,
- }
- [Flags()]
- public enum THBMask
- {
- BITMAP = 0x1,
- ICON = 0x2,
- TOOLTIP = 0x4,
- FLAGS = 0x8
- }
- [Flags()]
- public enum THBFlags
- {
- ENABLED = 0x00000000,
- DISABLED = 0x00000001,
- DISMISSONCLICK = 0x00000002,
- NOBACKGROUND = 0x00000004,
- HIDDEN = 0x00000008,
- NONINTERACTIVE = 0x00000010
+ UseMdiThumbnail = 0x1,
+ UseMdiLivePreview = 0x2
}
- [StructLayout(LayoutKind.Sequential, Pack = 8, CharSet = CharSet.Unicode)]
- public struct THUMBBUTTON
+ [Flags]
+ public enum TaskbarProgressFlags
+ {
+ NoProgress = 0x0,
+ Indeterminate = 0x1,
+ Normal = 0x2,
+ Error = 0x4,
+ Paused = 0x8
+ }
+
+ [Flags]
+ public enum TabFlags
+ {
+ None = 0x0,
+ UseAppThumbnailAlways = 0x1,
+ UseAppThumbnailWhenActive = 0x2,
+ UseAppPeekAlways = 0x4,
+ UseAppPeekWhenActive = 0x8,
+ }
+
+ [Flags]
+ public enum ThumbButtonMask
+ {
+ Bitmap = 0x1,
+ Icon = 0x2,
+ Tooltip = 0x4,
+ Flags = 0x8
+ }
+
+ [Flags]
+ public enum ThumbButtonFlags : int
+ {
+ Enabled = 0x00000000,
+ Disabled = 0x00000001,
+ DismissOnClick = 0x00000002,
+ NoBackground = 0x00000004,
+ Hidden = 0x00000008,
+ NonInteractive = 0x00000010
+ }
+
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
+ public struct ThumbButton
{
//WPARAM value for a THUMBBUTTON being clicked.
- internal const int THBN_CLICKED = 0x1800;
+ internal const int Clicked = 0x1800;
[MarshalAs(UnmanagedType.U4)]
- internal THBMask dwMask;
- internal uint iId;
- internal uint iBitmap;
- internal IntPtr hIcon;
+ public ThumbButtonMask Mask;
+ public int Id;
+ public int BitmapIndex;
+ public IntPtr IconHandle;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 259)]
- internal string szTip;
- [MarshalAs(UnmanagedType.U4)]
- internal THBFlags dwFlags;
+ public string TooltipText;
+ public ThumbButtonFlags Flags;
}
}
-}
\ No newline at end of file
+}
diff --git a/trunk/ProcessHacker/Components/TaskbarLib/ThumbnailBarButton.cs b/trunk/ProcessHacker/Components/TaskbarLib/ThumbnailBarButton.cs
index 0624b28d7..0fc54e480 100644
--- a/trunk/ProcessHacker/Components/TaskbarLib/ThumbnailBarButton.cs
+++ b/trunk/ProcessHacker/Components/TaskbarLib/ThumbnailBarButton.cs
@@ -12,7 +12,7 @@ namespace TaskbarLib
public class ThumbnailBarButton : ThumbnailBarButtonBase
{
private Bitmap icon;
- private uint imageIndex;
+ private int imageIndex;
///
/// Initializes a with a Bitmap icon.
@@ -42,7 +42,7 @@ namespace TaskbarLib
/// Specifies whether button is disabled initially.
/// Specifies whether button is dismissed on click.
/// Specifies whether button has background.
- public ThumbnailBarButton(uint imageIndex, string tooltip, bool isHidden, bool isDisabled, bool isDismissedOnClick, bool hasBackground)
+ public ThumbnailBarButton(int imageIndex, string tooltip, bool isHidden, bool isDisabled, bool isDismissedOnClick, bool hasBackground)
: base(tooltip, isHidden, isDisabled, isDismissedOnClick, hasBackground)
{
this.imageIndex = imageIndex;
@@ -74,7 +74,7 @@ namespace TaskbarLib
///
/// index of the the image that will be used as button icon.
///
- public uint ImageIndex
+ public int ImageIndex
{
get
{
@@ -89,10 +89,10 @@ namespace TaskbarLib
}
}
- internal override void BeforeGetUnmanagedButton(ref TaskbarNative.THUMBBUTTON button)
+ internal override void BeforeGetUnmanagedButton(ref TaskbarNative.ThumbButton button)
{
- button.iBitmap = this.imageIndex;
- button.dwMask |= TaskbarNative.THBMask.BITMAP;
+ button.BitmapIndex = this.imageIndex;
+ button.Mask |= TaskbarNative.ThumbButtonMask.Bitmap;
}
protected override void Update()
diff --git a/trunk/ProcessHacker/Components/TaskbarLib/ThumbnailBarButtonBase.cs b/trunk/ProcessHacker/Components/TaskbarLib/ThumbnailBarButtonBase.cs
index fc7f52ced..5354a91e3 100644
--- a/trunk/ProcessHacker/Components/TaskbarLib/ThumbnailBarButtonBase.cs
+++ b/trunk/ProcessHacker/Components/TaskbarLib/ThumbnailBarButtonBase.cs
@@ -9,9 +9,9 @@ namespace TaskbarLib
///
public abstract class ThumbnailBarButtonBase : IDisposable
{
- private static Dictionary idCounters;
+ private static Dictionary idCounters;
- private uint id;
+ private int id;
private bool isDisabled;
private bool isDismissedOnClick;
private bool hasBackground;
@@ -23,7 +23,7 @@ namespace TaskbarLib
static ThumbnailBarButtonBase()
{
- idCounters = new Dictionary();
+ idCounters = new Dictionary();
}
protected ThumbnailBarButtonBase(string tooltip, bool isHidden, bool isDisabled, bool isDismissedOnClick, bool hasBackground)
@@ -41,6 +41,7 @@ namespace TaskbarLib
~ThumbnailBarButtonBase()
{
this.Dispose(false);
+ GC.SuppressFinalize(this);
}
///
@@ -138,7 +139,7 @@ namespace TaskbarLib
}
}
- internal uint Id
+ internal int Id
{
get
{
@@ -189,7 +190,7 @@ namespace TaskbarLib
this.windowHandle = windowHandle;
- uint id;
+ int id;
if (idCounters.TryGetValue(windowHandle, out id))
{
idCounters[windowHandle]++;
@@ -203,46 +204,46 @@ namespace TaskbarLib
this.id = id;
}
- internal TaskbarNative.THUMBBUTTON GetUnmanagedButton()
+ internal TaskbarNative.ThumbButton GetUnmanagedButton()
{
- TaskbarNative.THUMBBUTTON button = new TaskbarNative.THUMBBUTTON();
- button.iId = this.id;
- button.dwMask = TaskbarNative.THBMask.FLAGS;
- button.dwFlags = TaskbarNative.THBFlags.ENABLED;
+ TaskbarNative.ThumbButton button = new TaskbarNative.ThumbButton();
+ button.Id = this.id;
+ button.Mask = TaskbarNative.ThumbButtonMask.Flags;
+ button.Flags = TaskbarNative.ThumbButtonFlags.Enabled;
this.BeforeGetUnmanagedButton(ref button);
if (this.IconHandle != null && !this.IconHandle.IsInvalid)
{
- button.hIcon = this.iconHandle.DangerousGetHandle();
- button.dwMask |= TaskbarNative.THBMask.ICON;
+ button.IconHandle = this.iconHandle.DangerousGetHandle();
+ button.Mask |= TaskbarNative.ThumbButtonMask.Icon;
}
if (!string.IsNullOrEmpty(this.Tooltip))
{
- button.szTip = this.Tooltip;
+ button.TooltipText = this.Tooltip;
- button.dwMask |= TaskbarNative.THBMask.TOOLTIP;
+ button.Mask |= TaskbarNative.ThumbButtonMask.Tooltip;
}
if (this.IsDisabled)
{
- button.dwFlags |= TaskbarNative.THBFlags.DISABLED;
+ button.Flags |= TaskbarNative.ThumbButtonFlags.Disabled;
}
if (this.IsDismissedOnClick)
{
- button.dwFlags |= TaskbarNative.THBFlags.DISMISSONCLICK;
+ button.Flags |= TaskbarNative.ThumbButtonFlags.DismissOnClick;
}
if (!this.HasBackground)
{
- button.dwFlags |= TaskbarNative.THBFlags.NOBACKGROUND;
+ button.Flags |= TaskbarNative.ThumbButtonFlags.NoBackground;
}
if (this.IsHidden)
{
- button.dwFlags |= TaskbarNative.THBFlags.HIDDEN;
+ button.Flags |= TaskbarNative.ThumbButtonFlags.Hidden;
}
return button;
@@ -258,17 +259,12 @@ namespace TaskbarLib
}
}
- internal virtual void BeforeGetUnmanagedButton(ref TaskbarNative.THUMBBUTTON button)
+ internal virtual void BeforeGetUnmanagedButton(ref TaskbarNative.ThumbButton button)
{
}
protected virtual void Dispose(bool disposing)
{
- if (disposing)
- {
- GC.SuppressFinalize(this);
- }
-
if (this.iconHandle != null && !this.iconHandle.IsInvalid)
{
this.iconHandle.Dispose();
diff --git a/trunk/ProcessHacker/Forms/HackerWindow.cs b/trunk/ProcessHacker/Forms/HackerWindow.cs
index 801e85bbe..c1bf71ab7 100644
--- a/trunk/ProcessHacker/Forms/HackerWindow.cs
+++ b/trunk/ProcessHacker/Forms/HackerWindow.cs
@@ -2826,7 +2826,7 @@ namespace ProcessHacker
#endregion
- #region "Taskbar ThumbnailButtons"
+ #region Taskbar Thumbnail Buttons
private ThumbnailBarButton CreateThumbnailBarImageButton(Bitmap Image, string imageName, string tooltip, bool isHidden, bool isDisabled, bool isDismissedOnClick, bool hasBackground)
{
@@ -2835,14 +2835,14 @@ namespace ProcessHacker
private static void AddThumbnailBarButtons(IntPtr windowHandle, IList buttons)
{
- var unmanagedButtons = new TaskbarNative.THUMBBUTTON[buttons.Count];
+ var unmanagedButtons = new TaskbarNative.ThumbButton[buttons.Count];
for (int i = 0; i < buttons.Count; i++)
{
buttons[i].Initialize(windowHandle);
unmanagedButtons[i] = buttons[i].GetUnmanagedButton();
}
- TaskbarClass.ThumbBarAddButtons(windowHandle, (uint)buttons.Count, unmanagedButtons);
+ TaskbarClass.ThumbBarAddButtons(windowHandle, buttons.Count, unmanagedButtons);
if (!thumbnailButtons.ContainsKey(windowHandle))
{
@@ -2882,17 +2882,17 @@ namespace ProcessHacker
private void thumbnailBarButton1_Click(object sender, EventArgs e)
{
- new SysInfoWindow().Show();
+ sysInfoMenuItem_Click(sender, e);
}
private void thumbnailBarButton2_Click(object sender, EventArgs e)
{
- new LogWindow().Show();
+ logMenuItem_Click(sender, e);
}
private void thumbnailBarButton3_Click(object sender, EventArgs e)
{
- new HandleFilterWindow().Show();
+ findHandlesMenuItem_Click(sender, e);
}
#endregion
@@ -2986,7 +2986,7 @@ namespace ProcessHacker
break;
case (int)WindowMessage.Command:
- if (HiWord(m.WParam) == TaskbarNative.THUMBBUTTON.THBN_CLICKED)
+ if (HiWord(m.WParam) == TaskbarNative.ThumbButton.Clicked)
{
var buttonId = LoWord(m.WParam);
diff --git a/trunk/ProcessHacker/Forms/UpdaterDownloadWindow.cs b/trunk/ProcessHacker/Forms/UpdaterDownloadWindow.cs
index 1b94e8428..ed47bacb2 100644
--- a/trunk/ProcessHacker/Forms/UpdaterDownloadWindow.cs
+++ b/trunk/ProcessHacker/Forms/UpdaterDownloadWindow.cs
@@ -77,7 +77,7 @@ namespace ProcessHacker
private void UpdaterDownloadWindow_FormClosing(object sender, FormClosingEventArgs e)
{
- TaskbarClass.SetProgressState(TaskbarNative.TBPFlag.NOPROGRESS);
+ TaskbarClass.SetProgressState(TaskbarNative.TaskbarProgressFlags.NoProgress);
}
private void webClient_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
@@ -144,7 +144,7 @@ namespace ProcessHacker
}
}
- TaskbarClass.SetProgressState(TaskbarNative.TBPFlag.NOPROGRESS);
+ TaskbarClass.SetProgressState(TaskbarNative.TaskbarProgressFlags.NoProgress);
}
private void webClient_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
@@ -157,7 +157,7 @@ namespace ProcessHacker
progressDownload.Value = e.ProgressPercentage;
- TaskbarClass.SetProgressState(TaskbarNative.TBPFlag.NORMAL);
+ TaskbarClass.SetProgressState(TaskbarNative.TaskbarProgressFlags.Normal);
TaskbarClass.SetProgressValue((ulong)e.BytesReceived, (ulong)e.TotalBytesToReceive);
}