1 /* 2 * Copyright 2016 Klemens D. Morgenstern 3 * 4 * Distributed under the Boost Software License, Version 1.0. 5 * See http://www.boost.org/LICENSE_1_0.txt 6 */ 7 8 #ifndef BOOST_WINAPI_GET_SYSTEM_DIRECTORY_HPP_INCLUDED_ 9 #define BOOST_WINAPI_GET_SYSTEM_DIRECTORY_HPP_INCLUDED_ 10 11 #include <boost/winapi/basic_types.hpp> 12 13 #ifdef BOOST_HAS_PRAGMA_ONCE 14 #pragma once 15 #endif 16 17 #if BOOST_WINAPI_PARTITION_DESKTOP 18 19 #include <boost/winapi/detail/header.hpp> 20 21 #if !defined( BOOST_USE_WINDOWS_H ) 22 extern "C" { 23 #if !defined( BOOST_NO_ANSI_APIS ) 24 BOOST_WINAPI_IMPORT boost::winapi::UINT_ BOOST_WINAPI_WINAPI_CC 25 GetSystemDirectoryA( 26 boost::winapi::LPSTR_ lpBuffer, 27 boost::winapi::UINT_ uSize); 28 #endif 29 30 BOOST_WINAPI_IMPORT boost::winapi::UINT_ BOOST_WINAPI_WINAPI_CC 31 GetSystemDirectoryW( 32 boost::winapi::LPWSTR_ lpBuffer, 33 boost::winapi::UINT_ uSize); 34 } // extern "C" 35 #endif 36 37 namespace boost { 38 namespace winapi { 39 40 #if !defined( BOOST_NO_ANSI_APIS ) 41 using ::GetSystemDirectoryA; 42 #endif 43 using ::GetSystemDirectoryW; 44 45 #if !defined( BOOST_NO_ANSI_APIS ) get_system_directory(LPSTR_ lpBuffer,UINT_ uSize)46BOOST_FORCEINLINE UINT_ get_system_directory(LPSTR_ lpBuffer, UINT_ uSize) 47 { 48 return ::GetSystemDirectoryA(lpBuffer, uSize); 49 } 50 #endif 51 get_system_directory(LPWSTR_ lpBuffer,UINT_ uSize)52BOOST_FORCEINLINE UINT_ get_system_directory(LPWSTR_ lpBuffer, UINT_ uSize) 53 { 54 return ::GetSystemDirectoryW(lpBuffer, uSize); 55 } 56 57 } 58 } 59 60 #include <boost/winapi/detail/footer.hpp> 61 62 #endif // BOOST_WINAPI_PARTITION_DESKTOP 63 64 #endif // BOOST_WINAPI_GET_SYSTEM_DIRECTORY_HPP_INCLUDED_ 65