SQUID Functions

 

  • The SQUID functions, and their examples, assume that the SQUID server has been started with an address of http://localhost:8000.
  • Validation of the function calls can be handled by checking the return value and calling SquidGetLastError().

 

Entries in SquidGetLastError (1)

Sunday
Feb192012

SquidGetLastError

  • Returns the last error on the connection handle (SQUID pointer).
  • SQUID function return values should also be checked.

Prototype

char* SquidGetLastError(int iSquid);

  • Parameters
iSquidSquid Connection Handle
  • Return Values
char*Last reported error
""The last operation was successful

Example

int iSquid;
lr_load_dll("SQUID-REST.dll");
iSquid = SquidConnect("http://localhost:8000");
SquidCreateColumn(iSquid, "NewColumn");
SquidSendData(iSquid, "NewColumn", "20");
SquidSendData(iSquid, "NewColumn", "100");
SquidSendData(iSquid, "NewColumn", "50");
SquidRetriveData(iSquid, "NewColumn");
lr_output_message("%s",SquidGetLastError(iSquid));
SquidRetriveData(iSquid, "NewColumnXXX");
lr_output_message("%s",SquidGetLastError(iSquid));
SquidDisconnect(iSquid);