Search code examples
c++winformsdcomopc

Winforms DLL does not start under DCOM


I have my own OPC server based on ATL(exe module). User interface based on WinForms(DLL module). In the _tWinMain in the separate thread I call Application::Run() from DLL. This works fine if I launch my server manually or if the server launched by local OPC client. However, OPC client is located on other machine and if I try to start the server, the server starts successfully, but UI Window is not displayed.

Any ideas?? Thanks


Solution

  • Check your server DCOM settings:

    DCOM settings

    Most likely server is configured to run as a launching user, so it is executed on the separate Window Station and GUI is not visible for the logged on user. If you change config to use the interactive user, a problem should be solved. Although if no user is currently logged on, your server will be unable to start.