I did some research and I think that this means 'class is missing'. However, I followed all the steps in the link, placing the #include "SmsMsgAPI.h", #include "SmsMsgAPI_i.c". However, I did not register the smsmsgapi.dll using regsvr32.
The reason I did not was because I am running this code in a Windows Pre-Installation Environment 64-bit. I tried to register it but it failed because it does not have 32 bit support.
Do you think that this is why the CoCreateInstance returns that error code?
Yes, that seems to be the problem. Thank you for confirming.
What I did was create another Win PE, but this time, 32 bit version, since the needed dll file (smsmsgapi.dll) was for 32 bit. I then registered the smsmsgapi.dll in it and it finally works around that part.
Bookmarks