mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-09-30 17:16:52 +13:00
18 lines
741 B
C#
18 lines
741 B
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using System.Text;
|
|
|
|
namespace SystemTrayMenu.DllImports
|
|
{
|
|
public static partial class NativeMethods
|
|
{
|
|
// Takes a STRRET structure returned by IShellFolder::GetDisplayNameOf, converts it to a string, and places the result in a buffer.
|
|
[DllImport("shlwapi.dll", EntryPoint = "StrRetToBuf", ExactSpelling = false, CharSet = CharSet.Unicode, SetLastError = true)]
|
|
private static extern int StrRetToBuf(IntPtr pstr, IntPtr pidl, StringBuilder pszBuf, int cchBuf);
|
|
|
|
public static int ShlwapiStrRetToBuf(IntPtr pstr, IntPtr pidl, StringBuilder pszBuf, int cchBuf)
|
|
{
|
|
return StrRetToBuf(pstr, pidl, pszBuf, cchBuf);
|
|
}
|
|
}
|
|
}
|