See the question and my original answer on StackOverflow

Let's say your StatConnectorSrv.tlb contains an interface ISomething with a MyMethod method, and a coclass Something, then you would instantiate it like this:

#import "C:\Program Files (x86)\statconn\DCOM\bin\StatConnectorSrv.tlb"
using namespace STATCONNECTORSRVLib;

int _tmain(int argc, _TCHAR* argv[])
{
    CoInitialize(NULL);

    ISomethingPtr ptr(__uuidof(Something)); // create an instance of the Something coclass and get an ISomething pointer back
    ptr->MyMethod(parameters of the method);

    CoUninitialize();
    return 0;
}