?
Solved

VB6 COM Sample Code Needed

Posted on 2006-11-16
2
Medium Priority
?
391 Views
Last Modified: 2013-11-25
I need to use a legacy OLE data provider that was designed to work with VB6.  We have done some testing and the OLE provider will not work reliably with the .Net tools.

The plan is to write class object of some sort in VB6 that will execute the legacy provider and return data back to a VB.Net web service.  The web service will then respond client requests for the data.

I have written a number of Windows applications using VB6, but I haven't tried to write a class library using VB6.  Also as I understand it, the class will have to be a COM object in order for it to be used by VB.Net.

Can anyone tell me if I have to create a COM object to make this work?

Can anyone provide me with VB6 sample code that can be used as a starting point for this effort?

Bob
0
Comment
Question by:bobsegrest
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
Julian_K earned 1600 total points
ID: 17963299
Hello.

All classes in VB6 are using COM technology, so you don't have any options - the class WILL BE a COM object.

You can start with creating a new project in VB6, and setting its type to "ActiveX EXE" or "ActiveX DLL". Then define several public accessible classes and several public properties/functions/procedures.

I could assist further with some tests/implementations/answers, but your question is too general at this time for me to help more.

Regards,
Julian.
0
 
LVL 8

Assisted Solution

by:kaliyugkaarjun
kaliyugkaarjun earned 400 total points
ID: 17963834
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question