HighTechTalks DotNet Forums  

Re: What is DispId used for?

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss Re: What is DispId used for? in the Dotnet Framework (Interop) forum.



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

Default Re: What is DispId used for? - 08-17-2007 , 12:16 AM






You don't, C# will do that for you automatically creating prodids {1...n}.
However there may be times when a property or method must match a well-known
progid in the COM world so in this case you would need to specifiy it. You
may not encounter this scenario. Some examples are ActiveX controls well
known properties or Ole Collections.

The only time I have found where I needed to was on a COM event source
interface written in c#.

--
Cheers,
Micky D
"Daniel Lidström" <someone (AT) microsoft (DOT) com> wrote

Quote:
Hello!

I've read on MSDN [1] that it is necessary to mark methods and properties
with DispId in order to expose them to COM. But that doesn't seem
necessary. I've created interfaces and subclasses in C# and I have no
problem using them from C++. So what is DispId really used for?

[1] Example COM Class (C#):
http://msdn2.microsoft.com/en-us/lib...20(VS.80).aspx

--
Daniel


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.