Axis APPINT Manual do Utilizador Página 5

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 10
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 4
5
Your AXIS 700 will now respond by sending you a 3/ response and image
data.
Scanning Using MFC
Microsoft Foundation Classes (MFC) offers good support for Internet connections,
especially when it comes to HTTP and FTP. As described above, scanning is performed by
requesting a 4378using HTTP. If the operation is successful, the image is returned via a
redirect response. The steps below describe how a scanning is performed using MFC. If you
need more information about the classes described, see the MFC documentation. The
following code is not checked for errors.
1. Create a CInternetSession object:
CInternetSession aSession("ScanSDK");
The parameter is a string identifying the application. An application needs only
one instance of this class.
2. Using this object you can now retrieve an HTTP connection:
CHttpConnection* anHttpConnection =
aSession.GetHttpConnection("somescanserver",
(INTERNET_PORT) 80,
NULL,
NULL);
3. Using this connection, you can now open a request. By default, redirect responses
are handled automatically:
CHttpFile* anHttpFile =
anHttpConnection->OpenRequest(0,
"/user/scan/scan.shtml");
The first parameter defines that a POST request shall be opened, the second is the
request target.
4. Create a query string containing the parameters you want to send:
CString aQueryString =
"\n\npage=scan&profileName=Color+low&scanNow=";
5. Add an HTTP header which informs the HTTP server that the request contains
encoded data:
anHttpFile->AddRequestHeaders(
"Content-type: application/x-www-form-urlencoded");
Vista de página 4
1 2 3 4 5 6 7 8 9 10

Comentários a estes Manuais

Sem comentários