Solved

Cross-Process heap like structures?

Posted on 1997-02-24
4
201 Views
Last Modified: 2013-11-20
I am making an interface extension Dll that programs will be calling.  I want the first instance to setup a heap, that is accessable in some way from ALL other processes, whether its possible to do with a heap (Which I doubt), or with a memory mapped file.  The problem is, is it needs to have data stored as if it where being dynamically created on a heap, it needs to by syncronized, etc..

In effect, it needs to be like user32.dll has a heap that all instances of user32 recognise and store window structures in, but it needs to be made with functions that are avaible from Kernel.

Does any body have any information that could help me?  I have looked thru the MSDN discs and can't find anything that was used for the same thing.

Thanks in advance!
0
Comment
Question by:roadkill
4 Comments
 
LVL 4

Expert Comment

by:mbhakta
ID: 1300321
Looks like you are looking at an application I am working on. Can you elobrate a bit please ? This might make your scenerio more clear to me.
0
 

Author Comment

by:roadkill
ID: 1300322
Ok, this program is actually a new OS that is using the Win32 driver subsystem, and makes use of the lowest level APIs to do graphics and disk access.  I need a heap that is system wide in order to allow pointers (Such as handles) to be valid in any app that class the user interface, kernel, or gdi.  I think I have found how I'm going to do this, by writing my own kernel that sits upon the Win32 kernel that has its own heap management calls.  These calls will automatically map heaps and allocate from a memory mapped file.  In theory this *should* work if I can get the file mapped to the same area of memory in each process.

If any one knows how to do that......
0
 

Expert Comment

by:asker
ID: 1300323
Hi, Roadkill:

Concerning "if I can get the file mapped to the same area of memory in each process": did you take a look at the last parameter of MapViewOfFileEx?

Regards,
Asker.
0
 
LVL 1

Accepted Solution

by:
papirus earned 150 total points
ID: 1300324
Did you try following:

in DLL-code, as defintion :

...
__declspec( dllexport ) int i = 0 ;
....

in caller-code :
...
__declspec( dllimport ) int i;
...
?
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now