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

2003-09-10 Thread Tero Ripattila
-BEGIN PGP SIGNED MESSAGE-
Hash: MD5

Hello Stefan,

Wednesday, September 10, 2003, 10:30:03 AM, you wrote:

ST   OK, here it is - the first version of TB! CP API for your comments.

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

//Tero

-BEGIN PGP SIGNATURE-
Version: 2.6

iQCVAwUAP17iNKFEeQ41vAczAQFr2wP+JdeqJDACRFgo5l0Odh6nVLSUk43a5nYf
dj5P9hkOV5ANrefzsrWKebyfmlQM+ViEadnx53AIFBpa9b9nj1fsvh3K+K5bJvFD
jHxz9lLoUgme+wkNgk0ylDskOyaf0I/P/Atvf7wmnH927pxZ9GzvaVbkdLkHKLGL
yfCdilJBVvk=
=7IDG
-END PGP SIGNATURE-




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


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

2003-09-10 Thread Alexey N. Vinogradov
Hello, Stefan.

You wrote 10.09.2003 @ 16:30  in mid:[EMAIL PROTECTED]
  using mailer The Bat! (v2.00.6)

ST Dear All,

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

Agree... :)

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

Some notes about the API:

,- [ from TBP_Setup description ]
| The TBP_Setup can be called by The Bat! only if the TBP_ConfigNeeded returned
| AVC_OK. The handle of the calling window can be retrieved by the GetActiveWindow
| Win32 API function
`-

AVC_OK didn't defined! May be change to ...if the TBP_ConfitNeeded returned
zero.

,- [ from TBP_SetConfigData description ]
|  C++:   int WINAPI TBP_SetConfigData(void* ABuf, int ABufSize);
| 
|  Object Pascal: function TBP_SetConfigData (const ABuf; ABufSize: Integer):
| Integer; stdcall;
`-

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

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

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

I have at least two suggestions about it:

1. It would be good to have a possibility from TBP_GetSpamScore to add a custom
header into regarded letter, for example X-spam: ... or etc (or change the
header, if it is already present in the letter). This will be useful to filter
the messages later using regular The Bat! sorting office, and safe to the
integrity of the letter RFC format. (Of course, it would be ideal if the filter
would change anything in the message, but it isn't so safe).

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


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



-- 
Sincerely,
 Alexey.
Using TB 2.00.6 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI) 
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.4dm

   mailto:[EMAIL PROTECTED]



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


Plugin initialization failed

2003-09-10 Thread Tero Ripattila
Hello all,

I wrote a dummy plugin with VC6, but I am getting Plugin initialization
errors thought I followed the instruction Stefan introduced earlier today.
See the attachment for further information.

I implemented only the two necessary functions TBP_GetName and
TBP_GetStatus to demonstrate how the interface works. I declared them as
follows:

// Header:
#define DllExport __declspec (dllexport)

DllExport int WINAPI TBP_GetName (char* ABuf, int ABufSize);
DllExport int WINAPI TBP_GetStatus ();

// Module:
DllExport int WINAPI TBP_GetName (char* ABuf, int ABufSize)
{
  assert (ABufSize  0);

  strncpy (ABuf, Foo, ABufSize);

  return 3;
}

DllExport int WINAPI TBP_GetStatus ()
{
  return TBP_SUCCESS;
}

What am I doing wrong ?

BR, Tero
attachment: error_message.png

pgp0.pgp
Description: PGP signature

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

Re: Plugin initialization failed

2003-09-10 Thread Tero Ripattila
-BEGIN PGP SIGNED MESSAGE-
Hash: MD5

TR DllExport int WINAPI TBP_GetStatus ()
TR {
TR   return TBP_SUCCESS;
TR }

Where as TBP_SUCCESS is declared as follows:

#define TBP_SUCCESS 0

BR, Tero

-BEGIN PGP SIGNATURE-
Version: 2.6

iQCVAwUAP18Mm6FEeQ41vAczAQFf8QP9G6bMzo99rRBS8S2BrjF1AHEMCD7y0Fbq
7vh6DFr4ZNsLmF69Kmy8kM7CfYH8J/akFtjaypwkAPARJlTVuWcE2QWTGT3Cw/6Y
zUoSNWzudPf21DwiyhqhwBiZCD2A1RfnGx+KfC7TesT/QIaFI2g+EtGOOd6JfPQr
dQju6P1elPo=
=QIVV
-END PGP SIGNATURE-




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


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

2003-09-10 Thread Alexey N. Vinogradov
Hello, Stefan.

You wrote 10.09.2003 @ 16:30  in mid:[EMAIL PROTECTED]
  using mailer The Bat! (v2.00.6)

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

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



-- 
Sincerely,
 Alexey.
Using TB 2.00.6 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI) 
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.4dm

   mailto:[EMAIL PROTECTED]



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


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

2003-09-10 Thread Alexey N. Vinogradov
Hello, Stefan.

You wrote 10.09.2003 @ 16:30  in mid:[EMAIL PROTECTED]
  using mailer The Bat! (v2.00.6)

ST   I tried to make everything clear, but if there are some uncovered
ST   issues and concerns, please post them here.

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

,- [ 3.2. Thread safety ]
| Any plug-in function can be called from different threads simultaneously, so all
| functions must be aware to multi-threaded model and provide appropriate level of
| protection of internal data. If a Plug-in author does not want to support
| full-blown multithreading, a simple workaround can be made by using critical
| sections (EnterCriticalSection at the start of a function and
| LeaveCriticalSection at the end, make sure the critical section is initialised
| at the DLL's entry point or in the TBP_Initialize function and the code between
| EnterCriticalSection and LeaveCriticalSection is protected from exceptions)
`-

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

-- 
Sincerely,
 Alexey.
Using TB 2.00.6 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI) 
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.4dm

   mailto:[EMAIL PROTECTED]



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


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

2003-09-10 Thread Mark Wieder
Stefan-

I see a few template object indexes which have disappeared from the
code stub you posted a while ago. I'm assuming these are gone for a
reason, and not just an oversight. Their numeric values have not been
subsumed by other indexes. In particular,

tpxAttachVCard
tpxSingleRe
tpxCookieCount
tpxRegExpText

-- 
-Mark Wieder

 Using The Bat! v1.63 Beta/7 on Windows 2000 5.0 Build 2195 Service Pack 2



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


Plugin stub (API draft compliant)

2003-09-10 Thread Mark Wieder
Here's the revised edition of my plugin stub, hopefully conforming to
the draft API document. Alexey - could you (or anyone else) please try
this under Visual C++? I've got it working under the other two
compilers and I *think* I've got the VC stuff formatted properly, but
I don't have that compiler at hand.

If that's working then this now compiles with Metrowerks Codewarrior,
Borland C++ Builder, and Visual C++.

-- 
-Mark Wieder

 Using The Bat! v1.63 Beta/7 on Windows 2000 5.0 Build 2195 Service Pack 2

TBPluginStub.zip
Description: Zip compressed data

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

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

2003-09-10 Thread NetVicious
Well,  if  you  installs a plugin into your system, it could do all it
wants because it's a program.

While the plugin install needs be maded by the user and you know which
plugin are you installing it will be ok.


lunes, 8 sep 2003 at 18:09, you wrote:

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

 I love TB because it's secure (among many other reasons), I'd hate to
 see a plugin compromise that security.


---
   
  /\/
 /  \  / \  /
/\/ e t   \/ i c i o u s
   
   [EMAIL PROTECTED]



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