|
-
March 20th, 2013, 10:38 AM
#9
Re: Accessing managed dll from c++
 Originally Posted by Lars_V_J
Ah...it seems that what it is really nagging about is that it doesn't like the service reference in the Csharp project, apparently because it doesn't have [ClassInterface(ClassInterfaceType.None)]
I see. So, using COM as such is not the problem. BTW, I started writing post #6 before your post #4 arrived, so I hadn't already seen it at that point.
Except for the using declaration right at the top of your C# snippet, I don't see any reference to POA_serviceref in the code you posted at all, so I have no idea what its signature is. Is there any concrete need to expose it to COM at all? The usual reason why you get that warning from tlbexp is that the offending type simply can't be represented in terms of COM, so exposing it as-is probably is not of much use anyway. If you simply applied [ComVisible(true)] at assembly scope and POA_serviceref (which I assume is a class) just inherited that, then explicitly applying [ComVisible(false)] to it would be the simple natural solution.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|