https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ebfec38cd1f0d428d8bfd00aa6efcffcd6d8bc4f

commit ebfec38cd1f0d428d8bfd00aa6efcffcd6d8bc4f
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Wed Sep 20 12:02:33 2023 +0900
Commit:     GitHub <[email protected]>
CommitDate: Wed Sep 20 12:02:33 2023 +0900

    [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>
 {
 
 };
 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<I_ID(type)>
 #elif defined(__GNUC__)
 #define DECLARE_QIPTR(type)     CComQIIDPtr<I_ID(type)>
+#elif defined(__RATL__)
+#define DECLARE_QIPTR(type)     CComQIIDPtr<I_ID(type)>
 #else
 #define DECLARE_QIPTR(type)     CComQIPtr<type>
 #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 <atlcore.h>
 #include <atlexcept.h>
 
+#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
 {
 

Reply via email to