Returns the Target Service type and version information.
#include <smsutapi.h> #include <smstsapi.h> CCODE NWSMTSGetTargetServiceType ( UINT32 connection, STRING serviceName, STRING serviceType, STRING serviceVersion);
(IN) Specifies the connection information returned by NWSMConnectToTSA.
(IN) Specifies the Target Service name returned by NWSMTSScanTargetServiceName or NWSMTSListTargetServices.
(OUT) Returns the Target Service type name (must be NWSM_MAX_TARGET_SRVC_TYPE_LEN bytes).
(OUT) Returns the version string of the Target Service (must be NWSM_MAX_TARGET_SRVC_VER_LEN bytes).
See Section 9.3, Target Service Return Values for more information.
The following table lists the return values associated with the function.
Before NWSMTSGetTargetServiceType is called, the engine must be connected to the TSA and Target Service.
The buffer sizes include a NULL terminator.
#include <smsutapi.h> #include <smstsapi.h>
NWSM_NAME_LIST *serviceNameList = NULL; unsigned char serviceTypeBuf[NWSM_MAX_TARGET_SRVC_TYPE_LEN], serviceVersionBuf[NWSM_MAX_TARGET_SRVC_VER_LEN], pat[2] = “*”; STRING serviceType = (STRING)serviceTypeBuf, serviceVersion =(STRING)serviceVersionBuf, serviceName, scanPattern = pat;
/* Connect to a TSA-see NWSMConnectToTSA. */
/* Get a list of Target Services accessible through the connected TSA (some TSAs can service multiple Target Services). NWSMTSListTargetServices or NWSMTSScanTargetServiceName can be used to create this list. */ NWSMTSListTargetServices(connection, scanPattern, &serviceNameList);
/* See if we have more than one Target Service */ if (serviceNameList->next) { /* Have the user choose a Target Service, set serviceName to point to that name. */ } else serviceName = serviceNameList->name; NWSMTSGetTargetServiceType(connection, serviceName, serviceType, serviceVersion);