Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sun Dec 17, 2017 6:29 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: REALGetVariantStructure?
PostPosted: Fri Nov 16, 2012 11:24 am 
Offline

Joined: Mon Sep 21, 2009 9:33 am
Posts: 29
Sorry if this sounds doltish, but is REALGetVariantStructure meant to help get the raw bytes of a variant, or not? If so, according to the documentation, I apparently need to allocate a buffer for this data to be copied into, correct? How do I figure out the size I'd need? How does one get the size of a REALObjectStruct? Or am I thinking about this wrong?


Top
 Profile  
Reply with quote  
 Post subject: Re: REALGetVariantStructure?
PostPosted: Fri Nov 16, 2012 11:32 am 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
REALGetVariantStructure is for getting structures.

But I never used it myself.

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
 Post subject: Re: REALGetVariantStructure?
PostPosted: Fri Nov 16, 2012 11:38 am 
Offline

Joined: Mon Sep 21, 2009 9:33 am
Posts: 29
Hmm. So perhaps I'm thinking about this wrong. As an experiment, as part of a larger scheme, I was trying to read the raw data in the variant into a byte buffer, then construct a new variant from that using REALNewVariantStructure, the result being a copy of the original variant.

It almost works, but for the lack of size info with which to allocate a buffer. Perhaps I'll have to re-think the whole premise.


Top
 Profile  
Reply with quote  
 Post subject: Re: REALGetVariantStructure?
PostPosted: Fri Nov 16, 2012 11:44 am 
Offline

Joined: Mon Sep 21, 2009 9:33 am
Posts: 29
Actually, no. It works even less well than I had thought. The resulting "copy" shows up with type = 36, indicating a structure as you said. This is clearly not something I should be doing.


Top
 Profile  
Reply with quote  
 Post subject: Re: REALGetVariantStructure?
PostPosted: Fri Nov 16, 2012 11:44 am 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
a copy? Why? Normally you just retain or release it as you carry it.

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group