Closed vinniefalco closed 7 years ago
Please wait until I sign off before merging - feel free to review though :)
All the APIs in Boost.WinAPI provide Boost-friendly declarations in the boost::detail::winapi
namespace. The declarations in the global namespace are not supposed to be used outside Boost.WinAPI itself.
Also, what is the reason to include debugapi.h
?
I just followed the example in this file, which looked the most similar: https://github.com/boostorg/winapi/blob/develop/include/boost/detail/winapi/dbghelp.hpp
I've updated the branch based on your feedback
boost::detail::winapi::IsDebuggerPresent
if the API is not available.using ::OutputDebugStringA
instead of the inline wrapper function. The wrapper functions are implemented only when using
-declaration is not enough (mostly, when argument casts are required). Same for OutputDebugStringW
.boost::detail::winapi::output_debug_string
inline function which calls ::OutputDebugStringA
or ::OutputDebugStringW
depending on the argument type.I'll make those changes. But, by not providing IsDebuggerPresent
it just pushes the ugly version macro checking on to all callers. Are you sure that's what we want? Or maybe I'm missing something?
That's the current convention with the other APIs. The user's code has to be aware of what Windows versions it targets and take steps, if necessary, to work around any missing optional (from the user's code perspective) APIs.
The point of Boost.WinAPI is not to re-implement Windows API where not present, but mostly avoiding inclusion of windows.h and workarounds for different Windows SDK bugs and quirks (read MinGW & co.) Boost.WinAPI also allows to configure the target Windows version.
Thanks.
This is from the original
<debugapi.h
> windows header, I'm not sure how this translates into Boost.WinAPI speak: