Loading plugins/nodeinfo/nodeinfo.cpp +19 −0 Changes for plugins/nodeinfo/nodeinfo.cpp: 19 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -153,6 +153,25 @@ namespace blogi { htmltable << (libhtmlpp::HtmlTable::Row() << "Hardware :" << usysinfo.machine); htmltable << (libhtmlpp::HtmlTable::Row() << _DistName << _DistEntry); #else // Windows implementation WSADATA wsaData; int iResult; iResult = WSAStartup(MAKEWORD(2, 2), &wsaData); if (iResult == 0) { char hostName[256]; DWORD hostNameLen = sizeof(hostName); if (gethostname(hostName, hostNameLen) == SOCKET_ERROR) { std::cerr << "gethostname failed with error: " << WSAGetLastError() << std::endl; WSACleanup(); return false; } htmltable << (libhtmlpp::HtmlTable::Row() << "Hostname: " << hostName); WSACleanup(); } // Typedef for the signature of GetProductInfo typedef BOOL (WINAPI *PGETPRODUCTINFO)( DWORD dwOSMajorVersion, Loading Loading
plugins/nodeinfo/nodeinfo.cpp +19 −0 Changes for plugins/nodeinfo/nodeinfo.cpp: 19 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -153,6 +153,25 @@ namespace blogi { htmltable << (libhtmlpp::HtmlTable::Row() << "Hardware :" << usysinfo.machine); htmltable << (libhtmlpp::HtmlTable::Row() << _DistName << _DistEntry); #else // Windows implementation WSADATA wsaData; int iResult; iResult = WSAStartup(MAKEWORD(2, 2), &wsaData); if (iResult == 0) { char hostName[256]; DWORD hostNameLen = sizeof(hostName); if (gethostname(hostName, hostNameLen) == SOCKET_ERROR) { std::cerr << "gethostname failed with error: " << WSAGetLastError() << std::endl; WSACleanup(); return false; } htmltable << (libhtmlpp::HtmlTable::Row() << "Hostname: " << hostName); WSACleanup(); } // Typedef for the signature of GetProductInfo typedef BOOL (WINAPI *PGETPRODUCTINFO)( DWORD dwOSMajorVersion, Loading