Skip to main content
June 19, 2010
Question

Integration with .Net Web application in RoboHelp

  • June 19, 2010
  • 1 reply
  • 800 views

Hi all:

       I was trying to integrate the .net web application with robohelp. I tried calling the helpfile generated using robohelp.

RH_ShowWebHelp

method was used to call .

It internally called

private bool ShowHelpURL(string strURL)

method.

But i am getting an error

ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current thread is not in a single-threaded apartment.

WebBrowser m_browser = new WebBrowser();

if (m_browser != null)

{

m_browser.Navigate(strURL);

m_browser.Visible =

true;

return true;

}

return false;

is giving issue because mine is webapplication. the solution they say is add STTHREAD section.

Can anybody guide me in proper  direction in integrating the .Net web application with robohelp.

This topic has been closed for replies.

1 reply

Participant
April 16, 2014

Ran into the same issue. Here is the solution I found

     protected void btnHelp_Click(object sender, EventArgs e)

        {

            OrderIt.Common.Utilities.RoboHelpAPI.CSH_API helpApi = new CSH_API();

            Thread thread = new Thread(new ThreadStart(STAOparation));

            thread.SetApartmentState(ApartmentState.STA);

            thread.Start();

            thread.Join();

        }

        public void STAOparation()

        {

            RoboHelpAPI.CSH_API helpApi = new CSH_API();

            helpApi.RH_ShowLocalHelp(0, "http://localhost:4606/help/WebHelp/index.htm", OptionConstants.CSH_DISPLAY_CONTEXT, "1");

        }