0

I am needing this:

sp_search* sp_search_create (   sp_session *    session,
  const char *  query,
  int   track_offset,
  int   track_count,
  int   album_offset,
  int   album_count,
  int   artist_offset,
  int   artist_count,
  int   playlist_offset,
  int   playlist_count,
  sp_search_type    search_type,
  search_complete_cb *  callback,
  void *    userdata     
)

Parameters:

[in]    session     Session
[in]    query   Query search string, e.g. 'The Rolling Stones' or 'album:"The Black Album"'
[in]    track_offset    The offset among the tracks of the result
[in]    track_count     The number of tracks to ask for
[in]    album_offset    The offset among the albums of the result
[in]    album_count     The number of albums to ask for
[in]    artist_offset   The offset among the artists of the result
[in]    artist_count    The number of artists to ask for
[in]    playlist_offset     The offset among the playlists of the result
[in]    playlist_count  The number of playlists to ask for
[in]    search_type     Type of search, can be used for suggest searches
[in]    callback    Callback that will be called once the search operation is complete. Pass NULL if you are not interested in this event.
[in]    userdata    Opaque pointer passed to callback

Currently i have tried this:

libspotify.sp_search_create(SessionPtr, "mc hammer", 0, 100, 0, 
  100, 0, 100, 0, 100, sp_search_type.SP_SEARCH_STANDARD, 
  ???, CType(vbNull, IntPtr))

Although i do not get an error, i dont get any artest name... I know that ??? should be a type of callback but i am not sure how to do the Address OF for that?

StealthRT
  • 10,108
  • 40
  • 183
  • 342

1 Answers1

0

Try using:

libspotify.sp_search_create(SessionPtr, "mc hammer", 0, 100, 0, 
  100, 0, 100, 0, 100, sp_search_type.SP_SEARCH_STANDARD, 
  AddressOf MyCallback, CType(vbNull, IntPtr))

where MyCallback is a sub/function that handles search completion:

  Private Sub MyCallback
    ...
  End sub
Andrea
  • 11,801
  • 17
  • 65
  • 72