I tried on my game machine (Windows 8.1) and i can confirm that DS4ToolServiceTester require admin rights.
But it's working flawless, the service is created correctly, correctly disposed on close and the log is read correctly both into the Tester and into the System EventLog (btw, i'm curious to know if someone is experiencing strange log messages in DS4ToolServiceTester, like i do on my home dev machine).
The only flaw is that DS4Tool is not receiving messages correctly, thus no controller show up.
The workaround for now is to launch DS4ToolServiceTester (tomorrow i will change name to Tester, the current name is too long
) AND DS4Tool with admin rights.
I've already some thought on what should be the cause and some possible workaround.
In the meantime i did some extra refactor, moved some stuff around, clean a little bit and so on. Ah, i also broke the Classic Window Style, sorry guys, only Metro until i fixed everything.
I update another version with some minor fixes compared to the previous version, i hope this time it will work! (REMEMBER: admin rights for both Tester and client)
If someone is interested, it's worth to explain how everything is working at the moment: because it's important to discuss this service thingy before doing the hard work.
The first thing that i'm testing is sending message from DS4ToolService to DS4Tool and to accomplish this the best way is to use a
NamedPipe through
WCF. The problem is that in our case we want to receive message on DS4Tool asynchronously and as far as i know the only way is to have his Pipe set as a server, where the Pipe of DS4ToolService is set as a client.
This complicates things, because we can't have a PipeClient asking for connection before the PipeServer exists (and considering that in our case the PipeClient is a service it exists way before his PipeServer).
The actual workaround (and probably it's this that force DS4Tool to work with admin rights) is using another communication protocol to handle command from DS4Tool to DS4ToolService that is called
ServiceController: it's a lot simpler, it's oneway only and it accept only integer value where every int is a different action that the service should execute.
I'm using it to inform DS4ToolService that there is a PipeServer where it could connect to. (When this happens you see on the log a message that inform you of a client that is now connected to the service).
Any thoughts?
EDIT: As always remember that this is just a proof of concept of GUI behavior and not a functional application.