x
Yes
No
Do you want to visit DriveHQ English website?
Inicio
Características
Precios
Prueba gratuita
Software cliente
Acerca de nosotros
Servidor de archivos
|
Solución de copias de seguridad
|
Servidor FTP
|
Servidor de correo electrónico
|
Alojamiento web
|
Software cliente
Servidor de archivos
Solución de copia de seguridad
Servidor FTP
Servidor de correo electrónico
Alojamiento web
Software cliente
system_failure.hpp - Hosted on DriveHQ Cloud IT Platform
Arriba
Subir
Descargar
Compartir
Publicar
Nueva carpeta
Nuevo archivo
Copiar
Cortar
Eliminar
Pegar
Clasificación
Actualizar
Ruta de la carpeta: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\iostreams\detail\system_failure.hpp
Girar
Efecto
Propiedad
Historial
// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) // (C) Copyright 2005-2007 Jonathan Turkanis // (C) Copyright Jonathan Graehl 2004. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) // See http://www.boost.org/libs/iostreams for documentation. // Used by mapped_file.cpp. #ifndef BOOST_IOSTREAMS_DETAIL_SYSTEM_FAILURE_HPP_INCLUDED #define BOOST_IOSTREAMS_DETAIL_SYSTEM_FAILURE_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include
#include
#include
#include
#include
// failure. #if defined(BOOST_NO_STDC_NAMESPACE) && !defined(__LIBCOMO__) namespace std { using ::strlen; } #endif #ifdef BOOST_IOSTREAMS_WINDOWS # define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers # include
#else # include
# include
#endif namespace boost { namespace iostreams { namespace detail { inline BOOST_IOSTREAMS_FAILURE system_failure(const char* msg) { std::string result; #ifdef BOOST_IOSTREAMS_WINDOWS DWORD err; LPVOID lpMsgBuf; if ( (err = ::GetLastError()) != NO_ERROR && ::FormatMessageA( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR) &lpMsgBuf, 0, NULL ) != 0 ) { result.reserve(std::strlen(msg) + 2 + std::strlen((LPSTR)lpMsgBuf)); result.append(msg); result.append(": "); result.append((LPSTR) lpMsgBuf); ::LocalFree(lpMsgBuf); } else { result += msg; } #else const char* system_msg = errno ? strerror(errno) : ""; result.reserve(std::strlen(msg) + 2 + std::strlen(system_msg)); result.append(msg); result.append(": "); result.append(system_msg); #endif return BOOST_IOSTREAMS_FAILURE(result); } inline BOOST_IOSTREAMS_FAILURE system_failure(const std::string& msg) { return system_failure(msg.c_str()); } inline void throw_system_failure(const char* msg) { throw system_failure(msg); } inline void throw_system_failure(const std::string& msg) { throw system_failure(msg); } } } } // End namespaces detail, iostreams, boost. #endif // #ifndef BOOST_IOSTREAMS_DETAIL_SYSTEM_FAILURE_HPP_INCLUDED
system_failure.hpp
Dirección de la página
Dirección del archivo
Anterior
35/38
Siguiente
Descargar
( 2 KB )
Comments
Total ratings:
0
Average rating:
No clasificado
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.