mirror of https://github.com/dahall/Vanara.git
Changed return value of OpenFileById from IntPtr to SafeHFILE
parent
05c0fffd97
commit
483d76df37
|
@ -236,7 +236,9 @@ namespace Vanara.Extensions
|
||||||
{
|
{
|
||||||
T ret = pCurrent.ToStructure<T>();
|
T ret = pCurrent.ToStructure<T>();
|
||||||
yield return ret;
|
yield return ret;
|
||||||
pCurrent = pCurrent.Offset(nextOffset(ret));
|
var offset = nextOffset(ret);
|
||||||
|
if (offset == 0) break;
|
||||||
|
pCurrent = pCurrent.Offset(offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1775,7 +1775,7 @@ namespace Vanara.PInvoke
|
||||||
// dwFlagsAndAttributes );
|
// dwFlagsAndAttributes );
|
||||||
[DllImport(Lib.Kernel32, SetLastError = true, ExactSpelling = true)]
|
[DllImport(Lib.Kernel32, SetLastError = true, ExactSpelling = true)]
|
||||||
[PInvokeData("winbase.h", MSDNShortId = "caa757a2-fc3f-4883-8d3e-b98d28f92517")]
|
[PInvokeData("winbase.h", MSDNShortId = "caa757a2-fc3f-4883-8d3e-b98d28f92517")]
|
||||||
public static extern IntPtr OpenFileById(HFILE hVolumeHint, in FILE_ID_DESCRIPTOR lpFileId, FileAccess dwDesiredAccess, FileShare dwShareMode, SECURITY_ATTRIBUTES lpSecurityAttributes, FileFlagsAndAttributes dwFlagsAndAttributes);
|
public static extern SafeHFILE OpenFileById(HFILE hVolumeHint, in FILE_ID_DESCRIPTOR lpFileId, FileAccess dwDesiredAccess, FileShare dwShareMode, SECURITY_ATTRIBUTES lpSecurityAttributes, FileFlagsAndAttributes dwFlagsAndAttributes);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>Decrements the count of power requests of the specified type for a power request object.</para>
|
/// <para>Decrements the count of power requests of the specified type for a power request object.</para>
|
||||||
|
|
Loading…
Reference in New Issue