IAudioFile::Register

HRESULT Register(PIAUDIOFILENOTIFYSINK pNotifyInterface);

Passes the address of a file notification interface to the audio object so that the object can notify the application when files are opened/closed, and current file position.

· Returns NOERROR if successful, or one of these error values:

E_INVALIDARG
E_OUTOFMEMORY

pNotifyInterface

[in] Address of the notification interface through which the audio object notifies the engine about audio information.

Because passing the address to the audio object does not transfer ownership of the notification interface, the audio object must call the interface's AddRef member function before returning from the call to Register. The audio object must also call the IAudio interface's Release member function when it closes. The calling application must release any reference counts it holds on the notification interface after calling Register, unless it needs the notification object to be valid when the audio object releases it.