06-29-2010 03:23 AM
hi all,
a short question regarding TCP-connections from CVI 9.0.1.
using CVI we use TCP to let work a kernel-solution with some AddOns. the AddOns are also built by CVI. this communication works fine if the OS WinXP is started in the common way.
now we want to run the complete solution as a kiosk-device and wrote the application into the registry as "shell"-entry. so windows comes up not with the explorer but with our kernel-solution. from this time the TCP-connection doesnt work.
are there dependencies between the WinExplorer and TCP inside windows ?
thanks and best regards
Simon
06-29-2010 08:41 AM
When you say the TCP communication does not work, what exactly happens? Are you getting errors from the CVI TCP Library functions? If so, what functions are returning errors and what are the error codes? One thing I can think of is that the TCP library uses a Win32 window to implement the TCP events based on the WSAAsyncSelect mechanism. If you do not start explorer.exe this Windows mechanism may not be working. If all the TCP library functions succeed and the problem is that you are not getting any TCP events (TCP callback is not getting called), you can try polling by calling ClientTCPRead or ServerTCPRead in a loop. Another approach is to call ProcessTCPEvents in a loop.
06-30-2010 03:04 AM
mohan,
sorry for confusion, the problem was another one:
the kernel-application can not start the addon-application if the kernel-application was started as the windows-shell. the addon was not found. the cause was, that GetDir() (called from inside the kernel) brings C:\\Documents and Settings\\<username> in this case. if the explorer works it brings C:\\Progams\\<kernel>. I changed the call to GetProjectDir() and all runs ok.
best regards
Simon
06-30-2010 08:51 AM
OK. This makes sense. GetDir returns the current working directory - this depends on whatever is launching your executable (explorer, cmd, etc). GetProjectDir returns the directory of your executable file and does not depened on the launcher.