收藏 不显示删除回复显示所有回复显示星级回复显示得分回复 return 发生 access violation 错误
这是我的代码
{
boolean bresult = FALSE;
AECHAR wMaoHao = ':';
AECHAR* waddress;
AECHAR* ptemp = NULL;
AECHAR* ptemp2 = accessAddress;
char* pstrtemp;
uint16 uport = 0;
ptemp = WSTRCHR(accessAddress, wMaoHao);
if (!ptemp)
{
*pwaddress = NULL;
*pwport = NULL;
return;
}
waddress = (AECHAR *) MALLOC( sizeof(AECHAR) * (ptemp - accessAddress + 1) );
if (waddress)
{
AECHAR * pa1 = waddress;
while(ptemp2 != ptemp)
{
*waddress = *ptemp2;
++ waddress;
++ ptemp2;
}
if (ptemp2 == ptemp)
{
*waddress = 0;
}
waddress = pa1;
}
pstrtemp = (char *) MALLOC( sizeof(char) * WSTRLEN( ++ptemp ) + 1 );
if (pstrtemp)
{
WSTRTOSTR(ptemp, pstrtemp, sizeof(char) * WSTRLEN( ptemp ) + 1);
uport = ATOI(pstrtemp);
}
*pwaddress = waddress;
*pwport = uport;
}
if (!ptemp)
{
*pwaddress = NULL;
*pwport = NULL;
return;
}