473,387 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

problem with c++ dll called from vb

ned
I wrote the following very simple programs to test calling a c++ dll
from visual basic. I'm working in visual studio 7.

*** the .cpp file ...

int __stdcall ver()
{
return 1;

}

*** the .def file ...

LIBRARY
EXPORTS
ver

*** the vb source ...

private declare function ver lib "vcnetdll.dll" () as long
sub form1_load()
msgbox(hex(ver()))
end sub

When I run this I get 10b7f3800000001 instead of just 1. I seem to have
done something to cause me to get back 64 bit values.

Thanks in advance.

Jul 22 '05 #1
1 1091
Long is a 64 bit value in .NET

Patrice

--

<ne*@cop.ufl.edu> a écrit dans le message de
news:11*********************@g49g2000cwa.googlegro ups.com...
I wrote the following very simple programs to test calling a c++ dll
from visual basic. I'm working in visual studio 7.

*** the .cpp file ...

int __stdcall ver()
{
return 1;

}

*** the .def file ...

LIBRARY
EXPORTS
ver

*** the vb source ...

private declare function ver lib "vcnetdll.dll" () as long
sub form1_load()
msgbox(hex(ver()))
end sub

When I run this I get 10b7f3800000001 instead of just 1. I seem to have
done something to cause me to get back 64 bit values.

Thanks in advance.

Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Sudesh Sawant | last post by:
Hello, We have an application which communicates using remoting. There is a server which is a Windows Service. The server exposes an object which is a singleton. The client is a Web Application...
3
by: rahul8143 | last post by:
hello, I write a following program and have problem in understanding constructors and destructors. #include <iostream.h> class vector { public: double x; double y;
4
by: Dani | last post by:
Hi everyone Description of the problem: Using a PreparedStatement to write down an integer (int) plus a timestamp for testing purposes. When read out again the integer looks very different. We...
5
by: Dan Brill | last post by:
Hi, I'm sure this issue has been covered before but after searching around I can't find anything which deals with quite the same set of circumstances or suggests an optimal solution. The...
1
by: ricolee99 | last post by:
Hi everyone, I have a .net application called "InteropService". InteropService consumes a com component called 'B'. 'B' consumes a third party dll. Everything seems to work fine. However,...
6
by: TPJ | last post by:
Help me please, because I really don't get it. I think it's some stupid mistake I make, but I just can't find it. I have been thinking about it for three days so far and I still haven't found any...
7
by: Trickynick1001 | last post by:
Hi, a newbie here. I don't have a real firm grasp on the idea of Javascript, as I'm used to programming in Qbasic and C. I'm not used to OOP. Anyway, I really don't have any idea what the...
9
by: burningsunorama | last post by:
Hi guys! This is maybe a too 'academic problem', but I would like to hear your opinions, something like pros and cons for each approach.... ... Recently we've had at work a little talk about the...
13
by: Jeroen | last post by:
Hi all, I'm trying to implement a certain class but I have problems regarding the copy ctor. I'll try to explain this as good as possible and show what I tried thusfar. Because it's not about a...
3
by: =?Utf-8?B?dGhlamFja29mYWxs?= | last post by:
I have a few global variables and a function that gets called multiple times to complete a single transaction and uses the variables. The function gets different notifications. When the function...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.