Re[3]: TBPtest.dpr

2003-01-17 Thread Robert Rainwater

Saturday, January 18, 2003, 12:13:29 AM, you wrote:

 OK-

 I've got the test sample converted to Borland C++ Builder, I can build
 it and attempt to install it. When I do, I first get a call to
 DLL_PROCESS_ATTACH followed by an immediate call to
 DLL_PROCESS_DETACH. Then I end up with the dreaded Couldn't
 initialize message.

To me, it appears as though TB is not finding the functions at all.
Even if you aren't using stdcall, it should still find the functions.
TBP_GetStatus is called first, so in that case it wouldn't matter what
calling convention you used since there are no params.


 My guess is that the DLL header conventions are different in C++ and
 Pascal and when TB is trying to initialize the plugin it can't find
 the TBP_Initialize() function. Here's what's in my DLL header:

Where is TBP_Initialize defined in the plugin API?  I am not using
such a function.  In mingw there is an option
(--no-export-all-symbols) to prevent exporting all functions.  It
appears that you are exporting more than you should be.  Are you
defining these functions as normal methods or are they members of a
class?  Where is the short coming from?

That's all I can think of off of my head.

Rob



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



Re[4]: TBPtest.dpr

2003-01-17 Thread Mark Wieder
Rob-

Friday, January 17, 2003, 9:27:30 PM, you wrote:

RR Where is TBP_Initialize defined in the plugin API?  I am not using
RR such a function.  In mingw there is an option
RR (--no-export-all-symbols) to prevent exporting all functions.  It
RR appears that you are exporting more than you should be.  Are you
RR defining these functions as normal methods or are they members of a
RR class?  Where is the short coming from?

Plugin API? It occurs to me that I'm coming in late to this
discussion. Is there an actual published API? The only thing I've seen
is Stefan's sample.

I found TBP_Initialize() and TBP_Finalize() in Stefan's original dpr
code and figured maybe they were significant. I'm explicitly exporting
them to see if I can break out of this.

The short is an artifact of BCCP's linker. I found a compiler option
to get rid of it - the default calling convention was set to C and
when I changed it to Pascal things got somewhat better. Even so, I'm
still stuck with

Addr:004012A0 Ord:   1 (0001h) Name: TBP_Initialize(void)
Addr:004012B4 Ord:   2 (0002h) Name: TBP_Finalize(void)
Addr:004012C8 Ord:   3 (0003h) Name: TBP_GetName(char*,int)
Addr:00401354 Ord:   4 (0004h) Name: TBP_GetVersion(char*,int)
Addr:004013CC Ord:   5 (0005h) Name: TBP_GetStatus(void)
Addr:004013F0 Ord:   6 (0006h) Name: TBP_NeedConfig(void)
Addr:00401414 Ord:   7 (0007h) Name: TBP_NeedCOM(void)
Addr:00401438 Ord:   8 (0008h) Name: TBP_Setup(void)
Addr:0040145C Ord:   9 (0009h) Name: TBP_GetSpamScore(int,(int,int,char*,int)*,int)

I believe now that TB is looking for TBP_GetStatus and it's finding
TBP_GetStatus(void) and exiting. I think this is Borland's linker
getting in my way... I'll have to play around with the build options
some more.

-Mark Wieder

 Using The Bat! v1.61 on Windows 2000 5.0 Build 2195 Service Pack 2
-- 



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