Solved

COM Problem: "Error loading type library/DLL"

Posted on 2004-04-05
8
1,111 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Title # Comments Views Activity
Internet Explorer View Settings Question 15 116
Mobile Keyboard covers the display of the TMemo 3 96
Delphi Mdi application Child forms get behind control 7 272
Magic Software info 18 138
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
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…

860 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