@@ -8,7 +8,7 @@ namespace winrt::impl
88
99 inline auto resume_background (std::experimental::coroutine_handle<> handle)
1010 {
11- if (!WINRT_TrySubmitThreadpoolCallback (resume_background_callback, handle.address (), nullptr ))
11+ if (!WINRT_IMPL_TrySubmitThreadpoolCallback (resume_background_callback, handle.address (), nullptr ))
1212 {
1313 throw_last_error ();
1414 }
@@ -18,19 +18,19 @@ namespace winrt::impl
1818 {
1919 int32_t aptType;
2020 int32_t aptTypeQualifier;
21- return (0 == WINRT_CoGetApartmentType (&aptType, &aptTypeQualifier)) && ((aptType == 0 /* APTTYPE_STA*/ ) || (aptType == 3 /* APTTYPE_MAINSTA*/ ));
21+ return (0 == WINRT_IMPL_CoGetApartmentType (&aptType, &aptTypeQualifier)) && ((aptType == 0 /* APTTYPE_STA*/ ) || (aptType == 3 /* APTTYPE_MAINSTA*/ ));
2222 }
2323
2424 inline bool requires_apartment_context () noexcept
2525 {
2626 int32_t aptType;
2727 int32_t aptTypeQualifier;
28- return (0 == WINRT_CoGetApartmentType (&aptType, &aptTypeQualifier)) && ((aptType == 0 /* APTTYPE_STA*/ ) || (aptType == 2 /* APTTYPE_NA*/ ) || (aptType == 3 /* APTTYPE_MAINSTA*/ ));
28+ return (0 == WINRT_IMPL_CoGetApartmentType (&aptType, &aptTypeQualifier)) && ((aptType == 0 /* APTTYPE_STA*/ ) || (aptType == 2 /* APTTYPE_NA*/ ) || (aptType == 3 /* APTTYPE_MAINSTA*/ ));
2929 }
3030
3131 inline auto apartment_context ()
3232 {
33- return requires_apartment_context () ? capture<IContextCallback>(WINRT_CoGetObjectContext ) : nullptr ;
33+ return requires_apartment_context () ? capture<IContextCallback>(WINRT_IMPL_CoGetObjectContext ) : nullptr ;
3434 }
3535
3636 inline int32_t __stdcall resume_apartment_callback (com_callback_args* args) noexcept
@@ -256,7 +256,7 @@ WINRT_EXPORT namespace winrt
256256 {
257257 m_resume = resume;
258258
259- if (!WINRT_TrySubmitThreadpoolCallback (callback, this , nullptr ))
259+ if (!WINRT_IMPL_TrySubmitThreadpoolCallback (callback, this , nullptr ))
260260 {
261261 throw_last_error ();
262262 }
@@ -313,9 +313,9 @@ WINRT_EXPORT namespace winrt
313313
314314 void await_suspend (std::experimental::coroutine_handle<> handle)
315315 {
316- m_timer.attach (check_pointer (WINRT_CreateThreadpoolTimer (callback, handle.address (), nullptr )));
316+ m_timer.attach (check_pointer (WINRT_IMPL_CreateThreadpoolTimer (callback, handle.address (), nullptr )));
317317 int64_t relative_count = -m_duration.count ();
318- WINRT_SetThreadpoolTimer (m_timer.get (), &relative_count, 0 , 0 );
318+ WINRT_IMPL_SetThreadpoolTimer (m_timer.get (), &relative_count, 0 , 0 );
319319 }
320320
321321 void await_resume () const noexcept
@@ -335,7 +335,7 @@ WINRT_EXPORT namespace winrt
335335
336336 static void close (type value) noexcept
337337 {
338- WINRT_CloseThreadpoolTimer (value);
338+ WINRT_IMPL_CloseThreadpoolTimer (value);
339339 }
340340
341341 static constexpr type invalid () noexcept
@@ -369,16 +369,16 @@ WINRT_EXPORT namespace winrt
369369
370370 bool await_ready () const noexcept
371371 {
372- return WINRT_WaitForSingleObject (m_handle, 0 ) == 0 ;
372+ return WINRT_IMPL_WaitForSingleObject (m_handle, 0 ) == 0 ;
373373 }
374374
375375 void await_suspend (std::experimental::coroutine_handle<> resume)
376376 {
377377 m_resume = resume;
378- m_wait.attach (check_pointer (WINRT_CreateThreadpoolWait (callback, this , nullptr )));
378+ m_wait.attach (check_pointer (WINRT_IMPL_CreateThreadpoolWait (callback, this , nullptr )));
379379 int64_t relative_count = -m_timeout.count ();
380380 int64_t * file_time = relative_count != 0 ? &relative_count : nullptr ;
381- WINRT_SetThreadpoolWait (m_wait.get (), m_handle, file_time);
381+ WINRT_IMPL_SetThreadpoolWait (m_wait.get (), m_handle, file_time);
382382 }
383383
384384 bool await_resume () const noexcept
@@ -401,7 +401,7 @@ WINRT_EXPORT namespace winrt
401401
402402 static void close (type value) noexcept
403403 {
404- WINRT_CloseThreadpoolWait (value);
404+ WINRT_IMPL_CloseThreadpoolWait (value);
405405 }
406406
407407 static constexpr type invalid () noexcept
@@ -423,15 +423,15 @@ WINRT_EXPORT namespace winrt
423423 struct thread_pool
424424 {
425425 thread_pool () :
426- m_pool (check_pointer(WINRT_CreateThreadpool (nullptr )))
426+ m_pool (check_pointer(WINRT_IMPL_CreateThreadpool (nullptr )))
427427 {
428428 m_environment.Pool = m_pool.get ();
429429 }
430430
431431 void thread_limits (uint32_t const high, uint32_t const low)
432432 {
433- WINRT_SetThreadpoolThreadMaximum (m_pool.get (), high);
434- check_bool (WINRT_SetThreadpoolThreadMinimum (m_pool.get (), low));
433+ WINRT_IMPL_SetThreadpoolThreadMaximum (m_pool.get (), high);
434+ check_bool (WINRT_IMPL_SetThreadpoolThreadMinimum (m_pool.get (), low));
435435 }
436436
437437 bool await_ready () const noexcept
@@ -445,7 +445,7 @@ WINRT_EXPORT namespace winrt
445445
446446 void await_suspend (std::experimental::coroutine_handle<> handle)
447447 {
448- if (!WINRT_TrySubmitThreadpoolCallback (callback, handle.address (), &m_environment))
448+ if (!WINRT_IMPL_TrySubmitThreadpoolCallback (callback, handle.address (), &m_environment))
449449 {
450450 throw_last_error ();
451451 }
@@ -464,7 +464,7 @@ WINRT_EXPORT namespace winrt
464464
465465 static void close (type value) noexcept
466466 {
467- WINRT_CloseThreadpool (value);
467+ WINRT_IMPL_CloseThreadpool (value);
468468 }
469469
470470 static constexpr type invalid () noexcept
0 commit comments