🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.winforms.controls.using
Article #480

Assembly Part 3 :)

#480
From: Stefanidis Dimitris
Date: Fri, 15 Oct 2004 10:26
31 lines
1562 bytes
Package3.dll contains Unit1 wich has TForm1

Class Procedure TForm1.Run(aVariable:String);
begin
  Wirth Self.Create(Nil) do
     begin
       Edit1.Text := aVariable;
       ShowModal;
     end;
end;


On Caller Exe
  var
   ass:Assembly;
   typ:System.Type;
   cltyp:System.Type;
   meth:MethodInfo;
   cl:TObject;
begin
  ass := Assembly.LoadFrom('Package3.dll');
  typ := ass.GetType('Unit1.TForm1');
  meth := typ.GetMethod('RUN');
  cltyp := typ.GetNestedType('@Meta'+typ.Name);
  cl := cltyp.GetField('@Instance').GetValue(Nil);
  meth.Invoke(nil,[cl,'TEST']);  <<--- Exception Null reference
end;



I think now we cover all posiblities :)
Technical Details
Message-ID: <416fa5a0$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1eff29,31c3a191bee3f752,start
X-Google-Attributes: gid1eff29,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Stefanidis Dimitris" <distef01@yahoo.gr>
Newsgroups: borland.public.delphi.winforms.controls.using
Subject: Assembly Part 3 :)
Date: Fri, 15 Oct 2004 13:26:31 +0300
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 194.30.233.129
Message-ID: <416fa5a0$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1097835936 194.30.233.129 (15 Oct 2004 03:25:36 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail