Use Named Pipes and Shared Memory for inter process communication with a child process or two

  I wanted to inject some very low impact code that would run in any “parent” process, like Notepad or Excel or Visual Studio. I wanted to have some User Interface for the data that my injected code gathered about the parent process, and that would work best in a different “child” process, preferably using…


Use a Custom Allocator for your STL container

Last time in Play around with .Net Dictionaries and STL maps, we talked about various containers. Today we’ll write our own allocator for a particular STL container.   A general purpose allocator, like malloc in the C Runtime library or HeapAlloc in the Windows API needs to handle allocation requests of various sizes. The calls…


Play around with .Net Dictionaries and STL maps

Last time (Adventures in interop code: explore string interop memory) we investigated sharing memory between native and managed code, or between processes.   Data structures are very useful: things like arrays, structures, lists, dictionaries, stacks, queues, etc. are used throughout programming.   In the early days of programming, if you wanted to use any of…


Adventures in interop code: explore string interop memory

  In Create an ActiveX control using ATL that you can use from Fox, Excel, VB6, VB.Net, I showed how to create a control (with which the user can interact) which can be hosted in many places.   Today’s sample creates a class in C++ that doesn’t necessarily have UI, and thus isn’t visually hosted,…

1