Instantiate a COM DLL remotely?
-
Sorry, first time for this and I'm not sure which direction I need to take... I have an ATL COM DLL that wrappers parts of another COM component written in Java provided by another vendor. It works great running on the same server as the Java component. However, the intent is to have the ATL component connect remotely to the Java component. I don't really care how the problem is solved... instantiating the ATL object on the server (Web server) from the client (how?) or having the ATL component which is currently downloaded to the client remotely instantiate the Java component (how?). The only direction I know to look is DCOM but that's not the direction I wanted to go. For one thing, with DCOM I'd have to setup (from a web browser) the Java component on the client so I can select it using dcomcnf to go to the server to run instead (that's the only way I could select the option that I saw). Could anyone point me in the right direction? I'm a little lost... Thanks, Matt
-
Sorry, first time for this and I'm not sure which direction I need to take... I have an ATL COM DLL that wrappers parts of another COM component written in Java provided by another vendor. It works great running on the same server as the Java component. However, the intent is to have the ATL component connect remotely to the Java component. I don't really care how the problem is solved... instantiating the ATL object on the server (Web server) from the client (how?) or having the ATL component which is currently downloaded to the client remotely instantiate the Java component (how?). The only direction I know to look is DCOM but that's not the direction I wanted to go. For one thing, with DCOM I'd have to setup (from a web browser) the Java component on the client so I can select it using dcomcnf to go to the server to run instead (that's the only way I could select the option that I saw). Could anyone point me in the right direction? I'm a little lost... Thanks, Matt
Actually, I think DCOM is the way you want to go. You can programmatically set everything DCOMCNFG does (look into CoCreateInstanceEx for specifying server, and the AppId registry keys and LSA functions for security settings if they apply). Might I suggest, if you are going to use multiple clients off this server, that you turn your COM dll into an exe. COM dlls require a surrogate (very thin wrapper that does nothing really but provide an executable layer) to run on a remote machine, because frankly they themselves arnt enough to sustain an independant process. DCOM provides a default surrogate, DllHost.exe, which isnt bad, but if your goal is to service multiple clients off that remote server, my suggestion would be to turn your DLL into an EXE. One thing I dont understand is who is the client? If its a web browser, all your objects will be "running" on the server, so you dont need to make your client aware of the objects. If its an application, then there isnt really any issue in just registering the needed classes on that client computer, is there? Hope this helps. -Jesse