Connects an engine to a specified Target Service and also supports passwords with international and extended characters.
#include <smsutapi.h>
#include <smstsapi.h>
CCODE NWSMTSConnectToTargetServiceEx (
UINT32 *connection,
STRING targetServiceName,
STRING targetUserName,
void *authentication
UINT32 optionFlag
);
(IN/OUT) Specifies a pointer to the connection information from NWSMConnectToTSA. Outputs a pointer to the connection to the Target Service in addition to the input information.
(IN) Specifies the Target Service name returned by NWSMTSScanTargetServiceName or NWSMTSListTargetServices.
(IN) Specifies the user name on a file server (maximum size is NWSM_MAX_TARGET_USER_NAME_LEN).
(IN) Points to the authentication data necessary to establish a connection with the Target Service (for example, a user password).
(IN) Specifies the type of the authentication data.
See Section 9.3, Target Service Return Values for more information.
The following table lists the return values associated with the functi on.
Before NWSMTSConnectToTargetService is called, the engine must be connected to a TSA that has access to the desired target.
targetServiceName should contain a Target Service name from the name list returned by NWSMTSListTargetServices.
NWSMTSConnectToTargetService connects an engine to the specified Target Service and establishes the user's rights on the Target Service. After successfully connecting, the engine can access the Target Service’s data.
An engine can connect to only one Target Service per TSA connection. This means that a Target Service can have multiple connections, but each connection must be referenced by a different TSA connection.
targetUserName contains the user name that allows proper access to the Target Service’s data.
authentication is defined using the optionflag parameter. However, the SMDR encrypt/decrypts it if it is passed between SMDRs. If no authentication is passed, set the length to zero. Do not pass a NULL pointer.
The following option flags are supported.
NOTE:This symbol is not present in the SMS import file, as all versions of SMS do not export this symbol. To use this function, programmatically import the symbol and invoke it.