08-11-2010 03:20 PM
Hello all,
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.
Thanks, Matt
Solved! Go to Solution.
08-12-2010 04:26 PM
Matt:
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.
08-13-2010 02:34 PM
Caleb,
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.
Thanks, Matt
08-13-2010 03:13 PM
Matt,
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.
Chris M
08-13-2010 03:32 PM
Done! I am going to try those things that you suggest to see if I get different results. Stay tuned!
09-03-2010 12:42 PM
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?
Cheers, Matt
09-09-2010 10:15 AM
You might want to check this out...
http://www.lowell.edu/dct/content/publications/OOMessagingCommandPatternStatePattern-1.pdf
09-09-2010 10:19 AM
Brilliant! I will take a look at it. Thanks, sachsm
05-21-2012 01:44 PM