Link to home
Start Free TrialLog in
Avatar of Karma121397
Karma121397

asked on

EOleSysError under NT5_Beta 2.

When trying to start my app under NT5_Beta 2 I get the exception "EOleSysError, Class not registered." What does this error mean and is there an easy way to fix this? Btw, I'm using Delphi 4.0(with the update).

Thanks
Avatar of Madshi
Madshi

Karma,

probably you're using a COM object somewhere in your program that isn't registered yet. Do you have an 3rd party OCX, ActiveX or components or are you using COM objects directly?
Another question: If you use windows interfaces (=COM object) like IShellLink - have you called "CoInitialize"?

Regards, Madshi.
Avatar of Karma121397

ASKER

I'm not using any 3rd party OCX, ActiveX, or any external components. As for using COM objects directly.. I have no clue. Could you give me an example of what or where to look to determine this.
Well I must have done something or added something recently because I get the same error under Win98 now.
"Another question: If you use windows interfaces (=COM object) like IShellLink - have you called "CoInitialize"? ":
I did add a component that encapsulates the SHFileOperation() function(TFileOperation), does this count as a COM objcet and what would I need to do inorder to make sure I have called CoInitialize?
I'm not sure about SHFileOperation.
Please edit your project file.

var CoInitSucc : boolean = false;            // add this line
begin
  CoInitSucc:=succeeded(CoInitialize(nil));  // add this
  try                                        // and this
    Application.Initialize;
    Application.CreateForm...
    Application.Run;
  finally if CoInitSucc then CoUnInitialize; end;  // and this
end;

It's just a try. If it works - great. If not - we'll look for another solution.

Regards, Madshi.
{$R *.RES}
var CoInitSucc : boolean = false;            // add this line
begin
  CoInitSucc:=succeeded(CoInitialize(nil));  // add this
  try                                        // and this
    Application.Initialize;
    Application.CreateForm(TfrmMain, frmMain);
    Application.CreateForm(TfrmCrcArchiveAdd, frmCrcArchiveAdd);
    Application.CreateForm(TfrmProgressDlg, frmProgressDlg);
    Application.CreateForm(TfrmErrorLog, frmErrorLog);
    Application.CreateForm(TfrmOptions, frmOptions);
    Application.Run;
   finally if CoInitSucc then CoUnInitialize;
end;  // and this

This what I added to the project file, I get the following errors:
[Error] CRChecker.dpr(14): Undeclared identifier: 'succeeded'
[Error] CRChecker.dpr(23): Undeclared identifier: 'CoUnInitialize'
Please add ActiveX to the uses statement.

uses ActiveX, Forms,
     ...;

Regards, Madshi.
P.S: There's an "end" missing, too. The finally has it's own "end".
Well I tracked it down to the THTML component. If I remove it the error goes away. Any idea why it's giving me the error? Here is what I'm using HTML for(it just checks a file on my web server to see if the user has the most recent version).
Call to start the lookup:
HTML.RequestDoc('www.myserver.com/test.ver');

HTML ParseComplete Event:
procedure TfrmMain.HTMLParseComplete(Sender: TObject);
begin
  If (Length(HTML.SourceText) > 4) or (HTML.SourceText = '') then
    ShowMessage('Error Checking Version. Please try again later.')
  else if NeedToUpdate('2.04', HTML.SourceText) = True then
    ShowMessage('You need to update! Version ' + HTML.SourceText + ' has been released.')
  else
    ShowMessage('You have the most recent version');
  MainMenuCheckForUpdate.Enabled := True;
  TrayMenuCheckForUpdate.Enabled := True;
end;
Ok it compiled but I still have the error =(
Have you tried CoInitialize? Didn't it help?

If not, I think this HTML component tries to create a COM object that is not known (yet) by windows. Do you have the source code of this component? Then look for "QueryInterface" and write me these lines (if not too many).

Regards, Madshi.

P.S: Now it is almost 20:00 (PM) in Germany. So you'll have to wait some hours for my next comment. Perhaps someone else will have a try... Bon nuit.   :-)
Ooops, have not seen your last comment. Ok, please look for "QueryInterface".
Does this component come with a DLL?
Thanks for the help, go get some sleep =) The HTML component shipped with Delphi 4.0, it's under the Internet tab. QueryInterface didn't return any matches on a search of the files in my project.
I looked at this component, but unfortunately I've sources for all Delphi components except the internet components.
So I can't help you. The HTML component is an ActiveX-Component. I don't know exactly what is the problem. Seems that a needed class is not registered. I looked at the help file and found the following support eMail: "dev_support@netmanage.com". Please write your problem to this eMail.

Regards, Madshi.
Ok thanks for the info, you've been a great help. Please answer the question so I can give you creidt.
ASKER CERTIFIED SOLUTION
Avatar of Madshi
Madshi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Here is what I got in the Delphi support area.....
----------------
Error: "EOleSysError : Error loading type library/DLL"

          Question:

          The client machine displays error "EOleSysError: Error loading type library/DLL".
          DBCLIENT.DLL and IDPROV32.DLL files are present in the BDE directory of Delphi.

          Answer:

          Make sure that STDVCL32.DLL is on the machine in the
          WINDOWS\SYSTEM directory and registered.

            REGSVR32 STDVCL32.DLL
-------------
Regards,
Viktor Ivanov