i have this problem for over a week now..
How do i then search the AdapterName array..
get to get each individual set of characters that make a string.
i am using this method
and the application just crashes upon load
Code:
/////////////////////////////////////////////////////////////////////////
char AdapterName[8192];
char *temp,*temp1;
//AdapterName char array gets populated by
if(PacketGetAdapterNames(AdapterName,&AdapterLength)==FALSE)
{
cout << "Unable to detect the network adapters installed on this box!\n";
return -1;
}
temp=AdapterName;
temp1=AdapterName;
while ((*temp!='\0')||(*(temp-1)!='\0'))
{
if (*temp=='\0')
{
strncpy(AdapterList[i],temp1,(temp-temp1)*2);
temp1=temp+1;
i++;
}
temp++; //Incrementing Original char Pointer
}
if anyone could help me out it would be really appreciated
[code][/code]tagged by Salem