Link to home
Start Free TrialLog in
Avatar of FeralCTO
FeralCTO

asked on

COM Problem: "Error loading type library/DLL"

I have two Delphi 5 applications. Application ABC interacts with application XYZ via COM. ABC was recently updated and as part of that project we applied the Delphi 5 Update to our Delphi environment. XYZ has not been updated in many months, and was compiled with Delphi 5 without the Update.

During testing we discovered that ABC could not successfully start XYZ. We registered STDVCL40.DLL and the problem went away.

We tried to deploy to Production on Saturday. FYI, we run these applications on Citrix servers. The server dude registered the STDVCL40.DLL. BUT, the new version of ABC still could not successfully start up XYZ. The error message is:

"Error loading type library/DLL"

It would be great if the error specified WHICH type library/DLL could not be loaded. But, of course, it doesn't...

How can I determine what exactly is failing?

Regards,

Ron
"FeralCTO"
Avatar of Russell Libby
Russell Libby
Flag of United States of America image


Ron,

Just to confirm, the error that your getting is when abc attempts to instantiate xyz?
If this is the case, then is it your xyz that is causing this error message.
Couple of notes:

1.) Make sure that xyz has been registered, and is available on the system.
2.) You mentioned the term "application" so I am guessing these are automation servers? If so, try and run xyz by itself, to make sure that it starts (not missing dll dependancies) and that it registers itself correctly in the registry.
3.) Run / Debug xyz in the ide in order to determine which module dependancies it has. Then ensure that for straight api dependancies, the dll's exist in the path. For com dlls, make sure the dlls exist, and the registry entries are available as well.

Also found this reference as well:
Make sure that STDVCL32.DLL is on the machine in the WINDOWS\SYSTEM directory and registered. REGSVR32 STDVCL32.DLL

Hope this helps,
Russell



Avatar of FeralCTO
FeralCTO

ASKER

Thanks for your comments Russell. To follow up...

!) XYZ runs fine by itself. It also runs fine when started by the old version of ABC.

2) The previous version of ABC, which was compiled with Delphi 5 WITHOUT the update, has no trouble with the interaction with XYZ via COM.

3) We didn't make any changes to the XYZ interaction as part of this project.

4) When testing the new version of ABC, which was compiled with Delphi 5 WITH the Update, we needed to have STDVCL40.DLL registered.

5) On Saturday, when the decision was made to back out the new version of ABC and restore the old version, at first the old version got an error when we tried to start up XYZ. We unregistered STDVCL40.DLL and then re-registered STDVCL32.DLL and then the old version of ABC was able to interact with XYZ without problem.

This is a case where it works on the test Citrix server, but not on the production Citrix server. We need to determine what's different between those two servers.

The problem at least appears to revolve around the move to Delphi 5 with the Update. That would explain why we needed STDVCL40.DLL registered when we didn't need it previously.

Ron
I had the same problem with this **** using Delphi 5 / COM+.

   The problem was in the XYZ_TLB.pas file. Here is what I did :

   1) take the compiled com object
   2) Project / Import Type Library
   3) Add your COM there
   4) go to "C:\Program Files\Borland\Delphi5\Imports". There you can find the imported XYZ_TLB.pas file
   5) take it and add to project or add the directory above to search path.

   Georgi.
Here's some more info. It seems to have something to do with TStringsAdapter. We are, in fact, passing a couple of TStrings from ABC to XYZ.

Call Stack...

 | Address  | Module       | Unit          | Class           | Procedure/Method        | Line |

 | 004D3A1B | Orion2.exe   | comobj.pas    |                 | OleError                | 1318 |
 | 004D3A00 | Orion2.exe   | comobj.pas    |                 | OleError                | 1317 |
 | 004D3A3A | Orion2.exe   | comobj.pas    |                 | OleCheck                | 1325 |
 | 004D3A24 | Orion2.exe   | comobj.pas    |                 | OleCheck                | 1324 |
 | 0057CF25 | Orion2.exe   | axctrls.pas   | TStringsAdapter | Create                  | 4002 |
 | 0057CEDC | Orion2.exe   | axctrls.pas   | TStringsAdapter | Create                  | 4001 |
 | 0057D395 | Orion2.exe   | axctrls.pas   |                 | GetOleStrings           | 4070 |
 | 0057D368 | Orion2.exe   | axctrls.pas   |                 | GetOleStrings           | 4066 |
 | 00A2C989 | Orion2.exe   | Contact01.pas | TContact01Frm   | OpenProposal03          | 2795 |
 | 00A2C274 | Orion2.exe   | Contact01.pas | TContact01Frm   | OpenProposal03          | 2717 |
 | 00A2B9AD | Orion2.exe   | Contact01.pas | TContact01Frm   | OpenBtnClick            | 2561 |

We ended up changing our code to pass regulat strings instead of instances of TStringList. The problem went away.

Ron
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

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