Re: TBB format

2003-10-23 Thread Stefan Tanurkov
Hi Uwe,

PT> Hi! Can anybody tell me the format of the TBB-files?

It is better not to access those files directly and to wait for API
to access TB data are implemented because the format may change in
future, so better be on the safe side of things. API will also provide
access to parsed messages. Also, access to SecureBat! data will be
possible only by using API calls (obviously - because all data
is encrypted :-)


-- 
Best regards,
 Stefan

...It's a dog-eat-dog world and I'm wearing Milk-Bone shorts.



http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: The Bat! Common Plug-in API v1.0

2003-09-20 Thread Stefan Tanurkov
Hello Alexey,

ANV> What about entering an internal macros in The Bat!, which can
ANV> retrieve the names and versions of installed plugins, and use
ANV> this text anyway? (See my subscription as example, but I did it
ANV> manually :(. )


Hmmm. Is it really needed? I mean - if this information is critical,
it's better for a plug-in to implement a special macro for that
otherwise, I can't think of a good way to list plug-ins but listing
each one in a separate line...


-- 
Best regards,
 Stefan

...Electricians do it till it Hz.



http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: The Bat! Anti-virus plug-in API

2003-09-20 Thread Stefan Tanurkov
Hello Mark,

MW> Maybe I'm being more dense than normal today, but I'm having trouble
MW> understanding the AVC_NotSupported return value. Does this imply that
MW> *all* the functions must at least have dummy code that returns a value
MW> of AVC_NotSupported?

No. If you don't implement a function, you can simply don't implement
it. But - it may be needed for debug purposes or when a plug-in is
used as a proxy to some engine.

MW>  What is the difference in, for example,
MW> BAV_StreamChecking() returning AVC_Error vs AVC_NotSupported?

Semantically, there is no difference now, but this may change in
future.

MW> My understanding is that I should return AVC_OK if my plugin supports
MW> stream checking. If my plugin does not support stream checking then I
MW> should return AVC_Error. When would I *ever* want to return a value of
MW> AVC_NotSupported?

If your plug-in is a proxy to some AV engine which may or may not
support stream checking depending on its version, for example...

MW> Secondly, the Msg argument to BAV_CheckMemory(), BAV_CureMemory(),
MW> BAV_CheckFile(), BAV_CureFile, BAV_CheckStream(), and BAV_CureStream()
MW> is specified as never being allowed to exceed 1024 bytes - why is
MW> this?

Because otherwise a complex mechanism should be involved to avoid
performing twice such a resource-consuming operation as checking for
viruses. Complexity may result in bugs on any side, so it's better to
use limitation here.

There is also buffer-overrun possibility here (sorry Leif - I was
lying because I didn't remember it before I actually looked at the
code) which is fixed in the oncoming version.


MW> Not that I would expect to exceed this value, but I'm worried
MW> that there's a buffer in TB itself that would overflow if I passed,
MW> say, 4096 bytes as a result.

Hmm. Potentially, any plug-in may crash TB or damage its data. So,
better to make sure all operations are bound to documented limits :-)


MW>  What happens if the message is malformed,
MW> ie, not null-terminated? Will this cause TB to crash?

If it's not null-terminated, not a problem - it'll be cut
automatically.

MW> The documentation states that for these functions "Usually AV software
MW> returns a distinguished name of the virus of the message." What does
MW> usually mean in this case?

Usually means that most of known AV engines we were testing or created
simple BAVs for.

MW> What does TB do with the returned string?

The string is added to the log.


MW> Lastly (at least for now) what is the difference in the BAV_Curexxx
MW> functions between AVC_CantBeCured, AVC_VirusFound, and AVC_Error?

AVC_Error always means that error occurred, i.e. the object cannot be
checked for some reason. In this case, the object will be processed as
if no virus found...

Currently, AVC_CantBeCured and AVC_VirusFound are treated in the same
way - i.e. it means that the object cannot be cleaned.



-- 
Cheers,
 Stefan

...Calm down - it's only ones and zeros!



