2020-07-07 07:15:45 +12:00
|
|
|
|
// <copyright file="SHGetDesktopFolder.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 int Shell32SHGetDesktopFolder(out IntPtr ppshf)
|
|
|
|
|
{
|
|
|
|
|
return SHGetDesktopFolder(out ppshf);
|
|
|
|
|
}
|
2020-07-08 03:05:19 +12:00
|
|
|
|
|
|
|
|
|
// Retrieves the IShellFolder interface for the desktop folder, which is the root of the Shell's namespace.
|
|
|
|
|
[DllImport("shell32.dll")]
|
|
|
|
|
private static extern int SHGetDesktopFolder(out IntPtr ppshf);
|
2020-03-28 08:43:16 +13:00
|
|
|
|
}
|
|
|
|
|
}
|