(* Collection of code snippets by Arne Vajhøj *)
(* (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) *)
program CProgram2;

uses
  ActiveX,ComObj;

var
  a, b, c : integer;
  s, s2 : widestring;
  sdn : Variant;

begin
  CoInitialize(nil);
  sdn := CreateOLEObject('COM.SNat');
  a := 123;
  b := 456;
  c := sdn.Add(a, b);
  writeln(c);
  s := 'ABC';
  s2 := sdn.Dup(s);
  writeln(s2);
  sdn.Iv := 123;
  sdn.Sv := 'ABC';
  sdn.M;
  writeln(sdn.Iv:1,' ',sdn.Sv);
  CoUninitialize;
end.

