Closed BadJerry closed 6 years ago
R_convertDCOMObjectToR() takes a VARIANT * as its parameter. You cannot invoke this via the .Call() interface as that passes R objects to the routine with type SEXP.
R_getDynamicVariantValue() can be called as you do above. Here we check the tag symbol on the external pointer asCOMArray() sets this to R_VARIANT, whereas R_getDynamicVariantValue() checks for VARIANTReference. You might try changing the "R_VARIANT" in the R_create2DArray() routine to "VARIANTReference".
Thank you very much for taking the time to reply. I really appreciate. My problem is that the COM object I use needs a VARIANT pointer (therefore a R_VARIANT). I will try to write a function that converts a SEXP object from a R_VARIANT to a VARIANTReference. I might call for help at one point ;) What is the etiquette regarding github code? Should I create branch? Or should I write that converter in my own R Code? Thanks again!
New to R programming so bear with me.
I am trying to call a function defined in converters.cpp file inside your package called R_convertDCOMObjectToR. I try to call it like this:
.Call("R_convertDCOMObjectToR", varQuestionNames, PACKAGE = "RDCOMClient")
But I get the following error:
Is there anyway to make that function visible?
Thanks for any pointer!
But I get an error :