http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: The Bat! Common Plug-in API v1.0

2003-09-20 Thread Stefan Tanurkov
Good [morning|afternoon|day|evening|night]  Mark,

MW> Note also that instead of the C calling conventions in section 3.1, a
MW> better (cross-compiler) substitute for WINAPI would be TBP_EXPORT, as
MW> follows:


Thank you, noted :-)



-- 
Read you later
 Stefan

...If a train station is where the train stops, what's a work station?



http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: The Bat! Common Plug-in API v1.0

2003-09-20 Thread Stefan Tanurkov
Dear Mark,

MW> I see a few template object indexes which have disappeared from the
MW> code stub you posted a while ago. I'm assuming these are gone for a
MW> reason, and not just an oversight.

They're gone because they are used in internal processing. If you want
to use corresponding settings, the Template.ExecuteMacro(...) should be
used.



-- 
Read you later
 Stefan

...File not found, but if you'll hum a few bars...



http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: The Bat! Common Plug-in API v1.0

2003-09-20 Thread Stefan Tanurkov
Hi Alexey,

ANV> The important question: are TBP_Initialize and TBP_Finalize also multithreaded?
ANV> If so, it will unfortunately hard to initialize a critical sections in
ANV> TBP_Initialize...

No. They are called from the main thread and only on startup/shutdown.
Otherwise, it would be wrong to recommend to create critical sections
in TBP_Initialize :-)


-- 
All the Best!
 Stefan

..."Compromise makes a good umbrella but a poor roof; it is a temporary expedient."
  - James Russel Lowell, American editor (1819-1891)



http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: The Bat! Common Plug-in API v1.0

2003-09-20 Thread Stefan Tanurkov
Hi Alexey,


ANV> |  Object Pascal: function TBP_SetConfigData (const ABuf; ABufSize: 
Integer):
ANV> | Integer; stdcall;

ANV> in Object Pascal description: first arg "const ABuf" sounds quite suspicious.
ANV> May be "var ABuf"?

No, it's a constant parameter - this means that the parameter's data
cannot be changed or the parameter cannot be passed further as a
variable one.

ANV> Also, for C++ description it would be safer to define it as (const void* ABuf...)

Noted.

ANV> 1. It would be good to have a possibility from
ANV> TBP_GetSpamScore to add a custom
ANV> header into regarded letter, for example "X-spam: ..." or etc (or change the
ANV> header, if it is already present in the letter).

It would lead to changing the interface which is not a very good idea.
Maybe a new function will be added for that. We'll think about it,
anyway.

ANV> 2. About TBP_FeedSpam - it would be good, if The Bat! will call this function
ANV> itself according to "Move to junk folder" threshold, basing on integral grade of
ANV> all filters installed. In this case this function will necessary to be called
ANV> manually for wrongly graded letter, but not to every one received.

Well, I'm not sure it's a good idea because it may seriously slow down
processing...

ANV> And finally: do you agree if I translate the API into Russian?

You already did it, but you have our permission anyway :-)  Thank you
very much!


-- 
Sincerely,
 Stefan

...If at first you don't succeed, redefine success.



http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: The Bat! Common Plug-in API v1.0

2003-09-20 Thread Stefan Tanurkov
Hi Tero,

TR> You don't happen to have a C header file I could use instead of copy
TR> pasting declarations from the .RTF-document do you ?-)

No, sorry. I'm using Object Pascal as the primary PL :-)



-- 
Cheers,
 Stefan

...WindowsError:042 This virus requires Microsoft Windows.



http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: The Bat! Common Plug-in API v1.0

2003-09-20 Thread Stefan Tanurkov
Good [morning|afternoon|day|evening|night]  Alexey,

ANV> And quite more comments :)


All fixed, thank you! :-)

-- 
Regards,
 Stefan

...Who is "they" anyway?



http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: The Bat! Common Plug-in API v1.0

2003-09-20 Thread Stefan Tanurkov
Good [morning|afternoon|day|evening|night]  Alexey,


