MS Word Automation
//Invoke the Quit method
szFunction = OLESTR("Quit");
hr = m_spApp->GetIDsOfNames(IID_NULL, &szFunction, 1,
LOCALE_USER_DEFAULT, &dispid_Quit);
hr = m_spApp->Invoke(dispid_Quit, IID_NULL, LOCALE_USER_DEFAULT,
DISPATCH_METHOD, &dpNoArgs, NULL, NULL, NULL);
I am not sure what the problem is. I found an article on MSDN that has this exact same code. So why would the Invoke GPF? Could it be that I am missing the Release statements (m_spApp->Release)? I modeled my dll after the example in the article "Building an Office2K COM addin with VC++/ATL" so m_spApp is actually a private member in the .h file. HELP!

