how to change a Image's picture in a Dll??

From: ari (aiirii_at_163.net)
Date: 12/29/03


Date: Mon, 29 Dec 2003 20:02:10 +0800

hi all,
   I got some troubles when I use such codes below in a Dll file,

procedure LoadIma(image1: Pimage; strFileName: string); stdcall;
begin
  try
    if FileExists(strFileName) then
    begin
      Image1.Picture.LoadFromFile(strFileName);
    end
    else
      Showmessage('FileNotExists');
  except
    on E: Exception do ShowMessage(E.Message);
  end;
end;

When I use this procedure, i got a Warn Message: Address violation at ...
How can I solve it?
regards,
                                                    Ari



Relevant Pages

  • Re: how to change a Images picture in a Dll??
    ... > I got some troubles when I use such codes below in a Dll file, ... And pass the image typed as TImage, you never need pointer-to-object types ... Object variables already ...
    (borland.public.delphi.language.objectpascal)
  • how to get the feature type pointer from the LPDISPATCH
    ... to access the feature named extrude2 from an active part, ... LPFEATURE pCurFeature; ... debug the codes which would create dll file, anyone can give me a hint? ...
    (comp.cad.solidworks)