http://keeper.lubie.org/html/dk_keeperfx_older.php
At the time I found this, 0.40 was the latest version.
Alright, I've created the file you need for kfxmcc to work with the version of KeeperFX you listed.
Unfortunately, I couldn't test it. KeeperFX 0.40 crashes for me, but it should work.
locations.ini
You need to replace the original locations.ini where you put kfxmcc with this one.
Normally I would suggest that the kfxmcc folder be extracted into the KeeperFX folder.
It will work elsewhere, but it was designed to be placed here.
If you have done this, locations.ini will be in "KeeperFX\kfxmcc\data".
Make sure when you use kfxmcc, that you choose version 0.40 and not 0.41!
Otherwise it will just mangle your KeeperFX exe and dll files.
Good luck.
I just had a hunch. I made a copy of my KeeperFX and marked all the files in KeeperFX\data as read only.
This gave me the same error code you got.
Make sure that these files are not read only
KeeperFX\data\cube.dat
KeeperFX\data\alpha.col
Hope this helps.
Yea, it sounds like KeeperFX copies the data from the Dungeon Keeper CD when you install it and keeps it as read only.
You can probably solve this by going with a fresh KeeperFX install and once it copies the files from the Dungeon Keeper CD, go into the KeeperFX directory and turn off read-only on the data directory and all it's files.
I don't have this problem myself, because I use an installed version of the original Dungeon Keeper and not the CD.
Also, I think changing keeper colors and then loading an old save game from before the color change has some side effects, so I would suggest a new game or level skip.
I hope this help and have fun!