Solved

VB6 COM Sample Code Needed

Posted on 2006-11-16
2
373 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now