I have a button, behind that button i created a thread,
void FunctionCallingThreadFunction()
{
AfxBeginThread(MyFunction, NULL);
}
In MyFunction i am creating a COM object, but when I create instance of it, null is returned to me,
MyFunction(LPVOID pvParam)
{
comObject.CreateInstance(__uuidof(ClassName), NULL, CLSCTX_INPROC_SERVER);
}
But if i create this comObject in origional function it is created fine,
what is problem?,