HighTechTalks DotNet Forums  

Implement COM interface in managed C++.

Dotnet Framework (CLR) microsoft.public.dotnet.framework.clr


Discuss Implement COM interface in managed C++. in the Dotnet Framework (CLR) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
krzys
 
Posts: n/a

Default Implement COM interface in managed C++. - 05-20-2006 , 09:34 PM






I'm posting here because I couldn't get any help in other managed groups.

After hours of browsing I can't find any hints on how to implement a COM
component using a managed C++ class.

In C# this is trivial, you import the interface like below and just
implement it.

In C++ neither inheriting such unmanaged interfaces nor adding the
IMPLEMENTS_INTERFACE sections appears to work. The documentation doesn't
provide any clue.

How to achieve this in managed C++? I'd rather not use ATL or other non-.NET
technologies unless absolutely necessary.

[ComImport(), Guid("000214EA-0000-0000-C000-000000000046"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown )]
internal interface IPersistFolder
{
void GetClassID(ref Guid pClassID);
[PreserveSig]
long Initialize(IntPtr pidl);
}


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.