function opens the specified phone device. A phone device can be opened using
either owner privilege or monitor privilege. An application that opens the
phone with owner privilege can control the phone's lamps, display, ringer, and
hookswitch or hookswitches. An application that opens the phone device with
monitor privilege is notified only about events that occur at the phone, such as
hookswitch changes or button presses. Ownership of a phone device is exclusive. In
other words, only one application can have a phone device opened with owner
privilege at a time. The phone device can, however, be opened multiple times with
| HPHONEAPP hPhoneApp,
| DWORD dwDeviceID,
| LPHPHONE lphPhone,
| DWORD dwAPIVersion,
| DWORD dwExtVersion,
| DWORD dwCallbackInstance,
| DWORD dwPrivilege
A handle to the application's registration with TAPI.
The phone device to be opened.
A pointer to an HPHONE handle, which identifies the open phone device. Use
this handle to identify the device when invoking other phone control functions.
The API version number under which the application and Telephony API have
agreed to operate. This number is obtained from phoneNegotiateAPIVersion
The extension version number under which the application and the service
provider agree to operate. This number is zero if the application does not use any
extensions. This number is obtained from phoneNegotiateExtVersion
User instance data passed back to the application with each message. This
parameter is not interpreted by the Telephony API.
The privilege requested. The dwPrivilege
parameter can have only one bit set. This parameter uses the following
An application that opens a phone device with this privilege is informed about
events and state changes occurring on the phone. The application cannot invoke
any operations on the phone device that would change its state.
An application that opens a phone device in this mode is allowed to change the
state of the lamps, ringer, display, and hookswitch devices of the phone.
Having owner privilege to a phone device automatically includes monitor privilege
Returns zero if the request is successful or a negative error number if an
error has occurred. Possible return values are:
PHONEERR_ALLOCATED, PHONEERR_NODRIVER, PHONEERR_BADDEVICEID, PHONEERR_NOMEM,
PHONEERR_INCOMPATIBLEEXTVERSION, PHONEERR_OPERATIONUNAVAIL, PHONEERR_INVALAPPHANDLE,
PHONEERR_RESOURCEUNAVAIL, PHONEERR_INVALPOINTER, PHONEERR_UNINITIALIZED,
PHONEERR_INVALPRIVILEGE, PHONEERR_REINIT, PHONEERR_INUSE, PHONEERR_NODEVICE, PHONEERR_INIFILECORRUPT.
When opening a phone device with monitor privileges, the application is sent
messages when events occur that change the status of the phone. Messages sent to
the application include PHONE_BUTTON
. The latter provides an indication of the phone's status item that has
When opening a phone with owner privilege, the phone device can be manipulated
in ways that affect the state of the phone device. An application should only
open a phone using owner privilege if it actively wants to manipulate the phone
device, and it should close the phone device when done to allow other
applications to control the phone.
When an application opens a phone device, it must specify the negotiated API
version and, if it wants to use the phone's extensions, the phone's
device-specific extension version. This version number should have been obtained with the
. Version numbering allows the mix and match of different application versions
with different API versions and service-provider versions.
- Software for developers
Software for Android Developers
- More information resources
Unix Manual Pages
- Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database