Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • Last Modified:

DLL Conflict

Thanks,

I have a group of components inherited from a class bases (ATFields call) inserted on a form. If I execute the application (exe) the following function ok works. "f1.Components[i].InheritsFrom(ATField)".

function  OATTRANS.GetATFIELDByHostID(host_id: String; f1 : TForm): ATField;
var
i   : Integer;
fx   : ATField;
begin
for i := 0 to  f1.ComponentCount - 1  do
 begin
 if not f1.Components[i].InheritsFrom(ATField) then
    continue;
 fx := ATField(f1.Components[i]);
 if (fx.FIELDHOSTID = host_id) then
     begin
     result := fx;
     exit;
     end;
  end;
result := nil;
end;

Question :

I have a DLL that uses this function and it does not recognize the class ATFields father?
0
rbarzallo
Asked:
rbarzallo
1 Solution
 
DragonSlayerCommented:
I'm not sure if I understand you properly, but looking at the code, perhaps you can try

if not (f1.Components[i] is ATField) then
  Continue;



HTH
DragonSlayer
0
 
rbarzalloAuthor Commented:
Thanks for you attention, please read newly the question.

Saludos
0
 
DragonSlayerCommented:
Perhaps you need to use the RegisterClass/RegisterClasses functions?

Anyway where did you declare the ATField and its ancestor classes?
0
 
CleanupPingCommented:
rbarzallo:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
Lukasz LachCommented:
rbarzallo,
No comment has been added lately (18 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Award points to DragonSlayer http:#7173281

Please leave any comments here within 7 days.

-- Please DO NOT accept this comment as an answer ! --

Thanks,

anAKiN
EE Cleanup Volunteer
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now