Jump to content

ACQUIRE

From EDM2
Revision as of 21:06, 25 November 2025 by Martini (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The ACQUIRE command acquires use of the physical resources for the device. The EXCLUSIVE and EXCLUSIVE INSTANCE keywords cannot be used together.

Syntax

ACQUIRE ──── object ────┬──────────────────────┬──┬─────────┬──
                        ├─ EXCLUSIVE ──────────┤  └─ QUEUE ─┘
                        └─ EXCLUSIVE INSTANCE ─┘

─┬──────────┬─────────────────────────────────────────────────┤
 ├─ WAIT   ─┤
 └─ NOTIFY ─┘

Keywords

object
Object associated with this media control interface command. The object can be one of the following:
  • Device type
  • Device name
  • Filename
  • Alias
EXCLUSIVE
Acquires the physical resource for exclusive use. If the resource is not available, MCIERR_DEVICE_IN_USE is returned. :Exclusive use of a device can be released with the RELEASE system command.
EXCLUSIVE INSTANCE
Acquires the device such that whether being used or not, it cannot be made inactive by another request.
QUEUE
Queues ACQUIRE command to be executed when device resources become available.
WAIT
The command is executed synchronously. The function waits until the requested action is complete before returning to the application.
NOTIFY
The command is executed asynchronously, allowing control to be returned immediately to the application. When the requested action is complete, an MM_MCINOTIFY message is sent to the application window procedure.

Example

acquire digitalvideo exclusive wait