次の方法で共有


IDirectMusicBuffer8::PackUnstructured

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 PackUnstructured method inserts unstructured data (typically a MIDI system-exclusive message), along with timing and routing information, into the buffer.

Syntax

  
    HRESULT PackUnstructured(
  REFERENCE_TIME rt, 
  DWORD dwChannelGroup,
  DWORD cb, 
  LPBYTE lpb
);

Parameters

rt

Absolute time of the message.

dwChannelGroup

Channel group to which the message belongs.

cb

Size of the data, in bytes.

lpb

Address of a buffer containing the data.

Return Values

If the method succeeds, the return value is S_OK.

If it fails, the method can return one of the error values shown in the following table.

Return code
E_OUTOFMEMORY
E_POINTER

Remarks

This method can be used to send any kind of data to the port.

At least 28 bytes (the size of DMUS_EVENTHEADER) plus the size of the data, padded to a multiple of 4 bytes, must be free in the buffer. The buffer space required can be obtained by using the DMUS_EVENT_SIZE(cb) macro, where cb is the size of the data.

The rt parameter must contain the absolute time at which the data is to be sent to the port. To play a message immediately, retrieve the time from the latency clock, and use this as rt. See IDirectMusicPort8::GetLatencyClock.

Messages stamped with the same time do not necessarily play in the same order in which they were placed in the buffer.

Requirements

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

**  Header:** Dmusicc.h

See Also

© 2004 Microsoft Corporation. All rights reserved.