lineGetAgentStatusA function (tapi.h)

The lineGetAgentStatus function obtains the agent-related status on the specified address.

Syntax

LONG lineGetAgentStatusA(
  HLINE             hLine,
  DWORD             dwAddressID,
  LPLINEAGENTSTATUS lpAgentStatus
);

Parameters

hLine

Handle to the open line device.

dwAddressID

Address on the open line device whose agent status is to be queried. An address identifier is permanently associated with an address; the identifier remains constant across operating system upgrades.

lpAgentStatus

Pointer to a variably sized structure of type LINEAGENTSTATUS. Upon successful completion of the request, this structure is filled with agent status information. Prior to calling lineGetAgentStatus, the application must set the dwTotalSize member of this structure to indicate the amount of memory available to TAPI for returning information.

Note  If the size parameters in the structure are not correct, there is a possibility that memory could get overwritten. For more information on setting structure sizes, see the memory allocation topic.
 

Return value

Returns a positive request identifier if the asynchronous operation starts; otherwise, one of these negative error values:

LINEERR_INVALADDRESSID, LINEERR_INVALLINEHANDLE, LINEERR_INVALPOINTER, LINEERR_NOMEM, LINEERR_OPERATIONFAILED, LINEERR_OPERATIONUNAVAIL, LINEERR_RESOURCEUNAVAIL, LINEERR_STRUCTURETOOSMALL, LINEERR_UNINITIALIZED.

Remarks

Note

The tapi.h header defines lineGetAgentStatus as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Target Platform Windows
Header tapi.h
Library Tapi32.lib
DLL Tapi32.dll

See also

LINEAGENTSTATUS

Supplementary Line Service Functions

TAPI 2.2 Reference Overview