>>Hi everybody,
>>
>>I have a DLL project. To the main class (based on the public interface) I added a property called lTraining.
>>
>>That dll is being invoked as a service (my colleague added that service).
>>
>>My question is - how can we somehow pass 'Training' parameter (may be to that service) and how would it then set that flag property?
>>
>>Thanks a lot in advance.
>
>Do you mean that you want to start the service with a parameter or that you want to change the flag whilst the service is running ?
>If the former that then might help:
https://stackoverflow.com/questions/42812333/pass-an-argument-to-a-windows-service-at-automatic-startup>
>If the latter then you have lots of options: named pipe, web sockets, WCF etc......
Hi Viv,
I have a problem.
Basically, my questions were because we wanted to be able to run our middleware com class in the training mode.
The original code was the following:
public enum ReturnType { UNK, STR, XML, XM2, XM3, DSP, ADO }; // UNK = unknown, if it has not been set or they selected an unavaliable value
[Guid("1c3f2f40-86f0-418b-a33f-9bdda89e82b5"), InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface IMiddleware
{
[DispId(1)]
String Invoke(String input);
}
[Guid("362941ee-ae94-41a2-9dd4-3e159e87cb4d"), ClassInterface(ClassInterfaceType.None)]
[ProgId("Siriusware.Middleware")]
public class MiddlewareCom : IMiddleware
...
It worked fine.
I added a new class and also generated a new GUID using the Tools/Create Guild so the signature now is the following:
I added running this class as a service using our PoolService program (written in C++).
And now I am able to run the training service fine, but I can not run the Live service anymore.
The pool log has the following
2017.07.07 18:26:11.341 ( 1 ) Unable to Create Instance of Siriusware.Middleware Error: Unable to load Siriusware.Middleware. Invalid class string
2017.07.07 18:26:11.341 ( 1 ) Unable to load Siriusware.Middleware. Invalid class string
Even after I commented out the training class and re-tried I still can not start the service.
So, do you know what may be wrong?
Thanks in advance.
If it's not broken, fix it until it is.
My Blog