Author Topic: Small bug in BASS.pas  (Read 4869 times)

3delite

  • Posts: 895
Small bug in BASS.pas
« on: 17 Apr '04 - 01:55 »
In BASS docs:
Quote
DWORD WINAPI BASS_ChannelGetLevel(
    DWORD handle
);


Return value
If an error occurs, -1 is returned...

In BASS.pas DWORD is defined as Cardinal (0..4294967295 unsigned 32-bit) which means it never returns -1.
I want to check if the stream handle is valid or not. Should I change the return value to Integer (-2147483648..2147483647 signed 32-bit) or is there another way to acomplish this?  ???

Irrational86

  • Posts: 960
Re:Small bug in BASS.pas
« Reply #1 on: 17 Apr '04 - 02:28 »
to compare a DWORD against -1, you dont use -1, you use DW_ERROR

3delite

  • Posts: 895
Re:Small bug in BASS.pas
« Reply #2 on: 17 Apr '04 - 04:20 »
Cool!
Thanx!  ;D