2013-06-26 3 views
0

Я нуждаясь это:Spotify изменения C в VB.net

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  
) 

Параметры:

[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 

В настоящее время я попытался это:

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

Хотя я не получить ошибку, я не получаю никакого артефактного имени ... Я знаю, что ??? должен быть типом обратного вызова, но я не уверен, как сделать Адрес для этого?

ответ

0

Попробуйте использовать:

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)) 

где MyCallback является суб/функция, которая обрабатывает завершение поиска:

Private Sub MyCallback 
    ... 
    End sub