Thanks for the comment
.
I still have the same "#VALUE!" in Excel.
Did I miss the linker flags ? I put "--add-stdcall-alias" in the "other linker options" field of "Code::Blocks" ? Is that correct ? Is there a way to check at least that the dll is loaded ?
I modified the sample code according to the previous reply to:
#include <windows.h>
#ifdef BUILD_DLL
#define DLL_EXPORT __declspec(dllexport)
#else
#define DLL_EXPORT
#endif
// a sample exported function
DLL_EXPORT int __stdcall SomeFunction(const double somedouble)
{
//MessageBoxA(0, somedouble, "DLL Message", MB_OK | MB_ICONINFORMATION);
return 1;
}
DLL_EXPORT BOOL __stdcall DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
// attach to process
// return FALSE to fail DLL load
break;
case DLL_PROCESS_DETACH:
// detach from process
break;
case DLL_THREAD_ATTACH:
// attach to thread
break;
case DLL_THREAD_DETACH:
// detach from thread
break;
}
return TRUE; // succesful
}