Omlouvám se za příspěvek v slabé chvilce... Operators : OR (Inclusive OR) ( | sign in C#, Or in VB.NET ) AND ( & sign in C#, And in VB.NET ) XOR (Exclusive OR) ( ^ sign in C#, Xor in VB.NET) NOT ( ~ sign in C#, Not in VB.NET) Left Shift ( << sign in C# and VB.NET) Right Shift ( >> sign in C# and VB.NET)
Private Function GetFileIndex(ByVal path As String) As UInt64
Dim info As BY_HANDLE_FILE_INFORMATION
GetFileInformation(path, info)
Return info.FileIndexLow Or Convert.ToUInt64(info.FileIndexHigh) << 32
End Function
... Pro opakovaný přístup k původním hodnotám bez počítání :
<StructLayout(LayoutKind.Explicit)>
Structure UInt64ToUInt32
<FieldOffset(0)>
Public Int64Value As UInt64
<FieldOffset(0)>
Public LeftInt32 As UInt32
<FieldOffset(4)>
Public RightInt32 As UInt32
End Structure
Nebo taky :
Return New UInt64ToUInt32() With {.LeftInt32 = info.FileIndexLow, .RightInt32 = info.FileIndexHigh}.Int64Value
Veselé velikonoce!
|