Platform SDK: DirectX

IDirectMusicPortDownload::GetDLId

The IDirectMusicPortDownload::GetDLId method obtains sequential identifiers for one or more download buffers.

Every memory chunk downloaded to the synthesizer must have a unique identifier placed in its DMUS_DOWNLOADINFO structure. The GetDLId method guarantees that no two downloads have the same identifier.

HRESULT GetDLId(
  DWORD* pdwStartDLId, 
  DWORD dwCount
);

Parameters

pdwStartDLId
Address of a variable to receive the first identifier.
dwCount
Number of identifiers to reserve. You might plan to download a whole series of chunks at once. Instead of calling GetDLId for each chunk, set dwCount to the number of chunks. GetDLId returns the first ID of the set, and the additional identifiers are automatically reserved up through *pdwStartDLId plus dwCount. A subsequent call to GetDLId would skip past the reserved values.

Return Values

If the method succeeds, it returns S_OK.

If it fails, the method can return one of the following error values:

E_POINTER
E_INVALIDARG

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dmusicc.h.

See Also

IDirectMusicPortDownload::GetBuffer, Low-Level DLS