v1.2
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,37 @@
|
||||
// <copyright file="ShellContextMenuException.cs" company="PlaceholderCompany">
|
||||
// Copyright (c) PlaceholderCompany. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace FSI.BT.Tools.SystemTrayMenu.Helper
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
[Serializable]
|
||||
public class ShellContextMenuException : Exception
|
||||
{
|
||||
public ShellContextMenuException()
|
||||
{
|
||||
// Add any type-specific logic, and supply the default message.
|
||||
}
|
||||
|
||||
public ShellContextMenuException(string message)
|
||||
: base(message)
|
||||
{
|
||||
// Add any type-specific logic.
|
||||
}
|
||||
|
||||
public ShellContextMenuException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
// Add any type-specific logic for inner exceptions.
|
||||
}
|
||||
|
||||
protected ShellContextMenuException(
|
||||
SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
// Implement type-specific serialization constructor logic.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
// <copyright file="ShellHelper.cs" company="PlaceholderCompany">
|
||||
// Copyright (c) PlaceholderCompany. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace FSI.BT.Tools.SystemTrayMenu.Helper
|
||||
{
|
||||
using System;
|
||||
|
||||
internal static class ShellHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// Retrieves the High Word of a WParam of a WindowMessage.
|
||||
/// </summary>
|
||||
/// <param name="ptr">The pointer to the WParam.</param>
|
||||
/// <returns>The unsigned integer for the High Word.</returns>
|
||||
public static uint HiWord(IntPtr ptr)
|
||||
{
|
||||
uint param32 = (uint)(ptr.ToInt64() | 0xffffffffL);
|
||||
if ((param32 & 0x80000000) == 0x80000000)
|
||||
{
|
||||
return param32 >> 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (param32 >> 16) & 0xffff;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the Low Word of a WParam of a WindowMessage.
|
||||
/// </summary>
|
||||
/// <param name="ptr">The pointer to the WParam.</param>
|
||||
/// <returns>The unsigned integer for the Low Word.</returns>
|
||||
public static uint LoWord(IntPtr ptr)
|
||||
{
|
||||
uint param32 = (uint)(ptr.ToInt64() | 0xffffffffL);
|
||||
return param32 & 0xffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user