• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Using drive path either local or mapped is intermittent

Community Beginner ,
Nov 08, 2016 Nov 08, 2016

Copy link to clipboard

Copied

Howdy,

When calling Webhelp from a C++ application running on windows 7 using a drive path works sometimes and sometimes not.

When using a web server it works rock solid.

Here's the samples;

CString s_help_server = "file:///z:/webhelp/wlib9_2hlp.htm>Window"; //mapped drive file based intermittent

CString s_help_server = "c:/inetpub/wwwroot/webhelp/wlib9_2hlp.htm>Window"; //file based intermittent

CString s_help_server = "http://TANK_2005/webhelp/wlib9_2hlp.htm>Window"; //web based solid

CString s_help_server = "http://localhost/webhelp/wlib9_2hlp.htm>Window"; //web based solid local computer

We really would like it to work with a mapped drive solidly,

We updated to RH11 and also are using the CSH_API that came with that.

Appreciate any help or insights.

Thanks,

Jim

Views

636

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Dec 05, 2016 Dec 05, 2016

Howdy again,

Your test application doesn't open the default browser but always IE. I suspect it's doing what the RoboHelp_CSH.cpp and RoboHelp_CSH.h files do and open the Internet Explorer web control.

We're not using those files/ C++ API anymore.

I got this from the Microsoft Site and it seems to work pretty well here to launch IE using the web control IWebBrowser2, tried ShellExecute and some other methods, but this works solid; https://msdn.microsoft.com/en-us/library/aa752127(v=vs.85).aspx

Votes

Translate

Translate
Community Expert ,
Nov 08, 2016 Nov 08, 2016

Copy link to clipboard

Copied

No solution for you, but does it misbehave if you use a UNC path instead of the mapped drive?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 08, 2016 Nov 08, 2016

Copy link to clipboard

Copied

Unfortunately it does the same misbehavior with a UNC path.

CString s_help_server = "//TANK_2005/xfer/webhelp/wlib9_2hlp.htm>Window";

That was a good idea to try, appreciate the input...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 08, 2016 Nov 08, 2016

Copy link to clipboard

Copied

I was thinking more like (hope this comes through):

CString s_help_server = "file://c/inetpub/wwwroot/webhelp/wlib9_2hlp.htm>Window";

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 08, 2016 Nov 08, 2016

Copy link to clipboard

Copied

TANK_2005 is another machine, xfer is a drive share and using this does the same misbehavior;

CString s_help_server = "file://TANK_2005/xfer/webhelp/wlib9_2hlp.htm>Window";

Using the local path, on first attempt it doesn't launch, on second attempt it hangs the application in hour glass / spinning circle mode a minute or so, then additional attempts never launch help, so that's different...

CString s_help_server = "file://c/inetpub/wwwroot/webhelp/wlib9_2hlp.htm>Window";

This is the same misbehavior, being intermittent...

CString s_help_server = "file://c:/inetpub/wwwroot/webhelp/wlib9_2hlp.htm>Window";

as is this;

CString s_help_server = "file:///c:/inetpub/wwwroot/webhelp/wlib9_2hlp.htm>Window";

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 10, 2016 Nov 10, 2016

Copy link to clipboard

Copied

Well, I'm 98.6% sure it's not the syntax, I've tried every UNC combination possible and all get the same results.

I do see a pattern now, when using a drive path when calling RH_ShowHelp;

---Fails on first attempt

---Works on Second attempt

---Fails on all additional attempts

I've been setting some stop points in RoboHelp_CSH.cpp.

I put a stopper on s_pAxWin->QueryControl(IID_IWebBrowser2, (LPVOID FAR*)&pBrowser); highlighted below. I see this pattern also;

---It hits there only once on first attempt

---Hits there 5 times on second attempt

---Then never gets back there on additional attempts.

When using a web server path it ;

---Hits there 5 times every-time and works every-time.

IWebBrowser2* GetBrowser()

{

IWebBrowser2 *pBrowser = NULL;

// If the caller already initialize COM, please comment out the next 5 lines.

/*

if (!gbCoInited)

{

::CoInitialize(NULL);

gbCoInited=1;

}

*/

if (!s_pAxWin)

{

AtlAxWinInit();

s_pAxWin = new CAxWindow;

RECT rect;

rect.left = rect.top = 0;

rect.bottom = rect.right = 0;

rect.right = 200;

rect.bottom = 200;

s_pAxWin->Create(::GetDesktopWindow(), &rect, NULL, WS_CHILD);

s_pAxWin->CreateControl(L"{8856F961-340A-11D0-A96B-00C04FD705A2}");

}

if (s_pAxWin)

{

s_pAxWin->QueryControl(IID_IWebBrowser2, (LPVOID FAR*)&pBrowser);

}

return pBrowser;

}

