k***@gmail.com
2006-03-13 20:28:46 UTC
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 test code:
// __int64 return value example
//
#include "windows.h"
#include "quad_dll.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
char szBuffer[500];
__int64 uu;
uu = TEST(100);
wsprintf(szBuffer, "Number returned from TEST(): %u", (int)uu);
MessageBox(NULL, szBuffer, "quadtest", MB_ICONINFORMATION);
// Exit the program
return(0);
}
In all cases, uu is the incorrect value. Is there a special compiler
switch I need to
use, or is this not supported? Could the problem lie in the .LIB
header?
Complete sample project:
http://www.kgpsoftware.com/downloads/quadprob.zip
Thanks for any assistance.
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 test code:
// __int64 return value example
//
#include "windows.h"
#include "quad_dll.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
char szBuffer[500];
__int64 uu;
uu = TEST(100);
wsprintf(szBuffer, "Number returned from TEST(): %u", (int)uu);
MessageBox(NULL, szBuffer, "quadtest", MB_ICONINFORMATION);
// Exit the program
return(0);
}
In all cases, uu is the incorrect value. Is there a special compiler
switch I need to
use, or is this not supported? Could the problem lie in the .LIB
header?
Complete sample project:
http://www.kgpsoftware.com/downloads/quadprob.zip
Thanks for any assistance.