I've had a similar problem and it was due to a drive mapping anomoly.
If you have a command line argument to load the IDAPI.CFG file, and that file is on a network drive; or, if the default IDAPI file is on the network, this error may occur.
You're supposed to get a "can't load configuration file" dialog, but I don't when this error occurs. What fixed it for us was to use explorer to browse to the idapi file, then simply close explorer. It's almost as if Windows sort of needs a reminder of the drive mapping.
In our case the network server in question was Netware, and the problem manifested after a re-boot of the server (it had been up for over two years without a re-boot).