ANV> Here must be TBP_NeedConfig, not TBP_ConfigNeeded!
 
Fixed :-)


-- 
Sincerely,
 Stefan

..."In spite of everything I still believe that people are really good at heart."
- Anne Frank



http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: The Bat! Common Plug-in API v1.0

2003-09-20 Thread Stefan Tanurkov
Good [morning|afternoon|day|evening|night]  Alexey,

ANV> About the restriction: it would be nice to include the underscore character "_"
ANV> in the set. 

It's there, I just forgot to include it. Fixed :-)

-- 
Best regards,
 Stefan

...Blessed is the end-user who expects nothing, for ye
   shall not be disappointed.



http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: The Bat! Common Plug-in API v1.0 - some extra typerrs found...

2003-09-20 Thread Stefan Tanurkov
Dear Alexey,

ANV> Error: Abuf is pointer to a BINARY buffer, but ABufSize is the size of STRING
ANV>buffer.

Fixed :-)

ANV> Also I think it would be good to get a convention to call all STRINGS buffers
ANV> inside API documentatin as "ABuf", but for BINARY buffers as simple "Buf". This
ANV> is a simple "decoration"'s convention, but I think it would be nice.

Well, I prefer not to change parameter names depending on their type.
:-)

ANV> 2. It would be nice to point explicitly the character of the buffer required.
ANV> For example, in TBP_GetName it is explicitly specified that it is _string_
ANV> buffer, and in TBP_GetConfigData it is explicitly cpecified that it is _binary_
ANV> buffer, but in TBP_SetConfigData - nothing specified _explicitly_.

Fixed


ANV> 3. It would be nice to always mention explicitly the measurement's units of
ANV> buffer's size (bytes). For example, in TBPSetConfigData it is mentioned
ANV> explicitly that the size of buffers is "in bytes", but in TBPGetDataProc
ANV> Callback function there is nothing about measurement's units of buffer's size
ANV> mentioned.

Hmmm. Here it says that the size is in bytes :-)  Anyway, all buffer
sizes are in bytes. Exceptions could be made only for UNICODE
functions (in future)


ANV> 4. As I mentioned before, sometimes (more precisely - TBP_Setup and
ANV> TBP_GetConfigData) the AVC_OK is used, but it was never defined explicitly.

Fixed, thank you!




-- 
Read you later
 Stefan

...Best file compression around:  "DEL *.*" = 100% compression



http://www.silverstones.com/thebat/TBUDLInfo.html


The Bat! Common Plug-in API v1.0

2003-09-10 Thread Stefan Tanurkov
Dear All,

  Phew... Writing API documentation is definitely a hard task for me :-)

  OK, here it is - the first version of TB! CP API for your comments.
  Attention C++ programmers - C calls were merely converted but not
  tested, so please verify that all definitions are correct.
  I tried to make everything clear, but if there are some uncovered
  issues and concerns, please post them here.

  We are planning to make some additions to the API soon. Please post
  your suggestions about which plug-in slot should be implemented
  next.

  
-- 
Cheers,
 Stefan  mailto:[EMAIL PROTECTED]

..."The man who, in a fit of melancholy, kills himself today,
   would have wished to live had he waited a week." - Voltaire

CP-API.ZIP
Description: Zip compressed data

http://www.silverstones.com/thebat/TBUDLInfo.html

Re[2]: Non-official TBP API - addition

2003-09-08 Thread Stefan Tanurkov
Dear Leif,

LG> I'm not a programmer, or rather, a very poor one. Just a pleading from
LG> a Network Systems Administrator dealing with MS patches on nearly a
LG> daily basis, please, please, please whatever code is placed into the
LG> Plugins (or securing the API itself), look at code security with
LG> regards to buffer overflows etc.

All memory blocks TB! uses for exchange with plug-ins are dynamically
allocated, this means - even if buffer overflow happens, it will only
cause access violation.




-- 
Best regards,
 Stefan

..."The art of medicine consists of amusing the patient
   while nature cures the disease." - Voltaire



http://www.silverstones.com/thebat/TBUDLInfo.html


