Reputation: 371
In a c++/clr dll (.net 4.5), is it possible to create a .NET object from a native IDispatch* (or IUnknown*, its a dual-interface COM object)? I don't want to register the COM object but I can get a pointer to it via c call from another dll. But how can I use this pointer to create a .net object (generated via "add reference..." from tlb)? I mean, without calling Invoke etc. directly.
Upvotes: 0
Views: 179
Reputation: 1
ok now I found the solution by myself. Marshal.GetObjectForIUnknown is what I was looking for. That was probably too easy to ask here...?
Upvotes: 0