473,386 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Control two data sections

Hi all,
I'm writing a Win32 DLL. I'd like to create two data sections:
one shared (among all the processes that will load this DLL),
and the other not shared. Then I would like to place some
variables (or arrays) in one data section or in the other.

In assembly it's quite simple (dunno if it applies to DLLs,
though) to create several sections, each one with the wanted
attributes.. but in C++?

Must I create independently-compiled-OBJ files and then link
them together to achieve this result, or can I use some simple,
more intuitive way to declare variables to be put in this or
that section?

In assembly I'd just put a "SECTION" directive.. is there maybe
some #pragma (for VisualC++ 7.0) that allows me to use such a
simple solution also in C++?

To sum it all, I'd want to have two data sections: one RW and
the other RWS.. and then easily declare where to put each
variable.. in which of the two sections.

Thank you!
John

Jul 19 '05 #1
1 1715

"John K." <jo**@NOSPAM.com> wrote in message
news:vm**********************@twister2.libero.it.. .
Hi all,
I'm writing a Win32 DLL. I'd like to create two data sections:
one shared (among all the processes that will load this DLL),
and the other not shared. Then I would like to place some
variables (or arrays) in one data section or in the other.

In assembly it's quite simple (dunno if it applies to DLLs,
though) to create several sections, each one with the wanted
attributes.. but in C++?


The concepts of DLL's and data sections don't exist in the C++ language.
This is a C++ language group.

You need a group that discusses how one particular implementation of the C++
language interfaces with one particular platform. Suggest you ask this
question again in a Windows programming group such as
news:comp.os.ms-windows.programmer.win32

john
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Steve Gadlin | last post by:
Hi there! First off, let me apologize for the basic question... I'm very new to .NET programming. I'm building a web site using VB.NET, and am trying to include several custom user controls. ...
1
by: pemigh | last post by:
I have a report with pages breaking in the middle of text box controls. And it's not just on a line-by-line basis, but sometimes (in a situation that I can no longer recreate) just the bottom...
14
by: SD | last post by:
I am thinking about writing a text editor in C for unix sometime soon. I am just doing this to learn more about C. I want to write something like ed.c, a simple line editor. What types of data...
0
by: Alex | last post by:
Interested in more .NET stuff visit www.dedicatedsolutions.co.uk The DataList is not as powerful as the DataGrid. It requires more work from you since it has no default data presentation format....
1
by: sleigh | last post by:
Hello, I'm building a web application that will build a dynamic form based upon questions in a database. This form will have several different sections that consist of a panel containing one to...
5
by: Dinsdale | last post by:
I have an application that recieves text data via external input (i.e. serial) and displays it on the screen (we use carraige return as a delimiter). At this point I use a regular old text box and...
3
by: Raman | last post by:
Hi All, Could any one tell what exactly these two option do. I have not been able to understand why we use them because as per the gcc man page, these options increase the size of libraries...
3
by: Emma Middlebrook | last post by:
Hi there, I've been trying to implement a repeater control in an ASP.NET 2 page but I can't seem to get the layout exactly how I want and I'm not sure if it's something that I am doing wrong or...
27
by: c.lang.myself | last post by:
i just got to know there are three different sections in which we can divide our program *Text section *Data section *Bss i think text section contain our code,data section include heap,stack...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.