I have an existing COM component written in C++ that does some Windows
account management stuff. We're moving to Active Directory and rather
than change the whole application, the only changes required are to the
COM component. I want to move the functionality of the COM component to
a remoted C# object, this is straightforward. I also want to make calls
to the remoted object from my original COM component. This is not so
straightforward.
I will confess to having very little experience with Interop. While I
wade through the documentation can anyone tell me whether I'm pushing
solid waste up hill? The code that is failing is the following attempt
to instantiate the remote object:
HttpChannel * channel = new HttpChannel( NULL, NULL, new
BinaryServerFormatterSinkProvider());
ChannelServices::RegisterChannel( channel);
#undef GetObject
IBranchUserLib * branchUser = dynamic_cast<IBranchUserLib
*>(Activator::GetObject(__typeof( IBranchUserLib),
S"https://myworkstation:443/BranchUserLib/BranchUserLib.rem"));
This code is based on the same code I use successfully in a C# test
harness but in this case it fails with error 8007000e (Out of memory
error.)
Any clue would be greatly appreciated. Thanks.
Dave