Cannot open include file: ‘metahost.h’: No such file or directory

You might upgrade your Visual Studio Project to VS 2017 and you might get errors like: 1>c:\memspect\vsassert\pch.h(20): fatal error C1083: Cannot open include file: ‘metahost.h’: No such file or directory On  machine with an older version of Visual Studio, I found metahost.h at: c:\Program Files (x86)\Windows Kits\8.1\Include\um\metahost.h Looking at the file, I see that there…

0

Faster monkeys

Last time I showed how to simulate monkeys typing on typewriters, using letter frequencies based on input text, like Hamlet’s soliloquy. The results were remarkably similar to the input text, but the output was relatively slow. Below is a version that has the “Optimum” option that outputs much faster if the “-o” command line parameter…

0

More Shakespearean Monkeys

  While I was in high school, I attended a lecture at Yale University in 1974 about monkeys at a typewriter by William R. Bennet, Jr, one of the inventors of the helium-neon laser. Quote: He was also frequently seen at various sites around the Yale campus collecting data for his popular course on “The…

0

It’s easy to use Windows Hooks, even from C#

Microsoft Windows is based on showing windows of data to the user (duh). An application can create windows with which to interact with the user. Every window has a Window Handle, which is used just like an ID number. The Windows OS communicates with the application windows via Windows Messages. For example, when you type…

0

Automatically open Visual Studio Projects and Solutions using IMessageFilter

I wanted to learn more about what an IMessageFilter is and how it behaves. So I wanted to have some sample code that used it to demonstrate its behavior. So I wrote a program that starts Visual Studio, calls some properties and methods (like Get Version and MainWindow.Activate)  and then opens a solution of one…

0

Memory use of Dynamically expanding TreeView

I created a tool a few years ago that uses a WPF TreeView with huge numbers of nodes. The branching factor is pretty high (the number of branches per level), and the depth can be several hundred levels. Of course, creating the whole tree would consume huge amounts of memory and processing time. This is…

0

Use gravity to generate Cartoon animation frames

I wrote a cartoon animation program around 1982 in C. The Honolulu Academy of Arts asked me to demo the program in their Focus on Computer Graphics. The program allows the user to draw lines of a cartoon frame using the mouse. The user then saves that frame and draws another. To animate, the program…

1

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….

1

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