Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

Cross-Process heap like structures?

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
roadkill
Asked:
roadkill
1 Solution
 
mbhaktaCommented:
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
 
roadkillAuthor Commented:
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
 
askerCommented:
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
 
papirusCommented:
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 Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now