Fatal error 0x8000FFFF when using a COM server

Our application needs to talk to quite a few other applications. Recently I replaced the existing DDE based interface with a COM based one. The vendor of the other application provides a COM server that controls their application and passes data back and forth. My first attempt in Visual FoxPro looked like this

loClient = CREATEOBJECT("Acme.Client")

Set o = CreateObject("Acme.Client")
msgbox o.acmeConnect("App")

Same error here. But who uses VB Script, anyway? Next in C:

var x = new Acme3Client.Client();
var n = x.acmeConnect("App");

Surprisingly, I got the same error. The control ships with a sample application written in C++ in which the COM server works. Unfortunately, the sample application is just a compiled EXE. So, next I tried this in C++ with ATL:

int _tmain(int argc, _TCHAR* argv[])
using namespace Acme3Client;
IClientPtr px("Acme.Client");
return 0;

I wasn't willing to see yet another 0x8000FFFF exception, but my computer didn't ask me. As a last attempt I tried to use the COM server in an MFC application:

CAcmeClient *p = new CAcmeClient();

Finally, I got a different error message. MFC fired an assertion because a window handle was NULL. This lead to the solution: Contrary to what the documentation states, this COM server can only be used by adding it as an ActiveX control to the form. A better error message would have pointed me in the right direction much earlier.