PC Review


Reply
Thread Tools Rate Thread

Calling VC++ DLL in VB passing STRING

 
 
Michael
Guest
Posts: n/a
 
      10th Dec 2003
Ok yet another road block. I have a simple DLL written
in VC ++ version 6.0. Lets take this for example..

long _stdcall Login(LPCSTR server)
{
..login to server
return 123;
}

Now if I call this function in VB.NET more then once from
a test app I get an "abnormal program termination" error
on the second Login call. If I run this from a VB6 app
things work perfectly. If I remove the server parameter
from the VC++ function then it works great in VB.NET but
I need to know the server to connect to.

The Function in VB is...
Public Declare Function Login Lib "testDLL5.dll" (ByVal
aServer as string) As int32

Please help !!

-Michael

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing String variable within a string argument =?Utf-8?B?S291IFZhbmc=?= Microsoft Access VBA Modules 1 20th Oct 2006 04:30 PM
Sub calling and passing arguments Jacob Microsoft Excel Programming 2 28th Sep 2006 05:56 PM
Passing a String in Array to Range as String marston.gould@alaskaair.com Microsoft Excel Programming 2 1st Sep 2004 01:13 AM
Calling a Sub passing Textbox name Ducttape19 Microsoft Excel Programming 2 7th Apr 2004 01:35 PM
Passing and retrieving a string calling a c++ function from c# roben Microsoft C# .NET 2 29th Mar 2004 04:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:42 PM.