private void initCallbacks()
        {
            this.fn_container_loaded_delegate = new container_loaded_delegate(this.container_loaded);
            this.fn_playlist_added_delegate   = new playlist_added_delegate(this.playlist_added);
            this.fn_playlist_moved_delegate   = new playlist_moved_delegate(this.playlist_moved);
            this.fn_playlist_removed_delegate = new playlist_removed_delegate(this.playlist_removed);

            libspotify.sp_playlistcontainer_callbacks callbacks = new libspotify.sp_playlistcontainer_callbacks();
            callbacks.container_loaded = Marshal.GetFunctionPointerForDelegate(this.fn_container_loaded_delegate);
            callbacks.playlist_added   = Marshal.GetFunctionPointerForDelegate(this.fn_playlist_added_delegate);
            callbacks.playlist_moved   = Marshal.GetFunctionPointerForDelegate(this.fn_playlist_moved_delegate);
            callbacks.playlist_removed = Marshal.GetFunctionPointerForDelegate(this.fn_playlist_removed_delegate);

            _callbacksPtr = Marshal.AllocHGlobal(Marshal.SizeOf(callbacks));
            Marshal.StructureToPtr(callbacks, _callbacksPtr, true);

            libspotify.sp_playlistcontainer_add_callbacks(_containerPtr, _callbacksPtr, IntPtr.Zero);

            return;
        }
        private void initCallbacks()
        {
            this.fn_container_loaded_delegate = new container_loaded_delegate(this.container_loaded);
            this.fn_playlist_added_delegate = new playlist_added_delegate(this.playlist_added);
            this.fn_playlist_moved_delegate = new playlist_moved_delegate(this.playlist_moved);
            this.fn_playlist_removed_delegate = new playlist_removed_delegate(this.playlist_removed);

            libspotify.sp_playlistcontainer_callbacks callbacks = new libspotify.sp_playlistcontainer_callbacks();
            callbacks.container_loaded = Marshal.GetFunctionPointerForDelegate(this.fn_container_loaded_delegate);
            callbacks.playlist_added = Marshal.GetFunctionPointerForDelegate(this.fn_playlist_added_delegate);
            callbacks.playlist_moved = Marshal.GetFunctionPointerForDelegate(this.fn_playlist_moved_delegate);
            callbacks.playlist_removed = Marshal.GetFunctionPointerForDelegate(this.fn_playlist_removed_delegate);

            _callbacksPtr = Marshal.AllocHGlobal(Marshal.SizeOf(callbacks));
            Marshal.StructureToPtr(callbacks, _callbacksPtr, true);

            libspotify.sp_playlistcontainer_add_callbacks(_containerPtr, _callbacksPtr, IntPtr.Zero);

            return;
        }