bump
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
i have a C++ dll that calls a C# COM dll
my c++ dll is of course called by MT4, and is just a wrapper for my C# stuff. t
my c++ function, analyze(double *opens), needs to convert the double array to a SAFEARRAY
I googled and found some sample code that helped me. I came up with this:
for (int i = 0; i < arraySize; i++) {
VARIANT vOut;
VariantInit(&vOut);
vOut.vt = VT_R8;
vOut.dblVal = opens[i];
LONG index[1] = {i};
SafeArrayPutElement(safeDates, index, &vOut);
}
my C# function is analyze(double[] opens)
it seems that this code runs without crashing, but when i pass these SAFEARRAYS into my C# function the values of the double[] are all -9.25596313487193E+61