Re: Active X Library problem
- From: erewhon@xxxxxxxxxx (J French)
- Date: Sat, 25 Jun 2005 08:05:37 +0000 (UTC)
On Sat, 25 Jun 2005 08:31:11 +0200, Meunier Michel
<michel.meunier10@xxxxxxxxxx> wrote:
<snip>
>> BTW ShowMessage is in Dialogs so I think that you might really mean
>> Window.MessageBox
>That's true ShowMessage is in Dialogs, but the problem is that also I
>need to load a standard dll inside the active x library, for that I need
>LoadLibrary (within Windows unit) and my library also crash!!
>I don't know if what I say is clear, but to be simple:
>uses windows inside my active library ---> crash at initialization
>uses dialogs inside my active library ---> crash at initialization
Create another Unit - call it MSupport.pas
Let that unit Use Windows.pas and anything else it feels like
Then you replace Windows in the AX Library's uses list with MSupport
In the AX Library code you can use:
MSupport.LoadLibrary which just calls Windows.LoadLibrary
There are other methods, but I reckon that this one is the easiest for
you to implement and most important, support in the long run.
I'm /not/ going to suggest that you group your 'sensitive' routines at
the bottom of the AX Library's code, following another Uses clause
Nor am I going to suggest that you copy the required DLL declarations
from Windows.pas and duplicate them (Delphi does do a bit of that, but
IMO it is dirty and unnecessary)
.
- References:
- Active X Library problem
- From: Meunier Michel
- Re: Active X Library problem
- From: J French
- Re: Active X Library problem
- From: Meunier Michel
- Active X Library problem
- Prev by Date: Re: Active X Library problem
- Next by Date: Re: cookies
- Previous by thread: Re: Active X Library problem
- Next by thread: C++ Builder 6
- Index(es):