' Get an instance of DirectSound DirectSoundCreate ByVal 0&, ds, Nothing
' Normally, you whould specify a handle to your own form, ' but since we don't have one in this project, we'll grab ' the foreground window handle instead ds.SetCooperativeLevel GetForegroundWindow(), DSSCL_PRIORITY
' Create a secondary sound buffer for playback ds.CreateSoundBuffer bufferDesc, dsb, Nothing
' Start playback ' 1 is the ID of the XM resource hresult = uFMOD_DSPlaySong(1, App.hInstance, XM_RESOURCE, dsb) If hresult < 0 Then Err.Rise hresult
' Pop-up a message box to let uFMOD play the XM till user input MsgBox "uFMOD ruleZ!", vbOKOnly, ".:Visual Basic:."