kg*********@gmail.com wrote:
Hi folks,
I have a DLL which contains functions that return __int64 values, but I
can't get Visual C to read the return value correctly. I am using the
2003 version.
Here is the declare:
__int64 __stdcall TEST(void);
__int64 and __stdcall are not part of standard C and therefore off topic
here (we only deal with standard C not MS or POSIX or any other
extensions of 3rd party libraries).
..and the calling code:
__int64 ret;
ret = TEST();
In all cases, ret is zero. Is there a special compiler switch I need to
use, or is this not supported? Could the problem lie in the .lib
header?
It would be easier to answer your question if you had provided a
complete compilable example showing your problem. As it is, the problem
could be on any of the 9237834 lines of code you have not shown us. My
guess is line 42 of forgotten_stuff.h
Actually, a real possibility is that you don't have a declaration for
TEST in scope when you call it. Without a declaration the compiler is
required to assume TEST returns an int which is not the case here (MSVC
only supports C90 not C99, so C99 rules don't apply).
If that does not help you go to one of the microsoft groups and post a
small *complete* example showing your problem. Don't bring the
non-standard code here.
--
Flash Gordon, living in interesting times.
Web site -
http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc