Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shared data in dlls

Status
Not open for further replies.

Kempelen

Programmer
Mar 1, 2008
1
ES
In MS VC you can declare to preprocesor how to declare global data:

#pragma data_seg(".gdata")
int i=0;
int z=1;
...
#pragma data_seg()

and then linking with /Section:.gata,WRS

I dont know how to do this on Borland. I saw the linker has the option, but dont know the commands in the code (the above only run in microsoft, no borland). Not help in help files of bcc55. difficult question

I am programming a DLL that launches threads. In DLL, when a thread is launched they have its own global variables copy, so not shared data between them. The solution is declare a data segment shared, as MS do.

Does anybody know how can I do this in borland? maybe any workaround if not possible.?

thx.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top