Hello together,
I may found a bug/offer an improvement in the library:
In snap7_libmain.cpp, in Cli_WaitAsCompletion:
The parameter for Timeout is an int which is passed to PSnap7Client->WaitAsCompletion, which is expecting an unsinged long value.
A fix could be this (change int Timeout to unsinged long Timeout):
int S7API Cli_WaitAsCompletion(S7Object Client, unsinged long Timeout) { if (Client) return PSnap7Client(Client)->WaitAsCompletion(Timeout); else return errLibInvalidObject; }
Log in to post a comment.
Hello together,
I may found a bug/offer an improvement in the library:
In snap7_libmain.cpp, in Cli_WaitAsCompletion:
The parameter for Timeout is an int which is passed to PSnap7Client->WaitAsCompletion, which is expecting an unsinged long value.
A fix could be this (change int Timeout to unsinged long Timeout):
int S7API Cli_WaitAsCompletion(S7Object Client, unsinged long Timeout)
{
if (Client)
return PSnap7Client(Client)->WaitAsCompletion(Timeout);
else
return errLibInvalidObject;
}