I am not sure if the the title is quite appropriate, but it accurately describes what I am trying to do. I have an application running on an RT machine from which I am attempting to pass an object from the app on the RT machine to a host. The problem is that when I transform the object to a variant and then stuff the object into the shared variable (the size of the object is about 450 b), I get no response on the host side indicating that the variable has updated. Probing the error out on the shared variable where I am writing (on the RT machine), it turns out that I am getting error code -2147467259, an unspecified error. Has anyone seen this error before? Does anyone have any thoughts as to why this might be happening? All other variables are responding ok.
Solved! Go to Solution.
Is this the only variable you are using to pass the variant datatype through? Do you know what is contained within the object you're trying to pass?
Unfortunately, that error IS pretty generic, so any extra info on what we're converting to a variant might be helpful.
Unfortunately there is not a lot else going on that might provide any clues, but I think this may lie in the structure of the class itself (as you imply with your question). Nested with in the object are arrays of objects, some clusters of numerics and some large arrays of 16 bit integers (I can be more specific if necessary, but I don't have the app in front of me right now). The data itself is not large currently - about 450 bytes - but will be larger when all of the fields are properly filled out.
What is the purpose of the generic error if it can't be used by even the NI folk to determine what went wrong? Is it a place holder for future problems that crop up. I will try some other things to push the data through and let you know what happens.
I have not seen this error before, but you may want to check to following:
On a somewhat related note, you may want to vote for this idea on the Idea Exchange.
OK, so solution found. For whatever reason, I can not pass the object as a variant. However, as when I use the STM library, I can flatten the object to string and then pass the data through the shared variable using a string SV. This is not an unreasonable solution, it just seems that I am doing something very similar as when I pass the data via a variant SV. Do you have any thoughts as to why I can't pass this using a variant? Looking forward, is there going to be any support for passing objects directly via SVs?