- Messages
- 65
- Country
Hi folks,
I wonder if a couple of you wouldn't mind pondering my predicament for a couple minutes, I'd be exceedingly grateful:
Problem:
When my DLL loads, the sim freezes and never recovers. I get no errors in my simconnect log file. The last message is that the previous dll has loaded successfully.
By now, I have removed all of my real code and am just trying to get the thing to load. When I take away DLLStart or DLLStop, or remove them from the .def file, the sim loads just fine (the dll doesn't, of course), and I get the expected error messages in the simconnect log to the effect that the dll loader can't find DLLStart and DLLStop. But when I do export those functions, I get no error, just a complete freeze.
further notes:
- I've tried the three functions here with all manner of decorations and declspecs (EXTERN_C, WINAPI, declspec(dllExport) and what have you). The behavior is the same. I've tried them void, and as returning int. Same behavior.
- I'm reluctant to suspect that it has anything to do with simconnect itself, as: a) all my other addons load just fine, b) I'm not even attempting to open a client or call any simconnect functions at the moment, and c) I've been developing this project as a gauge loaded from panel.cfg for the past couple weeks and its simconnect client and all its functionality works fine. It's only last night when I tried to switch it to loading from dll.xml (which I'd really like to do) that I get issues.
so has anyone here encountered something similar and licked it?
Thanks so much for taking a look at this, FSDevelopers. Y'all are a bunch of seriously smart people and I'm forever indebted to you.
Sincerely,
Farley
CODE:
my main .cpp file, CarrierExtensions.cpp:
/////////////////////////////////////////////////////////////
#include "gauges.h"
PANELS *Panels;
//The actual DLL entry point. Stores the DLL base address
BOOL APIENTRY DllMain(HINSTANCE hDLL, DWORD dwReason, LPVOID lpReserved)
{
// hModule = hDLL;
return TRUE;
}
void DLLStart(void)
{
}
void DLLStop(void)
{
};
//////////////////////////////////////////////////////////////
my .def file:
LIBRARY "CarrierExtensions"
EXPORTS
DLLStart
DLLStop
I wonder if a couple of you wouldn't mind pondering my predicament for a couple minutes, I'd be exceedingly grateful:
Problem:
When my DLL loads, the sim freezes and never recovers. I get no errors in my simconnect log file. The last message is that the previous dll has loaded successfully.
By now, I have removed all of my real code and am just trying to get the thing to load. When I take away DLLStart or DLLStop, or remove them from the .def file, the sim loads just fine (the dll doesn't, of course), and I get the expected error messages in the simconnect log to the effect that the dll loader can't find DLLStart and DLLStop. But when I do export those functions, I get no error, just a complete freeze.
further notes:
- I've tried the three functions here with all manner of decorations and declspecs (EXTERN_C, WINAPI, declspec(dllExport) and what have you). The behavior is the same. I've tried them void, and as returning int. Same behavior.
- I'm reluctant to suspect that it has anything to do with simconnect itself, as: a) all my other addons load just fine, b) I'm not even attempting to open a client or call any simconnect functions at the moment, and c) I've been developing this project as a gauge loaded from panel.cfg for the past couple weeks and its simconnect client and all its functionality works fine. It's only last night when I tried to switch it to loading from dll.xml (which I'd really like to do) that I get issues.
so has anyone here encountered something similar and licked it?
Thanks so much for taking a look at this, FSDevelopers. Y'all are a bunch of seriously smart people and I'm forever indebted to you.
Sincerely,
Farley
CODE:
my main .cpp file, CarrierExtensions.cpp:
/////////////////////////////////////////////////////////////
#include "gauges.h"
PANELS *Panels;
//The actual DLL entry point. Stores the DLL base address
BOOL APIENTRY DllMain(HINSTANCE hDLL, DWORD dwReason, LPVOID lpReserved)
{
// hModule = hDLL;
return TRUE;
}
void DLLStart(void)
{
}
void DLLStop(void)
{
};
//////////////////////////////////////////////////////////////
my .def file:
LIBRARY "CarrierExtensions"
EXPORTS
DLLStart
DLLStop