zerok1
1 Nickel

Atmos .Net API: ReadObject after UpdateObject throws exception

Jump to solution

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);

Labels (1)
0 Kudos
1 Solution

Accepted Solutions
8 Krypton

Re: Atmos .Net API: ReadObject after UpdateObject throws exception

Jump to solution

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

2 Replies
8 Krypton

Re: Atmos .Net API: ReadObject after UpdateObject throws exception

Jump to solution

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

zerok1
1 Nickel

Re: Atmos .Net API: ReadObject after UpdateObject throws exception

Jump to solution

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

0 Kudos