1 // get_system_directory.hpp --------------------------------------------------------------//
3 // Copyright 2016 Klemens D. Morgenstern
5 // Distributed under the Boost Software License, Version 1.0.
6 // See http://www.boost.org/LICENSE_1_0.txt
8 #ifndef BOOST_DETAIL_WINAPI_GET_SYSTEM_DIRECTORY_HPP_
9 #define BOOST_DETAIL_WINAPI_GET_SYSTEM_DIRECTORY_HPP_
11 #include <boost/detail/winapi/basic_types.hpp>
12 #include <boost/predef/platform.h>
14 #ifdef BOOST_HAS_PRAGMA_ONCE
18 #if BOOST_PLAT_WINDOWS_DESKTOP
20 #if !defined( BOOST_USE_WINDOWS_H )
22 #if !defined( BOOST_NO_ANSI_APIS )
23 BOOST_SYMBOL_IMPORT boost::detail::winapi::UINT_ WINAPI
25 boost::detail::winapi::LPSTR_ lpBuffer,
26 boost::detail::winapi::UINT_ uSize);
29 BOOST_SYMBOL_IMPORT boost::detail::winapi::UINT_ WINAPI
31 boost::detail::winapi::LPWSTR_ lpBuffer,
32 boost::detail::winapi::UINT_ uSize);
40 #if !defined( BOOST_NO_ANSI_APIS )
41 using ::GetSystemDirectoryA;
43 using ::GetSystemDirectoryW;
45 #if !defined( BOOST_NO_ANSI_APIS )
46 BOOST_FORCEINLINE UINT_ get_system_directory(LPSTR_ lpBuffer, UINT_ uSize)
48 return ::GetSystemDirectoryA(lpBuffer, uSize);
52 BOOST_FORCEINLINE UINT_ get_system_directory(LPWSTR_ lpBuffer, UINT_ uSize)
54 return ::GetSystemDirectoryW(lpBuffer, uSize);
61 #endif // BOOST_PLAT_WINDOWS_DESKTOP
63 #endif // BOOST_DETAIL_WINAPI_GET_SYSTEM_DIRECTORY_HPP_