Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function returns the address identifier associated with address in a different format on the specified line.
Syntax
LONG TSPIAPI TSPI_lineGetAddressID( HDRVLINE hdLine, LPDWORD lpdwAddressID, DWORD dwAddressMode, LPCWSTR lpsAddress, DWORD dwSize ); |
Parameters
- hdLine
-
Service provider's handle to the line whose address is to be retrieved.
- lpdwAddressID
-
Pointer to a DWORD-sized memory location where the address identifier is returned.
- dwAddressMode
-
Address mode of the address contained in lpsAddress. The dwAddressModeparameter is allowed to have one and only one of the LINEADDRESSMODEconstants.
- lpsAddress
-
Pointer to a data structure holding the address assigned to the specified line device. The format of the address is determined by the dwAddressModeparameter. If it is LINEADDRESSMODE_DIALABLEADDR, the lpsAddressparameter uses the common dialable number format and is NULL terminated.
- dwSize
-
Size of the address contained in lpsAddress. The parameter dwSizemust be set to the length of the string (plus one for the NULL) if LINEADDRESSMODE_DIALABLEADDR is used. If an extended LINEADDRESSMODE is used, the length should match the size of whatever is actually passed in (the DLL checks to be sure it can read the number of bytes specified from the given pointer).
Return Value
Returns zero if the function succeeds or an error number if an error occurs. The following table shows the return values for this function.
Value | Description |
---|---|
LINEERR_INVALLINEHANDLE |
The handle to the line is invalid. |
LINEERR_OPERATIONUNAVAIL |
The operation is unavailable. |
LINEERR_INVALADDRESS |
The address is invalid. |
LINEERR_OPERATIONFAILED |
The operation failed. |
LINEERR_NOMEM |
Not enough memory is available. |
LINEERR_RESOURCEUNAVAIL |
The resource is unavailable. |
Remarks
This function is used to map a phone number (address) assigned to a line device back to its dwAddressID(in the range from zero through the number of addresses minus one) that is returned in the line's device capabilities.
Requirements
Header | tapicomn.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 3.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |