by jasper » 02 April 2022, 10:39
I am not sure what you want me to suggest - the snippet you sent me is not sufficient for me to go on - it is still mixing double parameter details (minVal,maxVal,dimensionality (also passed to constructor)) with string parameter details. get_OptionList remains unimplemented, get_RestrictedToList returns NO_ERROR, but returns whatever value was already in the BOOL that was used as input argument, so the outcome is undefined. The constructor takes a pointer value (defVal) by reference.
The construction code snippet you post does not match the argument count of the constructor code snippet you post, so cannot possibly compile (as you posted it).
You cannot install tools to check whether your implementation is functioning, so you leave me really little choice but to read the code line by line, and the code is at best messy, but as said, as you posted it, it cannot even compile. Maybe you can put a bit more effort into cleanup of the code and posting the correct code? Otherwise I feel like I am putting in more effort than you.
I understand that COM programming is unpleasant. CO-LaN also understands this, and a new middle-ware which takes a lot of the COM programming out of the picture, and therefore making things a lot easier, is in the making.
Code produced with COBIA, or the class wizard () is generally a lot easier to understand and certainly a lot 'cleaner'. Perhaps this is a way forward. If you are however bound to using the COM CAPE-OPEN binding, please clean up the code, post construction code that matches constructor code; only then can I actualy perhaps say something about it (which still would require a lot of work on my end, integrating your code into a test project, and essentially running the logger or interop with a PME myself).