#include "windows.h" #import "c:\fox\test\myserver.tlb" //use the full path to the server tlb int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR , int) { using namespace myserver; //use the myserver namespace ImyclassPtr pmyclass; // declare a smart ptr to the server CoInitialize(0); // initialize COM pmyclass.CreateInstance("myserver.myclass"); //create an instance _variant_t myvar, vresult; // declare 2 variant variables. _bstr_t res; // declare a bstr variable myvar = "version(1)"; // assign the variable vresult = pmyclass->myeval(&myvar); //invoke the method res = vresult.bstrVal; // get the Unicode result MessageBox(0,(char *)res,"",0); //show it pmyclass = 0; // release the server CoUninitialize(); //uninitialize COM return 0; }>Hi