ThbTapiLine.DevSpecific
Unit: hbTapi
 

The DevSpecific method enables service providers to provide access to features not offered by other TAPI functions. The meaning of the extensions are device specific, and taking advantage of these extensions requires the application to be fully aware of them. If ThbTapiLine works in asynchronous mode, the OnDevSpecificReply and OnDevSpecificTimeout events are used to return the results of the device specific request. This operation is only available if the application has successfully negotiated a device-specific extension version.

You are able to pass a memory block to the TSP using the Params and Size parameters. This memory block is given to the TSP and used to return results from the TSP also. The data is copied to an internal buffer of ThbTapiLine and returen at the OnDevSpecificReply event. Within this event, you are able to get the result of the device specific function call if you are working in asynchronous mode.

This method is used only if you need to use features of a special TSP, that are not available via normal TAPI functions.

Declaration

procedure DevSpecific(Params: Pointer; Size: DWORD; Address: ThbTapiAddress = nil; Call: ThbTapiCall = nil);

Example

interface
uses hbTapi, tapi, ...

const
  DEVICESPECIFIC_REQUEST1 = 1;

type
  TLINE_DEV_SPECIFIC = record
    dwRequestType : DWORD;
    szDialableString : array[0..99] of Byte;
  end;

TForm1.Button1Click(Sender: TObject);
var
   data: TLINE_DEV_SPECIFIC;
   s: String;
begin
  data.dwRequestType := DEVICESPECIFIC_REQUEST1;
  FillChar(data.szDialableString, 100, #0);
  s := '100';
  Move(s[1], data.szDialableString, Length(s));
  hbTapiLine1.DevSpecific(@data, 100, nil, nil);
end;

Remarks

Please refer to the section "lineDevSpecific" in TAPI's documentation for a more detailed information. This function works in an asynchronous manner. See the SyncMode property to read more about the handling of asynchronous functions.

Errors

Using this function may cause an EhbTapiError exception . Possible errors are:

LINEERR_INVALADDRESSID, LINEERR_OPERATIONUNAVAIL, LINEERR_INVALCALLHANDLE, LINEERR_OPERATIONFAILED, LINEERR_INVALLINEHANDLE, LINEERR_RESOURCEUNAVAIL, LINEERR_INVALPOINTER, LINEERR_UNINITIALIZED, LINEERR_NOMEM

See Also

ThbTapiLine.OnDevSpecificReply, ThbTapiLine.OnDevSpecificTimeout