Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.
By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.
That's really weird, but I cannot get it working with FSX. The sim does not load the newly created gauge.I am not sure whether you can share pointers to structures/classes using FSX variables across different DLLs. I seriously doubt it due to ODR vialation, though never tried itIt could work if you use same compiler and your projects are configured identically, however CRT dependency on lcient machine could harm the solution. The safe way (not security, just feasibility, use of compiler, crt version, etc.) is to use vtable as in the example I have shown. If you want to share standard data types, then FSX variables are enough and best choice ...
you will find nice article about the techinique here:
http://www.codeproject.com/Articles/28969/HowTo-Export-C-classes-from-a-DLL
...
case PANEL_SERVICE_PRE_UPDATE:
{
IFadec* pFadec = ::GetFadec(); // COM-like accessing.
if(pFadec)
{
pFadec->GetN1(42);
pFadec->Release();
}
...
[Vcockpit01]
gauge11=Gauge2!GaugeTwo, 0,0

Any idea what's wrong?
No the data doesn't have to be declared that way at all.
'fsx.exe': Loaded 'F:\FSX\SimObjects\Airplanes\BS\Panel\Gauge2.dll', No symbols loaded.
'fsx.exe': Unloaded 'F:\FSX\SimObjects\Airplanes\BS\Panel\Gauge2.dll'
Why don't? The LoadLibrary already returns a proper value.DONT use LoadLibrary. Wont help you. Also, depending on the gauge list in your panel cfg, you may need to keep calling GetModuleHandleEx until you get a valid handle because those gauges might only be loading after your gauge initialization occurs.
At the very beginning I tried removing the memory allocation and putting "return NULL;", and it changed nothing.Yes. In this section:
IFadec* pFadec = ::GetFadec();
Probably GetFadec() is not returning a new object but instead the pointer of an existing one.
If that's the case then in this section:
pFadec->Release();
the remote object is destroyed, hence the dll failure.
Check using pFadec = NULL;
Tom
'fsx.exe': Loaded 'F:\FSX\SimObjects\Airplanes\BS\Panel\Gauge2.dll', No symbols loaded.
'fsx.exe': Unloaded 'F:\FSX\SimObjects\Airplanes\BS\Panel\Gauge2.dll'
Hmm, it sounds interesting. For this very test project the DLL was linked using the corresponding LIB file (regardless of mentioned code with "pFadec" is present or not). That is, I included the LIB file name in the Linker tab, Additional Dependencies of Visual Studio project.How you link one DLL to another ? using static linking (lib) ? apparently FSX for some reason unknown to me does not like linking to some external DLLs, so it unloads after loading it. At least this is what I experienced when tried to link my gauge to some external DLLs. Try to unlink it and share the IFadec* using GetModuleHandleEx, fsx variable or other FSX technique.
What do you do in case of multiple gauges "talking" to each other?Normally to overcome this "Unloading" I use LoadLibary .... and use GetProcAdress for exported function the way Naruto explained but this is only valid when my gauge loads another DLL rather than multiple gauges "talking" to each other.

(regardless of mentioned code with "pFadec" is present or not
What do you do in case of multiple gauges "talking" to each other?