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 January 9th, 2004, 08:20 PM
Registered User
Join Date: Jan 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Face problem to use DLL created using VB in VC++

Hi guys,

I want to use the function lies in a DLL created using VB having a signature

EncodeThis(ByVal sIn As String,ByVal sKey As String,ByRef sOut As String,ByRef oLen as Long)

in a VC++ i m trying to call the DLL using LoadLibrary() Function and try to use the function as

// Variable Declaration........
   LPCSTR data;
   LPCSTR key;
   LPCSTR result;
   LONG len;
   Loading DLL
   Get pointer to function "EncodeThis" say ptr

Then,........i will be getting an Error as "The value of ESP was not ptoperly saved which is the result of calling a function declared with one calling convention with function pointer declared with a different calling convention".

I know there will be some mistake in Function signature, but doesn't figure it out, so.........if anybody plz help me then i will be very thankful to him.


Old January 17th, 2005, 10:56 PM
Registered User
Join Date: Dec 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hwoBU

Without seeing some more of the code, I can only suggest the following:

1) Make sure all of your variables have been initialized to a value before passing them to your VB function.

2) Check your capitalization between the creation of your VB function and your C++ implementation because C++ is case-sensitive while VB, is not.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Face Recognition using VC++ akshat_malviya Visual C++ 2 December 21st, 2009 02:50 PM
How to access functions of Dll created in VC in VB seeekvb BOOK: Beginning ASP.NET 1.0 4 January 15th, 2007 06:58 PM
How to call a COM DLL from VC++, subhash_w Visual C++ 0 July 15th, 2005 11:33 PM
DLL in VC#.NET sachin-csharp .NET Framework 2.0 1 August 23rd, 2004 11:57 PM
Help me wirte dll in VC for use VB tranhung Visual C++ 0 February 12th, 2004 11:28 PM

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