Is dll developed in Delphi 6 works on Delphi 2?

I have a one dll, whose work is to creates a form with some normal vcl controls, print selected tables and email some reports. It was developed in Delphi 6. Can any other application which was developed in Delphi 2 use that dll.? If not, please let me know in which areas i need change. The dll work is only to print and email. 

With regards,
Srikanth Varma
0
Srikanth
7/6/2011 5:45:48 AM
embarcadero.delphi.ole 598 articles. 1 followers. Follow

5 Replies
623 Views

Similar Articles

[PageSpeed] 33

Srikanth varma wrote:

> I have a one dll, whose work is to creates a form with some normal
> vcl controls, print selected tables and email some reports. It was
> developed in Delphi 6. Can any other application which was developed
> in Delphi 2 use that dll.? 

Delphi 2, really? That version is, what, 15 years out of date...

It all depends on the DLL interface, which types of parameters are
passed to the DLL, whether it needs to use a shared memory manager with
the host exe, or even share packages with the host. If the DLL was
build using Windows API compatible parameter types only it should work.

-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://codenewsfast.com
http://groups.google.com
0
Peter
7/6/2011 6:03:35 PM
> It all depends on the DLL interface, which types of parameters are
> passed to the DLL, whether it needs to use a shared memory manager with
> the host exe, or even share packages with the host. If the DLL was
> build using Windows API compatible parameter types only it should work.

The dll work is to create a form with some third party components like exportToPdf and some Reporting components. Only D6 supports these components but D2 not. Will that dll work in D2?
0
Srikanth
7/7/2011 11:10:54 AM
Srikanth varma wrote:

> > It all depends on the DLL interface, which types of parameters are
> > passed to the DLL, whether it needs to use a shared memory manager
> > with the host exe, or even share packages with the host. If the DLL
> > was build using Windows API compatible parameter types only it
> > should work.
> 
> The dll work is to create a form with some third party components
> like exportToPdf and some Reporting components. Only D6 supports
> these components but D2 not. Will that dll work in D2?

If these components are only used internally in the DLL, then, yes, it
should work. But this all depends on how the host application interacts
with the DLL, and you have told us nothing about that yet.

What functions does the DLL export for the host application to call?
Post their declaration and we may be able to give you a more specific
verdict.

-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://codenewsfast.com
http://groups.google.com
0
Peter
7/7/2011 5:08:06 PM
> If these components are only used internally in the DLL, then, yes, it
> should work. But this all depends on how the host application interacts
> with the DLL, and you have told us nothing about that yet.
> What functions does the DLL export for the host application to call?
> Post their declaration and we may be able to give you a more specific
> verdict.

    DLLInstance := LoadLibrary(Pchar(sDll));
    if DLLInstance = 0 then
    begin
         .....
    end;
    @CreateReportD6 := GetProcAddress(DLLInstance, 'CreateReportD6');
    if ((@CreateReportD6 <> nil)) then
    begin
      if not CreateReportD6(Arrgs, richEdit1) then
         ..........
Arrgs is an Variant array and the second parameter is RichEdit.
0
Srikanth
7/8/2011 5:06:27 AM
Srikanth varma wrote:

> > If these components are only used internally in the DLL, then, yes,
> > it should work. But this all depends on how the host application
> > interacts with the DLL, and you have told us nothing about that yet.
> > What functions does the DLL export for the host application to call?
> > Post their declaration and we may be able to give you a more
> > specific verdict.
> 
>     DLLInstance := LoadLibrary(Pchar(sDll));
>     if DLLInstance = 0 then
>     begin
>          .....
>     end;
>     @CreateReportD6 := GetProcAddress(DLLInstance, 'CreateReportD6');
>     if ((@CreateReportD6 <> nil)) then
>     begin
>       if not CreateReportD6(Arrgs, richEdit1) then
>          ..........
> Arrgs is an Variant array and the second parameter is RichEdit.

The Variant will not be a problem, but the richedit parameter will
likely cause problems since the DLL will assume that it is a D6
TRichedit, which it is not. Whether it actually will cause a problem
depends on what the DLL does with this parameter, and how big the
changes in TRichedit and its ancestors were between D2 and D6. I don't
have D2 around anymore, so cannot check this, but there are probably
substantial changes since the VCL in D6 was modified to make it easier
to reuse as much as possible with Kylix.

I assume you cannot change the D2 application, perhaps not even rebuild
it after a minor change. Otherwise I would suggest that you change the
parameter to a window handle (HWND) and pass the richedit1.Handle. The
DLL then also needs to be modified, it has to use API methods (send
messages) with this handle to get data out of the richedit or modify
its content.

-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://codenewsfast.com
http://groups.google.com
0
Peter
7/8/2011 7:51:16 AM
Reply:

Similar Artilces:

