--- np2/win9x/sstp.cpp 2005/03/19 20:46:07 1.4 +++ np2/win9x/sstp.cpp 2011/03/07 09:54:11 1.8 @@ -1,12 +1,24 @@ -#include "compiler.h" -#include -#include "np2.h" -#include "scrnmng.h" -#include "sstp.h" +/** + * @file sstp.cpp + * @brief Sakura Script Transfer Protocol handler + * + * @author $Author: yui $ + * @date $Date: 2011/03/07 09:54:11 $ + */ + +#include "compiler.h" +#include +#include +#include "np2.h" +#include "scrnmng.h" +#include "sstp.h" #if defined(OSLANG_UTF8) || defined(OSLANG_UCS2) -#include "oemtext.h" +#include "oemtext.h" #endif +#if !defined(__GNUC__) +#pragma comment(lib, "wsock32.lib") +#endif // !defined(__GNUC__) static HWND sstphwnd = NULL; static int sstp_stat = SSTP_READY; @@ -30,7 +42,7 @@ static HANDLE check_sakura(void) { HANDLE hsakura; - hsakura = OpenMutex(MUTEX_ALL_ACCESS, FALSE, OEMTEXT("sakura")); + hsakura = OpenMutex(MUTEX_ALL_ACCESS, FALSE, _T("sakura")); if (hsakura != NULL) { CloseHandle(hsakura); } @@ -105,7 +117,7 @@ sstp_senderror:; void sstp_connect(void) { if (hSocket != INVALID_SOCKET) { - send(hSocket, sstpstr, strlen(sstpstr), 0); + send(hSocket, sstpstr, (int)strlen(sstpstr), 0); } } @@ -208,7 +220,7 @@ BOOL sstp_sendonly(const OEMCHAR *msg) { #else OEMSPRINTF(msgstr, sendermes, msg); #endif - send(lSocket, msgstr, strlen(msgstr), 0); + send(lSocket, msgstr, (int)strlen(msgstr), 0); ret = SUCCESS; } closesocket(lSocket);