Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Visual Basic 2005 Basics
|
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics 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 30th, 2007, 04:08 AM
Registered User
 
Join Date: Apr 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Calling a dll inside from a dll

Hello,

I am now writing a dll with VB 6. In there, I want to call another dll using example:

"Public Declare Function Something Lib "sthTest.dll" (ByVal a As String, ByVal b As Long) As Integer"

But I can't make it out. The Error message is

"Constants, fixed-length strings, arrays, user-defined types, and Declare statements not allowed as Public members of an object module"

How can I call a dll from a dll with VB6?

Thanks in advance.

 
Old August 30th, 2007, 05:43 AM
Authorized User
 
Join Date: Jul 2007
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vksingh24
Default

Just change the Public to Private.

"Public Declare Function Something Lib "sthTest.dll" (ByVal a As String, ByVal b As Long) As Integer

To

"Private Declare Function Something Lib "sthTest.dll" (ByVal a As String, ByVal b As Long) As Integer

__________________
Vikash Kumar Singh
 
Old August 30th, 2007, 11:02 PM
Registered User
 
Join Date: Apr 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Thanks a lot. Now I got it.. :)

Once again... tks.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling a method defined inside a .NET dll rajen C# 5 January 7th, 2008 04:04 AM
Calling a method defined inside a .NET dll rajen C# 2005 0 September 19th, 2006 12:58 AM
Using .NET DLL from inside VB6 application Dmitriy General .NET 1 January 30th, 2006 04:45 PM
Calling C# DLL from C virajithasarma C# 1 August 17th, 2005 04:01 AM
Calling a .Dll of Vb.NET enggalok C++ Programming 0 March 1st, 2004 06:51 PM





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