Solved

COM Problem: "Error loading type library/DLL"

Posted on 2004-04-05
8
1,242 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month9 days, 1 hour left to enroll

617 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