Calling C++ DLL from VB.NET

M

Michael

Ok this is driving me crazy. I have a simple DLL written
in VC ++ version 6.0. Lets take this for example..

long _stdcall Login()
{
return 123;
}

I aslo have the EXPORTS call in the DEF file like so

EXPORTS
Login @1

Now If I call this function from a VB version 6 app I get
a return value of 123 as expected, BUT if I run this from
a VB.NET app I get a weird number like 5332356516808378.
Has anyone seen this before. My function for both VB apps
is ..

Public Declare Function Login Lib "testDLL5.dll" () As
Long

Please help !!

-Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top