Been trying to find out what is causing that, but no luck yet.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 11, 2016 Nov 11, 2016

Copy link to clipboard

Copied

There aren't many developers here, so we might not be able to help with the code.

How do you launch the browser? There is a difference in how browsers handle local files and files over HTTP. For local files, you can't just parse additional parameters after the filename. That confuses the browser. And IE won't open at all: you'll just get an error.

If you exclude the >Window from the call, does it behave then?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 11, 2016 Nov 11, 2016

Copy link to clipboard

Copied

Yes, tried with and without >Window many times.

We are using the Robohelp API for C++ supplied with Robohelp. The code below is from the supplied RoboHelp_CSH.cpp file.

Here's our simple code to call RoboHelp.

//CString s_help_server = "file:///z:/webhelp/wlib9_2hlp.htm>Window"; //file based intermittent

//CString s_help_server = "c:/inetpub/wwwroot/webhelp/wlib9_2hlp.htm>Window"; //file based intermittent

//CString s_help_server = "http://TANK_2005/webhelp/wlib9_2hlp.htm>Window"; //web based solid

//CString s_help_server = "http://localhost/webhelp/wlib9_2hlp.htm>Window"; //web based solid local computer

CString s_help_server = "z:/webhelp/wlib9_2hlp.htm "; //latest attempted file path

int d = RH_ShowHelp(pMainWnd->m_hWnd, s_help_server, HH_DISPLAY_INDEX, NULL);

The green lines with // starting them are comments. That last line is the call to Robohelp.

It doesn't make sense that the calling code is problematic but something in RoboHelp_CSH.cpp or RoboHelp_CSH.h files where RH_ShowHelp() is defined -or- ?

Using C++.NET and the API supplied it makes an Active X Microsoft Web control on the fly, here's what it looks like when it works

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 18, 2016 Nov 18, 2016

Copy link to clipboard

Copied

Did you try to attach a screen shot? It didn't come through. You can only add images through the web interface, not by replying email.

I don't know C++ and I don't know how the API works. Is it possible to open the URI in a browser? Does that give you the same results?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 21, 2016 Nov 21, 2016

Copy link to clipboard

Copied

Here is the picture I tried to attach via email.  Notice how the API makes a browser control on the fly...

michele.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 28, 2016 Nov 28, 2016

Copy link to clipboard

Copied

I'm not a programmer, so debugging browser controls goes over my head.

What happens if you open the help in a browser instead of letting the API handle it? Do you then get the same results? You can use my CSH tester to test the different scenario's: http://www.wvanweelden.eu/sites/default/files/attachments/webhelp_api_csharp.zip

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 29, 2016 Nov 29, 2016

Copy link to clipboard

Copied

Thanks,

Your testing tool works fine. I can bring up a file based URL in the browser every time with it, ie;

file:///y:/wlib9_2hlp.htm#<id=1902>>newwnd=false

file:///y:/wlib9_2hlp.htm#<id=2035>>newwnd=false

file:///y:/wlib9_2hlp.htm#<cmd=toc>>newwnd=false

file:///y:/wlib9_2hlp.htm#<cmd=idx>>newwnd=false

The code in the API folder in your zip file shows how to make the URL, the code behind the Generate CSH URL button.

Do you also have the code behind the Show Help button that launches IE? <file:///y:/wlib9_2hlp.htm#<cmd=toc>>newwnd=false>

<file:///y:/wlib9_2hlp.htm#<cmd=toc>>newwnd=false>

Really appreciate your help...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 02, 2016 Dec 02, 2016

Copy link to clipboard

Copied

I'm not sure if I still have the source code lying around. But in short, it just does a file open command on the generated URL. That opens the URL in the system's default browser.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 05, 2016 Dec 05, 2016

Copy link to clipboard

Copied

LATEST

Howdy again,

Your test application doesn't open the default browser but always IE. I suspect it's doing what the RoboHelp_CSH.cpp and RoboHelp_CSH.h files do and open the Internet Explorer web control.

We're not using those files/ C++ API anymore.

I got this from the Microsoft Site and it seems to work pretty well here to launch IE using the web control IWebBrowser2, tried ShellExecute and some other methods, but this works solid; https://msdn.microsoft.com/en-us/library/aa752127(v=vs.85).aspx

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp