Any IPC (i.e. interprocess communication mechanism) will do. You have a
variety to pick from: shared section, memory mapped files (MMF), RPC, DCOM,
pipes, sockets, etc.
I would say that DCOM is the easiest way because you won't have to think
about marshaling data between processes. I assume that you know that each
process has its own memory space and thus you can't "simply share" pointers.
Just expose a COM object from you service and let the client to call
CoCreateInstance to obtain the pointer.
As a viable alternative for speed-effective cases you can consider MMF.
Check MSDN on OpenFileMapping/CreateFileMapping and MapViewOfFile. Note
though that you won't have certain benefits of DCOM infrastructure: you'll
have to marshal the data in and out yourself, and if you need to impersonate
the client you'll have to roll your own version of impersonation.
You can consider using pipes as well. See MSDN on CreateNamedPipe and
CreateFile. Pipes support impersonation, but you still have to marshal the
I'm sure others will mention how to implement shared section in a DLL and
load it into both process. I'd rather discourage you from using this method.
It's more prone to bugs, doesn't scale well, has lots of security