It's an structure that needs to be used with the proper namespace.
See https://docs.microsoft.com/en-us/uwp/api/windows.foundation.timespan
---
.../include/windows.foundation.idl | 5 +++++
.../include/windows.system.threading.idl | 20 ++++++-------------
2 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/mingw-w64-headers/include/windows.foundation.idl
b/mingw-w64-headers/include/windows.foundation.idl
index 97b533608..7cc35209f 100644
--- a/mingw-w64-headers/include/windows.foundation.idl
+++ b/mingw-w64-headers/include/windows.foundation.idl
@@ -45,6 +45,11 @@ namespace Windows {
UINT64 UniversalTime;
} DateTime;
+ [contract(Windows.Foundation.FoundationContract, 1.0)]
+ typedef struct TimeSpan {
+ INT64 Duration;
+ } TimeSpan;
+
[uuid(00000036-0000-0000-C000-000000000046)]
interface IAsyncInfo : IInspectable
{
diff --git a/mingw-w64-headers/include/windows.system.threading.idl
b/mingw-w64-headers/include/windows.system.threading.idl
index ab5054981..ab9247ab3 100644
--- a/mingw-w64-headers/include/windows.system.threading.idl
+++ b/mingw-w64-headers/include/windows.system.threading.idl
@@ -12,10 +12,6 @@ import "inspectable.idl";
import "windows.foundation.idl";
namespace Windows {
- namespace Foundation {
- struct TimeSpan;
- }
-
namespace System {
namespace Threading {
typedef enum WorkItemPriority WorkItemPriority;
@@ -45,10 +41,6 @@ namespace Windows {
TimeSliced = 1
};
- typedef struct TimeSpan {
- INT64 Duration;
- } TimeSpan;
-
[uuid(FAAEA667-FBEB-49CB-ADB2-71184C556E43)]
interface TimerElapsedHandler : IUnknown {
HRESULT Invoke(IThreadPoolTimer* timer);
@@ -87,8 +79,8 @@ namespace Windows {
[uuid(594EBE78-55EA-4A88-A50D-3402AE1F9CF2)]
interface IThreadPoolTimer : IInspectable
{
- [propget] HRESULT Period(TimeSpan* value);
- [propget] HRESULT Delay(TimeSpan* value);
+ [propget] HRESULT Period(Windows.Foundation.TimeSpan* value);
+ [propget] HRESULT Delay(Windows.Foundation.TimeSpan* value);
HRESULT Cancel();
}
@@ -97,23 +89,23 @@ namespace Windows {
{
HRESULT CreatePeriodicTimer(
TimerElapsedHandler* handler,
- TimeSpan period,
+ Windows.Foundation.TimeSpan period,
IThreadPoolTimer** timer);
HRESULT CreateTimer(
TimerElapsedHandler* handler,
- TimeSpan delay,
+ Windows.Foundation.TimeSpan delay,
IThreadPoolTimer** timer);
HRESULT CreatePeriodicTimerWithCompletion(
TimerElapsedHandler* handler,
- TimeSpan period,
+ Windows.Foundation.TimeSpan period,
TimerDestroyedHandler* destroyed,
IThreadPoolTimer** timer);
HRESULT CreateTimerWithCompletion(
TimerElapsedHandler* handler,
- TimeSpan delay,
+ Windows.Foundation.TimeSpan delay,
TimerDestroyedHandler* destroyed,
IThreadPoolTimer** timer);
}
--
2.29.2
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public