So, here it is. Basically, I have a VB5 client/server app that communicates via DCOM. Because of the horrendous times we have been having keeping it working, I have finally decided it was time to start phasing the DCOM out. The very first step to do this needs to be to create a .NET Remoting/WCF bridge between the client and server.
I have linked the server.com to the server.Remote and the client.remote is able to communicate with with com objects passed through the Remoting bridge. The problem lies in exposing the class that obtains the server.com objects back to the COM client. The same code that works within the Client.Remoting is unable to pass the same object one step further to the client.com when client.com asks for it. The error is E_NOINTERFACE. I am at a complete loss as why this is. Other methods on client.Remoting exposed over the same COM interface do work. So it seems somehow that an interface required to connect the object from server.com between client.Remoting and client.com is either broken or missing. The interface is in the references for all projects passing it along the way. And as indicated, it appears that the variables and methods are making it at least as far as the client.Remoting from the server.com.
I have also tried passing a variable bored through a function call to get the data all the way through with the same result. I have thought about trying to do a delegate/callback/addressof type thing to see if I can just pass back a pointer to it but I really don't like that idea.
I'm wondering if there is a marshalling issue or if I'm missing a reference or need to manually define an interface. I'm hoping someone can give me a better direction to go in.
I'm hoping this will make sense to someone before I paste any code in.
Client/Server VB5
Server COM EXE
Vb.NET Express 2013
I have linked the server.com to the server.Remote and the client.remote is able to communicate with with com objects passed through the Remoting bridge. The problem lies in exposing the class that obtains the server.com objects back to the COM client. The same code that works within the Client.Remoting is unable to pass the same object one step further to the client.com when client.com asks for it. The error is E_NOINTERFACE. I am at a complete loss as why this is. Other methods on client.Remoting exposed over the same COM interface do work. So it seems somehow that an interface required to connect the object from server.com between client.Remoting and client.com is either broken or missing. The interface is in the references for all projects passing it along the way. And as indicated, it appears that the variables and methods are making it at least as far as the client.Remoting from the server.com.
I have also tried passing a variable bored through a function call to get the data all the way through with the same result. I have thought about trying to do a delegate/callback/addressof type thing to see if I can just pass back a pointer to it but I really don't like that idea.
I'm wondering if there is a marshalling issue or if I'm missing a reference or need to manually define an interface. I'm hoping someone can give me a better direction to go in.
I'm hoping this will make sense to someone before I paste any code in.
Client/Server VB5
Server COM EXE
Vb.NET Express 2013