2020-07-07 07:15:45 +12:00
|
|
|
|
// <copyright file="DestroyMenu.cs" company="PlaceholderCompany">
|
|
|
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
|
|
|
// </copyright>
|
2020-03-28 08:43:16 +13:00
|
|
|
|
|
2020-03-30 06:26:45 +13:00
|
|
|
|
namespace SystemTrayMenu.DllImports
|
2020-03-28 08:43:16 +13:00
|
|
|
|
{
|
2020-07-07 07:15:45 +12:00
|
|
|
|
using System;
|
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// wraps the methodcalls to native windows dll's.
|
|
|
|
|
/// </summary>
|
2020-03-28 08:43:16 +13:00
|
|
|
|
public static partial class NativeMethods
|
|
|
|
|
{
|
|
|
|
|
public static bool User32DestroyMenu(IntPtr hMenu)
|
|
|
|
|
{
|
|
|
|
|
return DestroyMenu(hMenu);
|
|
|
|
|
}
|
2020-07-08 03:05:19 +12:00
|
|
|
|
|
|
|
|
|
// The DestroyMenu function destroys the specified menu and frees any memory that the menu occupies.
|
|
|
|
|
[DllImport("user32", SetLastError = true, CharSet = CharSet.Unicode)]
|
2021-04-17 12:39:48 +12:00
|
|
|
|
[DefaultDllImportSearchPaths(DllImportSearchPath.UserDirectories)]
|
2020-07-08 03:05:19 +12:00
|
|
|
|
private static extern bool DestroyMenu(IntPtr hMenu);
|
2020-03-28 08:43:16 +13:00
|
|
|
|
}
|
|
|
|
|
}
|