Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 20th, 2007, 09:59 AM
Registered User
 
Join Date: Mar 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to call c#.net dll in vb 6.0

hi Frnds

I want to call the .dll file created by c#.net. in one of my vb application
after creating the dll ,i am giving the reference of this Dll in my vb application ,but i am not able call the methods of this dll.

Please help me , or give me some good tutorial Link

Thanks in advance

.........Harry........
 
Old August 20th, 2007, 12:39 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

After adding the DLL to your project, the methods, et al., will be utilized by using the project name (or class name) of the DLL, a period, and the method.

For example, once ADO is added to a project you use the name “ADODB” a period, and one of the objects to create things like recordsets, connections, etc. The same approach will be used with any DLL, irrespective of the language used to create it.
 
Old August 21st, 2007, 12:57 AM
Registered User
 
Join Date: Mar 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i am able to take the reference of that dll.
i am not able to rectify either the problem with the dll creation or taking ref.

i have a c#.net project .i am creaing the dll using this.
the procss i am following:
1)tlbexp (to create typelib)
      tlbexp ComInteropExample.DLL /out:ComInteropExample.tlb

2)regasm
       regasm ComInteropExample.DLL /tlb: ComInteropExample.tlb

after this i m taking the ref of the .tlb file in my vb project.
i am not able to call the function inside.

Plz help


.........Harry........
 
Old August 21st, 2007, 01:42 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Don't reference the tlb, reference the dll.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting VB6 DLL call to asp.net rrhandle General .NET 0 April 14th, 2007 02:37 AM
How to convert .NET dll to COM dll used by VB 6.0 gvprashanth .NET Framework 1.x 0 December 4th, 2006 05:05 AM
How to call a .Net web service from C++ dll?? livehed .NET Web Services 0 August 2nd, 2005 05:03 AM
call window dialog component with asp.net/vb.net s3ng ASP.NET 1.x and 2.0 Application Design 0 June 21st, 2005 04:54 AM
How can I call a vb.net Exe from an asp.net page? jorevil Classic ASP Basics 0 October 1st, 2003 11:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.