Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Accessing a .net dll from VB6

Thread Tools
 
Search this Thread
 
Old 12 September 2003, 03:29 PM
  #1  
dsmith
Scooby Regular
Thread Starter
 
dsmith's Avatar
 
Join Date: Mar 1999
Posts: 4,518
Likes: 0
Received 0 Likes on 0 Posts
Post

Amateur developer needs help...

I have found a .NET (C# Source) dll that does some functions I would like to use within an existing VB6 App.

Now I have "No idea" how or If I could use them. Examples are given for calling functions from C# but of course not for VB. I'm not in a position to convert the app to .net either.

Anyone help ?

Deano
Old 12 September 2003, 04:37 PM
  #2  
David_Wallis
Scooby Regular
 
David_Wallis's Avatar
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like on 1 Post
Post

cant you just use the wizard to convert the app?
Old 12 September 2003, 05:02 PM
  #3  
dsmith
Scooby Regular
Thread Starter
 
dsmith's Avatar
 
Join Date: Mar 1999
Posts: 4,518
Likes: 0
Received 0 Likes on 0 Posts
Post

The app is a .ocx thats is called from a parent application built around a supplied VB template.. The wizard wont convert it, and there is no .net template yet.

Deano
Old 12 September 2003, 05:19 PM
  #4  
JoeyDeacon
Scooby Regular
 
JoeyDeacon's Avatar
 
Join Date: Feb 2000
Posts: 1,624
Likes: 0
Received 0 Likes on 0 Posts
Cool

If you are trying to use a third party DLL in your project then just add it to the project references. To do this select Project, References and then click on the browse button to find the DLL you wish to use.

Old 13 September 2003, 02:02 PM
  #5  
MrDeference
Scooby Regular
 
MrDeference's Avatar
 
Join Date: Mar 2002
Posts: 337
Likes: 0
Received 0 Likes on 0 Posts
Post

Your VB app will need to speak to the .NET runtime through it's COM API. This will of course mean that you will need .NET runtime on the PC as well as the .NET assembly (which happens to be a dll).
VB doesn't have any native support for .NET, and you won't be able to reference .NET assemblies from a vanilla VB project and use them directly.
IMO you should either migrate to .NET or write the functionality in VB.
Good luck!

After some scratching around: have a look here.

[Edited by MrDeference - 9/13/2003 2:46:36 PM]
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
JimBowen
ICE
5
02 July 2023 01:54 PM
TylerD529
General Technical
2
09 October 2015 01:53 AM
Littleted
Computer & Technology Related
4
25 September 2015 09:55 PM
Hangarrat93
Insurance
11
25 September 2015 08:42 AM
farmerwrx
Computer & Technology Related
14
10 September 2015 11:59 AM



Quick Reply: Accessing a .net dll from VB6



All times are GMT +1. The time now is 11:19 AM.