Share global variables in different DLL's 
Author Message
 Share global variables in different DLL's

Hello Everyone.

Is it a easy way to share global variables between dll's in a project.

Thanks in advance
Trond Eirik Paulsen



Thu, 26 Jul 2001 03:00:00 GMT  
 Share global variables in different DLL's
Quote:
>Is it a easy way to share global variables between dll's in a project.

I assume you mean something like, "Is there an easy way to declare a whole
bunch of global variables in one DLL, and be able to use that same list of
variables in another DLL easily."

1) You can use cut and paste. You go into the Global properties, edit the data
screen as text, copy the entire block, go to your next DLL and paste in the
results. Then you must change the storage class from Default to External-DLL
for every variable. You can then save this new set of data definitions as text
to to pasted into another app.

2) You can use the new capabilities in the C5 dct for declaring global
variables. I haven't explored this much.

3) You can use DEF (check with Mitten Software) to again define variables in
the dictionary.

4) You can make your own include files. This is messy, because you need to edit
the 'Inside the Export List' embed for each global variable.

Hope this helps,

George Lehmann
Horizon Business Concepts (C5-ABC)



Thu, 26 Jul 2001 03:00:00 GMT  
 Share global variables in different DLL's

yes, same as files, check source code that is generated by clarion

variable has to be declared in first dll and in all other dll's and exe's
app's it should be declared as external.... that's all...

Quote:

> Hello Everyone.

> Is it a easy way to share global variables between dll's in a project.

> Thanks in advance
> Trond Eirik Paulsen


  iveky.vcf
< 1K Download


Thu, 26 Jul 2001 03:00:00 GMT  
 Share global variables in different DLL's
Hi Trond,

Yes there is. You have to create one DLL that have global data
declarations and all other DLL's must have same data declarations but with
Storage Class set to EXTERNAL DLL.

Best regards,
Alex

Quote:

> Hello Everyone.

> Is it a easy way to share global variables between dll's in a project.

> Thanks in advance
> Trond Eirik Paulsen




Thu, 26 Jul 2001 03:00:00 GMT  
 Share global variables in different DLL's
What I do is to declare the globals in the "Global DLL" and make certain
the variable is exported.  I then build an INCLUDE file (say
FileName.clw) with the appropriate declarations:

   ....
   ....
VarName1 String(10),EXTERNAL,DLL(dll_mode)
   ....
   ....

I then add the statement in my Globals, Before File Declarations (don't
know about ABC).
  INCLUDE('FileName.clw')

This makes it relatively easy.  You declare it once in the Global, and
then add it to the "include file" which is included and compiled into
all my DLLs and Apps.

HTH

Al

Quote:

> Hello Everyone.

> Is it a easy way to share global variables between dll's in a project.

> Thanks in advance
> Trond Eirik Paulsen




Fri, 27 Jul 2001 03:00:00 GMT  
 Share global variables in different DLL's
Hi Trond,
You might want to check out my ABC DLL Toolkit.  It lets you do this using
include files and will set the proper External attributes where necessary.

Quote:

> Hello Everyone.

> Is it a easy way to share global variables between dll's in a project.

> Thanks in advance
> Trond Eirik Paulsen


--
! Jim Katz
! Certified Clarion Developer
! Author: ABC DLL Toolkit  Maintainer: DEF for ABC,DET for Legacy          
! Web Site: http://www.iag.net/~jimkatz/
! Company:  iTradeZone,Inc.
! Using Clarion for Windows - Always looking for the simpler solution.


Fri, 27 Jul 2001 03:00:00 GMT  
 Share global variables in different DLL's

Quote:

>Is it a easy way to share global variables between dll's in a project.

What you need to do is simply to declare them all in one DLL, then cut and
paste into all calling apps. The trick is to declare them all inside a
group, which is then easily changed to external. That way, you don't have to
change the attribute on 101 variables individually!
Daan


Fri, 27 Jul 2001 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Where declaring global variables when using exe + dll's with different data-dictionaries

2. Problem with sharing global variables in DLL

3. DLL's and global variables

4. g95 / Linux / 'shared global COMMON'

5. un-'upvar'ing/un-'global'ing variables

6. Global variables in different moduls

7. Accessing global variables by two different wish instances

8. Sharing global variable(s)

9. Global variables to share data between separate programs.

10. Share Global Variables data between two separate programs in one machine

11. Sharing variable between different functions in a Script?

12. Question: Global Signals vs Shared Variables

 

 
Powered by phpBB® Forum Software