I am having a few major problems with DLL's and using the IS keyword. I have
two situations in a DLL which I have written which fail using the IS
Keyword.

One I pass a reference to the form which is calling the DLL, and I then
iterate thought the form's components to find the MainMenu. But when I have
this code

if (Form.Components[POs] is TMainMenu)

the code returns false even when the current component is in fact a
TMainMenu.

I have another routine which has an Assign() method, and that also fails,
because the IS fails.

 if Source is TAdrockFillObject then

This line always returns false, and the message I get is "You can not assign
a TAdrockFillObject to a TAdrockFillObject"

The problems do not show up in a standard app.

Any ideas?, I got around the MainMenu by just knowing the name of the
component, but the assign for the fill object has multiple assign's and each
one of those will also fail.

This appears to be a bug in Delphi 5...

What else can I do to determine the class?, the DLL's are loaded using the
LoadLibrary function.

Chris

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to