473,387 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

COMM Class

Lou
I created a comclass from VB .NET 2005 but it fails when I try to load it
(.dll)
into VB6.
I followed these instructions
To create a COM object using the COM class template
1.. Open a new Windows Application project from the File menu by clicking
New Project.

2.. In the New Project dialog box under the Project Types field, check
that Windows is selected. Select Class Library from the Templates list, and
then click OK. The new project is displayed.

3.. Select Add New Item from the Project menu. The Add New Item dialog box
is displayed.

4.. Select COM Class from the Templates list, and then click Add. Visual
Basic adds a new class and configures the new project for COM interop.

5.. Add code such as properties, methods, and events to the COM class.

6.. Select Build ClassLibrary1 from the Build menu. Visual Basic builds
the assembly and registers the COM object with the operating system.

Nov 7 '06 #1
5 1242
Hello Lou

Does your class expose a public sub new ??

cause this is required for a COM class

Regards

Michel Posseth [MCP]
"Lou" <lo********@comcast.netschreef in bericht
news:ea**************@TK2MSFTNGP02.phx.gbl...
>I created a comclass from VB .NET 2005 but it fails when I try to load it
(.dll)
into VB6.
I followed these instructions
To create a COM object using the COM class template
1.. Open a new Windows Application project from the File menu by clicking
New Project.

2.. In the New Project dialog box under the Project Types field, check
that Windows is selected. Select Class Library from the Templates list,
and
then click OK. The new project is displayed.

3.. Select Add New Item from the Project menu. The Add New Item dialog
box
is displayed.

4.. Select COM Class from the Templates list, and then click Add. Visual
Basic adds a new class and configures the new project for COM interop.

5.. Add code such as properties, methods, and events to the COM class.

6.. Select Build ClassLibrary1 from the Build menu. Visual Basic builds
the assembly and registers the COM object with the operating system.

Nov 8 '06 #2
Lou wrote:
I created a comclass from VB .NET 2005 but it fails when I try to load it
(.dll)
into VB6.
Give us a hint. What do you mean by "it fails"? Is there an error
message? Does the class show up on the references page in VB6? Some
information about the actual problem would be helpful.

Nov 8 '06 #3
Lou
yes it does?

"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:u6**************@TK2MSFTNGP03.phx.gbl...
Hello Lou

Does your class expose a public sub new ??

cause this is required for a COM class

Regards

Michel Posseth [MCP]
"Lou" <lo********@comcast.netschreef in bericht
news:ea**************@TK2MSFTNGP02.phx.gbl...
>>I created a comclass from VB .NET 2005 but it fails when I try to load it
(.dll)
into VB6.
I followed these instructions
To create a COM object using the COM class template
1.. Open a new Windows Application project from the File menu by
clicking
New Project.

2.. In the New Project dialog box under the Project Types field, check
that Windows is selected. Select Class Library from the Templates list,
and
then click OK. The new project is displayed.

3.. Select Add New Item from the Project menu. The Add New Item dialog
box
is displayed.

4.. Select COM Class from the Templates list, and then click Add. Visual
Basic adds a new class and configures the new project for COM interop.

5.. Add code such as properties, methods, and events to the COM class.

6.. Select Build ClassLibrary1 from the Build menu. Visual Basic builds
the assembly and registers the COM object with the operating system.


Nov 9 '06 #4
Lou
Error "Can' add a reference to the specified file"

"Chris Dunaway" <du******@gmail.comwrote in message
news:11********************@b28g2000cwb.googlegrou ps.com...
Lou wrote:
>I created a comclass from VB .NET 2005 but it fails when I try to load it
(.dll)
into VB6.

Give us a hint. What do you mean by "it fails"? Is there an error
message? Does the class show up on the references page in VB6? Some
information about the actual problem would be helpful.

Nov 9 '06 #5
some tips :
1. you must have a sub new in your to COM exposed class ( the
constructor must be without parameters )
Public Sub New()
MyBase.New()
End Sub
2. provide your own id`s ClassId , InterfaceId and EventsId
register the dll with Regasm instead of regsvr

here an example

http://groups.google.com/group/micro...996d74d250974e

regards

Michel Posseth [MCP]

"Lou" <lo********@comcast.netschreef in bericht
news:us**************@TK2MSFTNGP04.phx.gbl...
yes it does?

"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:u6**************@TK2MSFTNGP03.phx.gbl...
>Hello Lou

Does your class expose a public sub new ??

cause this is required for a COM class

Regards

Michel Posseth [MCP]
"Lou" <lo********@comcast.netschreef in bericht
news:ea**************@TK2MSFTNGP02.phx.gbl...
>>>I created a comclass from VB .NET 2005 but it fails when I try to load it
(.dll)
into VB6.
I followed these instructions
To create a COM object using the COM class template
1.. Open a new Windows Application project from the File menu by
clicking
New Project.

2.. In the New Project dialog box under the Project Types field, check
that Windows is selected. Select Class Library from the Templates list,
and
then click OK. The new project is displayed.

3.. Select Add New Item from the Project menu. The Add New Item dialog
box
is displayed.

4.. Select COM Class from the Templates list, and then click Add.
Visual
Basic adds a new class and configures the new project for COM interop.

5.. Add code such as properties, methods, and events to the COM class.

6.. Select Build ClassLibrary1 from the Build menu. Visual Basic builds
the assembly and registers the COM object with the operating system.



Nov 12 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: al | last post by:
Hi, I am creating an application in access 97, so coding in vba. I am at the stage of sending values to my external machine, but am stuck at a point. I need to send each character at an...
1
by: sarath1111 | last post by:
hi all, I am using comm port for serial communication between 2 PC's using C language. Once I have initialized the COMM port, Is there any option of closing the port in C language. Thanks in...
0
by: David M | last post by:
I am attempting to access the text to speech SDK via. C#. I setup a reference to the "Microsoft Voice Text" Control (vtext.dll) and I added the following code: HTTSLib.TextToSpeechClass v = new...
7
by: Michael Chong | last post by:
I wrote a program that communicate with SerialComm. In every 300 milliseconds, my program continuously send & receive data via the serial port once the program starts. My program is once in a...
6
by: Leandro Berti via DotNetMonster.com | last post by:
Hi All, I wrote a code to do serial communication with an equipament. When i use the code outside of threaded class it seens work properly, but when i put inside a class and execute a thread in...
3
by: David | last post by:
I am trying to use the vb 6 comm control in a vb.net project. I am sending ok, but for some reason can not receive anything. I tried using the oncomm event which never is fired. I also just tried...
4
by: Iceman.Aragorn | last post by:
I'm having an odd problem where im reading input from a comm port (the maker of the software that exports the data TO the comm port is unhelpful). What im reading is fixed length (13 character)...
0
by: mngrl | last post by:
I have DB2 V8.2 installed on an AIX system and I want to see the sql errors that are occurring on the system. When I look at db2diag.log the messages all look like this: ...
2
by: Max Healey | last post by:
I have written a number of applications that control various bits of hardware via serial data. using VB6 and the comm. control now some one has asked me to do one for a specific piece of...
2
by: Hank | last post by:
Hello, I would like to get some opinions on using the Comm Port with Access 2000. We have a few jobs coming in that require us to interface with a PLC via the Comm Port. My partner feels we...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.