Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / November 2003



Tip: Looking for answers? Try searching our database.

How to use VB Reserved Word in method signature?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dmitriy Antonov - 24 Nov 2003 21:48 GMT
Hi everybody!

Is there any way to use VB reserved word as a name of my custom procedure
(in the public class module within ActiveX DLL).

In particular, I need something like this:

Dim mType as Long

Public Property Get Type() As Long
   Type=mType
End Property

Since "Type" is reserved word I can't use it directly in VB.
I think I heard about such possibility, can't remember where.

Any ideas?

Thank you in advance.
Joe - 24 Nov 2003 22:40 GMT
> Is there any way to use VB reserved word as a name of my custom procedure
> (in the public class module within ActiveX DLL).
[quoted text clipped - 9 lines]
> Since "Type" is reserved word I can't use it directly in VB.
> I think I heard about such possibility, can't remember where.

You may be able to do something like this in VB6:

Public Property Get [Type]() As Long
 [Type]=mType
End Property

VB5 allowed similar things with Enum members, but that's all.

--
Joe Foster <mailto:jlfoster%40znet.com>  Sign the Check! <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!
Dmitriy Antonov - 24 Nov 2003 22:57 GMT
Nope. I tried this before - doesn't work.

I think maybe there is a way to build DLL in VB and then alter it somehow
using COM tools. Unfortunately I'm not familiar with that and hoped may be
somebody could give me some starting point to begin research.
Thank you Joe. Say Hi to all your cats.

> > Is there any way to use VB reserved word as a name of my custom procedure
> > (in the public class module within ActiveX DLL).
[quoted text clipped - 22 lines]
> WARNING: I cannot be held responsible for the above        They're   coming  to
> because  my cats have  apparently  learned to type.        take me away, ha ha!
Robert - 24 Nov 2003 23:15 GMT
I may be wrong about this but if you declare the interface in a type library
and implement it in your dll it may do what you want.
Regards
Rob

> Nope. I tried this before - doesn't work.
>
[quoted text clipped - 36 lines]
> > because  my cats have  apparently  learned to type.        take me away,
> ha ha!
Dmitriy Antonov - 25 Nov 2003 00:29 GMT
Hi, Robert!

I probably should burn with shame but I have no idea what does it mean
"declare the interface in a type library
and implement it in your dll".

I often read something like this but never had a chance to work with it.
Could you breifely tell me (I don't need details - I'll learn myself) what
steps are involved here. Don't bother if it's too much - I'll find it
myself.

Thank you very much.

> I may be wrong about this but if you declare the interface in a type library
> and implement it in your dll it may do what you want.
[quoted text clipped - 42 lines]
> > > because  my cats have  apparently  learned to type.        take me away,
> > ha ha!
Robert - 25 Nov 2003 15:22 GMT
Try http://www.mvps.org/vb/hardcore/ chapter 10 for an explaination of
interfaces.

Wouldn't it be easier to just change the name of the function?
Rob

> Hi, Robert!
>
[quoted text clipped - 59 lines]
> away,
> > > ha ha!
anonymous@discussions.microsoft.com - 26 Nov 2003 05:13 GMT
Sure I do it. It is just "nice to have feature" in my
object. I try to create some library that will have
structure similar to another standard library. Then I
would use existing procs to use with both libraries
without altering the code (for the price of using late
binding).

For example:

Sub DoSomething(obj as Object)
  If obj.Type=1 Then DoThis Else DoThat
End Sub

Where obj can be object created from my class or that
standard library.
Anyway it is not very important for me.
Thank you.

>-----Original Message-----
>Try http://www.mvps.org/vb/hardcore/ chapter 10 for an explaination of
[quoted text clipped - 72 lines]
>
>.
Dmitriy Antonov - 25 Nov 2003 01:04 GMT
OK. I found some initial information how to create and use type library in
Microsoft KB. I don't know whether it can solve my original problem but at
least I'll study something new.

Thanks.

> I may be wrong about this but if you declare the interface in a type library
> and implement it in your dll it may do what you want.
[quoted text clipped - 42 lines]
> > > because  my cats have  apparently  learned to type.        take me away,
> > ha ha!
Jiho Han - 25 Nov 2003 15:25 GMT
Would you mind sharing the link as I am also interested in achieving exactly
the same goal.

Thanks

> OK. I found some initial information how to create and use type library in
> Microsoft KB. I don't know whether it can solve my original problem but at
[quoted text clipped - 52 lines]
> away,
> > > ha ha!
anonymous@discussions.microsoft.com - 26 Nov 2003 04:58 GMT
http://support.microsoft.com/default.aspx?scid=kb;en-
us;143258&Product=vbb

I just used Microsoft KB and used search criteria "Type
Library" (with option "all the words"). There is no
solution there for my problem - just, as I said, some
initial info to start experimenting. Unfortunately I was
busy with other things and didn't work on it.

>-----Original Message-----
>Would you mind sharing the link as I am also interested in achieving exactly
[quoted text clipped - 64 lines]
>
>.
 
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



©2009 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.