error MIDL2020 : error generating type library : LayOut failed

If you get an error like this, chances are that your MIDL compiler is too old. Try using a more recent one by downloading a recent platform SDK. If you are still using Visual C++ 6.0 look at this post for the last compatible PSDK.