iscServiceOpenEx() opens a new service handle based on a property array.
Syntax
isy_INT32 iscServiceOpenEx( isy_CONST isy_TCHAR* URL, ISCPROPERTY* property, isy_INT32 propertyNum, HISCSERV* phServ);
Function arguments
Tabulka 122 lists the valid argument used with the
iscServiceOpenEx() function.
Tabulka 122. iscServiceOpenEx() argument
Data type | Argument | Use | Description |
---|---|---|---|
isy_CONST isy_TCHAR | URL | input | Server information as a URL sting |
ISCPROPERTY | property | input |
Array of properties of the ISCPROPERTY type: typedef struct { isy_TCHAR *key; //property ID string isy_TCHAR *value; //property value string } ISCPROPERTY; There are three properties available:
The user name and password properties are mandatory. |
isy_INT32 | propertyNum | input | Number of properties. |
HISCSERV | phServ | output | Handle to a service. |
Usage
iscServiceOpenEx() is used to request a new handle for a specific service from a server with settings represented as a property array. The server is identified by a Uniform Resource Locator (URL) string, which might contain the protocol, the host name (or IP), and the port number. If the Sync Server is configured for Secure Socket Layer (SSL), the protocol part for the URL should be "https://", otherwise, it is "http://". The port number can be omitted, and the default ports for SSL and non-SSL are port 443 and port 80, respectively. All of the settings (including the user name and password) are specified in the property array. Upon success, a service handle (HISCSERV) is returned through phServ; otherwise, phServ is NULL, and the error code is returned. Upon completion, the service handle is closed with iscServiceClose().
Example:
int rc = 0; HISCSERV hSyncServ; ISCPROPERTY properties[3] = {{"isync.user", "myUserName"}, {"isync.password", "myPassword"}, {"isync.encoding", "ISO8859_1"}} rc = iscServiceOpenEx("http://localhost.mycom.com:80", properties, 3, &hSyncServ);
Return codes
Restrictions
None.
Související odkazy