The Bat! Anti-virus plug-in API

2003-09-07 Thread Stefan Tanurkov
Dear All,

  Finally, the first official version of TB!'s Anti-virus plug-in API
  is made :-) The common plug-in API will be published here soon.
  Hopefully, it won't take more than a couple of days because it is
  not as extensive as going to be in subsequent releases (we'll be
  updating information more regularly then, anyway).

  I know that this API may be interesting just for a few readers of
  this list, but if somebody stay close to developers of some API
  software, we will be happy if this document is passed to them.

  Also, this is a "test" version of API documentation, so please post
  your comments in case you feel it can be improved in any aspect
  

-- 
All the Best!
 Stefan  mailto:[EMAIL PROTECTED]

..."Me hav'em heap trouble." - Tonto the programmer


BAV_API.zip
Description: Zip compressed data


pgp0.pgp
Description: PGP signature

http://www.silverstones.com/thebat/TBUDLInfo.html

New version of TBPTest

2003-06-04 Thread Stefan Tanurkov
Hi All,

  Here's an updated version of TBPTest. I even added some comments to
  the new routines :-)))

  I will force myself to write the documentation about plug-in API as
  soon as possible, if something is not clear, please send questions
  here.


-- 
Cheers,
 Stefan  mailto:[EMAIL PROTECTED]

..."All you need in this life is ignorance and confidence, and then success is sure."
  - Mark Twain

TBPtest.rar
Description: Binary data

http://www.silverstones.com/thebat/TBUDLInfo.html


Get ready for the new Beta :-)

2003-05-30 Thread Stefan Tanurkov
Hello All,

  Here is a short update for Anti-SPAM plug-ins. There is a new
  function in the oncoming Beta to be called for submitting SPAM/HAM:

  function TBP_FeedSpam(MsgID, IsSPAM: Integer; GetData: TBPGetDataProc): Integer; 
stdcall;

  Basically, MsgID and GetData parameters are the same as from
  TBP_GetSpamScore function.  If a submitted message is SPAM, the
  IsSpam parameter is not zero.  The return value is non-zero if the
  submitted message is not processed, it should be zero if everything
  is OK.

  ...And the "mpidMessageBody" data ID is finally functional :-)
  
  

-- 
Read you later
 Stefan  mailto:[EMAIL PROTECTED]

...Windows 3 - the MAC for the rest of us!



http://www.silverstones.com/thebat/TBUDLInfo.html


Bayesian SPAM filtering

2003-02-23 Thread Stefan Tanurkov
Hello All,

  The thing stated in the subject can be supported if we provide some
  additional features for plug-ins like adding menu commands, am I right?
  

-- 
All the Best!
 Stefan  mailto:[EMAIL PROTECTED]

...BREAKFAST.COM Halted... Cereal Port Not Responding.



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


Re: help with regular expressions

2003-02-21 Thread Stefan Tanurkov
Good [morning|afternoon|day|evening|night]  Task,

TC>   ?anyone knows a good regular expresions guide? please reply with the
TC>   url.

Well, the PCRE guide is a part of The Bat! help ;-)
Just look under "Advanced usage topics" - you will find it...

-- 
All the Best!
 Stefanmailto:[EMAIL PROTECTED]

...Do radioactive cats have 18 half-lives?



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


Re[2]: i need better idea to know if a complete word *really it's*a complete word

2003-02-21 Thread Stefan Tanurkov
Good [morning|afternoon|day|evening|night]  tracer,


t> would be better if the Bat or email used it...
t> Many programs allas donot use unicode   all the way. One reason why
t> for instance using Thai, Mirc gives a channel display with 
t> instead of text...

If it was so easy The Bat! could support Unicode right from the
start... The reason programs don't support Unicode is because it is
totally screwed under Windows - MS uses different Unicode
implementations for 9x and NT. Programs should rely on 9x
implementation which is a joke. :-(



-- 
Sincerely,
 Stefanmailto:[EMAIL PROTECTED]

...I want my data back, machine, and I want it now!



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


Re[4]: i need better idea to know if a complete word *really it's*a complete word

2003-02-21 Thread Stefan Tanurkov
Hi Kevin,

KJMJ> What about using UNICODE instead of ASCII?

Conversion to upper case in Unicode supported only in WinNT family,
so it would make everything tough to a plug-in :-)

