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
Solved

VB6 COM Sample Code Needed

Posted on 2006-11-16
2
383 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
2 Comments
 
LVL 5

Accepted Solution

by:
Julian_K earned 400 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 100 total points
ID: 17963834
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

856 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