NWSMTSGetTargetServiceAddress (Obsolete)

Returns the Target Service physical address.

Syntax

  #include <smstsapi.h> 
   
  CCODE NWSMTSGetTargetServiceAddress (
     UINT32   connection, 
     STRING   targetServiceName, 
     UINT32  *addressType, 
     STRING   address);
  

Parameters

connection

(IN) Specifies the connection information returned by NWSMConnectToTSA.

targetServiceName

(IN) Specifies the Target Service name returned by NWSMTSScanTargetServiceName or NWSMTSListTargetServices.

addressType

(OUT) Points to the physical address type of address.

address

(OUT) Returns the Target Service’s physical address in binary form.

Return Values

See Section 9.3, Target Service Return Values for more information.

The following table lists the return values associated with the function.

0x00000000

Successful

0xFFFDFFB9

NWSMTS_UNSUPPORTED_FUNCTION

0xFFFDFFD2

NWSMTS_NO_MORE_DATA

0xFFFEFFFF

NWSMDR_INVALID_CONNECTION

0xFFFEFFFE

NWSMDR_INVALID_PARAMETER

Remarks

Before NWSMTSGetTargetServiceAddress is called, the engine must be connected to the TSA that has access to the specified Target Service.

The values that can be returned by addressType is listed in the following table

Value

Byte Information

SPX

0x1 (12 bytes)

TCPIP

0x2 (4 bytes)

ADSP

0x3 (4 bytes)

The engine must ensure that address is long enough to handle the protocol address.

See Also

NWSMTSListTargetServices, NWSMTSScanTargetServiceName

Example

  char buffer[NWSM_MAX_TARGET_SRVC_NAME_LEN], addrBuffer[12]; 
  STRING targetServiceName = buffer, address = addrBuffer; 
  UINT32 addressType; 
   
  /* Get target service name and copy it to targetServiceName. See the example code of NWSMTSScanTargetServiceName or
  NWSMTSListTargetServices. */ 
   
  NWSMTSGetTargetServiceAddress(connection, targetServiceName, &addressType, address);