Okay i worked out the issue. Windows file protection was blocking the DLL

(as it was being run as system privelages). I've fixed that now, but I now have a few more problems.
My error calling code is:
void Error(const char *text)
{
printf("\nError %d: %s\n",BASS_ErrorGetCode(),text);
BASS_Free();
ExitProcess(0);
}
which returns an error number (no error string)
but if i put
BASS_ErrorGetCode();
into the main code, NULL is returned.
Anyway, if i call Error() after BASS_Init, i get error code -1 (that shouldnt happen right?) :\
If i call Error after BASS_MIDI_StreamCreateFile i get error code 2.
Very confusing...
This doesnt happen when the program is run in Command Prompt.
Any ideas?
Thanks, jamie