Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
WSDiscoveryWin32.cpp File Reference
#include "WSDiscoveryWin32.h"
#include "utils/StringUtils.h"
#include "utils/log.h"
#include "platform/win32/CharsetConverter.h"
#include <mutex>
#include <windns.h>
#include <ws2tcpip.h>

Namespaces

namespace  WSDiscovery
 

Functions

std::string FromW (const wchar_t *str, size_t length)
 

Function Documentation

◆ FromW()

std::string KODI::PLATFORM::WINDOWS::FromW ( const wchar_t * str,
size_t length )

Convert UTF-16 to UTF-8 strings Windows specific method to avoid initialization issues and locking issues that are unique to Windows as API calls expect UTF-16 strings

Parameters
str[in]string to be converted
length[in]length in characters of the string
Returns
utf8 string, empty string on failure