Using WRL - Windows Runtime C++ Template Library
Neil Hodgson <[email protected]> Fri, 14 Feb 2025 03:13:20 -0800 (PST)
| Newsgroups | gmane.comp.lib.scintilla.devel |
|---|---|
| Message-ID | <[email protected]> |
The recent changes for supporting Direct2D 1.1 added much 'lightweight COM' code to call Windows graphics infrastructure APIs. I tried to encapsulate lifetimes and class hierarchy navigation using specializations of std::unique_ptr and some custom templated code. Such code is more likely to contain bugs than code that uses common Windows facilities and will also be less familiar to other Windows developers. The WRL is a Microsoft produced library that handles COM with better abstractions and safety than the bare COM API. I believe that using WRL would be worthwhile in Scintilla's Win32 platform layer. WRL is distributed with Visual C++ and also with mingw-w64, including the cross-compiler on Linux. While cross-compiling works, it is possible there are issues with particular tool chains. https://learn.microsoft.com/en-us/cpp/cppcx/wrl/windows-runtime-cpp-template-library-wrl?view=msvc-170 Neil -- You received this message because you are subscribed to the Google Groups "scintilla-interest" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/scintilla-interest/f0ecedb0-be80-426b-b1ca-a4036760d7e1n%40googlegroups.com.