Click to See Complete Forum and Search --> : Error caused by using ICImageDecompress API function


minhld
September 29th, 2008, 12:32 AM
Hi all,

I'm trying to deal with a video surveillance system. All I have to do is retrieving data from server via socket and decompress the data by using ICImageDecompress function. Server periodically sends the data packed in a message and I have to (at clientside) unpack and then decompress it, and show it on a viewer (Picturebox, for instance).

But actually when I try to invoke the ICImageDecompress API function, I got this error: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

My source code in C# in attached here, I don't have much experiences in APIs and memory management. So I need your help. Thank you!