Trying to call a .DLL from Delphi XE (used to work with Delphi 6 :-) )
Hi everyone, I have a problem where perhaps some one could help point me in the right direction. In Delphi 6 I used a stand alone package to train a neural netowrk,. The trained neural network was stored as a .DEF file. The standalone software provided a .DLL and Delphi code to call the network and get the prediced values from your sw. (The .DLL was created in 2002 and apparently is 32 bit.) I have'nt used it for years but am now coming back to it.... I now use Delphi XE on Windows 7 (32 bit) The old .exe's I had compiled from that time work fine. However in Delphi XE ...

Calling Delphi 6 DLL from Delphi 2010
We have a Delphi 6 dll that has a PChar passed to it. The dll function then does a search and returns a PCHar. This works good using Delphi 6 to call and recieve the dll result. We have upgraded our calling program to Delphi 2010 and most of the time, the value is passed back just fine. However, we do have times when we get an access violation, when calling the dll. The dll does process the request. Below is the code. Has anyone had a similar issue using an older version Delphi Dll with Delphi 2010? I am sure that Unicode has something to do with it, but not sure how to fix th...

from delphi 6 to delphi 2010
Hi. It is possible, with component RX, dxforumlibrary, InfoPower3000Pro, StringAlignGrid. Accepts communication BDE. Thank by comments. excequiel arostica wrote: >Hi. > It is possible, with component RX, dxforumlibrary, >InfoPower3000Pro, StringAlignGrid. Accepts communication BDE. > >Thank by comments. Rx is dead and sources are taken over by jcl/jvcl. I dont know about the rest of the components and i have no experiences with bde over the last 9 years. excequiel arostica wrote: > Hi. > It is possible, with component RX, dxforumlibrary,...

Delphi 5 to Delphi 6 and up
Dear List, Trying to add 7Zip compression support to my delphi application. I am using the ported 7Zip sdk (see their website, they have a link). I am stumped on how to rewrite a single function: function ReverseDecode(var Models: array of SmallInt; ....): ..... where the input is mostly a fixed size array of SmallInt. This code perfectly compiles and functions in Delphi 6 and up, but in Delphi 5 I get the error: There is no overloaded version of 'ReverseDecode' that can be called with these arguments And obviously, the input (fixed) isn't the same as the param de...

dll fails when compiled with delphi 2010, but works with delphi 7
I may be doing good if someone can just point me to the right forum I have not created a dll for some time and have not written one with 2010 before. The dll I am creating will be called as a cfx function by either a ColdFusion or BlueDragon webserver. I have written cfx DLLs in the past. The function declaration is below, it is the standard declaration from ColdFusion or Bluegradon documention on creating a CFX. procedure ProcessTagRequest(Request: TCFXRequest); export; cdecl; Since this was the first time using 2010 I wrote a very basic function to build off that was not much mor...

Delphi and Delphi for .Net
It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. I would like to know is it true all .Net application is slower than Win32 native applicaiton or it is Delphi for .Net only. Your information is great appreciated, Inung On 2011-06-21 18:20:17 +0100, Inung Huang said: > It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. > I would like to know is it true all .Net application is slower than > Win32 native applicaiton or it is Delphi for .Net only. If you are only running the code in the application once then, yes, yo...

Delphi 5 to Delphi 6 conversion
Hi We are moving our product from D5 to D6. I have dealt with all the deprecated functions. However, we are getting various platform specifc warnings. These include: Symbol 'FileGetAttr' is specific to a platform Symbol 'FileSetAttr' is specific to a platform Symbol 'faReadOnly' is specific to a platform We want this conversion to be carried out correctly. We don't view the simple solution of switching off those warnings or symbols as being the correct way. What we want is the same platform independence as other functions. For example, all o...

Delphi 6 and Delphi 2010 Install same machine
I'm currently still on Delphi 6 for some legacy software, but I'm looking at installing Delphi 2010 on my Windows XP machine. Are there any known issues with installing D2010 on an XP machine that already has Delphi 6 installed? (I'm not talking about updating the projects code/controls/etc, just running the IDE's). > I'm currently still on Delphi 6 for some legacy software, but I'm > looking at installing Delphi 2010 on my Windows XP machine. > > Are there any known issues with installing D2010 on an XP machine that > already has Delphi 6 i...

Delphi 6 to Delphi 2010 upgrade and ADO
We have an application written in Delphi 6 Professional that uses ADO to access databases servers that may be on other PCs in our network. We want to move to Delphi 2010 but can't decide if we need Professional or Enterprise. 2010 Pro has dbGO - will this give us the same functionality as the ADO components we use in Delphi 6 Pro? Thanks, Keith > 2010 Pro has dbGO - will this give us the same functionality as the > ADO components we use in Delphi 6 Pro? Yes. > {quote:title=Joachim Uersfeld wrote:}{quote} > > 2010 Pro has dbGO - will this give us the same func...

