Hi,

As I stated, my comments are based on the AV API.

>>> function TBP_NeedConfig: Integer; stdcall;
PP>> return 0 if you provide a configuration dialog.

> It's actually the other way around... return 0 if there's no
> configuration option, return non-zero if you *do* provide one.

If is it so, than the TBP API is different.

In AV API following return codes are defined:

#define AVC_Suspicious          2
#define AVC_VirusFound          1
#define AVC_OK                   0
#define AVC_NotSupported        -1
#define AVC_CantBeCured         -2
#define AVC_CantCure            -2
#define AVC_Error               -3
#define AVC_BufferTooSmall      -4

>>> As I guess it must return "zero" if all is right. How other results are
>>> interpreted? Just as "non-zero", or an exact value is also important?
PP>> Zero is OK, any negative value is an error.

> That seems to be the case. Personally, I'd rather use boolean values,
> where the convention is zero=false, non-zero=true. But it seems TB's
> API is structured using ints everywhere instead. And obviously,
> TBP_GetSpamScore needs to return an actual score value.

> That's the theory. In actuality, TBP_Setup *is* called immediately
> after TBP_NeedConfig. Hopefully this will be fixed soon.

Very old bug. Don't hold your breath. :)

Anyway, a lack of proper documentation of API is a pet peeve of mine.


-- 
Petr Prazak
GRISOFT, s.r.o.


________________________________________________
Current version is 1.62 | "Using TBDEV" information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to