/** \file ExtraSocket.h \brief Define the socket of ultracopier \author alpha_one_x86 \licence GPL3, see the file COPYING */ #include "ExtraSocket.h" #include #include QString ExtraSocket::pathSocket(const QString &name) { #ifdef Q_OS_UNIX return name+QStringLiteral("-")+QString::number(getuid()); #else QString userName; /* bad way for catchcopy compatibility char uname[1024]; DWORD len=1023; if(GetUserNameA(uname, &len)!=FALSE) userName=QString::fromLatin1(toHex(uname));*/ QChar charTemp; DWORD size=255; WCHAR * userNameW=new WCHAR[size]; if(GetUserNameW(userNameW,&size)) { QByteArray tempArray; userName=QString::fromWCharArray(userNameW,size-1); int index=0; while(index