Solved

Cross-Process heap like structures?

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
dog bark java program 15 94
move a line in eclipse 3 99
no14 challenge 14 66
Capture logon name 13 70
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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 quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

815 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

7 Experts available now in Live!

Get 1:1 Help Now