Methods not visible in COM for a CCW type library

  • Thread starter Thread starter nigel.stephens
  • Start date Start date
N

nigel.stephens

nigel.stephens@parasolit.­co.uk
Nov 24, 10:04 am show options

Newsgroups: microsoft.public.dotnet.framework.interop
From: "(e-mail address removed)" <[email protected]>
- Find messages by this author
Date: 24 Nov 2005 02:04:50 -0800
Local: Thurs, Nov 24 2005 10:04 am
Subject: Mehods not showing in COM (CCW) interface of .NET assembly
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Report Abuse

Hi,
I have created an assembley in vb.net by adding a class based on the
component tempate to my project. I have a public function called send
that has some parameters and returns a long type.


I have built the project and used regasm.exe to generate a type library

that is a COM Callable Wrapper.


My problem is that my public function is not visible as a method in the

COM interface. I have declared the public function as follows.


Public Function Send(ByVal MsgId As Long) As Long


Is this correct? if so is there anything else I have missed?


Thanks
Nigel
 
When you say "visible" by the meaning of Intellisense pop-up list while
coding, yes, Intellisense will not work with the COM interface of a .NET dll
by default. It is by design. However, there is a way to make it work. See
this link:

http://support.microsoft.com/default.aspx?scid=kb;en-us;813809


nigel.stephens@parasolit.­co.uk
Nov 24, 10:04 am show options

Newsgroups: microsoft.public.dotnet.framework.interop
From: "(e-mail address removed)" <[email protected]>
- Find messages by this author
Date: 24 Nov 2005 02:04:50 -0800
Local: Thurs, Nov 24 2005 10:04 am
Subject: Mehods not showing in COM (CCW) interface of .NET assembly
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Report Abuse

Hi,
I have created an assembley in vb.net by adding a class based on the
component tempate to my project. I have a public function called send
that has some parameters and returns a long type.


I have built the project and used regasm.exe to generate a type library

that is a COM Callable Wrapper.


My problem is that my public function is not visible as a method in the

COM interface. I have declared the public function as follows.


Public Function Send(ByVal MsgId As Long) As Long


Is this correct? if so is there anything else I have missed?


Thanks
Nigel
 
Public Function Send(ByVal MsgId As Long) As Long
Is this correct? if so is there anything else I have missed?

In addition to what Norman wrote, you should avoid using Long in your
method signature since VB6 doesn't support 64-bit integers.


Mattias
 
Back
Top