Delphi Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreDelphi Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 7th, 2012, 09:34 AM
Gadgeroonie Gadgeroonie is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Posts: 3 Gadgeroonie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 59 sec
Reputation Power: 0
Can i use 2 dll with same name ?

I have a dll that is written i think in delphi

i have two versions

version 1 has a bug

version 2 has the bug fixed but has a different bug

between the two of them we have all the working code i need

can i use them both ? i have tried to rename the second one and link to it for some of the functions - but am getting strange results

can it be done ?

Reply With Quote
  #2  
Old June 7th, 2012, 12:56 PM
clivew clivew is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2006
Location: Carlsbad, CA
Posts: 2,045 clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 2 h 37 m
Reputation Power: 382
It depends.
Given your strange results the answer would appear to be no.

I do not want to be dogmatic here because there are probably factors involved beyond
my personal knowledge; but I believe the following is a generally true explanation:

If the DLL is stateless then you should be able to do what you are attempting.
However, if the DLL maintains any sort of internal state then you are going to get
strange results at best and "glorious" crashes at worst.

HTH

Clive.

Reply With Quote
  #3  
Old June 7th, 2012, 01:44 PM
Gadgeroonie Gadgeroonie is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Posts: 3 Gadgeroonie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 59 sec
Reputation Power: 0
Hi Clive

thanks for the reply

what does stateless mean ?

is a delphi dll a true dll or an activex/ocx ?

Reply With Quote
  #4  
Old June 7th, 2012, 04:50 PM
clivew clivew is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2006
Location: Carlsbad, CA
Posts: 2,045 clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level)clivew User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 2 h 37 m
Reputation Power: 382
A Delphi DLL is a DLL.
An ActiveX or ocx is a special DLL (and can also be created in Delphi).

Stateless means that the DLL has no internal state.
OK. I know that might seem circular so let me explain more.

In your simple situation, it means that every call you make to the DLL is entirely self
contained and has no dependencies on any calls that have preceded it or on any code
that might have run when the DLL was first loaded.

Simple Example:

Let us assume a document scanning DLL called scan.dll.

To scan you might have to make two calls:
1. LoadThisScanner('CANON');
2. Scan;

Obviously, if you loaded a second copy of scan.dll (renamed to scan2.dll) and sent
LoadThisScanner('CANON'); to scan.dll and
Scan; to scan2.dll you will be in trouble.

That is one explanation of having state.

HTH,

Clive

Reply With Quote
  #5  
Old June 7th, 2012, 05:11 PM
Gadgeroonie Gadgeroonie is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Posts: 3 Gadgeroonie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 59 sec
Reputation Power: 0
Hi Clive

thanks for the explanation - it makes sense

i suspect you are correct

i will make multiple exe's where i swap over one function at a time and observe the results

thanks again

G.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreDelphi Programming > Can i use 2 dll with same name ?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap