Thank you very much helping me! 🙂
What i do is to create a thread (via win32 CreateThread()), that (should) handles all the actual tcp-stuff. The threadfunction is ServerFunction(), see below. All this is located in a dll, that is called from inside LabView.
It registeres the TCP-Server (successfully!), calls ProcessTCPEvents() and performs TCPRead and -Write functions, and finally closes the server.
What happens is, that the call to ProcessTCPEvents() returns -13 (-kTCP_GeneralIOError).
This occures, when executed remotely on LabView Real-Time 7.1; when executed locally, under LabView for Windows, it works fine.
Thank you very much for your help!
Fabian
--- source code: ----------------------------------
DWORD WINAPI ServerFunction( void* data) {
// register server
status = RegisterTCPServer( pServer->nPort, ServerTCPCB, pServer);
if( 0 != status) { // failed to register server
pServer->state = SERVER_ERROR;
return -1;
}
// run server
pServer->state = SERVER_RUN;
while( SERVER_RUN == pServer->state) {
g_TCP_Event = ProcessTCPEvents();
if( 0 != g_TCP_Event) {
// failes with -13
}
...
// ok, read, write data etc. ...
}
...
--------------------------------------------