?
Solved

installing a component

Posted on 2000-03-14
8
Medium Priority
?
154 Views
Last Modified: 2010-04-04
HI
I have a component that is for D2 and I have D4. Its exeicon and it has a exeicon.dcu but it wont compile into D4 for me. Can this be done or am I doing something wrong.
Thanks
0
Comment
Question by:smurff
[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
  • 4
  • 3
8 Comments
 
LVL 5

Expert Comment

by:TheNeil
ID: 2615707
You cannot necessarily install D2 code into D4. What have you done to try installing it so far?

Try this:
Component->Install Component
Goto the 'Into New Package' tab
Set unit name to your DCU
Enter a package name
Enter a Description
Hit Ok

This will TRY to install the component for you but as I said, your code might not work in Delphi 4 and you might have to go back to the component supplier

The Neil
0
 
LVL 15

Accepted Solution

by:
simonet earned 50 total points
ID: 2615719
Delphi Compiled Units (DCU) are version-specific for the version of Delphi that compiled them.

This means that a DCU compiled with Delphi 2 will ONLY work with Delphi 2. A DCU compiled with Delphi 4.00 will not work with Delphi 4.03. They are very tied to the compiled version and to their dependencies (other DCUs) as well.

Unless you have the source (.PAS) file for the component you are trying to install, the Delphi 2 DCU file is worthless undes Delphi 3/4/5.

Neil's suggestion will not work either, because he's ignored the fact that DCUs are version-specific.

Although there can be differences in the code, you can only overcome such problems by having the source files.

Yours,

Alex
0
 
LVL 3

Author Comment

by:smurff
ID: 2619380
Thanks anyway. Dont supose you know how to change the icon of a compiled EXE file do you? That was what the component did.
Thanks again

0
Technology Partners: 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 5

Expert Comment

by:TheNeil
ID: 2619442
You can change the icon in a rather nasty way: Search through the exe at a byte level searching for the icon (as bytes), then overwrite it with a new byte stream. Amazingly it DOES work but it isn't a pretty solution

The Neil
0
 
LVL 3

Author Comment

by:smurff
ID: 2619774
i thought there might of been an api such as updateresource or something
0
 
LVL 5

Expert Comment

by:TheNeil
ID: 2619863
There is an API call to extract the icon but I don't know of any such call to put an icon back in. That doesn't mean that it doesn't exist but the chances are against it

The Neil
0
 
LVL 3

Author Comment

by:smurff
ID: 2620009
I have the component i just cant install it or get the source. The guys website is no longer available so I cant even ask him for the source.
Anyway thanks for your help

Smurff
0
 
LVL 3

Author Comment

by:smurff
ID: 2620289
I have the component i just cant install it or get the source. The guys website is no longer available so I cant even ask him for the source.
Anyway thanks for your help

Smurff
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

801 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