I am trying to make a Windows Service Client that connects to a Server in c++. The server is not a service and both, the Client and the Server are written in c++ using winsock. The goal is to enumerate the connected devices on the Client Service and send it to the Server and print it there. I am able to send messages between the two and print it out but whenever I try to do it for this it doesn't work.
I have narrowed it down to when I try to get the size of the list generated from GetRawInputDevices()
it returns nothing (0). I am assuming this is the size it its reading, which is incorrect, because when I try to do this outside of the service it prints out 5 or 6 devices.
I found a few things online saying that this is not possible but they were old threads and they didnt really give any reasoning behind why. I also do not see why this isnt possible.
Does anyone know if this is possible? If so, any suggestions on what needs to be done differently from just enumerating the list from a non-service client? and if not, what makes this different?
I can post the code if need be.