From ebfec38cd1f0d428d8bfd00aa6efcffcd6d8bc4f Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Wed, 20 Sep 2023 12:02:33 +0900 Subject: [PATCH] [ATL][ATL_APITEST] Independent ReactOS ATL (RATL) support (#5657) This is an attempt to make ReactOS ATL (RATL) independent. https://github.com/katahiromz/RATL CORE-19153 --- modules/rostests/apitests/atl/CComObject.cpp | 4 ++-- modules/rostests/apitests/atl/CComQIPtr.cpp | 2 ++ sdk/lib/atl/atlsimpstr.h | 6 ++++++ sdk/lib/atl/atlwin.h | 6 ++++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/modules/rostests/apitests/atl/CComObject.cpp b/modules/rostests/apitests/atl/CComObject.cpp index 396290dfd5e..8f486c8fb6e 100644 --- a/modules/rostests/apitests/atl/CComObject.cpp +++ b/modules/rostests/apitests/atl/CComObject.cpp @@ -63,13 +63,13 @@ public: END_COM_MAP() }; - +#ifndef __RATL__ // Avoid conflict (causing assertion at CAtlModule::CAtlModule) class CDumExe: public CAtlExeModuleT { }; CDumExe dum; - +#endif START_TEST(CComObject) { diff --git a/modules/rostests/apitests/atl/CComQIPtr.cpp b/modules/rostests/apitests/atl/CComQIPtr.cpp index 1ab179bb176..ed411141455 100644 --- a/modules/rostests/apitests/atl/CComQIPtr.cpp +++ b/modules/rostests/apitests/atl/CComQIPtr.cpp @@ -80,6 +80,8 @@ public: #define DECLARE_QIPTR(type) CComQIIDPtr #elif defined(__GNUC__) #define DECLARE_QIPTR(type) CComQIIDPtr +#elif defined(__RATL__) +#define DECLARE_QIPTR(type) CComQIIDPtr #else #define DECLARE_QIPTR(type) CComQIPtr #endif diff --git a/sdk/lib/atl/atlsimpstr.h b/sdk/lib/atl/atlsimpstr.h index 7d78f41abc4..a2956a9abbe 100644 --- a/sdk/lib/atl/atlsimpstr.h +++ b/sdk/lib/atl/atlsimpstr.h @@ -6,6 +6,12 @@ #include #include +#ifdef __RATL__ + #ifndef _In_count_ + #define _In_count_(nLength) + #endif +#endif + namespace ATL { struct CStringData; diff --git a/sdk/lib/atl/atlwin.h b/sdk/lib/atl/atlwin.h index 69225fe262c..19d438523cc 100644 --- a/sdk/lib/atl/atlwin.h +++ b/sdk/lib/atl/atlwin.h @@ -49,6 +49,12 @@ inline LONG_PTR GetWindowLongPtr(HWND hWnd, int nIndex) #pragma push_macro("SubclassWindow") #undef SubclassWindow +#ifdef __RATL__ + #ifndef _Post_z_ + #define _Post_z_ + #endif +#endif + namespace ATL {