Error on Delphi 6 but not on Delphi Xe for Ftp
I am Experimenting with get a file from our webside server via Ftp. I have 2 Machines 1 a laptop runing XP Delphi 6 Indy 10.5.8.0 An a machine runing Window 7 Delphi XE2 with Indy 10.5.8.0. I am using the Same Code on Both. procedure TFrmMain.ProcessItemDalySpecial; var PathDest : String; FileName : String; begin with FrmTb2 do begin if ReadIniBoolean(IniCfg,'FTP','UseFtpDaly') then begin Ftp.Host := ReadIniStr(IniCfg,'FTP','HostDaly'); Ftp.Port := ReadIniInt(IniCfg,'FTP'...

delphi Win32 using delphi .NET dll
Hi, I'm trying to use a delphi.NET dll in delphi.WIN32. I am currently using CodeGear Delphi 2007 with version2(base version) of .NET I can get the dll to import into the WIN32 application the only problem is when i include things such as: "using Classes,DateUtils, SysUtils" in the .NET dll the win32 application will instantly hang when any of the dll functions are called. Any help would be great thanks. Also I have tried this example and it also crashes for me? http://cc.embarcadero.com/Item/22688 -Braden I also found this.. "The problem is that, wehn you instal...

Language like Delphi 6 or Delphi 7
Hi I like to make application what will connect to web services(SOAP or REST) and send data to server via HTTPS. I have previous experience with Delphi 6 and Delphi 7.I know that language in Delphi 2009 is changed. Which is the last Delhi(Delphi 2005, Delphi 2009) what have the languages like Delphi 6 or Delphi 7. Additional ,which edition(home,professional ,architect) I should use if i like to achieve my task? Pero perov wrote: > I know that language in Delphi 2009 is changed. That is not true. > Which is the last Delhi(Delphi 2005, Delphi 2009) what > have the lan...

Problem with Delphi 6 to Delphi 7 upgrade
I have just purchased Delphi XE because I have an immediate need of D7 which came for free with XE. I downloaded and installed D7 and I think I applied the Update 1 that I had also downloaded. After much messing around with old components, I have finally attempted to compile my D6 project with D7. I get the following error:- [Fatal Error] apm.dpr(225): Unit ExtDlgs was compiled with a different version of ExtCtrls.TPanel I have checked the library paths all point to D7 versions of everything and now am at a loss to know what to do next. Also checked the sequence to make sure that al...

ShareMem Delphi 6 --> Delphi 2009
I have just upgraded from Delphi 6 to Delphi 2009. My software uses about 20 files, plus literally dozens more plug-ins. Every project has ShareMem as its first unit and borlndmm.dll is distributed with the software. I am aware that the Borland Memory Manager was replaced to use FastMM quite some time ago. Will I have to rebuild every EXE and DLL in DElphi 2009 that uses ShareMem, or will supplying the new borlndmm.dll be enough? i.e. I would like to just update the main application EXEs and DLLs, but leave the plug-ins alone. Will this work? Thanks, Jason. -- Jason Sweby ...

Web resources about - Is dll developed in Delphi 6 works on Delphi 2? - embarcadero.delphi.ole

Least developed country - Wikipedia, the free encyclopedia
Least developed country ( LDC ) is the name given to a country which, according to the United Nations , exhibits the lowest indicators of socioeconomic ...

Developed country - Wikipedia, the free encyclopedia
A developed country can be defined through economic growth and security. Most commonly the criteria for evaluating the degree of development ...

Koloid - hand developed photography on the App Store on iTunes
Get Koloid - hand developed photography on the App Store. See screenshots and ratings, and read customer reviews.

All sizes - Buzzword Bingo: Crowdsourcing = Content developed by a group of people - Flickr - Photo Sharing ...
Flickr is almost certainly the best online photo management and sharing application in the world. Show off your favorite photos and videos to ...

New Method Developed to Detect Ebola Virus - WCS - YouTube
http://www.wcs.org A group of international scientists led by the Wildlife Conservation Society (WCS) have developed a new method to study Ebola ...

Islamic State and Jabhat al-Nusra seize wheat farms developed with Aussie aid
Thousands of hectares of wheat-farming land in Syria and Ira benefiting from a long term multimillion-dollar Australian aid program are under ...

High visibility clothing for females developed by Queensland woman
While they might be getting good salaries, women in the mining industry haven't had good options when it comes to their work uniforms.

US, Israel developed Flame computer virus: report
US, Israel developed Flame computer virus: report

Australia ranked worst-performing developed nation on climate performance
Australia is the worst-performing developed nation when it comes to climate-change action, a survey by European non-government organisations ...

Eye-control software developed for phones, tablets
Eye-control software developed for phones, tablets

Resources last updated: 12/8/2015 2:58:39 PM