Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / April 2007

Tip: Looking for answers? Try searching our database.

<DispId(0)> attriubute

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JerryWEC - 25 Apr 2007 19:40 GMT
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
Walter Wang [MSFT] - 26 Apr 2007 04:56 GMT
Hi Jerry,

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

> 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-us/automat/html/56037091-5761-40ad-8b25
-72f85d41466f.asp?frame=true

Regards,
Walter Wang (wawang@online.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.
JerryWEC - 26 Apr 2007 14:20 GMT
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
Walter Wang [MSFT] - 27 Apr 2007 02:52 GMT
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@online.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.
JerryWEC - 27 Apr 2007 14:57 GMT
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
JerryWEC - 30 Apr 2007 16:54 GMT
Sorry...

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

> 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.