Gerhard Pobinger
2015-07-08 13:52:11 UTC
Lately, I was using asio as header-only version for a project on Windows CE
6.0. It nearly worked out of the box, only things I needed to change was
some '#ifdef' in asio-file 'error_code.ipp' to use wchar_t for Windows CE.
If anyone finds this information useful, small patch could be applied to
some future asio-versions hopefully:
std::string message(int value) const
{
-#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+#if defined(ASIO_WINDOWS) && !defined(UNDER_CE) || defined(__CYGWIN__)
char* msg = 0;
DWORD length = ::FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER
| FORMAT_MESSAGE_FROM_SYSTEM
@@ -59,7 +59,7 @@ public:
return msg;
else
return "asio.system error";
-#elif defined(ASIO_WINDOWS_RUNTIME)
+#elif defined(ASIO_WINDOWS_RUNTIME) || defined(UNDER_CE)
std::wstring wmsg(128, wchar_t());
for (;;)
{
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
asio-users mailing list
asio-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio
6.0. It nearly worked out of the box, only things I needed to change was
some '#ifdef' in asio-file 'error_code.ipp' to use wchar_t for Windows CE.
If anyone finds this information useful, small patch could be applied to
some future asio-versions hopefully:
std::string message(int value) const
{
-#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+#if defined(ASIO_WINDOWS) && !defined(UNDER_CE) || defined(__CYGWIN__)
char* msg = 0;
DWORD length = ::FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER
| FORMAT_MESSAGE_FROM_SYSTEM
@@ -59,7 +59,7 @@ public:
return msg;
else
return "asio.system error";
-#elif defined(ASIO_WINDOWS_RUNTIME)
+#elif defined(ASIO_WINDOWS_RUNTIME) || defined(UNDER_CE)
std::wstring wmsg(128, wchar_t());
for (;;)
{
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
asio-users mailing list
asio-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio