WEB开发网
开发学院手机开发Windows Mobile 开发 在Windows mobile 5.0下操作INI文件 阅读

在Windows mobile 5.0下操作INI文件

 2010-08-22 12:58:00 来源:WEB开发网   
核心提示:szBuf = (LPCWSTR)(pFileBuf + 2);else{PTCHAR pszWideChar = new TCHAR[dwLength + 1];MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pFileBuf, dwLength, pszWideChar, dwLeng

szBuf = (LPCWSTR)(pFileBuf + 2);

else

{

PTCHAR pszWideChar = new TCHAR[dwLength + 1];

MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pFileBuf, dwLength, pszWideChar, dwLength);

szBuf = pszWideChar;

delete pszWideChar;

}

delete pFileBuf;

CString szTemp;

int nPos;

if (szBuf.IsEmpty())

retrun -1;

nPos = szBuf.FindOneOf(TEXT(" "));

if (nPos == -1)

{

return -1;

}

while (1)

{

szTemp = szBuf.Left(nPos);

szBuf = szBuf.Right(szBuf.GetLength() - nPos);

szBuf.TrimLeft(TEXT(" "));

szTemp.TrimLeft(TEXT(" "));

szTemp.TrimRight(TEXT(" "));

if(szTemp.IsEmpty())

break;

if (szTemp.GetAt(0) == TEXT('[') &&

szTemp.GetAt(szTemp.GetLength() - 1) == TEXT(']'))

{

iIniNum++;

}

nPos = szBuf.FindOneOf(TEXT(" "));

}

return iIniNum;

return -1;

}

上一页  1 2 3 4 5 6 

Tags:Windows mobile 操作

编辑录入:coldstar [复制链接] [打 印]
赞助商链接