Revision: 9489 https://osdn.net/projects/ttssh2/scm/svn/commits/9489 Author: zmatsuo Date: 2021-10-23 01:09:52 +0900 (Sat, 23 Oct 2021) Log Message: ----------- TTProxy の TTXSetCommandLine() を Unicode化 Modified Paths: -------------- trunk/TTProxy/TTProxy.h -------------- next part -------------- Modified: trunk/TTProxy/TTProxy.h =================================================================== --- trunk/TTProxy/TTProxy.h 2021-10-22 16:09:45 UTC (rev 9488) +++ trunk/TTProxy/TTProxy.h 2021-10-22 16:09:52 UTC (rev 9489) @@ -287,13 +287,16 @@ } } - static void PASCAL TTXSetCommandLine(PCHAR cmd, int cmdlen, PGetHNRec rec) { - String url = ProxyWSockHook::generateURL(); + static void PASCAL TTXSetCommandLine(wchar_t *cmd, int cmdlen, PGetHNRec rec) { + String urlA = ProxyWSockHook::generateURL(); + wchar_t *urlW = ToWcharA(urlA); + WString url = urlW; + free(urlW); if (url != NULL) { - if (strlen(cmd) + 8 + url.length() >= (unsigned) cmdlen) + if (wcslen(cmd) + 8 + url.length() >= (unsigned) cmdlen) return; - strcat_s(cmd, cmdlen, " -proxy="); - strcat_s(cmd, cmdlen, url); + wcscat_s(cmd, cmdlen, L" -proxy="); + wcscat_s(cmd, cmdlen, url); } }