-
Notifications
You must be signed in to change notification settings - Fork 991
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class Kernel32 | ||
{ | ||
public struct FILETIME | ||
{ | ||
public FILETIME(DateTime date) | ||
{ | ||
long ft = date.ToFileTime(); | ||
dwLowDateTime = (uint)(ft & 0xFFFFFFFF); | ||
dwHighDateTime = (uint)(ft >> 32); | ||
} | ||
|
||
public uint dwLowDateTime; | ||
public uint dwHighDateTime; | ||
|
||
public DateTime ToDateTime() | ||
{ | ||
return DateTime.FromFileTime(((long)dwHighDateTime << 32) + dwLowDateTime); | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Runtime.InteropServices; | ||
using static Interop.Oleaut32; | ||
|
||
internal partial class Interop | ||
{ | ||
internal static partial class Ole32 | ||
{ | ||
[DllImport(Libraries.Ole32, ExactSpelling = true)] | ||
public unsafe static extern HRESULT PropVariantClear(VARIANT* pvarg); | ||
|
||
public unsafe static HRESULT PropVariantClear(ref VARIANT varg) | ||
{ | ||
fixed (VARIANT* pvarg = &varg) | ||
{ | ||
return PropVariantClear(pvarg); | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class Oleaut32 | ||
{ | ||
public struct DECIMAL | ||
{ | ||
public ushort wReserved; | ||
public byte scale; | ||
public byte sign; | ||
public uint Hi32; | ||
public uint Lo32; | ||
public uint Mid32; | ||
|
||
public decimal ToDecimal() | ||
{ | ||
return new decimal((int)Lo32, (int)Mid32, (int)Hi32, sign == 0x80, scale); | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
|
||
internal partial class Interop | ||
{ | ||
internal static partial class Oleaut32 | ||
{ | ||
[Flags] | ||
public enum FADF : ushort | ||
{ | ||
AUTO = 0x0001, | ||
STATIC = 0x0002, | ||
EMBEDDED = 0x0004, | ||
FIXEDSIZE = 0x0010, | ||
RECORD = 0x0020, | ||
HAVEIID = 0x0040, | ||
HAVEVARTYPE = 0x0080, | ||
BSTR = 0x0100, | ||
UNKNOWN = 0x0200, | ||
DISPATCH = 0x0400, | ||
VARIANT = 0x0800 | ||
} | ||
} | ||
} |