A plug-in can extract "raw" information from the message source and
perform decoding by itself...

Besides, it is planned to provide fields in Unicode format...


-- 
Best regards,
 Stefanmailto:[EMAIL PROTECTED]

...Make it idiot-proof and someone will make a better idiot.



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


Re[3]: TBP API - need help!

2003-02-13 Thread Stefan Tanurkov
Hi Mark,

MW> Or, in this case, a lack of *any* real documentation. Stefan - I
MW> take it that the API we're working with here is also going to be
MW> valid when the fabled 2.0 release finally rears its head?

I am going to publish plug-in API in a couple of weeks. It just needs
time and some calm, you know. :-) As the current workload is quite
high and a bit stressful, the problem to find proper time is real...


-- 
Read you later
 Stefanmailto:[EMAIL PROTECTED]

...Why are you looking down here? The joke is above!



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



Re[2]: second version of pacpsam now avalaible (english version now)

2003-02-13 Thread Stefan Tanurkov
Hi Thomas,


TM> I think because TB! gets informations from 2 different Sources.

Because TB! may gather information from many sources, the option
exists so you can choose the score :-)

TM> Anyway what is the aim and object using 2 plugin, if both do the
TM> same or one is better.

Different plug-ins can be used for different methods of checking. Some
use statistical approach, some analyze message origin, some search
for particular phrases, etc. Of course, it is technically possible to
use all methods combined is a single plug-in, but it is not so easy
from my experience. So, the possibility to use many plug-ins is
supposed to add more flexibility and freedom of choice...


-- 
Read you later
 Stefanmailto:[EMAIL PROTECTED]

..."If poetry comes not as naturally as the leaves to a tree,
   it better not come at all." - John Keats



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



Re[2]: second version of pacpsam now avalaible (english version now)

2003-02-13 Thread Stefan Tanurkov
Hi Thomas,

TM> If you have both plugins installed for example the filtering from the
TM> sender email (PacSpam Plugin)  is not working in my case. TB! doesn't
TM> know which scores it should take from which plugin.

Why doesn't it know if you can select which score should be used
(min,max,average)?

-- 
Cheers,
 Stefanmailto:[EMAIL PROTECTED]

...Don't walk through the screen door, you might strain yourself.



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



Re[2]: second version of pacpsam now avalaible (english version now)

2003-02-13 Thread Stefan Tanurkov
Dear Gerd,

GE> I understood it the following way: If both Plugins are installed, then
GE> Plugin A does not work because of Plugin B; Plugin B does not work because
GE> of Plugin A.

This is why I am asking. Do they bite each other? :-)

-- 
Sincerely,
 Stefanmailto:[EMAIL PROTECTED]

...Rome did not create a great empire by having meetings,
 they did it by killing all those who opposed them.



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



Re[2]: second version of pacpsam now avalaible (english version now)

2003-02-13 Thread Stefan Tanurkov
Hello Thomas,


TM> You can't use both Plugin that won't work. Tested!! The function of
TM> each Plugin are eliminating each against the other Plugin.

Please explain what you mean :-)


-- 
Sincerely,
 Stefanmailto:[EMAIL PROTECTED]

...It was the best of lines,
  it was the worst of lines...



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



Re[5]: RFC: plugins macros

2003-01-27 Thread Stefan Tanurkov
Good [morning|afternoon|day|evening|night]  NetVicious,


N> But  only  one suggestion, disable overriding standard Template Macros,
N> or allow it only if a checkbox it's selected. For disabling viruses to
N> deploy a simple dll into The Bat! directory and make us vulnerable.

Well, if a virus gets onto your machine so it can replace DLLs or add itself to The 
Bat! plug-in list, you are in big trouble :-)

