Using INamedBuffer

delphi package - easy access to kernel objects etc.

Using INamedBuffer

Postby Cristian » Thu Oct 02, 2008 1:22 pm

Hi all,

I'm new in madshi!!
I have to say that is a great library!
But not very good documented, at least in some parts.

I'm developing a windows service, and I have created a monitor application to receive status information and interact with that service.

I think the best way to do this is by using INamedBuffer.
However I cant figure out how to use that interface.
I can create it, but how can I read/write to that buffer?
Can the read function be blocking and/or non-blocking?

Thanks for the tips!!

Posts: 1
Joined: Thu Oct 02, 2008 1:11 pm

Postby madshi » Wed Oct 08, 2008 8:45 pm


INamedBuffer is just a simple encapsulation of the win32 APIs Create/OpenFileMapping, (Un)MapViewOfFile and CloseHandle.

Basically you can create a "shared" memory area this way to which all of your processes can write. "INamedBuffer.Memory" returns a point to the shared buffer. You can use the pointer for reading from or writing to the buffer. Reading/writing does not block. You can realize something like that yourself by making use of a named mutex or semaphore.

Alternatively you could also check out madCodeHook which contains direct IPC functions for communication between different processes. madCodeHook licensing is quite restricted, though.
Site Admin
Posts: 9265
Joined: Sun Mar 21, 2004 5:25 pm

Return to madKernel

Who is online

Users browsing this forum: Google [Bot] and 1 guest