this gets too complicated for a Forum discussion. Please create a support case with Milestone Technical Support and provide:
a good description
a Wireshark trace of the communication between your application and the Image Server
a memory dump of your application (you can make a memory dump using the Task Manager - pls make sure you use the 32-bit Task Manager if your program is 32 bit)