Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

In ArcGIS there is IMemoryBlobStream, which is used to Provides access to members that control the Blob Stream.

Well, I'm trying to use this as a way to save off custom information (Layers/Groups/etc) in a globe and load it back.

I can initially load the stream from file but the problem comes with reading.

I know I can make a GroupLayerClass/FeatureLayer/etc and create a IPersistSteram from it and attempt to go stream.Load(inBlob). HOWEVER, if it's the wrong type (i.e I should have been a feature instead of a group) it all goes to heck.

I never know the order of the info coming in and it doesn't appear that there is a way to go back that part of the blob (once passed).

So can I clone that part of the blob and just look at it that way? It appears .Clone isn't implemented and since the stream isn't serializable I can't clone it that way.

share|improve this question
2  
Do you have control over the serialization aspect too? If so, consider persisting objects using a Propertyset class as a container. Anything in the propertyset that implements IPersistStream will get saved. Also keep in mind you can store propertysets inside of propertysets. – Kirk Kuykendall Jun 19 '12 at 18:13
1  
You can also use IVariantStream, which acts as simplifying wrapper for an underlying stream. It provides Write and Read method which keep track of the type of the object being written/read. – Petr Krebs Jun 19 '12 at 19:20

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.