However, we are yet to develop some protection mechanisms for plug-ins and their 
settings - I think something like signing plug-ins and configuration files with 
administrator's password would work for it.


-- 
Cheers,
 Stefanmailto:[EMAIL PROTECTED]

..."What counts is not necessarily the size of the dog in the fight;
   it's the size of the fight in the dog." - Dwight D. Eisenhower



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



Re[2]: NetPlug 0.2.0000

2003-01-27 Thread Stefan Tanurkov
Good [morning|afternoon|day|evening|night]  tracer,

t> Again: is this plugin working AFTER or before filtering

This plug-in is working BEFORE filtering. I think we should add some callback option 
to determine presence of an address in a particular AB group to avoid cases like 
yours...


-- 
Best regards,
 Stefanmailto:[EMAIL PROTECTED]

...As I said before, I never repeat myself.



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



Re[3]: RFC: plugins macros

2003-01-27 Thread Stefan Tanurkov
Dear Mark,

ST>> - Macros

MW> The ability to have macros perform functions?

It has nothing to do with automatic execution of message content. :-)
I meant Template Macros.

ST>> - Attachment handlers (is this needed?)

MW> This one comes up all the time on TBUDL: how to strip out HTML
MW> attachments and just leave the text? It would be great to have a way
MW> to handle this.

Basically, the idea is about converting attachments into
text/html/picture form using extracted information so those
attachments are displayed at the tabs of the preview pane and/or
adding more commands to the attachment menu...

Stripping HTML content is something else as it should be processed
before the message is stored into message base... Well, I just named
another functin of plug-ins :-)

MW> If you're opening all this up to third-party DLLs then it would be
MW> nice for users to have a system to prioritize them: if DLL A contains
MW> anti-spam and editor extension functions and I want to use the editor
MW> functions from DLL B, I should be able to select those and still use
MW> the anti-spam features of DLL A.

This will be on user's choice - which editor should be used. Besides,
I see no point of providing editor and anti-spam engine in the same
plug-in :-)


-- 
All the Best!
 Stefanmailto:[EMAIL PROTECTED]

...(A)bort, (R)etry, (T)ake down entire network?






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



Re: RFC: plugins macros

2003-01-27 Thread Stefan Tanurkov
Good [morning|afternoon|day|evening|night]  Petr,

( For some reason, the original of this message did not appear in
TBDEV )

PP>   I've got an idea how to extend TheBat! :

PP>   Every plugin (no matter of what kind, AV or AntiSpam etc.) could register
PP>   an array of macros that would be added to the TB! standard set of macros.

This is the same idea I've got too. It just needs some time to provide
all those possibilities. It just takes some time to implement the
"slots" :-)

Meanwhile, we would like to hear suggestions about implementation,
places, etc.

Here is what is already planned (just to avoid repetition):

- Macros
- Menu commands/Toolbar buttons
- Filtering:
   - additional conditions
   - actions
   - complete filters
- Message loading processors
- Attachment handlers (is this needed?)
- Editor extensions

Generally, all of those can be provided by a single plug-in  - TB!
will just check for availability of a particular function available in
the DLL.

For some things, COM-alike interfaces (it won't be necessary to
perform all the stuff about registering because this just complicates
things) would be better for simplifying access to particular functions.

To all: what do you feel about this? :-)


-- 
Sincerely,
 Stefanmailto:[EMAIL PROTECTED]

...Always glad to share my ignorance - I've got plenty.






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



Re[3]: TBP_GetName() etc.

2003-01-20 Thread Stefan Tanurkov
Dear Mark,


MW> ...However, I really, really, hope that neither the version string nor
MW> the plugin name will exceed 255 chars...

Well, it does not matter if you just make one routine to implement
those calls - this is actually the point of making everything working
in a single simple way. Simple architecture helps to create reliable
programs, isn't it? :-)


-- 
Read you later
 Stefanmailto:[EMAIL PROTECTED]

...All life's answers are on TV. - Bart Simpson



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



