次の方法で共有


IDirectMusic8::SetMasterClock

Warning: This technology is deprecated as is all of DirectMusic. Deprecated components are considered obsolete. While these components are still supported, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Deprecated.

The SetMasterClock method sets the DirectMusic master clock to a clock identified by a GUID obtained by using the IDirectMusic8::EnumMasterClock method. There is only one master clock for all DirectMusic applications.

Syntax

  
    HRESULT SetMasterClock(
  REFGUID 
    rguidClock
);

Parameters

rguidClock

Reference to (C++) or address of (C) the GUID that identifies the clock to set as the master clock for DirectMusic. This parameter must be a GUID returned by the IDirectMusic8::EnumMasterClock method.

Return Values

If the method succeeds, the return value is S_OK.

If it fails, the method can return DMUS_E_PORTS_OPEN.

Remarks

If another running application is also using DirectMusic, it is not possible to change the master clock until that application is shut down.

Most applications do not need to call SetMasterClock. It should not be called unless there is a need to synchronize tightly with a hardware timer other than the system clock.

Requirements

**  Minimum Supported Client:** Windows 2000.
**  Minimum Supported Server:** Windows 2000 Server.

**  Header:** Dmusicc.h
  Library: Dmusic.dll

See Also

© 2004 Microsoft Corporation. All rights reserved.