Solved

Cross-Process heap like structures?

Posted on 1997-02-24
4
225 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

627 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