i am getting pretty anoyed at this, im using FDSTalk.dll to talk to FDS and i had it working but now it doesn't work why? here is the code i am using:(C++)
long IP2Long(std::string &ipString) //function from drichards (experts-exchange)
{
long result = 0;
size_t startPos = 0;
for ( int ii = 0; ii < 4; ii++ )
{
size_t dot = ipString.find('.', startPos);
int num = ::atoi(ipString.substr(startPos, dot-startPos).c_str());
result *= 256;
result += num;
startPos = dot+1;
}
return result;
}
int _tmain(int argc, _TCHAR* argv[])
{
if(Init(1234, "password"))
{
cout << "Init";
Send_Message("password", IP2Long((string)"127.0.0.1"), 4849);
Send_Message("msg hello", IP2Long((string)"127.0.0.1"), 4849);
Shutdown();
}
system("pause");
return 0;
}
it will compile and run with no errors but nothing apperes in FDS, why!
[Updated on: Tue, 08 August 2006 15:22]
Report message to a moderator