Ole / Com madness

Giganews Newsgroups
Subject: Ole / Com madness
Posted by:  Tom Peters (tom_vip…@msn.com)
Date: Sat, 23 Sep 2006

If I use:

uses
    ActiveX;

if CoInitialize(nil)=S_OK then begin
  showmessage('here');
  try
  finally
  CoUninitialize;
  end;
end;

I get a messagebox.  If I use:

ActiveX, ComObj;

if CoInitialize(nil)=S_OK then begin
  showmessage('here');
  try
  finally
  CoUninitialize;
  end;
end;

I do not get a messagebox.  The CoInitialize fails.  Anyone know, how to
work around this.  I need the ComObj unit included in my project, for some
procedures contained with-in.

Replies