Solved

COM Problem: "Error loading type library/DLL"

Posted on 2004-04-05
8
1,014 Views
Last Modified: 2007-12-19
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"
0
Comment
Question by:FeralCTO
8 Comments
 
LVL 26

Expert Comment

by:Russell Libby
ID: 10758184

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



0
 
LVL 1

Author Comment

by:FeralCTO
ID: 10758318
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
0
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 10766475
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.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 1

Author Comment

by:FeralCTO
ID: 10776014
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 |

0
 
LVL 1

Author Comment

by:FeralCTO
ID: 10860690
We ended up changing our code to pass regulat strings instead of instances of TStringList. The problem went away.

Ron
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 13276129
PAQed with points refunded (500)

modulo
Community Support Moderator
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now