Update version to v0.40.12
Add main windows globals.
Run the automated struct size check.