Share via


lineRegister (Compact 2013)

3/26/2014

This function registers a device with a particular network operator.

Syntax

LONG WINAPI lineRegister(
    HLINE hLine,
    DWORD dwRegisterMode,
    LPCTSTR lpszOperator,
    DWORD dwOperatorFormat
);

Parameters

  • hLine
    The line device handle. The line device handle must have been previously obtained by a call to lineOpen with the proper TAPI device ID specified and a device-specific extension version successfully negotiated with lineNegotiateExtVersion.
  • dwRegisterMode
    Identifies the mode for registration. Possible values are listed in the following table.

    Value

    Description

    LINEREGMODE_AUTOMATIC

    Automatically register with available operator.

    LINEREGMODE_MANUAL

    Explicitly register with a particular operator.

    LINEREGMODE_MANAUTO

    If manual registration fails, register automatically.

    LINEREGMODE_AUTOGSM

    Automatically register with available operator on a GSM network.

    LINEREGMODE_MANUALGSM

    Explicitly register with a particular operator on a GSM network.

    LINEREGMODE_AUTOCDMA

    Automatically register with available operator on a CDMA network.

    LINEREGMODE_MANUALCDMA

    Explicitly register with a particular operator on a CDMA network.

  • lpszOperator
    A string identifying the operator to register with. This parameter is ignored and optional if dwRegisterMode is LINEREGMODE_AUTOMATIC or LINEREGMODE_AUTOGSM or LINEREGMODE_AUTOCDMA.
  • dwOperatorFormat
    Identifies the format of lpszOperator. This parameter is ignored and optional if dwRegisterMode is LINEREGMODE_AUTOMATIC or LINEREGMODE_AUTOGSM or LINEREGMODE_AUTOCDMA. Possible values are listed in the following table.

    Value

    Description

    LINEOPFORMAT_NONE

    The lpszOperator field is unused.

    LINEOPFORMAT_ALPHASHORT

    Short text description.

    LINEOPFORMAT_ALPHALONG

    Long text description.

    LINEOPFORMAT_NUMERIC

    Numeric description.

Return Value

This function returns a positive request identifier if the function is completed asynchronously or a negative error number if an error occurs. The dwParam2 parameter of the corresponding LINE_REPLY message is zero if the function succeeds or it is a negative error number if an error occurs. For more detail, see TAPI Synchronous/Asynchronous Model on Microsoft MSDN Online. The following are possible return values:

  • LINEERR_INVALLINEHANDLE
  • LINEERR_NOMEM
  • LINEERR_OPERATIONUNAVAIL
  • LINEERR_OPERATIONFAILED
  • LINEERR_RESOURCEUNAVAIL
  • LINEERR_INVALPOINTER
  • LINEERR_INVALPARAM
  • LINEERR_UNINITIALIZED

Remarks

When explicitly registering with a particular operator, the user should assume that the operator name is case-sensitive.

Requirements

Header

extapi.h

Library

cellcore.lib

See Also

Reference

Extended TAPI Functions