简体   繁体   中英

C++ Windows Service socket connection error

I wrote a win32 test application with re-usable unit to port to a service. The test application runs perfectly. It opens a socket to the device(s) to communicate with the device.

Now when running the service, I get a socket connection error. I've tried setting the logon account to Administrator and Local System account with desktop interaction but still get the socket connection error.

I compile the win32 app and all work fine .... any ideas on what else I can try?

Sockets are not affected by user accounts. That is one reason they are useful in services. I use sockets in services all the time and they work fine. The cause of the problem is more likely a bug in your socket code instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM