InfopathEditor as an ActiveX component (C++) - InfoPath Dev
in

InfoPath Dev

InfopathEditor as an ActiveX component (C++)

Last post 03-19-2008 06:20 AM by pk_toor. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 03-19-2008 06:20 AM

    InfopathEditor as an ActiveX component (C++)

    New to Infopath. I have a MFC application and i want to view and edit Forms in a dialog. 

    I have loaded the IInfoPathEditor Object onto my toolbar. Dropped it into my CDialog and generated a wrapper class for it. I am experiencing some plroblems when opening the dialog and when trying to load a form (Done via the OnBnClickedButton1 method see below).

    void WorkRequestDetailsDlg::OnBnClickedButton1()

    {

    HRESULT hr = S_OK;

    OPENFILENAME ofn; // common dialog box structure

    hr = OpenFileDialog("Select XML File", &ofn, "All\0*.*\0XML files\0*.xml\0");

    if (FAILED(hr))

    return;

    // Open a form based on the solution.

    m_infopathEditor.NewFromSolution(ofn.lpstrFile);

    }

    When opening the dialog this error occurs:

    occsite.cpp line 853. The

    ASSERT(!IsEqualIID(*piid, GUID_NULL)); has failed

     

    if (SUCCEEDED(m_pObject->QueryInterface(IID_IProvideClassInfo2,

    (LPVOID*)&pPCI2)))

    {

    ASSERT(pPCI2 != NULL);

    if (SUCCEEDED(pPCI2->GetGUID(GUIDKIND_DEFAULT_SOURCE_DISP_IID, piid)))

    ASSERT(!IsEqualIID(*piid, GUID_NULL));

    else

    ASSERT(IsEqualIID(*piid, GUID_NULL));

    pPCI2->Release();

    }

     

    Then when i try opening a form the following error occurs "Library not registered". I dont know which library its looking for.

     

    Please help!

    Filed under:
Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.