windows.hpp 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // Copyright (c) 2012 Artyom Beilis (Tonkikh)
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See
  5. // accompanying file LICENSE or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. #ifndef BOOST_NOWIDE_WINDOWS_HPP_INCLUDED
  9. #define BOOST_NOWIDE_WINDOWS_HPP_INCLUDED
  10. #ifdef BOOST_USE_WINDOWS_H
  11. #include <windows.h>
  12. #else
  13. //
  14. // These are function prototypes... Allow to avoid including windows.h
  15. //
  16. extern "C" {
  17. __declspec(dllimport) wchar_t* __stdcall GetEnvironmentStringsW(void);
  18. __declspec(dllimport) int __stdcall FreeEnvironmentStringsW(wchar_t*);
  19. __declspec(dllimport) wchar_t* __stdcall GetCommandLineW(void);
  20. __declspec(dllimport) wchar_t** __stdcall CommandLineToArgvW(const wchar_t*, int*);
  21. __declspec(dllimport) unsigned long __stdcall GetLastError();
  22. __declspec(dllimport) void* __stdcall LocalFree(void*);
  23. __declspec(dllimport) int __stdcall SetEnvironmentVariableW(const wchar_t*, const wchar_t*);
  24. __declspec(dllimport) unsigned long __stdcall GetEnvironmentVariableW(const wchar_t*, wchar_t*, unsigned long);
  25. }
  26. #endif
  27. #endif