View Single Post
  #4 (permalink)  
Old 8th June 2005
immortal immortal is offline
Junior Member
BS.Player Newbie
 
Join Date: Jun 2005
Posts: 3
Rep Power: 0
immortal is an unknown quantity at this point
Default

Routine to open file as requested:

Public Sub BSPAddFile(filename As String)
' Adds a file to the playlist

hWndBSPlayer = FindWindow(bspClass, 0)
If hWndBSPlayer = 0 Then 'can't find BSPlayer
Exit Sub
End If

Dim cds As COPYDATASTRUCT
cds.dwData = BSP_OpenFile
cds.lpData = lstrcpy(filename, filename)
' Copies filename to itself. Nothing happens,
' but returns the address for the pointer to the string!
cds.cbData = Len(filename) + 1

RetVal = CopyDataSendMessage(hWndBSPlayer, WM_COPYDATA, 0&, cds)

End Sub
Reply With Quote
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20