HighTechTalks DotNet Forums  

<DispId(0)> attriubute

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


Discuss <DispId(0)> attriubute in the Dotnet Framework (Interop) forum.



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

Default <DispId(0)> attriubute - 04-25-2007 , 02:40 PM






I'm using
<DispId(0)> attriubute

for my COM-Interop interfaces...

I have two interfaces one for events and another for properties and methods.

I'm using

<DispId(0)> attriubute to <DispId(16)> attriubute

some are used in one interface and some are used in another. Can I do
ranges like...

<DispId(101)> attriubute

<DispId(201)> attriubute, etc..?

TIA! JerryM



Reply With Quote
  #2  
Old   
Walter Wang [MSFT]
 
Posts: n/a

Default RE: <DispId(0)> attriubute - 04-25-2007 , 11:56 PM






Hi Jerry,

Sorry but I'm not sure I understand your question:

Quote:
Can I do ranges like...
DispId(101)> attriubute
DispId(201)> attriubute, etc..?
Also, the DISPID_VALUE (0) is reserved for default member for the object:
the property or method is invoked when an ActiveX client specifies the
object name without a property or method.

#DISPID
http://msdn.microsoft.com/library/en...5761-40ad-8b25
-72f85d41466f.asp?frame=true

Regards,
Walter Wang (wawang (AT) online (DOT) microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.




Reply With Quote
  #3  
Old   
JerryWEC
 
Posts: n/a

Default Re: <DispId(0)> attriubute - 04-26-2007 , 09:20 AM



Walter,

Basically I want to know if I can skip DispId values...

Interface1...

<DispId(101)> _
Sub Method1()
<DispId(102)> _
Sub Method2()

Interface2...

<DispId(201)> _
Sub Method3()
<DispId(202)> _
Sub Method4()

etc...

I would like to group certain methods, properties and events into group
using 101, 102, 103, 104 for events, then 201, 202, 203, 204 for properties
and then 301, 302, 303, 304, etc... for Methods. within two different
interfaces. ??? Yes or No?

TIA JerryM



Reply With Quote
  #4  
Old   
Walter Wang [MSFT]
 
Posts: n/a

Default Re: <DispId(0)> attriubute - 04-26-2007 , 09:52 PM



Hi Jerry,

Other than those special DispIDs, you can use arbitrary ID, as long as
they're not duplicate for different property/method.


Regards,
Walter Wang (wawang (AT) online (DOT) microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.


Reply With Quote
  #5  
Old   
JerryWEC
 
Posts: n/a

Default Re: <DispId(0)> attriubute - 04-27-2007 , 09:57 AM



Walter, Cool! I just wanted to do ranges so I can add new times as I
develop and don't have to renumber everytime I add one new method or
property or event.

Chow! Have a great weekend!
JerryM



Reply With Quote
  #6  
Old   
JerryWEC
 
Posts: n/a

Default Re: <DispId(0)> attriubute - 04-30-2007 , 11:54 AM



Sorry...

Below the text reads new times and should have read new items...

Quote:
Walter, Cool! I just wanted to do ranges so I can add new times as I
develop and don't have to renumber everytime I add one new method or
property or event.

Chow! Have a great weekend!
JerryM




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.