But recently I've been working on a new commercial (non-game) project, which may end up being quite lucrative (I hope).
Anyway, I'm back on win32 C coding with MingW.
So far my observations have been:
- Using COM in C with MingW is awkward
- In the win32 shell, redirecting stdout to a file, causes the file to be "unix2dos'd" - and there's NOTHING you can do about it (read: not binary safe, whatsoever)
- What works in an exe from the command line, does not work in CGI necessarily, and it's difficult to figure out why.
I'm calling a COM API. It's working fine, I can run my program from the command-line, and the right thing happens.
I do the same thing in a cgi program (the same exe), and it doesn't work. The error code is not helpful.
- A permissions problem (Not as far as I can tell using ntfilemon to check file accesses)
- Some env variable set wrong (nonexistent temp dir)? seems ok so far
- It just decided it doesn't feel like it
I shall have to investigate later. Perhaps the user ID that the web server (currently IIS, but hopefully Apache ultimately, when I get around to installing it (I hate IIS)) is running under, doesn't have rights to something that the API requires.