mirror of
https://github.com/boostorg/dll.git
synced 2026-02-01 20:32:22 +00:00
More b2 related workarounds for MinGW, simplified Windows code and fixed warnings
This commit is contained in:
5
example/tutorial9/tutorial9.cpp
Normal file → Executable file
5
example/tutorial9/tutorial9.cpp
Normal file → Executable file
@@ -8,7 +8,8 @@
|
||||
#if BOOST_OS_WINDOWS
|
||||
|
||||
//[callplugcpp_tutorial9
|
||||
#include <boost/dll/import.hpp> // for import
|
||||
#include <boost/dll/import.hpp> // for dll::import
|
||||
#include <boost/dll/shared_library.hpp> // for dll::shared_library
|
||||
#include <boost/function.hpp>
|
||||
#include <iostream>
|
||||
#include <windows.h>
|
||||
@@ -20,7 +21,7 @@ int main() {
|
||||
|
||||
// OPTION #0, requires C++11 compatible compiler that understands GetStdHandle_t signature.
|
||||
/*<-*/
|
||||
#if !defined(BOOST_NO_CXX11_TRAILING_RESULT_TYPES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) /*->*/
|
||||
#if defined(_MSC_VER) && !defined(BOOST_NO_CXX11_TRAILING_RESULT_TYPES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) /*->*/
|
||||
auto get_std_handle = dll::import<GetStdHandle_t>(
|
||||
"Kernel32.dll",
|
||||
"GetStdHandle"
|
||||
|
||||
Reference in New Issue
Block a user