Solved

Cross-Process heap like structures?

Posted on 1997-02-24
4
205 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

24 Experts available now in Live!

Get 1:1 Help Now