A BASS_ERROR_ILLTYPE error indicates that the attribute type is invalid, at least for the specified channel, ie. your "_handle" channel doesn't support the BASS_ATTRIB_TEMPO_PITCH attribute in this case. Note the BASS_ATTRIB_TEMPO_PITCH attribute is only supported by tempo streams, created with BASS_FX_TempoCreate. To apply it to a file, you need to wrap the file in a tempo stream, something like this...
decoder=BASS_StreamCreateFile(FALSE, filename, 0, 0, BASS_STREAM_DECODE); // create a "decoding channel" from a file
tempostream=BASS_FX_TempoCreate(decoder, BASS_FX_FREESOURCE); // create a tempo stream for it
BASS_ChannelSetAttribute(tempostream, BASS_ATTRIB_TEMPO_PITCH, pitch); // set the pitch
BASS_ChannelPlay(tempostream, FALSE); // start playing
Please see the documentation for details on the aforementioned stuff.