Yes the DLL and the ESE files are in the same directory.
When runnnig the EXE file it ends with an error message "An unhandled win32 exception ocurred in Monitor.exe"
The program is based on a Petzold example and I'm using it to read the CPU temperature through a library (Susi.dll and Susi.lib, the define file is called "REL_SUSI.h") distributed by the board manufacturer.
I am able to read and display the temperature when running the EXE file inside the IDE.
Here is the code:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
#include <stdio.h>
#include "REL_SUSI.h"
int CDECL MessageBoxPrintf (TCHAR * szCaption, TCHAR * szFormat, ...)
{
TCHAR szBuffer [1024] ;
va_list pArgList ;
// The va_start macro (defined in STDARG.H) is usually equivalent to:
// pArgList = (char *) &szFormat + sizeof (szFormat) ;
va_start (pArgList, szFormat) ;
// The last argument to wvsprintf points to the arguments
_vsntprintf (szBuffer, sizeof (szBuffer) / sizeof (TCHAR),
szFormat, pArgList) ;
// The va_end macro just zeroes out pArgList for no good reason
va_end (pArgList) ;
return MessageBox (NULL, szBuffer, szCaption, 0) ;
}
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
int cputemp, cyScreen ;
float* dos;
if (SusiDllInit())
{
SusiHWMGetTemperature(1,dos);
}
cputemp= *dos;
MessageBoxPrintf (TEXT ("CPU temperature"),
TEXT ("The CPU temperature is %i degrees C"),
cputemp, cyScreen) ;
return 0 ;
}