Let's say:
byte[] bytes = new byte[1024 * 100];
Marshal.Copy(nET_DVR_XML_CONFIG_OUTPUT.lpOutBuffer, b, 0, 1024 * 100);
string responseMsg = Encoding.ASCII.GetString(bytes);
//so string responseMsg basically like this.
string responseMsg = @"Content-Type:multipart/form-data;boundary=MIME_boundary
--MIME_boundary
Content-Type: application/json
Content-Length:1629
{
"requestURL": "/ISAPI/Intelligent/FDLib/FDSearch?format=json",
"statusCode": 1
}
--MIME_boundary
Content-Type:image/jpeg
Content-Length:20455
???? ►JFIF ☺☺☺ ? ? ??♥rExif (much more binary data.....)
--MIME_boundary"; //End of string
How do I get just the image binary data only? Just to make it more clear, nET_DVR_XML_CONFIG_OUTPUT.lpOutBuffer is IntPtr send by the device after I send a request through ISAPI.
Hopefully my question is clear enough to understand. I've been stuck on this problem quite a while already. Any help would be massively appreciated.