mirror of https://github.com/dahall/Vanara.git
Changed IExtractImage interface to PreserveSig format
parent
9a9a11ccd2
commit
d9c1597c45
|
@ -1,12 +1,14 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using static Vanara.PInvoke.Gdi32;
|
||||||
using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME;
|
using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME;
|
||||||
|
|
||||||
namespace Vanara.PInvoke
|
namespace Vanara.PInvoke
|
||||||
{
|
{
|
||||||
public static partial class Shell32
|
public static partial class Shell32
|
||||||
{
|
{
|
||||||
|
/// <summary>Flags that specifiy how to handle the image.</summary>
|
||||||
[Flags]
|
[Flags]
|
||||||
public enum IEIFLAG
|
public enum IEIFLAG
|
||||||
{
|
{
|
||||||
|
@ -101,8 +103,18 @@ namespace Vanara.PInvoke
|
||||||
HRESULT GetLocation([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszPathBuffer, uint cchMax, [Optional] IntPtr pdwPriority, ref SIZE prgSize, uint dwRecClrDepth, ref IEIFLAG pdwFlags);
|
HRESULT GetLocation([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszPathBuffer, uint cchMax, [Optional] IntPtr pdwPriority, ref SIZE prgSize, uint dwRecClrDepth, ref IEIFLAG pdwFlags);
|
||||||
|
|
||||||
/// <summary>Requests an image from an object, such as an item in a Shell folder.</summary>
|
/// <summary>Requests an image from an object, such as an item in a Shell folder.</summary>
|
||||||
/// <returns>The HBITMAP of the image.</returns>
|
/// <param name="phBmpThumbnail">
|
||||||
HBITMAP Extract();
|
/// <para>Type: <c>HBITMAP*</c></para>
|
||||||
|
/// <para>The buffer to hold the bitmapped image.</para>
|
||||||
|
/// </param>
|
||||||
|
/// <returns>
|
||||||
|
/// <para>Type: <c>HRESULT</c></para>
|
||||||
|
/// <para>Returns S_OK if successful, or a COM-defined error code otherwise.</para>
|
||||||
|
/// </returns>
|
||||||
|
/// <remarks>You must call IExtractImage::GetLocation prior to calling <c>Extract</c>.</remarks>
|
||||||
|
// https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-iextractimage-extract
|
||||||
|
[PreserveSig]
|
||||||
|
HRESULT Extract(out SafeHBITMAP phBmpThumbnail);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Extends the capabilities of IExtractImage.</summary>
|
/// <summary>Extends the capabilities of IExtractImage.</summary>
|
||||||
|
@ -153,19 +165,31 @@ namespace Vanara.PInvoke
|
||||||
new HRESULT GetLocation([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszPathBuffer, uint cchMax, [Optional] IntPtr pdwPriority, ref SIZE prgSize, uint dwRecClrDepth, ref IEIFLAG pdwFlags);
|
new HRESULT GetLocation([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszPathBuffer, uint cchMax, [Optional] IntPtr pdwPriority, ref SIZE prgSize, uint dwRecClrDepth, ref IEIFLAG pdwFlags);
|
||||||
|
|
||||||
/// <summary>Requests an image from an object, such as an item in a Shell folder.</summary>
|
/// <summary>Requests an image from an object, such as an item in a Shell folder.</summary>
|
||||||
/// <returns>The HBITMAP of the image.</returns>
|
/// <param name="phBmpThumbnail">
|
||||||
new HBITMAP Extract();
|
/// <para>Type: <c>HBITMAP*</c></para>
|
||||||
|
/// <para>The buffer to hold the bitmapped image.</para>
|
||||||
/// <summary>
|
/// </param>
|
||||||
/// Requests the date the image was last modified. This method allows the Shell to determine whether cached images are out-of-date.
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>
|
/// <returns>
|
||||||
|
/// <para>Type: <c>HRESULT</c></para>
|
||||||
|
/// <para>Returns S_OK if successful, or a COM-defined error code otherwise.</para>
|
||||||
|
/// </returns>
|
||||||
|
/// <remarks>You must call IExtractImage::GetLocation prior to calling <c>Extract</c>.</remarks>
|
||||||
|
// https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-iextractimage-extract
|
||||||
|
[PreserveSig]
|
||||||
|
new HRESULT Extract(out SafeHBITMAP phBmpThumbnail);
|
||||||
|
|
||||||
|
/// <summary>Requests the date the image was last modified. This method allows the Shell to determine whether cached images are out-of-date.</summary>
|
||||||
|
/// <param name="pDateStamp">
|
||||||
/// <para>Type: <c>FILETIME*</c></para>
|
/// <para>Type: <c>FILETIME*</c></para>
|
||||||
/// <para>A pointer to a FILETIME structure used to return the last time the image was modified.</para>
|
/// <para>A pointer to a FILETIME structure used to return the last time the image was modified.</para>
|
||||||
|
/// </param>
|
||||||
|
/// <returns>
|
||||||
|
/// <para>Type: <c>HRESULT</c></para>
|
||||||
|
/// <para>Return S_OK if successful, or a COM-defined error code otherwise.</para>
|
||||||
/// </returns>
|
/// </returns>
|
||||||
// https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-iextractimage2-getdatestamp HRESULT
|
// https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-iextractimage2-getdatestamp
|
||||||
// GetDateStamp( FILETIME *pDateStamp );
|
[PreserveSig]
|
||||||
FILETIME GetDateStamp();
|
HRESULT GetDateStamp(out FILETIME pDateStamp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue