Win service (remoting)

Hello, i have a service running, made in c#, who is like a mutex for a file.. keep the file read/write access between different c# applications. Everything works well.
Now, i have this final application made in c++ vs2013(cannot upgrade because of older c and other obsolete inbuilt functions) and i dont know how to access the service.
The service has 2 functions .. LockFile(string uniquename, int timeout) and UnlockFile(). And the question is: how i can access the two functions in c++.
Thanks in advance for any idea.
OK, so you have to do a little bit of extra work yourself.

But the underlying API is there.
Thank you for the reply.
The problem is that i have to pass by the service. So i need a way to access those two functions of the service.
Generally you send commands to a service using "ControlService()" or "ControlServiceEx()". The specific command you send, will depend on how the service is written.
I've managed to communicate with the service.
How? I made a dll in C# and then (actually 2 dlls), another dll in c++ (with /clr) who's using the 2 dlls and then i use this last dll in my c++2013 (funny thing: this last project it's a dll too :) ).
Seems to work well now.

The function used in C#: Activator.GetObject(typeof(object), "tcp://localhost:33210/FileLocker.rem");
I didn't find a function in C++ who does the same thing.

Registered users can post here. Sign in or register to post.