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   
Nicholas Paldino [.NET/C# MVP]
 
Posts: n/a

Default Re: What is DispId used for? - 08-16-2007 , 02:43 PM






Daniel,

DispId is used in the event that you want to assign the dispatch id
(used with dispatch interfaces, basically late binding). If you don't
assign it, then it will be auto assigned for you. It's a good idea to use
them, as it gives you better control over how your class is exposed to COM.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp (AT) spam (DOT) guard.caspershouse.com

"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.