What’s in a PDB file? Use the Debug Interface Access SDK

It’s easy to use C# code and MSDia140.dll from the Debug Interface Access SDK to examine what’s inside a PDB. A PDB is Program Database which is generated when an executable such as an EXE or DLL is built. It includes a lot of information about the file that is very useful for a debugger….

0

Mapped Files give very fast access to huge amounts of data

Sometimes you write a program and it requires lots of extra storage. Perhaps it needs to deal with lots of information. If the requirements are large there are several alternatives to consider: 1. use main process memory (HeapAlloc, VirtualAlloc, or any API that eventually calls these, such as C++ new, C# new, etc). a. 32…

0

Visual Sorting Algorithms part II

In the days before the internet, email and cell phones: My ice hockey team was in the locker room talking about skating when the topic of a video showing me roller staking in Boston in 1980. https://www.youtube.com/watch?v=IxlV_lOLmrk see Visual Sorting Part I Below is the new version that uses a background thread to do the…

0

Visual Sorting Part 1

Remember the days before the internet?   I have a collection of hundreds of programs that I wrote in the early 1980’s using the DeSmet C compiler. This is way before the internet age. My machine of choice was an IBM PC with 4.77 MHz 16 bit processor and 256K Ram, dual floppy disks, running…

0

Use C++ to show memory use in an Excel Pivot table

(apologies for the formatting: The MSDN blog infrastructure has changed and some tools aren’t working yet) The CComDispatchDriver class is very useful, but it doesn’t work too well with Excel. It makes it easier to call many Automation interfaces (IDispatch). PropertyGet and PropertyPut, Invoke Method You can see the typedef of CComDispatchDriver in typedef CComQIPtr<IDispatch,…

0

Create a Concordance for a Word Document from C# using Automation

I was talking to my son about some of his homework assignments. He had to write several essays. We talked about the power of Microsoft Word and how I had to count the words manually when writing a 5000 word essay on a typewriter, but Word shows the word count easily. Then we talked about…

1

Use C++ and no managed code to create a WPF form

In Use the power of Reflection to create and manipulate managed objects I showed how to create a WPF form with a StackPanel, Button and Textbox from a C# console app, using reflection. The code adds text to the textbox and sets some properties on it. Using reflection works, but makes the code 5 time…

0

Use the power of Reflection to create and manipulate managed objects

When you create a Windows Presentation Foundation (WPF) project in Visual Studio, references to WPF libraries, like PresentationFrameworks.dll, PresentationCore.dll, WindowsBase.dll, are automatically added, from which you can create types and invoke members. That makes the code to create a couple controls and show them in a window quite simple. (A WPF application already creates a…

0

Big numbers

When I first started learning about numbers I remember marveling at what infinity means. How many integers are there? Are there more real numbers than integers? How many numbers are there between zero and 1? Then I remember thinking about how these numbers get to be so big… so many digits. Then I started playing…

0

Drawing old playing card images for bridge

About 11 years ago I wrote a blog about Contract bridge card distributions. When you play bridge, with a normal 52 card deck, it helps to know about how often a particular suit distribution might occur. For example, if you and your partner have 9 Spades, then the opponent’s spade holding of 4 spades might…

1