after successful coInitialize and cocreateinstance (COM server registration is perfect).. When i access a method in class it returns the error:
"First-chance exception in XYZ.exe (OLEAUT32.DLL): 0xC0000005: Access Violation".

By step by step debugging i found it gives this error while calling 

```
// make the call
SCODE sc = m_lpDispatch->Invoke(dwDispID, IID_NULL, 0, wFlags, &dispparams, pvarResult, &excepInfo, &nArgErr);

```

in OLEDIST2.CPP file.

please help