Solved

COM Problem: "Error loading type library/DLL"

Posted on 2004-04-05
8
1,134 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

685 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