3,245
社区成员
发帖
与我相关
我的任务
分享
// 文件名
if ( jValCur["filename"].empty() )
return -1;
const char *fileName = jValCur["filename"].asCString();
// 用户名和密码
const char *userName = NULL;
if ( !jValCur["username"].empty() )
userName = jValCur["username"].asCString();
const char *password = NULL;
if ( !jValCur["password"].empty() )
password = jValCur["password"].asCString();
bool bPassive = true;
if ( !jValCur["passive"].empty() )
bPassive = ((jValCur["passive"].asInt()==1)?true:false);
USES_CONVERSION;
LPCTSTR uns;
if ( userName && strlen(userName) > 0 )
{
uns == A2W(userName);
//_lpa = userName;
//_convert = (lstrlenA(_lpa)+1);
//LPWSTR p = (LPWSTR)alloca(_convert*sizeof(WCHAR));
//uns = ATLA2WHELPER(p, _lpa, _convert, _acp);
}
else
uns = NULL;
LPCTSTR pw;
if ( password && strlen(password) > 0 )
pw = A2W(password);
else
pw = NULL;
LPCTSTR fn = A2W(fileName);