Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

1163

November 2nd, 2014 10:00

Atmos .Net API: ReadObject after UpdateObject throws exception

Following code snippet throws exception on size if ReadObject is called after UpdateObject. It works fine if ReadObject is called after CreateObject. I tried passing null as well as new Extent(-1,-1) in UpdateObject for Extent parameter. Still go the same error. Any ideas?

                //Update

                byte[] arr = File.ReadAllBytes(@"C:\Users\Public\Pictures\foo.bmp");

                api.UpdateObject(path, null, null, null, arr, null);

                //Read after update

                retval = api.ReadObject(path, new Extent(-1, -1), null);

                File.WriteAllBytes(@"c:\temp\bar.bmp", retval);

281 Posts

November 3rd, 2014 07:00

What if you pass null in ReadObject for the Extent?  Can you provide a stack trace?

5 Posts

November 3rd, 2014 09:00

Thanks, passing null instead of new Extent(-1,-1) for ReadObject() fixed the problem.

No Events found!

Top