Re[9]: TBPtest.dpr

2003-01-18 Thread Stefan Tanurkov
Hello Robert,


RR> Saturday, January 18, 2003, 9:03:26 PM, you wrote:

>> Also, somebody knows whether "WINAPI" may replace "stdcall" ?

RR> In mingw WINAPI is defined as __stdcall in windef.h.

As long as it is defined for all C compilers (I am not sure, but I
think it should), better use WINAPI to define calling convention for
TBP_XXX functions

-- 
Cheers,
 Stefanmailto:[EMAIL PROTECTED]

...Mac error message:  Like, dude, something's wrong.



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



Re[7]: TBPtest.dpr

2003-01-18 Thread Stefan Tanurkov
Hi Mark,

MW> Probably doesn't much matter. In the example those two functions are
MW> just do-nothing stubs anyway.

Well, they are called when the plugin is loaded/unloaded. If you do
everything at the DLL entry, you simple should not implement them -
their absence is not critical.

MW> My only thought was that there was some Object Pascal glue that
MW> needed to see those two functions in the DLL.

There is nothing from Object Pascal here. DLL is DLL :-)

Did you work out what was wrong with the call convention? I think you
just should add "stdcall" in TBP_XXX function declaration (if I
remember it right, BC++ does not require underscores, but I can be
wrong). Also, somebody knows whether "WINAPI" may replace "stdcall" ?


-- 
Cheers,
 Stefanmailto:[EMAIL PROTECTED]

...I don't suffer from insanity. I enjoy every minute of it.



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



Re: TBPtest.dpr

2003-01-17 Thread Stefan Tanurkov
Hi Mark,


MW> Can TBPtest.dpr be posted again? It's not in the archives. Are there
MW> other resources I should know about as well?

Here it goes. The other resource currently available is me :-))


-- 
Read you later
 Stefanmailto:[EMAIL PROTECTED]

..."If you cannot get rid of the family skeleton, you may as well dance with it."
   - George Bernard Shaw


TBPtest.dpr
Description: Binary data

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



Re[5]: Spam Plugin API Issues

2003-01-17 Thread Stefan Tanurkov
Hi Robert,

RR> Ok, I finally solved it using Dev-CPP (and mingw).  It required adding
RR> the option --add-stdcall-alias. 

:-)  I told you it is because call convention...

RR> I now have the plugin listed.  Of course, the path is listed under
RR> the Status column, but I can live with that :)

This is a bug, obviously. Fixed.


-- 
Best regards,
 Stefanmailto:[EMAIL PROTECTED]

...IBM: I befriended Microsoft (remember 1980?)



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



Re[4]: C Spam Plugin Interface

2003-01-17 Thread Stefan Tanurkov
Hello Robert,

RR>   subject = (char *)GlobalAlloc(GPTR,i+1);

Try to do it with a usual malloc :-)


-- 
All the Best!
 Stefanmailto:[EMAIL PROTECTED]

...Warning: Dates in Calendar are closer than they appear.



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



Re[2]: Program language...

2003-01-17 Thread Stefan Tanurkov
Dear Thomas,

TM> What's about Borland C++ Builder? Good one?

I like it more than VC++ :-)  Not just because it is from Borland - it
is very fast comparing to VC...



-- 
Read you later
 Stefanmailto:[EMAIL PROTECTED]

...BENJI.COM found...%?&!



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



Re[3]: Spam Plugin API Issues

2003-01-17 Thread Stefan Tanurkov
Dear Robert,

RR> Using Visual C++ and switching from __cdecl to __stdcall results in TB
RR> throwing an error saying it cannot initialize the plugin.

It definitely must not be cdecl. :-)

I guess, we should ask other people who has experience in writing
plug-ins in both Delphi and C...


-- 
Regards,
 Stefanmailto:[EMAIL PROTECTED]

..."Every heart that has beat strong and cheerfully has left a hopeful impulse
   behind it in the world, and bettered the tradition of mankind."
- Robert Louis Stevenson



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



Re[4]: Spam Plugin API Issues

