I have a Windows Service written in C++ where I don't have the control over the source code, i.e. I cannot rewrite it. I also don't have the possibility to install it as a service and control it via ServiceController.
So the question is if it's possible to use DllImport and from C# "emulate" the service controller to initialize the service and run OnStart and OnStop from there? I've tried to find the entry point by using PEview and other tools, but can't find anything. When running it in C# and looking for "main" I get "System.EntryPointNotFoundException: 'Unable to find an entry point named 'main' in DLL ... "
When dumping /exports with dumpbin.exe there are no exports at all.
Is there a "standard" way to manage a windows service like the Service Controller do it?