Hi Pavel.
> Did you declare your procedure GetDriver as exported in a bpl?

No. I found that problem about an hour after posting. However, now, when
running the code, I get a runtime error stating  that 'Application is
not licensed to use this feature'. I wrote about this in my previous
post.

I've tried toying with my exported procedure and found that this latest
problem has to do with the fact that I'm passing an object that is of
the super-class type, and initializing it (in the GetDriver procedure)
as a subclass.

How would I go about exporting the class?

Thanks for all the help,
Assaf.



-----Original Message-----
From: Pavel Evarestov [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 21, 2005 8:45 AM
To: [email protected]
Subject: [delphi-en] Re: Problems loading a BPL package dynamically in
D7


Hi, Assaf!

>What I do is, locate the file, then run LoadPackage, and then 
>GetProcAddress, to run the procedure (GetDriver) that returns the 
>driver object (the procedure creates the proper subclass of the parent 
>driver class). However, when I run the code, the driver procedure 
>(ExecF) is unassigned, and that of course, is not what should be.

Did you declare your procedure GetDriver as exported in a bpl?

>    @ExecF := GetProcAddress(phm, 'GetDrive');

May be this is a cause of a problem? You've written, that your procedure
is called "GetDriver', but in above line of code you try to get an
address of "GetDrive".

Another question is: are there any reasons that prevent you from
creating your object straignt from the package, something like this:

aPointSensorDrv:=TPointSensorDrv.Create(...);

What is the reason for using special procedure "GetDriver"?

Best regards, Pavel Evarestov.

[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links



 


 This mail arrived via mail.pineapp.net
 
************************************************************************
************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals &
computer viruses.
************************************************************************
************


-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to