satelliteGuy
New member
- Joined
- Feb 25, 2010
- Messages
- 10
- Reaction score
- 0
- Points
- 0
Hi,
I'm having a very basic problem: I wrote a DLL which only has InitModule and ExitModule. The DLL is placed in the Module/Plugin-Directory, and I can add it to the active modules (which I did).
However - the module is not loaded when I start a scenario (the only thing it does is open a file, write to it and close it - the code works when placed in a vessel-dll in the constructor). As the file does not exist, I conclude that the InitModule is NOT called as opposed to the description (or my understanding of it) or the module is not recognized properly
orbitersdk.h is included, and ORBITER_MODULE is defined.
What am I doing wrong (I am not a Windows-/Visual-C-buff. Under Linux I would be able to check for symbols in libraries etc, but Windows is still a mistery to me)?
And: where do I put config-stuff for plugin-modules?
Thx in advance
satelliteGuy
P.S.: Here's the code
#include "orbitersdk.h"
#define ORBITER_MODULE
DLLCLBK void InitModule ( HINSTANCE hDLL )
{
FILE* fp;
fopen_s ( &fp, "MyModule.cfg", "w" );
fclose ( fp );
exit(-1);
}
DLLCLBK void ExitModule ( HINSTANCE hDLL )
{
}
I'm having a very basic problem: I wrote a DLL which only has InitModule and ExitModule. The DLL is placed in the Module/Plugin-Directory, and I can add it to the active modules (which I did).
However - the module is not loaded when I start a scenario (the only thing it does is open a file, write to it and close it - the code works when placed in a vessel-dll in the constructor). As the file does not exist, I conclude that the InitModule is NOT called as opposed to the description (or my understanding of it) or the module is not recognized properly
orbitersdk.h is included, and ORBITER_MODULE is defined.
What am I doing wrong (I am not a Windows-/Visual-C-buff. Under Linux I would be able to check for symbols in libraries etc, but Windows is still a mistery to me)?
And: where do I put config-stuff for plugin-modules?
Thx in advance
satelliteGuy
P.S.: Here's the code
#include "orbitersdk.h"
#define ORBITER_MODULE
DLLCLBK void InitModule ( HINSTANCE hDLL )
{
FILE* fp;
fopen_s ( &fp, "MyModule.cfg", "w" );
fclose ( fp );
exit(-1);
}
DLLCLBK void ExitModule ( HINSTANCE hDLL )
{
}