I have resolved the issue finally with the following changes to the code given.. What I found was the DISP_FUNCTION usage couldn't exactly trace the id of the method..Instead when I used DISP_FUNCTION_ID, it started working..I have noticed that the DISP_FUNCTION_ID call having a parameter option to pass dispid of the method as well..Not sure why the DISP_FUNCTION couldn't work but anyhow my issue got resolved with DISP_FUNCTION_ID.. Similarly in the .h file I have changed 30L to just 30. Rest all are same.. //changed part of the code in testpgm.cpp DISP_FUNCTION_ID(testcontrl, "newmethod",dispidnewmethod, newmethod, VT_BOOL, VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR) //changed part in testpgm.h : public: enum{ dispidnewmethod = 30, .. Thanks,
SoftwareDeveloper(.NET)