class CoOcrEnginge : public IUnknown {
public:
  STDMETHODIMP QueryInterface(REFIIF iid, void **);
  STDMETHODIMP_(ULONG) Addref();
  STDMETHODIMP_(ULONG) Release();

  //Implementation of the IOcvs interface
  class CIOcr: public IOcr {
  public:
    CoOcrEngine * m_pHost; //points back to host

    LONG m_lInterfaceLevelRefCount;

    STDMETHODIMP QueryInterface(REFIIF iid, void **);
    STDMETHODIMP_(ULONG) Addref();
    STDMETHODIMP_(ULONG) Release();

    STDMETHODIMP OCrImage(long lImageSize, byte * pbImage,
                          wchar_t **pwszOcrtext);
    STDMETHODIMP OcrZone(long lImageSize, byte * pbImage,
                         Zone zone, wchar_t ** pwszOcrtext);
  } m_IOcr;

  class CISpell : public ISpell {
  public:
    CoOcrEngine * m_pHost; //points back to host

    LONG m_lInterfaceLevelRefCount;

    STDMETHODIMP QueryInterface(REFIIF iid, void **);
    STDMETHODIMP_(ULONG) Addref();
    STDMETHODIMP_(ULONG) Release();

    STDMETHODIMP Check(wchar_t * pwszWord, PossibleWords *pWords);
  } mISpell;
public:
  LONG m_lRefCount;
};