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 structurehr = 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!