Module \20.Reports\A6.User Defined Functions\UUserDefinedFunctions.pas, line 42:
//FUNCTIONS SHOULD ALWAYS be defined as either:
// 1) function xxx(const Paramters: array of variant): variant
// 2) function xxx: variant
// Any other declaration will raise an Access Violation.
That's fine in Delphi, but I am using C++: how am I supposed to define a function that takes "an array of variant"?
Let's say I want to translate this function
function Upper(const Parameters: array of variant): variant;
in c++ I thought that this syntax would work
Variant __fastcall Upper(System::Variant const *Parameters, const int Size)
but when I execute it gives me this error: trying to access property Upper..verify that is a variant
Hi,
The Project you provided got me access violation. I suspect that there is something wrong with my installation. I had to remove FlexCel2007 package import: is this ringing any bell?
That's probably my fault. For the setups in C++ builder we clean a lot the files because indeed C++ builder is very sensitive t the stuff that goes in the cbproj. But here I just zipped it and sent it, hoping it would work :( Also note that this was done in RadStudio XE2, if you have other version it might not work.
Ok I recreated the project and now it works! I don't know why, though. I need to fix my main project, can you give me a few pointers?
I compared the two cbprojs. It turns out that RadStudio is not that good at porting projects :) Also, my project has been ported from XE2, too (1 year ago). The bug was the same: I had to replace the <PackageImports> tag of the project file... honestly there was so many packages in both projects that I couldn't establish what was wrong.
I was lucky.
Indeed cbprojs are problematic files. There is too much stuff there and a wrong entry can cause C++ builder to crash. Also normally the "AllLibs" entry can be problematic, sometimes C++ builder forgets to modify entries there and thy get out of synch.
Indeed cbprojs are problematic files. There is too much stuff there and a wrong entry can cause C++ builder to crash. Also normally the "AllLibs" entry can be problematic, sometimes C++ builder forgets to modify entries there and thy get out of sync.