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.
A version of this page is also available for
4/8/2010

This function sets the location used as the context for address translation.

Syntax

LONG lineSetCurrentLocation( 
  HLINEAPP 
hLineApp, 
  DWORD 
dwLocation
);

Parameters

hLineApp

[in] Application handle returned by the lineInitializefunction. If an application has not yet called lineInitialize, it can set the hLineAppparameter to NULL.

dwLocation

[in] New value for the CurrentLocation entry in the [Locations] section in the registry. It must contain a valid permanent identifier of a Location entry in the [Locations] section, as obtained from the lineGetTranslateCapsfunction. If it is valid, the CurrentLocation entry is updated.

Return Value

Zero indicates success. A negative error number indicates that an error occurred. The following table shows the return values for this function.

Value Description

LINEERR_INIFILECORRUPT

The INI file is corrupted.

LINEERR_INVALAPPHANDLE

The app handle is invalid.

LINEERR_INVALLOCATION

The location provided is invalid.

LINEERR_NODRIVER

The driver was not found.

LINEERR_NOMEM

Not enough memory is available.

LINEERR_OPERATIONFAILED

The operation failed.

LINEERR_RESOURCEUNAVAIL

The resourcr is unavailable.

LINEERR_UNINITIALIZED

The parameter was uninitialized.

Requirements

Header tapi.h
Library coredll.lib
Windows Embedded CE Windows CE 2.10 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also