This post is more than 5 years old
5 Posts
0
1175
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);
No Events found!
JasonCwik
281 Posts
1
November 3rd, 2014 07:00
What if you pass null in ReadObject for the Extent? Can you provide a stack trace?
zerok1
5 Posts
0
November 3rd, 2014 09:00
Thanks, passing null instead of new Extent(-1,-1) for ReadObject() fixed the problem.