2013-06-26 1 views
0

Je besoin de ce:Spotify changer 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  
) 

Paramètres:

[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 

J'ai actuellement essayé ceci:

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

Bien que je ne obtenir une erreur, je ne reçois aucun nom artest ... Je sais que ??? devrait être un type de rappel, mais je ne suis pas sûr de savoir comment faire le Adresse de pour cela?

Répondre

0

Essayez d'utiliser:

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 est un sous/fonction qui gère l'achèvement de la recherche:

Private Sub MyCallback 
    ... 
    End sub