Mingw does not have required headers. Maybe you could copy structure definitions from Microsoft headers.
I recommend you to use Visual Studio for COM programming.
Well, all header files should be included in the Windows SDK, even the COM ones. You could download and install the latest SDK and configure Code::Blocks to use these.
But you should post the errors anyway to ensure you get proper replies.