2003-01-17 Thread Stefan Tanurkov
Dear Robert,

>>>  SizeNeeded = TBP_GetName(NULL, 0);
>>>  if (SizeNeeded > 0) {
>>>Buffer = malloc(SizeNeeded);
>>>CharsCopied = TBP_GetName(Buffer, SizeNeeded);
>>>  }

RR> Based on this I have to assume that we should be returning the
RR> length plus the null character as you are only allocating enough size
RR> for the string and not the null.  Or shouldn't you allocate
RR> SizeNeeded+1?

Zero character is not needed.


-- 
Cheers,
 Stefanmailto:[EMAIL PROTECTED]

...A bug in the code is worth two in the documentation



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



Re: Spam Plugin API Issues

2003-01-17 Thread Stefan Tanurkov
Dear Robert,

RR> I've been working on converting the TBPtest.dpr example that Stefan
RR> posted to C. I have several issues that prevent it from working correctly
RR> though.

As I wrote to you, you should use the _stdcall (or whatever
underscores it needs - depending on compiler or WINAPI) as the calling
convention for all functions. I think this is the reason the program
does not go any further.


RR> 1) When added in the Spam Plugin options, the plugin is loaded, but
RR> the information is not displayed in the listbox. I can tell a new
RR> entry is created, but it is blank. Once closed, the blank entry does
RR> not come back. So far, I see two calls to TBP_GetName.

OK, here is how TBP_GetName (and any other function that returns
information into a buffer) is called from TB! (C syntax here)

 SizeNeeded = TBP_GetName(NULL, 0);
 if (SizeNeeded > 0) {
   Buffer = malloc(SizeNeeded);
   CharsCopied = TBP_GetName(Buffer, SizeNeeded);
 }

In other words, the first call is made with the buffer parameter set
to 0 (NULL in C, NIL in Delphi), so the calling function should return
the size of the buffer it requires. The second call just collects
Does it makes things more clear?

 
RR> 2) According to Stefan, TBP_Setup should return TRUE if the user made
RR> changes otherwise false.  However, whenever I return true, the plugin
RR> unloads immediately.

This is because of the convention, I guess - there may be a problem
with clearing stack after calling TBP_Setup and this generates an
exception.


RR> 3) Shouldn't TBP_Setup pass the HWND of the preferences window (or
RR> whatever window its called from)?

Not necessarily - you can just call GetActiveWindow() if you need it
:-)




-- 
Sincerely,
 Stefanmailto:[EMAIL PROTECTED]

..."If you cannot get rid of the family skeleton, you may as well dance with it."
   - George Bernard Shaw



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



Re: Tutorial C++

2003-01-17 Thread Stefan Tanurkov
Hi Thomas,

TM> since i am out of practice for about 6 years in coding, is there a
TM> good C++ Tutorial online somewhere? Perhaps in PDF for downloading?

I guess, this one should help:
http://www.cplusplus.org/


-- 
Best regards,
 Stefanmailto:[EMAIL PROTECTED]

..."The art of medicine consists of amusing the patient
   while nature cures the disease." - Voltaire



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



Re[3]: Program language...

2003-01-17 Thread Stefan Tanurkov
Hi Den,

DVY> The Delphi-code is much more readable rather than C++ - code, especial for
DVY> the beginning programmers.

Hey guys, please don't start religious wars here. Programming language
choice is really a matter of taste - just like colouring, music, etc.



-- 
All the Best!
 Stefanmailto:[EMAIL PROTECTED]

...If you stand up to be counted someone will take your seat.



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



Re[2]: Program language...

2003-01-17 Thread Stefan Tanurkov
Good [morning|afternoon|day|evening|night]  David,

DE> Since the original source code for The Bat! was Delphi and it is
DE> now being ported to C++. This should tell you something.

Well, this actually means only that we want to make a more "portable"
code. Delphi is still big preference for most members of our crew :-)




-- 
Sincerely,
 Stefanmailto:[EMAIL PROTECTED]

...Brain dysfunction detected...



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