Axis APPINT Integrationshandbuch - Seite 8
Blättern Sie online oder laden Sie pdf Integrationshandbuch für Server Axis APPINT herunter. Axis APPINT 10 Seiten. Application integration
6. If the request is successful, image data will be sent back. Otherwise an HTML
page containing error information will be sent. One way of testing what was sent
back is to look at the Content-type. Its value can be retrieved by the following call:
HttpQueryInfo(anHttpRequest,
The third parameter is the address to a buffer that receives the information, and
the fourth is the address to a variable containing the buffer's length. After the call
it will contain the size of the information written to the buffer.
If all went well, aContType will have the value "image/jpeg" (if JPEG was the
chosen format (see table above). Otherwise the value will be "text/html".
7. The data can now be received:
// All data has been read when (nrBytesRead == 0)
while(InternetReadFile(anHttpRequest,
{
}
8. Finally, it is important to close all opened handles:
InternetCloseHandle(anHttpRequest);
InternetCloseHandle(anHTTPHandle);
InternetCloseHandle(anInetHandle);
Push Type Scanning
We refer to push type scanning as scanning initiated from the control panel of your AXIS
700. The images are pushed out to a directory on an FTP server.
Your application can scan the directory on the FTP server. When new images arrive, the
application can, depending on information sent with the image, take the appropriate actions.
For each image file written to the directory, an information file will also be written, unless
you choose Include Image Information: None when defining the destination. The information
file is in raw text format and it contains data about the image.
Information included in the information file is
Name and size of the image file.
Internet address of your AXIS 700.
Currently connected scanner.
The name of the destination (the name appearing in the destination list).
0,
&aBuffer,
&aBufferSize,
HTTP_QUERY_CONTENT_TYPE);
nrBytesRead > 0)
// Save data somewhere
aBuffer,
aBufferSize,
&nrBytesRead) &&
8