[Webinar] Streamline your web hosting managementRegister Today

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

GlobalAlloc

Can i exchange a datablock between two application with GlobalAlloc ?
0
snoopy_Spy
Asked:
snoopy_Spy
  • 2
  • 2
1 Solution
 
MadshiCommented:
Nope. Each application has it's own memory/address context.
For which OS do you need that? Win9x or winNT or both?
0
 
snoopy_SpyAuthor Commented:
For Both.
0
 
MadshiCommented:
Then you won't come around either using memory mapped files or using WM_COPYDATA (which uses memory mapped files internally).
Look at the documentation of

CreateFileMapping(dword(-1), ...);

You must call this in both application, then call MapViewOfFile in both applications. MapViewOfFile gives you a pointer. This pointer may be different in both applications, but they will nevertheless point to the same data block.

Regards, Madshi.
0
 
snoopy_SpyAuthor Commented:
Thanxs
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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